15 Nov, 2016

1 commit

  • This patch fixes the lockdep warning below

    DEBUG_LOCKS_WARN_ON(irqs_disabled_flags(flags))
    ------------[ cut here ]------------
    WARNING: CPU: 1 PID: 1 at linux-next/kernel/locking/lockdep.c:2876 lockdep_trace_alloc+0xe0/0xf0
    Modules linked in:

    CPU: 1 PID: 1 Comm: swapper/0 Not tainted 4.8.0-11756-g86c5152 #46
    ...
    Call trace:
    Exception stack(0xffff8007da837890 to 0xffff8007da8379c0)
    7880: ffff8007da834000 0001000000000000
    78a0: ffff8007da837a70 ffff0000081111a0 00000000600000c5 000000000000003d
    78c0: 9374bc6a7f3c7832 0000000000381878 ffff000009db7ab8 000000000000002f
    78e0: ffff00000811aabc ffff000008be2548 ffff8007da837990 ffff00000811adf8
    7900: ffff8007da834000 00000000024080c0 00000000000000c0 ffff000009021000
    7920: 0000000000000000 0000000000000000 ffff000008c8f7c8 ffff8007da579810
    7940: 000000000000002f ffff8007da858000 0000000000000000 0000000000000001
    7960: 0000000000000001 0000000000000000 ffff00000811a468 0000000000000002
    7980: 656c62617369645f 0000000000038187 00000000000000ee ffff8007da837850
    79a0: ffff000009db50c0 ffff000009db569d 0000000000000006 ffff000089db568f
    [] lockdep_trace_alloc+0xe0/0xf0
    [] __kmalloc_track_caller+0x50/0x250
    [] devres_alloc_node+0x28/0x60
    [] devm_request_threaded_irq+0x50/0xe0
    [] pcc_mbox_request_channel+0x110/0x170
    [] acpi_cppc_processor_probe+0x264/0x414
    [] __acpi_processor_start+0x28/0xa0
    [] acpi_processor_start+0x44/0x54
    [] driver_probe_device+0x1fc/0x2b0
    [] __driver_attach+0xb4/0xc0
    [] bus_for_each_dev+0x5c/0xa0
    [] driver_attach+0x20/0x30
    [] bus_add_driver+0x110/0x230
    [] driver_register+0x60/0x100
    [] acpi_processor_driver_init+0x2c/0xb0
    [] do_one_initcall+0x38/0x130
    [] kernel_init_freeable+0x210/0x2b4
    [] kernel_init+0x10/0x110
    [] ret_from_fork+0x10/0x50

    It's because the spinlock inside pcc_mbox_request_channel() is
    kept too long. This patch releases spinlock before request_irq()
    and free_irq() to fix this issue as spinlock is only needed to
    protect the channel data.

    Signed-off-by: Hoan Tran
    Reviewed-by: Prashanth Prakash
    Signed-off-by: Rafael J. Wysocki

    Hoan Tran
     

07 Oct, 2016

1 commit


02 Oct, 2016

1 commit

  • * acpi-x86:
    x86: ACPI: make variable names clearer in acpi_parse_madt_lapic_entries()
    x86: ACPI: remove extraneous white space after semicolon

    * acpi-cppc:
    ACPI / CPPC: Support PCC with interrupt flag
    ACPI / CPPC: Add prefix cppc to cpudata structure name
    ACPI / CPPC: Add support for functional fixed hardware address
    ACPI / CPPC: Don't return on CPPC probe failure
    ACPI / CPPC: Allow build with ACPI_CPU_FREQ_PSS config
    ACPI / CPPC: check for error bit in PCC status field
    ACPI / CPPC: move all PCC related information into pcc_data
    ACPI / CPPC: add sysfs support to compute delivered performance
    ACPI / CPPC: set a non-zero value for transition_latency
    ACPI / CPPC: support for batching CPPC requests
    ACPI / CPPC: acquire pcc_lock only while accessing PCC subspace
    ACPI / CPPC: restructure read/writes for efficient sys mapped reg ops
    mailbox: pcc: Support HW-Reduced Communication Subspace type 2

    * acpi-soc:
    ACPI / APD: constify local structures
    ACPI / APD: Add device HID for Vulcan SPI controller

    Rafael J. Wysocki
     

07 Sep, 2016

1 commit


31 Aug, 2016

