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
     

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

6 commits


15 Feb, 2016

1 commit


02 Feb, 2016

2 commits

  • Not every arch has io memory.
    So, unbreak the build by fixing the dependencies.

    Signed-off-by: Richard Weinberger
    Signed-off-by: Jassi Brar

    Richard Weinberger
     
  • This patch fixes the calculation of pcc_chan for non-zero id.
    After the compiler ignores the (unsigned long) cast the
    pcc_mbox_channels pointer is type-cast and then the type-cast
    offset is added which results in address outside of the range
    leading to the kernel crashing.

    We might add braces and make it:

    pcc_chan = (struct mbox_chan *)
    ((unsigned long) pcc_mbox_channels +
    (id * sizeof(*pcc_chan)));

    but let's go with array approach here and use id as index.

    Tested on Juno board.

    Signed-off-by: Alexey Klimov
    Acked-by: Sudeep Holla
    Acked-by: Ashwin Chaugule
    Signed-off-by: Jassi Brar

    Alexey Klimov
     

30 Nov, 2015

1 commit


04 Nov, 2015

1 commit


27 Oct, 2015

1 commit


23 Oct, 2015

2 commits

  • The mailbox framework controls the transmission queue and requires
    either its controller implementations or clients to run the state
    machine for the Tx queue. The OMAP mailbox controller uses a Tx-ready
    interrupt as the equivalent of a Tx-done interrupt to run this Tx
    queue state-machine.

    The WkupM3 processor on AM33xx and AM43xx SoCs is used to offload
    certain PM tasks, like doing the necessary operations for Device
    PM suspend/resume or for entering lower c-states during cpuidle.

    The CPUIdle on AM33xx requires the messages to be sent without
    having to trigger the Tx-ready interrupts, as the interrupt
    would immediately terminate the CPUIdle operation. Support for
    this has been added by introducing a DT quirk, "ti,mbox-send-noirq"
    and using it to modify the normal OMAP mailbox controller behavior
    on the sub-mailboxes used to communicate with the WkupM3 remote
    processor. This also requires the wkup_m3_ipc driver to adjust
    its mailbox usage logic to run the Tx state machine.

    NOTE:
    - AM43xx does not communicate with WkupM3 for CPU Idle, so is
    not affected by this behavior. But, it uses the same IPC driver
    for PM suspend/resume functionality, so requires the quirk as
    well, because of changes to the common wkup_m3_ipc driver.

    Signed-off-by: Dave Gerlach
    [s-anna@ti.com: revise logic and update comments/patch description]
    Signed-off-by: Suman Anna
    Signed-off-by: Jassi Brar

    Dave Gerlach
     
  • Kbuild test robot reported some Sparse warnings to the tune of:

    sparse: incorrect type in argument 6 (different address spaces)
    expected void const *buf
    got void [noderef] *mmio

    This was due to passing variables tagged with the Sparse cookie
    '__iomem' through into memcpy() and print_hex_dump() without
    adequate protection or casting. These issues were fixed in a
    previous patch suppressing the warnings, but the issue is indeed
    still present.

    This patch fixes the warnings in the correct way, i.e. by using
    the purposely authored memcpy_{from,to}io() derivatives in the
    memcpy() case and casting the memory address to (void *) and
    forcing Sparse to ignore to ignore it in the print_hex_dump()
    case [NB: This is also what the memcpy() derivatives do].

    Reported-by: Peter Griffin
    Signed-off-by: Lee Jones
    Signed-off-by: Jassi Brar

    Lee Jones
     

17 Oct, 2015

3 commits


16 Oct, 2015

1 commit


06 Sep, 2015

1 commit


02 Sep, 2015

