30 Dec, 2014

1 commit

  • * pm-cpufreq:
    cpufreq: fix a NULL pointer dereference in __cpufreq_governor()
    cpufreq-dt: defer probing if OPP table is not ready

    * pm-cpuidle:
    cpuidle / ACPI: remove unused CPUIDLE_FLAG_TIME_INVALID
    cpuidle: ladder: Better idle duration measurement without using CPUIDLE_FLAG_TIME_INVALID
    cpuidle: menu: Better idle duration measurement without using CPUIDLE_FLAG_TIME_INVALID

    Rafael J. Wysocki
     

20 Dec, 2014

2 commits

  • If ACPI _PPC changed notification happens before governor was initiated
    while kernel is booting, a NULL pointer dereference will be triggered:

    BUG: unable to handle kernel NULL pointer dereference at 0000000000000030
    IP: [] __cpufreq_governor+0x23/0x1e0
    PGD 0
    Oops: 0000 [#1] SMP
    ... ...
    RIP: 0010:[] []
    __cpufreq_governor+0x23/0x1e0
    RSP: 0018:ffff881fcfbcfbb8 EFLAGS: 00010286
    RAX: 0000000000000000 RBX: ffff881fd11b3980 RCX: ffff88407fc20000
    RDX: 0000000000000000 RSI: 0000000000000000 RDI: ffff881fd11b3980
    RBP: ffff881fcfbcfbd8 R08: 0000000000000000 R09: 000000000000000f
    R10: ffffffff818068d0 R11: 0000000000000043 R12: 0000000000000004
    R13: 0000000000000000 R14: ffffffff8196cae0 R15: 0000000000000000
    FS: 0000000000000000(0000) GS:ffff881fffc00000(0000) knlGS:0000000000000000
    CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
    CR2: 0000000000000030 CR3: 00000000018ae000 CR4: 00000000000407f0
    DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
    DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
    Process kworker/0:3 (pid: 750, threadinfo ffff881fcfbce000, task
    ffff881fcf556400)
    Stack:
    ffff881fffc17d00 ffff881fcfbcfc18 ffff881fd11b3980 0000000000000000
    ffff881fcfbcfc08 ffffffff81470d08 ffff881fd11b3980 0000000000000007
    ffff881fcfbcfc18 ffff881fffc17d00 ffff881fcfbcfd28 ffffffff81472e9a
    Call Trace:
    [] __cpufreq_set_policy+0x1b8/0x2e0
    [] cpufreq_update_policy+0xca/0x150
    [] ? cpufreq_update_policy+0x150/0x150
    [] acpi_processor_ppc_has_changed+0x71/0x7b
    [] acpi_processor_notify+0x55/0x115
    [] acpi_device_notify+0x19/0x1b
    [] acpi_ev_notify_dispatch+0x41/0x5f
    [] acpi_os_execute_deferred+0x27/0x34

    The root cause is a race conditon -- cpufreq core and acpi-cpufreq driver
    were initiated, but cpufreq_governor wasn't and _PPC changed notification
    happened, __cpufreq_governor() was called within acpi_os_execute_deferred
    kernel thread context.

    To fix this panic issue, add pointer checking code in __cpufreq_governor()
    before pointer policy->governor is to be dereferenced.

    Signed-off-by: Ethan Zhao
    Acked-by: Viresh Kumar
    Signed-off-by: Rafael J. Wysocki

    Ethan Zhao
     
  • I'm leaving Red Hat at the end of December 2014, so remove all
    references to my soon-to-be-dead address.

    (There are some references left in the tree, that need additional
    changes, I'll send those through the AGP maintainers).

    Signed-off-by: Dave Jones
    Signed-off-by: Linus Torvalds

    Dave Jones
     

19 Dec, 2014

1 commit

  • Pull more ACPI and power management updates from Rafael Wysocki:
    "These are regression fixes (leds-gpio, ACPI backlight driver,
    operating performance points library, ACPI device enumeration
    messages, cpupower tool), other bug fixes (ACPI EC driver, ACPI device
    PM), some cleanups in the operating performance points (OPP)
    framework, continuation of CONFIG_PM_RUNTIME elimination, a couple of
    minor intel_pstate driver changes, a new MAINTAINERS entry for it and
    an ACPI fan driver change needed for better support of thermal
    management in user space.

    Specifics:

    - Fix a regression in leds-gpio introduced by a recent commit that
    inadvertently changed the name of one of the properties used by the
    driver (Fabio Estevam).

    - Fix a regression in the ACPI backlight driver introduced by a
    recent fix that missed one special case that had to be taken into
    account (Aaron Lu).

    - Drop the level of some new kernel messages from the ACPI core
    introduced by a recent commit to KERN_DEBUG which they should have
    used from the start and drop some other unuseful KERN_ERR messages
    printed by ACPI (Rafael J Wysocki).

    - Revert an incorrect commit modifying the cpupower tool (Prarit
    Bhargava).

    - Fix two regressions introduced by recent commits in the OPP library
    and clean up some existing minor issues in that code (Viresh
    Kumar).

    - Continue to replace CONFIG_PM_RUNTIME with CONFIG_PM throughout the
    tree (or drop it where that can be done) in order to make it
    possible to eliminate CONFIG_PM_RUNTIME (Rafael J Wysocki, Ulf
    Hansson, Ludovic Desroches).

    There will be one more "CONFIG_PM_RUNTIME removal" batch after this
    one, because some new uses of it have been introduced during the
    current merge window, but that should be sufficient to finally get
    rid of it.

    - Make the ACPI EC driver more robust against race conditions related
    to GPE handler installation failures (Lv Zheng).

    - Prevent the ACPI device PM core code from attempting to disable
    GPEs that it has not enabled which confuses ACPICA and makes it
    report errors unnecessarily (Rafael J Wysocki).

    - Add a "force" command line switch to the intel_pstate driver to
    make it possible to override the blacklisting of some systems in
    that driver if needed (Ethan Zhao).

    - Improve intel_pstate code documentation and add a MAINTAINERS entry
    for it (Kristen Carlson Accardi).

    - Make the ACPI fan driver create cooling device interfaces witn
    names that reflect the IDs of the ACPI device objects they are
    associated with, except for "generic" ACPI fans (PNP ID "PNP0C0B").

    That's necessary for user space thermal management tools to be able
    to connect the fans with the parts of the system they are supposed
    to be cooling properly. From Srinivas Pandruvada"

    * tag 'pm+acpi-3.19-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (32 commits)
    MAINTAINERS: add entry for intel_pstate
    ACPI / video: update the skip case for acpi_video_device_in_dod()
    power / PM: Eliminate CONFIG_PM_RUNTIME
    NFC / PM: Replace CONFIG_PM_RUNTIME with CONFIG_PM
    SCSI / PM: Replace CONFIG_PM_RUNTIME with CONFIG_PM
    ACPI / EC: Fix unexpected ec_remove_handlers() invocations
    Revert "tools: cpupower: fix return checks for sysfs_get_idlestate_count()"
    tracing / PM: Replace CONFIG_PM_RUNTIME with CONFIG_PM
    x86 / PM: Replace CONFIG_PM_RUNTIME in io_apic.c
    PM: Remove the SET_PM_RUNTIME_PM_OPS() macro
    mmc: atmel-mci: use SET_RUNTIME_PM_OPS() macro
    PM / Kconfig: Replace PM_RUNTIME with PM in dependencies
    ARM / PM: Replace CONFIG_PM_RUNTIME with CONFIG_PM
    sound / PM: Replace CONFIG_PM_RUNTIME with CONFIG_PM
    phy / PM: Replace CONFIG_PM_RUNTIME with CONFIG_PM
    video / PM: Replace CONFIG_PM_RUNTIME with CONFIG_PM
    tty / PM: Replace CONFIG_PM_RUNTIME with CONFIG_PM
    spi: Replace CONFIG_PM_RUNTIME with CONFIG_PM
    ACPI / PM: Do not disable wakeup GPEs that have not been enabled
    ACPI / utils: Drop error messages from acpi_evaluate_reference()
    ...

    Linus Torvalds
     

18 Dec, 2014

1 commit

  • cpufreq-dt driver supports mode when OPP table is provided by platform
    code and not device tree. However on certain platforms code that fills
    OPP table may run after cpufreq driver tries to initialize, so let's
    report -EPROBE_DEFER if we do not find any entires in OPP table for the
    CPU.

    Signed-off-by: Dmitry Torokhov
    Acked-by: Viresh Kumar
    Signed-off-by: Rafael J. Wysocki

    Dmitry Torokhov
     

15 Dec, 2014

1 commit

  • Pull driver core update from Greg KH:
    "Here's the set of driver core patches for 3.19-rc1.

    They are dominated by the removal of the .owner field in platform
    drivers. They touch a lot of files, but they are "simple" changes,
    just removing a line in a structure.

    Other than that, a few minor driver core and debugfs changes. There
    are some ath9k patches coming in through this tree that have been
    acked by the wireless maintainers as they relied on the debugfs
    changes.

    Everything has been in linux-next for a while"

    * tag 'driver-core-3.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: (324 commits)
    Revert "ath: ath9k: use debugfs_create_devm_seqfile() helper for seq_file entries"
    fs: debugfs: add forward declaration for struct device type
    firmware class: Deletion of an unnecessary check before the function call "vunmap"
    firmware loader: fix hung task warning dump
    devcoredump: provide a one-way disable function
    device: Add dev__once variants
    ath: ath9k: use debugfs_create_devm_seqfile() helper for seq_file entries
    ath: use seq_file api for ath9k debugfs files
    debugfs: add helper function to create device related seq_file
    drivers/base: cacheinfo: remove noisy error boot message
    Revert "core: platform: add warning if driver has no owner"
    drivers: base: support cpu cache information interface to userspace via sysfs
    drivers: base: add cpu_device_create to support per-cpu devices
    topology: replace custom attribute macros with standard DEVICE_ATTR*
    cpumask: factor out show_cpumap into separate helper function
    driver core: Fix unbalanced device reference in drivers_probe
    driver core: fix race with userland in device_add()
    sysfs/kernfs: make read requests on pre-alloc files use the buffer.
    sysfs/kernfs: allow attributes to request write buffer be pre-allocated.
    fs: sysfs: return EGBIG on write if offset is larger than file size
    ...

    Linus Torvalds
     

13 Dec, 2014

1 commit

  • Pull trivial tree update from Jiri Kosina:
    "Usual stuff: documentation updates, printk() fixes, etc"

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (24 commits)
    intel_ips: fix a type in error message
    cpufreq: cpufreq-dt: Move newline to end of error message
    ps3rom: fix error return code
    treewide: fix typo in printk and Kconfig
    ARM: dts: bcm63138: change "interupts" to "interrupts"
    Replace mentions of "list_struct" to "list_head"
    kernel: trace: fix printk message
    scsi: mpt2sas: fix ioctl in comment
    zbud, zswap: change module author email
    clocksource: Fix 'clcoksource' typo in comment
    arm: fix wording of "Crotex" in CONFIG_ARCH_EXYNOS3 help
    gpio: msm-v1: make boolean argument more obvious
    usb: Fix typo in usb-serial-simple.c
    PCI: Fix comment typo 'COMFIG_PM_OPS'
    powerpc: Fix comment typo 'CONIFG_8xx'
    powerpc: Fix comment typos 'CONFiG_ALTIVEC'
    clk: st: Spelling s/stucture/structure/
    isci: Spelling s/stucture/structure/
    usb: gadget: zero: Spelling s/infrastucture/infrastructure/
    treewide: Fix company name in module descriptions
    ...

    Linus Torvalds
     

11 Dec, 2014

2 commits

  • Add a few comments in the code which calculates busyness to
    clarify parts of the algorithm.

    Signed-off-by: Kristen Carlson Accardi
    Signed-off-by: Rafael J. Wysocki

    Kristen Carlson Accardi
     
  • To force loading on Oracle Sun X86 servers, provide one kernel command line
    parameter

    intel_pstate = force

    For those who are aware of the risk of no power capping capabily working
    and try to get better performance with this driver.

    Signed-off-by: Ethan Zhao
    Tested-by: Alexey Kodanev
    Reviewed-by: Linda Knippers
    Acked-by: Kristen Carlson Accardi
    Signed-off-by: Rafael J. Wysocki

    Ethan Zhao
     

03 Dec, 2014

1 commit


02 Dec, 2014

1 commit


01 Dec, 2014

3 commits


30 Nov, 2014

3 commits

  • Currently we are calling of_cpufreq_cooling_register() from ->init() callback.
    At this point of time cpufreq driver's policy isn't completely ready to be used
    as few of its fields/structure/pointers aren't yet initialized.

    Because of_cpufreq_cooling_register() tries to access policy with help of
    cpufreq_cpu_get() and then tries to get freq-table as well, these calls fail.

    To fix this, register the cooling device after the policy is ready to be used.
    And the right callback for it is the newly added ->ready() one.

    Signed-off-by: Viresh Kumar
    Reviewed-by: Eduardo Valentin
    Tested-by: Eduardo Valentin
    Reviewed-by: Lukasz Majewski
    Signed-off-by: Rafael J. Wysocki

    Viresh Kumar
     
  • Currently there is no callback for cpufreq drivers which is called once the
    policy is ready to be used. There are some requirements where such a callback is
    required.

    One of them is registering a cooling device with the help of
    of_cpufreq_cooling_register(). This routine tries to get 'struct cpufreq_policy'
    for CPUs which isn't yet initialed at the time ->init() is called and so we face
    issues while registering the cooling device.

    Because we can't register cooling device from ->init(), we need a callback that
    is called after the policy is ready to be used and hence we introduce ->ready()
    callback.

    Signed-off-by: Viresh Kumar
    Reviewed-by: Eduardo Valentin
    Tested-by: Eduardo Valentin
    Reviewed-by: Lukasz Majewski
    Signed-off-by: Rafael J. Wysocki

    Viresh Kumar
     
  • The second parameter of of_cpufreq_cooling_register() should be the CPUs to
    which the frequency constraint will apply. As the cpufreq-dt driver now supports
    platforms with multiple 'struct cpufreq_policy' instances (i.e. > 1 clock
    domains for CPUs), passing 'cpu_present_mask' isn't correct anymore. As every
    policy will have a set of CPUs and that may not be equal to 'cpu_present_mask'
    always.

    So, pass only mask of CPUs which are controlled by current policy.

    Signed-off-by: Viresh Kumar
    Reviewed-by: Eduardo Valentin
    Tested-by: Eduardo Valentin
    Signed-off-by: Rafael J. Wysocki

    Viresh Kumar
     

27 Nov, 2014

1 commit


26 Nov, 2014

1 commit

  • Do it before it's assigned to cpufreq_cpu_data, otherwise when a driver
    tries to get the cpu frequency during initialization the policy kobj is
    referenced and we get this warning:

    ------------[ cut here ]------------
    WARNING: CPU: 1 PID: 64 at include/linux/kref.h:47 kobject_get+0x64/0x70()
    Modules linked in:
    CPU: 1 PID: 64 Comm: irq/77-tegra-ac Not tainted 3.18.0-rc4-next-20141114ccu-00050-g3eff942 #326
    [] (unwind_backtrace) from [] (show_stack+0x10/0x14)
    [] (show_stack) from [] (dump_stack+0x98/0xd8)
    [] (dump_stack) from [] (warn_slowpath_common+0x84/0xb4)
    [] (warn_slowpath_common) from [] (warn_slowpath_null+0x1c/0x24)
    [] (warn_slowpath_null) from [] (kobject_get+0x64/0x70)
    [] (kobject_get) from [] (cpufreq_cpu_get+0x88/0xc8)
    [] (cpufreq_cpu_get) from [] (cpufreq_get+0xc/0x64)
    [] (cpufreq_get) from [] (actmon_thread_isr+0x134/0x198)
    [] (actmon_thread_isr) from [] (irq_thread_fn+0x1c/0x40)
    [] (irq_thread_fn) from [] (irq_thread+0x134/0x174)
    [] (irq_thread) from [] (kthread+0xdc/0xf4)
    [] (kthread) from [] (ret_from_fork+0x14/0x3c)
    ---[ end trace b7bd64a81b340c59 ]---

    Signed-off-by: Tomeu Vizoso
    Acked-by: Viresh Kumar
    Signed-off-by: Rafael J. Wysocki

    Tomeu Vizoso
     

20 Nov, 2014

1 commit


18 Nov, 2014

2 commits

  • CPUFreq driver's Kconfig entries are added in Kconfig. files and they are
    all included from the main Kconfig file using a menu entry. This creates another
    level of (unnecessary) hierarchy within the menuconfig entries.

    The problem occurs when there are drivers usable across architectures. Either
    their config entry is duplicated in all the supported architectures or is put
    into the main Kconfig entry. With the later one, we have menuconfig entries for
    drivers at two levels then.

    Fix these issues by getting rid of another level of menuconfig hierarchy and
    populate all drivers within the main cpufreq menu. To clearly distinguish where
    the drivers start from, also add a comment that will appear in menuconfig.

    Reported-by: Tang Yuantian
    Suggested-by: Scott Wood
    Signed-off-by: Viresh Kumar
    Signed-off-by: Rafael J. Wysocki

    Viresh Kumar
     
  • Rafael J. Wysocki
     

14 Nov, 2014

1 commit

  • The pcc-cpufreq driver is not automatically loaded on systems where
    the platform's power management setting requires this driver.
    Instead, on those systems no CPU frequency driver is registered and
    active.

    Make the autoloading matching criteria for loading the pcc-cpufreq
    driver the same as done in acpi-cpufreq by commit c655affbd524d01
    ("ACPI / cpufreq: Add ACPI processor device IDs to acpi-cpufreq").

    x86 CPU frequency drivers are now typically autoloaded by specifying
    MODULE_DEVICE_TABLE entries and x86cpu model specific matching.
    But pcc-cpufreq was omitted when acpi-cpufreq and other drivers were
    changed to use this approach.

    Both acpi-cpufreq and pcc-cpufreq depend on a distinct and mutually
    exclusive set of ACPI methods which are not directly tied to specific
    processor model numbers. Both of these drivers have init routines
    which look for their required ACPI methods. As a result, only the
    appropriate driver registers as the cpu frequency driver and the other
    one ends up being unloaded.

    Tested on various systems where acpi-cpufreq, intel_pstate, and
    pcc-cpufreq are the expected cpu frequency drivers.

    Signed-off-by: Lenny Szubowicz
    Signed-off-by: Joseph Szczypek
    Reported-by: Trinh Dao
    Signed-off-by: Rafael J. Wysocki

    Lenny Szubowicz
     

12 Nov, 2014

3 commits

  • Add BDW-H to the list of supported processors.

    Signed-off-by: Dirk Brandewie
    Signed-off-by: Rafael J. Wysocki

    Dirk Brandewie
     
  • Add support of Hardware Managed Performance States (HWP) described in Volume 3
    section 14.4 of the SDM.

    With HWP enbaled intel_pstate will no longer be responsible for selecting P
    states for the processor. intel_pstate will continue to register to
    the cpufreq core as the scaling driver for CPUs implementing
    HWP. In HWP mode intel_pstate provides three functions reporting
    frequency to the cpufreq core, support for the set_policy() interface
    from the core and maintaining the intel_pstate sysfs interface in
    /sys/devices/system/cpu/intel_pstate. User preferences expressed via
    the set_policy() interface or the sysfs interface are forwared to the
    CPU via the HWP MSR interface.

    Signed-off-by: Dirk Brandewie
    Signed-off-by: Rafael J. Wysocki

    Dirk Brandewie
     
  • When the user space tries to set scaling_(max|min)_freq through
    sysfs, the cpufreq_set_policy() asks other driver's opinions
    for the max/min frequencies. Some device drivers, like Tegra
    CPU EDP which is not upstreamed yet though, may constrain the
    CPU maximum frequency dynamically because of board design.
    So if the user space access happens and some driver is capping
    the cpu frequency at the same time, the user_policy->(max|min)
    is overridden by the capped value, and that's not expected by
    the user space. And if the user space is not invoked again,
    the CPU will always be capped by the user_policy->(max|min)
    even no drivers limit the CPU frequency any more.

    This patch preserves the user specified min/max settings, so that
    every time the cpufreq policy is updated, the new max/min can
    be re-evaluated correctly based on the user's expection and
    the present device drivers' status.

    Signed-off-by: Vince Hsu
    Acked-by: Viresh Kumar
    Signed-off-by: Rafael J. Wysocki

    Vince Hsu
     

08 Nov, 2014

1 commit

  • When resuming from s2ram on an SMP system without cpufreq operating
    points (e.g. there's no "operating-points" property for the CPU node in
    DT, or the platform doesn't use DT yet), the kernel crashes when
    bringing CPU 1 online:

    Enabling non-boot CPUs ...
    CPU1: Booted secondary processor
    Unable to handle kernel NULL pointer dereference at virtual address 0000003c
    pgd = ee5e6b00
    [0000003c] *pgd=6e579003, *pmd=6e588003, *pte=00000000
    Internal error: Oops: a07 [#1] SMP ARM
    Modules linked in:
    CPU: 0 PID: 1246 Comm: s2ram Tainted: G W 3.18.0-rc3-koelsch-01614-g0377af242bb175c8-dirty #589
    task: eeec5240 ti: ee704000 task.ti: ee704000
    PC is at __cpufreq_add_dev.isra.24+0x24c/0x77c
    LR is at __cpufreq_add_dev.isra.24+0x244/0x77c
    pc : [] lr : [] psr: 60000153
    sp : ee705d48 ip : ee705d48 fp : ee705d84
    r10: c04e0450 r9 : 00000000 r8 : 00000001
    r7 : c05426a8 r6 : 00000001 r5 : 00000001 r4 : 00000000
    r3 : 00000000 r2 : 00000000 r1 : 20000153 r0 : c0542734

    Verify that policy is not NULL before dereferencing it to fix this.

    Signed-off-by: Geert Uytterhoeven
    Fixes: 8414809c6a1e (cpufreq: Preserve policy structure across suspend/resume)
    Cc: 3.12+ # 3.12+
    Signed-off-by: Rafael J. Wysocki

    Geert Uytterhoeven
     

06 Nov, 2014

5 commits


04 Nov, 2014

1 commit


28 Oct, 2014

2 commits

  • Commit 34e5a5273d6aa0ee ("cpufreq: cpufreq-dt: extend with
    platform_data") changed cpufreq_init() to only call
    cpumask_setall(policy->cpus) if the platform data indicates that all
    CPUs share the same clock. Before, cpufreq_generic_init() did this
    unconditionally.

    This causes a crash on r8a7791/koelsch when resuming from s2ram:

    Enabling non-boot CPUs ...
    CPU1: Booted secondary processor
    Unable to handle kernel NULL pointer dereference at virtual address 0000003c
    pgd = ee71f980
    [0000003c] *pgd=6eeb6003, *pmd=6e0e9003, *pte=00000000
    Internal error: Oops: a07 [#1] SMP ARM
    Modules linked in:
    CPU: 0 PID: 1397 Comm: s2ram Tainted: G W 3.18.0-rc2-koelsch-00762-g7eed2a4e61d2d978 #581
    task: ee6b76c0 ti: ee7f0000 task.ti: ee7f0000
    PC is at __cpufreq_add_dev.isra.24+0x24c/0x77c
    LR is at __cpufreq_add_dev.isra.24+0x244/0x77c
    pc : [] lr : [] psr: 60000153
    sp : ee7f1d48 ip : ee7f1d48 fp : ee7f1d84
    r10: c04e8448 r9 : 00000000 r8 : 00000001
    r7 : c054a8c4 r6 : 00000001 r5 : 00000001 r4 : 00000000
    r3 : 00000000 r2 : 00000000 r1 : 20000153 r0 : c054a950
    Flags: nZCv IRQs on FIQs off Mode SVC_32 ISA ARM Segment user
    Control: 30c5307d Table: 6e71f980 DAC: fffffffd
    Process s2ram (pid: 1397, stack limit = 0xee7f0240)

    ...

    Backtrace:
    [] (__cpufreq_add_dev.isra.24) from [] (cpufreq_cpu_callback+0x6c/0x74)
    r10:eec75240 r9:c04e8448 r8:c04ef3a0 r7:00000001 r6:00000012 r5:00000000
    r4:00000012
    [] (cpufreq_cpu_callback) from [] (notifier_call_chain+0x48/0x70)
    r4:ffffffdd r3:c029e5b4
    [] (notifier_call_chain) from [] (__raw_notifier_call_chain+0x1c/0x24)
    r8:00000001 r7:00000010 r6:00000000 r5:00000000 r4:00000012 r3:ffffffff
    [] (__raw_notifier_call_chain) from [] (__cpu_notify+0x34/0x50)
    [] (__cpu_notify) from [] (cpu_notify+0x18/0x1c)
    r4:00000001
    [] (cpu_notify) from [] (_cpu_up+0x108/0x144)
    [] (_cpu_up) from [] (enable_nonboot_cpus+0x68/0xb8)
    r10:00000000 r9:c04e8ee6 r8:00000000 r7:00000003 r6:c04e8528 r5:c0506248
    r4:00000001
    [] (enable_nonboot_cpus) from [] (suspend_devices_and_enter+0x29c/0x3e8)
    r6:c0506e70 r5:00000000 r4:00000000 r3:60000153

    Restore the old default of calling cpumask_setall(policy->cpus) if no
    platform data is available to fix this.

    Fixes: 34e5a5273d6aa0ee (cpufreq: cpufreq-dt: extend with platform_data)
    Signed-off-by: Geert Uytterhoeven
    Reviewed-by: Thomas Petazzoni
    Signed-off-by: Rafael J. Wysocki

    Geert Uytterhoeven
     
  • If the regulator connected to the CPU voltage plane doesn't
    support an OPP specified voltage with the acceptable tolerance
    it's better to just disable the OPP instead of constantly
    failing the voltage scaling later on.

    Includes a fix to move initialization of opp_freq outside
    the loop to avoid an endless loop from Geert Uytterhoeven.

    Signed-off-by: Geert Uytterhoeven
    Signed-off-by: Lucas Stach
    Acked-by: Viresh Kumar
    Signed-off-by: Rafael J. Wysocki

    Lucas Stach
     

25 Oct, 2014

1 commit

  • Pull ACPI and power management updates from Rafael Wysocki:
    "This is material that didn't make it to my 3.18-rc1 pull request for
    various reasons, mostly related to timing and travel (LinuxCon EU /
    LPC) plus a couple of fixes for recent bugs.

    The only really new thing here is the PM QoS class for memory
    bandwidth, but it is simple enough and users of it will be added in
    the next cycle. One major change in behavior is that platform devices
    enumerated by ACPI will use 32-bit DMA mask by default. Also included
    is an ACPICA update to a new upstream release, but that's mostly
    cleanups, changes in tools and similar. The rest is fixes and
    cleanups mostly.

    Specifics:

    - Fix for a recent PCI power management change that overlooked the
    fact that some IRQ chips might not be able to configure PCIe PME
    for system wakeup from Lucas Stach.

    - Fix for a bug introduced in 3.17 where acpi_device_wakeup() is
    called with a wrong ordering of arguments from Zhang Rui.

    - A bunch of intel_pstate driver fixes (all -stable candidates) from
    Dirk Brandewie, Gabriele Mazzotta and Pali Rohár.

    - Fixes for a rather long-standing problem with the OOM killer and
    the freezer that frozen processes killed by the OOM do not actually
    release any memory until they are thawed, so OOM-killing them is
    rather pointless, with a couple of cleanups on top (Michal Hocko,
    Cong Wang, Rafael J Wysocki).

    - ACPICA update to upstream release 20140926, inlcuding mostly
    cleanups reducing differences between the upstream ACPICA and the
    kernel code, tools changes (acpidump, acpiexec) and support for the
    _DDN object (Bob Moore, Lv Zheng).

    - New PM QoS class for memory bandwidth from Tomeu Vizoso.

    - Default 32-bit DMA mask for platform devices enumerated by ACPI
    (this change is mostly needed for some drivers development in
    progress targeted at 3.19) from Heikki Krogerus.

    - ACPI EC driver cleanups, mostly related to debugging, from Lv
    Zheng.

    - cpufreq-dt driver updates from Thomas Petazzoni.

    - powernv cpuidle driver update from Preeti U Murthy"

    * tag 'pm+acpi-3.18-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (34 commits)
    intel_pstate: Correct BYT VID values.
    intel_pstate: Fix BYT frequency reporting
    intel_pstate: Don't lose sysfs settings during cpu offline
    cpufreq: intel_pstate: Reflect current no_turbo state correctly
    cpufreq: expose scaling_cur_freq sysfs file for set_policy() drivers
    cpufreq: intel_pstate: Fix setting max_perf_pct in performance policy
    PCI / PM: handle failure to enable wakeup on PCIe PME
    ACPI: invoke acpi_device_wakeup() with correct parameters
    PM / freezer: Clean up code after recent fixes
    PM: convert do_each_thread to for_each_process_thread
    OOM, PM: OOM killed task shouldn't escape PM suspend
    freezer: remove obsolete comments in __thaw_task()
    freezer: Do not freeze tasks killed by OOM killer
    ACPI / platform: provide default DMA mask
    cpuidle: powernv: Populate cpuidle state details by querying the device-tree
    cpufreq: cpufreq-dt: adjust message related to regulators
    cpufreq: cpufreq-dt: extend with platform_data
    cpufreq: allow driver-specific data
    ACPI / EC: Cleanup coding style.
    ACPI / EC: Refine event/query debugging messages.
    ...

    Linus Torvalds
     

24 Oct, 2014

4 commits

  • Using a VID value that is not high enough for the requested P state can
    cause machine checks. Add a ceiling function to ensure calulated VIDs
    with fractional values are set to the next highest integer VID value.

    The algorythm for calculating the non-trubo VID from the BIOS writers
    guide is:
    vid_ratio = (vid_max - vid_min) / (max_pstate - min_pstate)
    vid = ceiling(vid_min + (req_pstate - min_pstate) * vid_ratio)

    Cc: All applicable
    Signed-off-by: Dirk Brandewie
    Signed-off-by: Rafael J. Wysocki

    Dirk Brandewie
     
  • BYT has a different conversion from P state to frequency than the core
    processors. This causes the min/max and current frequency to be
    misreported on some BYT SKUs. Tested on BYT N2820, Ivybridge and
    Haswell processors.

    Link: https://bugzilla.yoctoproject.org/show_bug.cgi?id=6663
    Cc: All applicable
    Signed-off-by: Dirk Brandewie
    Signed-off-by: Rafael J. Wysocki

    Dirk Brandewie
     
  • The user may have custom settings don't destroy them during suspend.

    Link: https://bugzilla.kernel.org/show_bug.cgi?id=80651
    Reported-by: Tobias Jakobi
    Cc: All applicable
    Signed-off-by: Dirk Brandewie
    Signed-off-by: Rafael J. Wysocki

    Dirk Brandewie
     
  • Some BIOSes modify the state of MSR_IA32_MISC_ENABLE_TURBO_DISABLE
    based on the current power source for the system battery AC vs
    battery. Reflect the correct current state and ability to modify the
    no_turbo sysfs file based on current state of
    MSR_IA32_MISC_ENABLE_TURBO_DISABLE.

    Link: https://bugzilla.kernel.org/show_bug.cgi?id=83151
    Cc: All applicable
    Signed-off-by: Gabriele Mazzotta
    Signed-off-by: Dirk Brandewie
    Signed-off-by: Rafael J. Wysocki

    Gabriele Mazzotta