android_kernel_motorola_sm6225/drivers/cpufreq
Rafael J. Wysocki 1c3d85dd4e cpufreq: Revert incorrect commit 5800043
Commit 5800043 (cpufreq: convert cpufreq_driver to using RCU) causes
the following call trace to be spit on boot:

 BUG: sleeping function called from invalid context at /scratch/rafael/work/linux-pm/mm/slab.c:3179
 in_atomic(): 0, irqs_disabled(): 0, pid: 292, name: systemd-udevd
 2 locks held by systemd-udevd/292:
  #0:  (subsys mutex){+.+.+.}, at: [<ffffffff8146851a>] subsys_interface_register+0x4a/0xe0
  #1:  (rcu_read_lock){.+.+.+}, at: [<ffffffff81538210>] cpufreq_add_dev_interface+0x60/0x5e0
 Pid: 292, comm: systemd-udevd Not tainted 3.9.0-rc8+ #323
 Call Trace:
  [<ffffffff81072c90>] __might_sleep+0x140/0x1f0
  [<ffffffff811581c2>] kmem_cache_alloc+0x42/0x2b0
  [<ffffffff811e7179>] sysfs_new_dirent+0x59/0x130
  [<ffffffff811e63cb>] sysfs_add_file_mode+0x6b/0x110
  [<ffffffff81538210>] ? cpufreq_add_dev_interface+0x60/0x5e0
  [<ffffffff810a3254>] ? __lock_is_held+0x54/0x80
  [<ffffffff811e647d>] sysfs_add_file+0xd/0x10
  [<ffffffff811e6541>] sysfs_create_file+0x21/0x30
  [<ffffffff81538280>] cpufreq_add_dev_interface+0xd0/0x5e0
  [<ffffffff81538210>] ? cpufreq_add_dev_interface+0x60/0x5e0
  [<ffffffffa000337f>] ? acpi_processor_get_platform_limit+0x32/0xbb [processor]
  [<ffffffffa022f540>] ? do_drv_write+0x70/0x70 [acpi_cpufreq]
  [<ffffffff810a3254>] ? __lock_is_held+0x54/0x80
  [<ffffffff8106c97e>] ? up_read+0x1e/0x40
  [<ffffffff8106e632>] ? __blocking_notifier_call_chain+0x72/0xc0
  [<ffffffff81538dbd>] cpufreq_add_dev+0x62d/0xae0
  [<ffffffff815389b8>] ? cpufreq_add_dev+0x228/0xae0
  [<ffffffff81468569>] subsys_interface_register+0x99/0xe0
  [<ffffffffa014d000>] ? 0xffffffffa014cfff
  [<ffffffff81535d5d>] cpufreq_register_driver+0x9d/0x200
  [<ffffffffa014d000>] ? 0xffffffffa014cfff
  [<ffffffffa014d0e9>] acpi_cpufreq_init+0xe9/0x1000 [acpi_cpufreq]
  [<ffffffff810002fa>] do_one_initcall+0x11a/0x170
  [<ffffffff810b4b87>] load_module+0x1cf7/0x2920
  [<ffffffff81322580>] ? ddebug_proc_open+0xb0/0xb0
  [<ffffffff816baee0>] ? retint_restore_args+0xe/0xe
  [<ffffffff810b5887>] sys_init_module+0xd7/0x120
  [<ffffffff816bb6d2>] system_call_fastpath+0x16/0x1b

which is quite obvious, because that commit put (multiple instances
of) sysfs_create_file() under rcu_read_lock()/rcu_read_unlock(),
although sysfs_create_file() may cause memory to be allocated with
GFP_KERNEL and that may sleep, which is not permitted in RCU read
critical section.