1 commit

  • ACPI 6.1 has a PCC HW-Reduced Communication Subspace type 2 intended for
    use on HW-Reduce ACPI Platform, which requires read-modify-write sequence
    to acknowledge doorbell interrupt. This patch provides the implementation
    for the Communication Subspace Type 2.

    Signed-off-by: Hoan Tran
    Reviewed-by: Prashanth Prakash
    Signed-off-by: Rafael J. Wysocki

    hotran
     

29 Aug, 2016

3 commits


28 Jul, 2016

2 commits


24 Jun, 2016

1 commit

  • The use of __raw IO accesors is not endian safe and should be used
    sparingly. The relaxed variants should be as lightweight and also
    are endian safe.

    Note, this has not been run-time tested.

    Signed-off-by: Ben Dooks
    Acked-by: Rob Herring
    Signed-off-by: Jassi Brar

    Ben Dooks
     

12 Jun, 2016

1 commit

  • tdev->signal is not set NULL after it's freed. This will cause random
    exceptions when the stale pointer is accessed after tdev->signal is
    freed. Also, since tdev->signal allocation is skipped the next time
    it's written, this leads to continuous fault finally leading to the
    total death of the system.

    Fixes: d1c2f87c9a8f ("mailbox: mailbox-test: Prevent memory leak")
    Signed-off-by: Sudeep Holla
    Acked-by: Lee Jones
    Signed-off-by: Jassi Brar

    Sudeep Holla
     

09 May, 2016

1 commit


26 Apr, 2016

8 commits

  • The omap_mbox_save_ctx() and omap_mbox_restore_ctx() API were
    previously provided to OMAP mailbox clients to save and restore
    the mailbox context during system suspend/resume. The save and
    restore functionality is now implemented through System PM driver
    callbacks, and there is no need for these functions, so kill these
    API.

    Signed-off-by: Suman Anna
    Signed-off-by: Jassi Brar

    Suman Anna
     
  • The OMAP mailbox driver is used by clients to communicate with remote
    processors in general. The mailbox clients are expected to have stopped
    communicating with these remote processors during a system suspend. The
    OMAP mailbox fifos are expected to not have any messages as such. Add a
    check for any pending unprocessed messages in the suspend callback, to
    detect any communication protocol issues of the mailbox clients. The
    system suspend is aborted if any messages are found.

    Signed-off-by: Suman Anna
    Signed-off-by: Jassi Brar

    Suman Anna
     
  • Support has been added to the OMAP mailbox driver to allow it
    to work across a system suspend/resume. The OMAP mailbox driver
    requires only the interrupt configuration registers to be saved
    and restored, and this is done in the suspend/resume callbacks.
    The registers need to be saved only if there are active clients
    at the time of suspend. The enabling and disabling of the mailbox
    clocks is done automatically by the omap_device layer.

    Signed-off-by: Suman Anna
    Signed-off-by: Jassi Brar

    Suman Anna
     
  • The interrupt type used for identifying the layout of the interrupt
    configuration registers between OMAP4+ SoCs and older SoCs is stored
    only in the sub-mailbox structures for easier access. Store this type
    in the the omap_mbox_device structure as well along with the other
    global variables. This is being done to facilitate the context save
    and restore of appropriate registers during system suspend/resume.

    Signed-off-by: Suman Anna
    Signed-off-by: Jassi Brar

    Suman Anna
     
  • Fix couple of checkpatch warnings of the type,
    "WARNING: Missing a blank line after declarations"

    Also, fixed a warning about a space after a typecast
    while at this.

    Signed-off-by: Suman Anna
    Signed-off-by: Jassi Brar

    Suman Anna
     
  • Remove the paragraph about writing to the Free Software
    Foundation's mailing address from the GPL license header
    as this address can change. This fixes the corresponding
    checkpatch warning.

    Signed-off-by: Suman Anna
    Signed-off-by: Jassi Brar

    Suman Anna
     
  • Fix the code formatting to use the kernel preferred style
    of using the actual variables to determize the size using
    the sizeof() operator. This fixes the corresponding checkpatch
    warning as well.

    Signed-off-by: Suman Anna
    Signed-off-by: Jassi Brar

    Suman Anna
     
  • OMAP mailbox devices can no longer be created in legacy non-DT
    mode, all the relevant code has been cleaned up. The OMAP mailbox
    driver will only support devices created from DT going forward,
    so drop the legacy platform device support from the driver.

    Signed-off-by: Suman Anna
    Signed-off-by: Jassi Brar

    Suman Anna
     

15 Apr, 2016