1 commit

  • Pull power management and ACPI updates from Rafael Wysocki:
    "From the number of commits perspective, the biggest items are ACPICA
    and cpufreq changes with the latter taking the lead (over 50 commits).

    On the cpufreq front, there are many cleanups and minor fixes in the
    core and governors, driver updates etc. We also have a new cpufreq
    driver for Mediatek MT8173 chips.

    ACPICA mostly updates its debug infrastructure and adds a number of
    fixes and cleanups for a good measure.

    The Operating Performance Points (OPP) framework is updated with new
    DT bindings and support for them among other things.

    We have a few updates of the generic power domains framework and a
    reorganization of the ACPI device enumeration code and bus type
    operations.

    And a lot of fixes and cleanups all over.

    Included is one branch from the MFD tree as it contains some
    PM-related driver core and ACPI PM changes a few other commits are
    based on.

    Specifics:

    - ACPICA update to upstream revision 20150818 including method
    tracing extensions to allow more in-depth AML debugging in the
    kernel and a number of assorted fixes and cleanups (Bob Moore, Lv
    Zheng, Markus Elfring).

    - ACPI sysfs code updates and a documentation update related to AML
    method tracing (Lv Zheng).

    - ACPI EC driver fix related to serialized evaluations of _Qxx
    methods and ACPI tools updates allowing the EC userspace tool to be
    built from the kernel source (Lv Zheng).

    - ACPI processor driver updates preparing it for future introduction
    of CPPC support and ACPI PCC mailbox driver updates (Ashwin
    Chaugule).

    - ACPI interrupts enumeration fix for a regression related to the
    handling of IRQ attribute conflicts between MADT and the ACPI
    namespace (Jiang Liu).

    - Fixes related to ACPI device PM (Mika Westerberg, Srinidhi
    Kasagar).

    - ACPI device registration code reorganization to separate the
    sysfs-related code and bus type operations from the rest (Rafael J
    Wysocki).

    - Assorted cleanups in the ACPI core (Jarkko Nikula, Mathias Krause,
    Andy Shevchenko, Rafael J Wysocki, Nicolas Iooss).

    - ACPI cpufreq driver and ia64 cpufreq driver fixes and cleanups (Pan
    Xinhui, Rafael J Wysocki).

    - cpufreq core cleanups on top of the previous changes allowing it to
    preseve its sysfs directories over system suspend/resume (Viresh
    Kumar, Rafael J Wysocki, Sebastian Andrzej Siewior).

    - cpufreq fixes and cleanups related to governors (Viresh Kumar).

    - cpufreq updates (core and the cpufreq-dt driver) related to the
    turbo/boost mode support (Viresh Kumar, Bartlomiej Zolnierkiewicz).

    - New DT bindings for Operating Performance Points (OPP), support for
    them in the OPP framework and in the cpufreq-dt driver plus related
    OPP framework fixes and cleanups (Viresh Kumar).

    - cpufreq powernv driver updates (Shilpasri G Bhat).

    - New cpufreq driver for Mediatek MT8173 (Pi-Cheng Chen).

    - Assorted cpufreq driver (speedstep-lib, sfi, integrator) cleanups
    and fixes (Abhilash Jindal, Andrzej Hajda, Cristian Ardelean).

    - intel_pstate driver updates including Skylake-S support, support
    for enabling HW P-states per CPU and an additional vendor bypass
    list entry (Kristen Carlson Accardi, Chen Yu, Ethan Zhao).

    - cpuidle core fixes related to the handling of coupled idle states
    (Xunlei Pang).

    - intel_idle driver updates including Skylake Client support and
    support for freeze-mode-specific idle states (Len Brown).

    - Driver core updates related to power management (Andy Shevchenko,
    Rafael J Wysocki).

    - Generic power domains framework fixes and cleanups (Jon Hunter,
    Geert Uytterhoeven, Rajendra Nayak, Ulf Hansson).

    - Device PM QoS framework update to allow the latency tolerance
    setting to be exposed to user space via sysfs (Mika Westerberg).

    - devfreq support for PPMUv2 in Exynos5433 and a fix for an incorrect
    exynos-ppmu DT binding (Chanwoo Choi, Javier Martinez Canillas).

    - System sleep support updates (Alan Stern, Len Brown, SungEun Kim).

    - rockchip-io AVS support updates (Heiko Stuebner).

    - PM core clocks support fixup (Colin Ian King).

    - Power capping RAPL driver update including support for Skylake H/S
    and Broadwell-H (Radivoje Jovanovic, Seiichi Ikarashi).

    - Generic device properties framework fixes related to the handling
    of static (driver-provided) property sets (Andy Shevchenko).

    - turbostat and cpupower updates (Len Brown, Shilpasri G Bhat,
    Shreyas B Prabhu)"

    * tag 'pm+acpi-4.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (180 commits)
    cpufreq: speedstep-lib: Use monotonic clock
    cpufreq: powernv: Increase the verbosity of OCC console messages
    cpufreq: sfi: use kmemdup rather than duplicating its implementation
    cpufreq: drop !cpufreq_driver check from cpufreq_parse_governor()
    cpufreq: rename cpufreq_real_policy as cpufreq_user_policy
    cpufreq: remove redundant 'policy' field from user_policy
    cpufreq: remove redundant 'governor' field from user_policy
    cpufreq: update user_policy.* on success
    cpufreq: use memcpy() to copy policy
    cpufreq: remove redundant CPUFREQ_INCOMPATIBLE notifier event
    cpufreq: mediatek: Add MT8173 cpufreq driver
    dt-bindings: mediatek: Add MT8173 CPU DVFS clock bindings
    PM / Domains: Fix typo in description of genpd_dev_pm_detach()
    PM / Domains: Remove unusable governor dummies
    PM / Domains: Make pm_genpd_init() available to modules
    PM / domains: Align column headers and data in pm_genpd_summary output
    powercap / RAPL: disable the 2nd power limit properly
    tools: cpupower: Fix error when running cpupower monitor
    PM / OPP: Drop unlikely before IS_ERR(_OR_NULL)
    PM / OPP: Fix static checker warning (broken 64bit big endian systems)
    ...

    Linus Torvalds
     