Revert the buggy commit altogether along with some changes on top
of it.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2013-04-29 00:08:16 +02:00
..
acpi-cpufreq.c cpufreq: Notify all policy->cpus in cpufreq_notify_transition() 2013-04-02 15:24:00 +02:00
amd_freq_sensitivity.c cpufreq: AMD "frequency sensitivity feedback" powersave bias for ondemand governor 2013-04-10 13:19:26 +02:00
arm_big_little.c cpufreq: ARM big LITTLE: Adapt to latest cpufreq updates 2013-04-22 00:53:40 +02:00
arm_big_little.h cpufreq: ARM big LITTLE: Add generic cpufreq driver and its DT glue 2013-04-02 15:26:32 +02:00
arm_big_little_dt.c cpufreq: ARM big LITTLE: put DT nodes after using them 2013-04-22 00:53:40 +02:00
at32ap-cpufreq.c cpufreq: AVR32: move cpufreq driver to drivers/cpufreq 2013-04-10 13:19:25 +02:00
blackfin-cpufreq.c cpufreq: blackfin: move cpufreq driver to drivers/cpufreq 2013-04-10 13:19:25 +02:00
cpufreq-cpu0.c cpufreq: cpu0: Put cpu parent node after using it 2013-04-22 00:53:40 +02:00
cpufreq-nforce2.c cpufreq: drivers: Remove unnecessary assignments of policy-> members 2013-04-02 15:26:32 +02:00
cpufreq.c cpufreq: Revert incorrect commit 5800043 2013-04-29 00:08:16 +02:00
cpufreq_conservative.c cpufreq: conservative: Use an inline function to evaluate freq_target 2013-04-01 01:11:36 +02:00
cpufreq_governor.c cpufreq: governors: Calculate iowait time only when necessary 2013-04-01 01:11:35 +02:00
cpufreq_governor.h cpufreq: ondemand: allow custom powersave_bias_target handler to be registered 2013-04-10 13:19:26 +02:00
cpufreq_ondemand.c cpufreq: ondemand: allow custom powersave_bias_target handler to be registered 2013-04-10 13:19:26 +02:00
cpufreq_performance.c cpufreq: Improve debug prints 2012-11-15 00:33:06 +01:00
cpufreq_powersave.c cpufreq: Improve debug prints 2012-11-15 00:33:06 +01:00
cpufreq_stats.c cpufreq: stats: do cpufreq_cpu_put() corresponding to cpufreq_cpu_get() 2013-03-25 15:13:16 +01:00
cpufreq_userspace.c cpufreq: Don't check cpu_online(policy->cpu) 2013-02-09 01:18:34 +01:00
cris-artpec3-cpufreq.c cpufreq: cris: move cpufreq driver to drivers/cpufreq 2013-04-10 13:19:25 +02:00
cris-etraxfs-cpufreq.c cpufreq: cris: move cpufreq driver to drivers/cpufreq 2013-04-10 13:19:25 +02:00
davinci-cpufreq.c cpufreq: davinci: move cpufreq driver to drivers/cpufreq 2013-04-08 13:02:31 +02:00
dbx500-cpufreq.c cpufreq: dbx500: Round to closest available freq 2013-04-11 23:23:57 +02:00
e_powersaver.c cpufreq: Notify all policy->cpus in cpufreq_notify_transition() 2013-04-02 15:24:00 +02:00
elanfreq.c cpufreq: Notify all policy->cpus in cpufreq_notify_transition() 2013-04-02 15:24:00 +02:00
exynos-cpufreq.c cpufreq: exynos: Remove error return even if no soc is found 2013-04-10 13:19:26 +02:00
exynos-cpufreq.h arm-soc: cleanups 2013-02-21 14:58:40 -08:00
exynos4x12-cpufreq.c arm-soc: cleanups 2013-02-21 14:58:40 -08:00
exynos4210-cpufreq.c arm-soc: cleanups 2013-02-21 14:58:40 -08:00
exynos5250-cpufreq.c arm-soc: cleanups 2013-02-21 14:58:40 -08:00
exynos5440-cpufreq.c cpufreq: exynos5440: Protect OPP search calls with RCU lock 2013-04-22 00:24:37 +02:00
freq_table.c cpufreq: Don't check cpu_online(policy->cpu) 2013-02-09 01:18:34 +01:00
gx-suspmod.c cpufreq: Notify all policy->cpus in cpufreq_notify_transition() 2013-04-02 15:24:00 +02:00
highbank-cpufreq.c cpufreq: highbank: do not initialize array with a loop 2013-03-04 14:23:11 +01:00
ia64-acpi-cpufreq.c cpufreq: ia64: move cpufreq driver to drivers/cpufreq 2013-04-10 13:19:25 +02:00
imx6q-cpufreq.c cpufreq: Notify all policy->cpus in cpufreq_notify_transition() 2013-04-02 15:24:00 +02:00
integrator-cpufreq.c cpufreq: integrator: move cpufreq driver to drivers/cpufreq 2013-04-08 13:02:31 +02:00
intel_pstate.c cpufreq / intel_pstate: Optimize intel_pstate_set_policy 2013-04-10 13:42:45 +02:00
Kconfig cpufreq: sparc: move cpufreq driver to drivers/cpufreq 2013-04-10 13:19:26 +02:00
Kconfig.arm ARM: S5pv210: compiling issue, ARM_S5PV210_CPUFREQ needs CONFIG_CPU_FREQ_TABLE=y 2013-04-24 13:57:05 +02:00
Kconfig.powerpc cpufreq: powerpc/platforms/cell: move cpufreq driver to drivers/cpufreq 2013-04-10 13:19:26 +02:00
Kconfig.x86 cpufreq: AMD "frequency sensitivity feedback" powersave bias for ondemand governor 2013-04-10 13:19:26 +02:00
kirkwood-cpufreq.c cpufreq: Notify all policy->cpus in cpufreq_notify_transition() 2013-04-02 15:24:00 +02:00
longhaul.c cpufreq: Notify all policy->cpus in cpufreq_notify_transition() 2013-04-02 15:24:00 +02:00
longhaul.h sections: fix section conflicts in drivers/cpufreq 2012-09-14 21:10:46 +02:00
longrun.c cpufreq: Add support for x86 cpuinfo auto loading v4 2012-01-26 16:49:06 -08:00
loongson2_cpufreq.c cpufreq: mips: move cpufreq driver to drivers/cpufreq 2013-04-10 13:19:25 +02:00
Makefile cpufreq: exynos: Add cpufreq driver for exynos5440 2013-04-10 13:19:26 +02:00
maple-cpufreq.c cpufreq: Notify all policy->cpus in cpufreq_notify_transition() 2013-04-02 15:24:00 +02:00
mperf.c [CPUFREQ] Move x86 drivers to drivers/cpufreq/ 2011-05-19 18:51:07 -04:00
mperf.h [CPUFREQ] Move x86 drivers to drivers/cpufreq/ 2011-05-19 18:51:07 -04:00
omap-cpufreq.c cpufreq: OMAP: instantiate omap-cpufreq as a platform_driver 2013-04-10 13:41:00 +02:00
p4-clockmod.c cpufreq: Don't check if cpu is online/offline for cpufreq callbacks 2013-04-02 15:26:32 +02:00
pcc-cpufreq.c cpufreq: Notify all policy->cpus in cpufreq_notify_transition() 2013-04-02 15:24:00 +02:00
powernow-k6.c cpufreq: Notify all policy->cpus in cpufreq_notify_transition() 2013-04-02 15:24:00 +02:00
powernow-k7.c cpufreq: Notify all policy->cpus in cpufreq_notify_transition() 2013-04-02 15:24:00 +02:00
powernow-k7.h [CPUFREQ] Move x86 drivers to drivers/cpufreq/ 2011-05-19 18:51:07 -04:00
powernow-k8.c cpufreq: Don't check if cpu is online/offline for cpufreq callbacks 2013-04-02 15:26:32 +02:00
powernow-k8.h cpufreq: Remove support for hardware P-state chips from powernow-k8 2012-09-09 22:05:30 +02:00
ppc_cbe_cpufreq.c cpufreq: powerpc/platforms/cell: move cpufreq driver to drivers/cpufreq 2013-04-10 13:19:26 +02:00
ppc_cbe_cpufreq.h cpufreq: powerpc/platforms/cell: move cpufreq driver to drivers/cpufreq 2013-04-10 13:19:26 +02:00
ppc_cbe_cpufreq_pervasive.c cpufreq: powerpc/platforms/cell: move cpufreq driver to drivers/cpufreq 2013-04-10 13:19:26 +02:00
ppc_cbe_cpufreq_pmi.c cpufreq: powerpc/platforms/cell: move cpufreq driver to drivers/cpufreq 2013-04-10 13:19:26 +02:00
pxa2xx-cpufreq.c cpufreq: pxa2xx: initialize variables 2013-04-25 20:11:14 +02:00
pxa3xx-cpufreq.c cpufreq: pxa3xx: move cpufreq driver to drivers/cpufreq 2013-04-08 13:02:31 +02:00
s3c64xx-cpufreq.c cpufreq: Notify all policy->cpus in cpufreq_notify_transition() 2013-04-02 15:24:00 +02:00
s3c2416-cpufreq.c cpufreq: Notify all policy->cpus in cpufreq_notify_transition() 2013-04-02 15:24:00 +02:00
s5pv210-cpufreq.c cpufreq: Notify all policy->cpus in cpufreq_notify_transition() 2013-04-02 15:24:00 +02:00
sa1100-cpufreq.c cpufreq: sa11x0: move cpufreq driver to drivers/cpufreq 2013-04-10 13:19:24 +02:00
sa1110-cpufreq.c cpufreq: sa11x0: move cpufreq driver to drivers/cpufreq 2013-04-10 13:19:24 +02:00
sc520_freq.c cpufreq: Notify all policy->cpus in cpufreq_notify_transition() 2013-04-02 15:24:00 +02:00
sh-cpufreq.c cpufreq: sh: move cpufreq driver to drivers/cpufreq 2013-04-10 13:19:25 +02:00
sparc-us2e-cpufreq.c cpufreq: sparc: move cpufreq driver to drivers/cpufreq 2013-04-10 13:19:26 +02:00
sparc-us3-cpufreq.c cpufreq: sparc: move cpufreq driver to drivers/cpufreq 2013-04-10 13:19:26 +02:00
spear-cpufreq.c cpufreq: Notify all policy->cpus in cpufreq_notify_transition() 2013-04-02 15:24:00 +02:00
speedstep-centrino.c cpufreq: Don't check if cpu is online/offline for cpufreq callbacks 2013-04-02 15:26:32 +02:00
speedstep-ich.c cpufreq: Notify all policy->cpus in cpufreq_notify_transition() 2013-04-02 15:24:00 +02:00
speedstep-lib.c cpufreq: Add support for x86 cpuinfo auto loading v4 2012-01-26 16:49:06 -08:00
speedstep-lib.h [CPUFREQ] Move x86 drivers to drivers/cpufreq/ 2011-05-19 18:51:07 -04:00
speedstep-smi.c cpufreq: Notify all policy->cpus in cpufreq_notify_transition() 2013-04-02 15:24:00 +02:00
tegra-cpufreq.c cpufreq: tegra: Move driver to drivers/cpufreq 2013-04-08 13:02:30 +02:00
unicore2-cpufreq.c cpufreq: unicore2: move cpufreq driver to drivers/cpufreq 2013-04-10 13:19:26 +02:00