1 commit

  • Pull mailbox fixes from Jussi Brar:
    "Misc fixes:

    mailbox-test driver:
    - prevent memory leak and another cosmetic change

    mailbox:
    - change the returned error code

    Xgene driver:
    - return -ENOMEM instead of PTR_ERR for failed devm_kzalloc"

    * 'mailbox-devel' of git://git.linaro.org/landing-teams/working/fujitsu/integration:
    mailbox: Stop using ENOSYS for anything other than unimplemented syscalls
    mailbox: mailbox-test: Prevent memory leak
    mailbox: mailbox-test: Use more consistent format for calling copy_from_user()
    mailbox: xgene-slimpro: Fix wrong test for devm_kzalloc

    Linus Torvalds
     

12 Apr, 2016

3 commits


09 Apr, 2016

1 commit

  • * pm-cpufreq:
    cpufreq: dt: Drop stale comment
    cpufreq: intel_pstate: Documenation for structures
    cpufreq: intel_pstate: fix inconsistency in setting policy limits
    intel_pstate: Avoid extra invocation of intel_pstate_sample()
    intel_pstate: Do not set utilization update hook too early

    * pm-cpuidle:
    intel_idle: Add KBL support
    intel_idle: Add SKX support
    intel_idle: Clean up all registered devices on exit.
    intel_idle: Propagate hot plug errors.
    intel_idle: Don't overreact to a cpuidle registration failure.
    intel_idle: Setup the timer broadcast only on successful driver load.
    intel_idle: Avoid a double free of the per-CPU data.
    intel_idle: Fix dangling registration on error path.
    intel_idle: Fix deallocation order on the driver exit path.
    intel_idle: Remove redundant initialization calls.
    intel_idle: Fix a helper function's return value.
    intel_idle: remove useless return from void function.

    * acpi-cppc:
    mailbox: pcc: Don't access an unmapped memory address space

    Rafael J. Wysocki
     

08 Apr, 2016

1 commit


07 Apr, 2016

1 commit

  • The acpi_pcc_probe() may end up accessing memory outside of the PCCT
    table space causing the kernel panic(). Increment the pcct_entry
    pointer after parsing 'HW-reduced Communications Subspace' to fix
    the problem. This change also enables the parsing of subtable at
    index 0.

    Signed-off-by: Shanker Donthineni
    Acked-by: Ashwin Chaugule
    Signed-off-by: Rafael J. Wysocki

    Shanker Donthineni
     

23 Mar, 2016

1 commit


21 Mar, 2016

2 commits

  • Support for TI Message Manager Module. This hardware block manages a
    bunch of hardware queues meant for communication between processor
    entities.

    Clients sitting on top of this would manage the required protocol
    for communicating with the counterpart entities.

    For more details on TI Message Manager hardware block, see documentation
    that will is available here: http://www.ti.com/lit/ug/spruhy8/spruhy8.pdf
    Chapter 8.1(Message Manager)

    Signed-off-by: Nishanth Menon
    Signed-off-by: Jassi Brar

    Nishanth Menon
     
  • Pull mailbox updates from Jassi Brar:

    - mailbox bindings and drivers for
    * APM X-Gene
    * Hisilicon Hi6220
    * Rockchip RK3368
    platforms

    - minor fixes to the above three drivers.

    - misc cleanups of mailbox-test driver.

    * 'mailbox-for-next' of git://git.linaro.org/landing-teams/working/fujitsu/integration:
    mailbox: rockchip: avoid 64-bit division
    mailbox: rockchip: Add Rockchip mailbox driver
    dt-bindings: rockchip-mailbox: Add mailbox controller document on Rockchip SoCs
    mailbox/xgene-slimpro: Checking for IS_ERR instead of NULL
    mailbox: Hi6220: add mailbox driver
    dt-bindings: mailbox: Document Hi6220 mailbox driver
    mailbox: mailbox-test: add support for separate tx/rx buffer with single channel
    mailbox: mailbox-test: use print_hex_dump_bytes to allow dynamic printk
    mailbox: mailbox-test: fix the compatible string
    mailbox: mailbox-test: rename driver as generic test driver
    Documentation: mailbox: Add APM X-Gene SLIMpro mailbox dts documentation
    mailbox: Add support for APM X-Gene platform mailbox driver

    Linus Torvalds
     

16 Mar, 2016

1 commit

  • The newly added rockchip mailbox driver causes a bug in
    the ARM allyesconfig build because of a division of a resource_size_t
    variable that may be 64 bit wide:

    drivers/mailbox/built-in.o: In function `rockchip_mbox_probe':
    :(.text+0x6614): undefined reference to `__aeabi_uldivmod'

    This adds a cast to size_t, which turns it into a 32-bit division
    in this case. This is safe because we know that we cannot possibly
    map a resource that is longer than what a pointer contains, and
    in practice it will be very short instead.

    Signed-off-by: Arnd Bergmann
    Signed-off-by: Jassi Brar

    Arnd Bergmann
     