26 Aug, 2015

1 commit

  • PCC is made selectable only by clients which use it. e.g. CPPC
    Default it to disabled so that it is not included accidentally on
    platforms which dont use it.

    Signed-off-by: Ashwin Chaugule
    Reviewed-by: Al Stone
    Signed-off-by: Rafael J. Wysocki

    Ashwin Chaugule
     

25 Aug, 2015

1 commit

  • This change initializes the PCC Mailbox earlier than
    the ACPI processor driver. This enables drivers introduced
    in follow up patches (e.g. CPPC) to be probed via the ACPI
    processor driver interface. The CPPC probe requires the PCC
    channel to be initialized for it to query each CPUs performance
    capabilities.

    Signed-off-by: Ashwin Chaugule
    Reviewed-by: Al Stone
    Signed-off-by: Rafael J. Wysocki

    Ashwin Chaugule
     

10 Aug, 2015

2 commits

  • Since the mailbox core users hrtimers now, it can handle much higher
    resolutions. We can reduce the txpoll_period to 1 ms as the transmit
    usually takes just few microseconds.

    Reported-and-suggested-by: Juri Lelli
    Signed-off-by: Sudeep Holla
    Signed-off-by: Jassi Brar

    Sudeep Holla
     
  • The mailbox core uses jiffy based timer to handle polling for the
    transmit completion. If the client/protocol have/support notification
    of the last packet transmit completion via ACK packet, then we tick the
    Tx state machine immediately in the callback. However if the client
    doesn't support that mechanism we might end-up waiting for atleast a
    jiffy even though the remote is ready to receive the next request.

    This patch switches the timer used for that polling from jiffy-based
    to hrtimer-based so that we can support polling at much higher time
    resolution.

    Reported-and-suggested-by: Juri Lelli
    Signed-off-by: Sudeep Holla
    Signed-off-by: Jassi Brar

    Sudeep Holla
     

07 Aug, 2015

1 commit


05 Aug, 2015

1 commit


03 Jul, 2015

