20 Oct, 2014
1 commit
-
A platform_driver does not need to set an owner, it will be populated by the
driver core.Signed-off-by: Wolfram Sang
20 Mar, 2014
1 commit
-
Subsystems that want to register CPU hotplug callbacks, as well as perform
initialization for the CPUs that are already online, often do it as shown
below:get_online_cpus();
for_each_online_cpu(cpu)
init_cpu(cpu);register_cpu_notifier(&foobar_cpu_notifier);
put_online_cpus();
This is wrong, since it is prone to ABBA deadlocks involving the
cpu_add_remove_lock and the cpu_hotplug.lock (when running concurrently
with CPU hotplug operations).Instead, the correct and race-free way of performing the callback
registration is:cpu_notifier_register_begin();
for_each_online_cpu(cpu)
init_cpu(cpu);/* Note the use of the double underscored version of the API */
__register_cpu_notifier(&foobar_cpu_notifier);cpu_notifier_register_done();
Fix the hwmon via-cputemp code by using this latter form of callback
registration.Cc: Jean Delvare
Cc: Ingo Molnar
Acked-by: Guenter Roeck
Signed-off-by: Srivatsa S. Bhat
Signed-off-by: Rafael J. Wysocki
15 Jul, 2013
1 commit
-
The __cpuinit type of throwaway sections might have made sense
some time ago when RAM was more constrained, but now the savings
do not offset the cost and complications. For example, the fix in
commit 5e427ec2d0 ("x86: Fix bit corruption at CPU resume time")
is a good example of the nasty type of bugs that can be created
with improper use of the various __init prefixes.After a discussion on LKML[1] it was decided that cpuinit should go
the way of devinit and be phased out. Once all the users are gone,
we can then finally remove the macros themselves from linux/init.h.This removes all the drivers/hwmon uses of the __cpuinit macros
from all C files.[1] https://lkml.org/lkml/2013/5/20/589
Cc: Fenghua Yu
Cc: lm-sensors@lm-sensors.org
Acked-by: Guenter Roeck
Signed-off-by: Paul Gortmaker
29 Nov, 2012
3 commits
-
CONFIG_HOTPLUG is going away as an option so __devexit is no
longer needed.Signed-off-by: Bill Pemberton
Cc: Hans de Goede
Cc: Jean Delvare
Cc: Alistair John Strachan
Cc: Fenghua Yu
Cc: Juerg Haefliger
Cc: Andreas Herrmann
Cc: Clemens Ladisch
Cc: Rudolf Marek
Cc: Jim Cromie
Cc: "Mark M. Hoffman"
Cc: Roger Lucas
Acked-by: Guenter Roeck
Acked-by: Mark Brown
Signed-off-by: Greg Kroah-Hartman -
CONFIG_HOTPLUG is going away as an option so __devinit is no longer
needed.Signed-off-by: Bill Pemberton
Cc: Hans de Goede
Cc: Jean Delvare
Cc: Alistair John Strachan
Cc: Fenghua Yu
Cc: Juerg Haefliger
Cc: Andreas Herrmann
Cc: Clemens Ladisch
Cc: Rudolf Marek
Cc: Jim Cromie
Cc: "Mark M. Hoffman"
Cc: Roger Lucas
Acked-by: Guenter Roeck
Acked-by: Mark Brown
Signed-off-by: Greg Kroah-Hartman -
CONFIG_HOTPLUG is going away as an option so __devexit_p is no longer
needed.Signed-off-by: Bill Pemberton
Cc: Hans de Goede
Cc: Jean Delvare
Cc: Alistair John Strachan
Cc: Fenghua Yu
Cc: Juerg Haefliger
Cc: Andreas Herrmann
Cc: Clemens Ladisch
Cc: Rudolf Marek
Cc: Jim Cromie
Cc: "Mark M. Hoffman"
Cc: Roger Lucas
Acked-by: Guenter Roeck
Acked-by: Mark Brown
Signed-off-by: Greg Kroah-Hartman
24 Sep, 2012
2 commits
-
Convert to use devm_ functions to reduce code size and simplify the code.
Signed-off-by: Guenter Roeck
-
via_cputemp_init loops with for_each_online_cpu, adding
platform_devices, then calls register_hotcpu_notifier. If a CPU is
offlined between the loop and register_hotcpu_notifier, then later
onlined, via_cputemp_device_add will attempt to add platform devices
with the same ID. A similar race occurs during via_cputemp_exit,
after the module calls unregister_hotcpu_notifier, a CPU might offline
and a device will exist for a CPU that is offline.This fix surrounds for_each_online_cpu and register_hotcpu_notifier
with get_online_cpus+put_online_cpus; and surrounds
unregister_hotcpu_notifier and device unregistering with
get_online_cpus+put_online_cpus.Build tested.
Signed-off-by: Silas Boyd-Wickizer
Acked-by: Harald Welte
Signed-off-by: Jean Delvare
30 Jul, 2012
1 commit
-
... as being referenced from __init code only.
Signed-off-by: Jan Beulich
Signed-off-by: Jean Delvare
27 Jan, 2012
1 commit
-
Use the new x86 cpuid autoprobe interface.
Cc: Jean Delvare
Cc: Guenter Roeck
Signed-off-by: Andi Kleen
Signed-off-by: Thomas Renninger
Acked-by: H. Peter Anvin
Signed-off-by: Greg Kroah-Hartman
26 Jul, 2011
1 commit
-
At least VIA family 6 model D CPU report the VID settings in a MSR,
so expose the value to user-space. Not sure about model A.Signed-off-by: Jean Delvare
Acked-by: Guenter Roeck
Tested-by: Jeff Rickman
09 Jan, 2011
2 commits
-
Signed-off-by: Jan Beulich
Signed-off-by: Guenter Roeck -
Added #define pr_fmt KBUILD_MODNAME ": " fmt
Converted printks to pr_
Coalesced any long formats
Removed prefixes from formatsSigned-off-by: Joe Perches
Signed-off-by: Guenter Roeck
26 Oct, 2010
3 commits
-
CONFIG_HOTPLUG_CPU is used too much in some drivers.
This patch clean them up.Signed-off-by: Chen Gong
Signed-off-by: Guenter Roeck -
These likely originate from these drivers being clones of one another
and/or other drivers which actually needed these includes.Signed-off-by: Jan Beulich
Signed-off-by: Guenter Roeck -
... as they're being called only from a __cpuinit function.
Signed-off-by: Jan Beulich
Signed-off-by: Guenter Roeck
15 Aug, 2010
1 commit
-
The via-cputemp hwmon driver was probably intending "typedef enum {
... } SHOW;", but the "typedef" was missing creating a global variable
named "SHOW". There is absolutely no reason to have this in the
global namespace.Signed-off-by: H. Peter Anvin
Acked-by: Harald Welte
Cc: Juerg Haefliger
Signed-off-by: Jean Delvare
17 Dec, 2009
1 commit
-
This is a driver for the on-die digital temperature sensor of
VIA's recent CPU models.[JD: Misc clean-ups.]
Signed-off-by: Harald Welte
Cc: Juerg Haefliger
Signed-off-by: Jean Delvare
Tested-by: Adam Nielsen