14 Mar, 2016

1 commit

  • * acpi-processor:
    ACPI / sleep: move acpi_processor_sleep to sleep.c
    ACPI / processor : add support for ACPI0010 processor container
    ACPI / processor_idle: replace PREFIX with pr_fmt

    * acpi-cppc:
    ACPI / CPPC: use MRTT/MPAR to decide if/when a req can be sent
    ACPI / CPPC: replace writeX/readX to PCC with relaxed version
    mailbox: pcc: optimized pcc_send_data
    ACPI / CPPC: optimized cpc_read and cpc_write
    ACPI / CPPC: Optimize PCC Read Write operations

    Rafael J. Wysocki
     

11 Mar, 2016

1 commit

  • This driver is found on RK3368 SoCs.

    The Mailbox module is a simple APB peripheral that allows both
    the Cortex-A53 MCU system to communicate by writing operation to
    generate interrupt.
    The registers are accessible by both CPU via APB interface.

    The Mailbox has the following main features:

    1) Support dual-core system: Cortex-A53 and MCU.
    2) Support APB interface.
    3) Support four mailbox elements, each element includes one data word,
    one command word register and one flag bit that can represent
    one interrupt.
    4) Four interrupts to Cortex-A53.
    5) Four interrupts to MCU.
    6) Provide 32 lock registers for software to use to indicate whether
    mailbox is occupied.

    [Jassi: Removed unused variable buf_base]

    Signed-off-by: Caesar Wang
    Signed-off-by: Jassi Brar

    Caesar Wang
     

10 Mar, 2016

1 commit

  • pcc_send_data() can be invoked during the execution of performance
    critical code as in cppc_cpufreq driver. With acpi_* APIs, the
    doorbell register accessed in pcc_send_data() if present in system
    memory will be searched (in cached virt to phys addr mapping),
    mapped, read/written and then unmapped. These operations take
    significant amount of time.

    This patch maps the performance critical doorbell register
    during init and then reads/writes to it directly using the
    mapped virtual address. This patch + similar changes to CPPC
    acpi driver reduce the time per freq. transition from around
    200us to about 20us for the CPPC cpufreq driver

    Signed-off-by: Prashanth Prakash
    Acked-by: Ashwin Chaugule
    Signed-off-by: Rafael J. Wysocki

    Prakash, Prashanth
     

04 Mar, 2016

5 commits

  • devm_ioremap() returns NULL, it never returns an ERR_PTR.

    Fixes: f700e84f417b ('mailbox: Add support for APM X-Gene platform mailbox driver')
    Signed-off-by: Dan Carpenter
    Signed-off-by: Jassi Brar

    Dan Carpenter
     
  • Add driver for Hi6220 mailbox, the mailbox communicates with MCU; for
    sending data, it can support two methods for low level implementation:
    one is to use interrupt as acknowledge, another is automatic mode which
    without any acknowledge. These two methods have been supported in the
    driver. For receiving data, it will depend on the interrupt to notify
    the channel has incoming message.

    Now mailbox driver is used to send message to MCU to control dynamic
    voltage and frequency scaling for CPU, GPU and DDR.

    Signed-off-by: Leo Yan
    Signed-off-by: Jassi Brar

    Leo Yan
     
  • This patch adds support for different MMIO region for Tx and Rx paths.
    If only one region is specified, it's assumed to be shared between Rx
    and Tx, thereby retaining backward compatibility.

    Also in order to support single channel dealing with both Tx and Rx with
    dedicated MMIO regions, Tx channel itself is assigned to Rx if MMIO
    regions are different and Rx is not specified.

    Acked-by: Lee Jones
    Signed-off-by: Sudeep Holla
    Signed-off-by: Jassi Brar

    Sudeep Holla
     
  • Reduce the logging from info to debug. Also use print_hex_dump_bytes
    instead as it has support for dynamic printk providing options to
    conditionally enable/disable these logs.

    Cc: Lee Jones
    Signed-off-by: Sudeep Holla
    Signed-off-by: Jassi Brar

    Sudeep Holla
     
  • Underscores are usually forbidden in the compatible strings. So lets
    remove it before the first users of this is seen.

    Acked-by: Rob Herring
    Acked-by: Lee Jones
    Signed-off-by: Sudeep Holla
    Signed-off-by: Jassi Brar

    Sudeep Holla