1 commit

  • …scm/linux/kernel/git/paulg/linux

    Pull module_init replacement part two from Paul Gortmaker:
    "Replace module_init with appropriate alternate initcall in non
    modules.

    This series converts non-modular code that is using the module_init()
    call to hook itself into the system to instead use one of our
    alternate priority initcalls.

    Unlike the previous series that used device_initcall and hence was a
    runtime no-op, these commits change to one of the alternate initcalls,
    because (a) we have them and (b) it seems like the right thing to do.

    For example, it would seem logical to use arch_initcall for arch
    specific setup code and fs_initcall for filesystem setup code.

    This does mean however, that changes in the init ordering will be
    taking place, and so there is a small risk that some kind of implicit
    init ordering issue may lie uncovered. But I think it is still better
    to give these ones sensible priorities than to just assign them all to
    device_initcall in order to exactly preserve the old ordering.

    Thad said, we have already made similar changes in core kernel code in
    commit c96d6660dc65 ("kernel: audit/fix non-modular users of
    module_init in core code") without any regressions reported, so this
    type of change isn't without precedent. It has also got the same
    local testing and linux-next coverage as all the other pull requests
    that I'm sending for this merge window have got.

    Once again, there is an unused module_exit function removal that shows
    up as an outlier upon casual inspection of the diffstat"

    * tag 'module_init-alternate_initcall-v4.1-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/paulg/linux:
    x86: perf_event_intel_pt.c: use arch_initcall to hook in enabling
    x86: perf_event_intel_bts.c: use arch_initcall to hook in enabling
    mm/page_owner.c: use late_initcall to hook in enabling
    lib/list_sort: use late_initcall to hook in self tests
    arm: use subsys_initcall in non-modular pl320 IPC code
    powerpc: don't use module_init for non-modular core hugetlb code
    powerpc: use subsys_initcall for Freescale Local Bus
    x86: don't use module_init for non-modular core bootflag code
    netfilter: don't use module_init/exit in core IPV4 code
    fs/notify: don't use module_init for non-modular inotify_user code
    mm: replace module_init usages with subsys_initcall in nommu.c

    Linus Torvalds
     

17 Jun, 2015

1 commit

  • The drivers/mailbox/pl320-ipc.o is dependent on config PL320_MBOX
    which is declared as a bool. Hence the code is never going to be
    modular. So using module_init as an alias for __initcall can be
    somewhat misleading.

    Fix this up now, so that we can relocate module_init from
    init.h into module.h in the future. If we don't do this, we'd
    have to add module.h to obviously non-modular code, and that
    would be a worse thing. Also add an inclusion of init.h, as
    that was previously implicit.

    Note that direct use of __initcall is discouraged, vs. one
    of the priority categorized subgroups. As __initcall gets
    mapped onto device_initcall, our use of subsys_initcall (which
    seems to make sense for IPC code) will thus change this
    registration from level 6-device to level 4-subsys (i.e. slightly
    earlier). However no impact of that small difference is expected.

    Cc: Russell King
    Cc: linux-arm-kernel@lists.infradead.org
    Signed-off-by: Paul Gortmaker

    Paul Gortmaker
     

13 Jun, 2015

1 commit

  • With the VC reader blocked and the ARM writing, MAIL0_STA reads empty
    permanently while MAIL1_STA goes from empty (0x40000000) to non-empty
    (0x00000001-0x00000007) to full (0x80000008).

    This bug ended up having no effect on us, because all of our
    transactions in the client driver were synchronous and under a mutex.

    Suggested-by: Phil Elwell
    Signed-off-by: Eric Anholt
    Acked-by: Stephen Warren
    Signed-off-by: Jassi Brar

    Eric Anholt
     

12 Jun, 2015

2 commits

  • This patch supplies a new framework API; mbox_request_channel_byname().

    It works by supplying the usual client pointer as the first argument and
    a string as the second. The API will search the client's node for a
    'mbox-names' property then request a channel in the normal way using the
    requested string's index as the expected second 'index' argument.

    Signed-off-by: Lee Jones
    Signed-off-by: Jassi Brar

    Lee Jones
     
  • This mailbox driver provides a single mailbox channel to write 32-bit
    values to the VPU and get a 32-bit response. The Raspberry Pi
    firmware uses this mailbox channel to implement firmware calls, while
    Roku 2 (despite being derived from the same firmware tree) doesn't.

    The driver was originally submitted by Lubomir, based on the
    out-of-tree 2708 mailbox driver. Eric Anholt fixed it up for
    upstreaming, with the major functional change being that it now has no
    notion of multiple channels (since that is a firmware-dependent
    concept) and instead the raspberrypi-firmware driver will do that
    bit-twiddling in its own messages.
    [Jassi: made the 'mbox_chan_ops' struct as const and removed a redundant
    variable]

    Signed-off-by: Lubomir Rintel
    Signed-off-by: Craig McGeachie
    Signed-off-by: Eric Anholt
    Acked-by: Stephen Warren
    Signed-off-by: Jassi Brar

    Lubomir Rintel