1. 24 1月, 2015 9 次提交
  2. 20 12月, 2014 2 次提交
    • E
      cpufreq: fix a NULL pointer dereference in __cpufreq_governor() · cb57720b
      Ethan Zhao 提交于
      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: [<ffffffff81470453>] __cpufreq_governor+0x23/0x1e0
       PGD 0
       Oops: 0000 [#1] SMP
       ... ...
       RIP: 0010:[<ffffffff81470453>]  [<ffffffff81470453>]
       __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:
        [<ffffffff81470d08>] __cpufreq_set_policy+0x1b8/0x2e0
        [<ffffffff81472e9a>] cpufreq_update_policy+0xca/0x150
        [<ffffffff81472f20>] ? cpufreq_update_policy+0x150/0x150
        [<ffffffff81324a96>] acpi_processor_ppc_has_changed+0x71/0x7b
        [<ffffffff81320bcd>] acpi_processor_notify+0x55/0x115
        [<ffffffff812f9c29>] acpi_device_notify+0x19/0x1b
        [<ffffffff813084ca>] acpi_ev_notify_dispatch+0x41/0x5f
        [<ffffffff812f64a4>] 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: NEthan Zhao <ethan.zhao@oracle.com>
      Acked-by: NViresh Kumar <viresh.kumar@linaro.org>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      cb57720b
    • D
      Update/Remove soon-to-be-dead email address · d5e80b4b
      Dave Jones 提交于
      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: NDave Jones <davej@codemonkey.org.uk>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      d5e80b4b
  3. 18 12月, 2014 1 次提交
  4. 11 12月, 2014 2 次提交
  5. 03 12月, 2014 1 次提交
  6. 02 12月, 2014 1 次提交
  7. 01 12月, 2014 3 次提交
  8. 30 11月, 2014 3 次提交
  9. 27 11月, 2014 1 次提交
  10. 26 11月, 2014 1 次提交
    • T
      cpufreq: Ref the policy object sooner · 6d4e81ed
      Tomeu Vizoso 提交于
      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
      [<c0016fac>] (unwind_backtrace) from [<c001272c>] (show_stack+0x10/0x14)
      [<c001272c>] (show_stack) from [<c06085d8>] (dump_stack+0x98/0xd8)
      [<c06085d8>] (dump_stack) from [<c002892c>] (warn_slowpath_common+0x84/0xb4)
      [<c002892c>] (warn_slowpath_common) from [<c00289f8>] (warn_slowpath_null+0x1c/0x24)
      [<c00289f8>] (warn_slowpath_null) from [<c0220290>] (kobject_get+0x64/0x70)
      [<c0220290>] (kobject_get) from [<c03e944c>] (cpufreq_cpu_get+0x88/0xc8)
      [<c03e944c>] (cpufreq_cpu_get) from [<c03e9500>] (cpufreq_get+0xc/0x64)
      [<c03e9500>] (cpufreq_get) from [<c0285288>] (actmon_thread_isr+0x134/0x198)
      [<c0285288>] (actmon_thread_isr) from [<c0069008>] (irq_thread_fn+0x1c/0x40)
      [<c0069008>] (irq_thread_fn) from [<c0069324>] (irq_thread+0x134/0x174)
      [<c0069324>] (irq_thread) from [<c0040290>] (kthread+0xdc/0xf4)
      [<c0040290>] (kthread) from [<c000f4b8>] (ret_from_fork+0x14/0x3c)
      ---[ end trace b7bd64a81b340c59 ]---
      Signed-off-by: NTomeu Vizoso <tomeu.vizoso@collabora.com>
      Acked-by: NViresh Kumar <viresh.kumar@linaro.org>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      6d4e81ed
  11. 20 11月, 2014 1 次提交
  12. 18 11月, 2014 1 次提交
  13. 14 11月, 2014 1 次提交
    • L
      cpufreq: pcc: Enable autoload of pcc-cpufreq for ACPI processors · 7e7e8fe6
      Lenny Szubowicz 提交于
      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 c655affb
      ("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: NLenny Szubowicz <lszubowi@redhat.com>
      Signed-off-by: NJoseph Szczypek <joseph.szczypek@hp.com>
      Reported-by: NTrinh Dao <trinh.dao@hp.com>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      7e7e8fe6
  14. 12 11月, 2014 3 次提交
    • D
      intel_pstate: Add CPUID for BDW-H CPU · 43f8a966
      Dirk Brandewie 提交于
      Add BDW-H to the list of supported processors.
      Signed-off-by: NDirk Brandewie <dirk.j.brandewie@intel.com>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      43f8a966
    • D
      intel_pstate: Add support for HWP · 2f86dc4c
      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: NDirk Brandewie <dirk.j.brandewie@intel.com>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      2f86dc4c
    • V
      cpufreq: respect the min/max settings from user space · 619c144c
      Vince Hsu 提交于
      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: NVince Hsu <vinceh@nvidia.com>
      Acked-by: NViresh Kumar <viresh.kumar@linaro.org>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      619c144c
  15. 08 11月, 2014 1 次提交
    • G
      cpufreq: Avoid crash in resume on SMP without OPP · 09712f55
      Geert Uytterhoeven 提交于
      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 : [<c0298efc>]    lr : [<c0298ef4>]    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: NGeert Uytterhoeven <geert+renesas@glider.be>
      Fixes: 8414809c (cpufreq: Preserve policy structure across suspend/resume)
      Cc: 3.12+ <stable@vger.kernel.org> # 3.12+
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      09712f55
  16. 06 11月, 2014 5 次提交
  17. 28 10月, 2014 2 次提交
    • G
      cpufreq: cpufreq-dt: Restore default cpumask_setall(policy->cpus) · c81407fe
      Geert Uytterhoeven 提交于
      Commit 34e5a527 ("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 : [<c029e084>]    lr : [<c029e07c>]    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:
          [<c029de38>] (__cpufreq_add_dev.isra.24) from [<c029e620>] (cpufreq_cpu_callback+0x6c/0x74)
           r10:eec75240 r9:c04e8448 r8:c04ef3a0 r7:00000001 r6:00000012 r5:00000000
           r4:00000012
          [<c029e5b4>] (cpufreq_cpu_callback) from [<c003f20c>] (notifier_call_chain+0x48/0x70)
           r4:ffffffdd r3:c029e5b4
          [<c003f1c4>] (notifier_call_chain) from [<c003f2cc>] (__raw_notifier_call_chain+0x1c/0x24)
           r8:00000001 r7:00000010 r6:00000000 r5:00000000 r4:00000012 r3:ffffffff
          [<c003f2b0>] (__raw_notifier_call_chain) from [<c0026a00>] (__cpu_notify+0x34/0x50)
          [<c00269cc>] (__cpu_notify) from [<c0026a34>] (cpu_notify+0x18/0x1c)
           r4:00000001
          [<c0026a1c>] (cpu_notify) from [<c0026c44>] (_cpu_up+0x108/0x144)
          [<c0026b3c>] (_cpu_up) from [<c0381c68>] (enable_nonboot_cpus+0x68/0xb8)
           r10:00000000 r9:c04e8ee6 r8:00000000 r7:00000003 r6:c04e8528 r5:c0506248
           r4:00000001
          [<c0381c00>] (enable_nonboot_cpus) from [<c0059038>] (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: 34e5a527 (cpufreq: cpufreq-dt: extend with platform_data)
      Signed-off-by: NGeert Uytterhoeven <geert+renesas@glider.be>
      Reviewed-by: NThomas Petazzoni <thomas.petazzoni@free-electrons.com>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      c81407fe
    • L
      cpufreq: cpufreq-dt: disable unsupported OPPs · 045ee45c
      Lucas Stach 提交于
      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: NGeert Uytterhoeven <geert+renesas@glider.be>
      Signed-off-by: NLucas Stach <l.stach@pengutronix.de>
      Acked-by: NViresh Kumar <viresh.kumar@linaro.org>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      045ee45c
  18. 24 10月, 2014 2 次提交