linux/drivers/hwmon
Srivatsa S. Bhat 2480b6a3e5 hwmon, via-cputemp: Fix CPU hotplug callback registration
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 <jdelvare@suse.de>
Cc: Ingo Molnar <mingo@kernel.org>
Acked-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2014-03-20 13:43:48 +01:00
..
pmbus hwmon: (pmbus) Support per-page exponent in linear mode 2014-02-02 21:21:40 -08:00
ab8500.c
abituguru3.c hwmon: Correct some typos 2013-10-18 09:12:02 -07:00
abituguru.c hwmon: Correct some typos 2013-10-18 09:12:02 -07:00
abx500.c hwmon: (abx500) Staticize abx500_temp_attributes 2013-07-14 16:24:25 -07:00
abx500.h
acpi_power_meter.c ACPI: Clean up inclusions of ACPI header files 2013-12-07 01:03:14 +01:00
ad7314.c
ad7414.c
ad7418.c
adcxx.c hwmon: (adcxx) Remove redundant spi_set_drvdata 2013-10-18 09:12:01 -07:00
adm1021.c
adm1025.c Update Jean Delvare's e-mail address 2014-01-29 20:40:08 +01:00
adm1026.c hwmon: Remove unnecessary semicolons 2013-10-13 16:16:25 -07:00
adm1029.c Update Jean Delvare's e-mail address 2014-01-29 20:40:08 +01:00
adm1031.c Update Jean Delvare's e-mail address 2014-01-29 20:40:08 +01:00
adm9240.c
ads1015.c hwmon: (ads1015) Add support for ADS1115 2013-08-11 22:10:40 -07:00
ads7828.c hwmon: use dev_get_platdata() 2013-08-11 22:10:39 -07:00
ads7871.c
adt7x10.c
adt7x10.h
adt7310.c hwmon: (adt7310) Use spi_w8r16be() instead spi_w8r16() 2013-10-03 13:52:15 +01:00
adt7410.c
adt7411.c
adt7462.c hwmon: (adt7462) Use error value returned from find_trange_value() 2013-10-13 16:16:26 -07:00
adt7470.c hwmon: Change my email address. 2013-08-27 08:28:01 -07:00
adt7475.c Update Jean Delvare's e-mail address 2014-01-29 20:40:08 +01:00
amc6821.c hwmon: (amc6821) Remove redundant break 2013-09-11 13:01:40 -07:00
applesmc.c hwmon: (applesmc) Always read until end of data 2013-10-09 09:48:55 -07:00
asb100.c
asc7621.c hwmon: Remove unnecessary semicolons 2013-10-13 16:16:25 -07:00
asus_atk0110.c ACPI: Clean up inclusions of ACPI header files 2013-12-07 01:03:14 +01:00
atxp1.c hwmon: (atxp1) Set and use error code from vid_to_reg() 2013-10-13 16:16:26 -07:00
coretemp.c hwmon, coretemp: Fix CPU hotplug callback registration 2014-03-20 13:43:47 +01:00
da9052-hwmon.c hwmon: (da9052) Fix adc to voltage calculation 2014-01-14 21:36:31 -08:00
da9055-hwmon.c hwmon: (da9055) Remove use of regmap_irq_get_virq() 2014-02-06 17:22:33 -08:00
dme1737.c
ds620.c hwmon: use dev_get_platdata() 2013-08-11 22:10:39 -07:00
ds1621.c Update Jean Delvare's e-mail address 2014-01-29 20:40:08 +01:00
emc6w201.c Update Jean Delvare's e-mail address 2014-01-29 20:40:08 +01:00
emc1403.c hwmon: (emc1403) Add support for EMC1404 and EMC1424 2013-10-18 09:12:04 -07:00
emc2103.c hwmon: (emc2103) Fix return value 2013-09-11 13:01:31 -07:00
f71805f.c Update Jean Delvare's e-mail address 2014-01-29 20:40:08 +01:00
f71882fg.c hwmon: (f71882fg) Remove extra return statement 2013-10-13 16:16:27 -07:00
f75375s.c hwmon: (f75375s) Don't crash the kernel unnecessarily 2013-10-13 16:16:27 -07:00
fam15h_power.c hwmon: remove DEFINE_PCI_DEVICE_TABLE macro 2014-01-14 21:36:30 -08:00
fschmd.c
g760a.c
g762.c hwmon: use dev_get_platdata() 2013-08-11 22:10:39 -07:00
gl518sm.c Update Jean Delvare's e-mail address 2014-01-29 20:40:08 +01:00
gl520sm.c
gpio-fan.c hwmon: (gpio-fan) Include linux/of.h header 2013-10-18 09:12:02 -07:00
hih6130.c hwmon: HIH-6130: Support I2C bus drivers without I2C_FUNC_SMBUS_QUICK 2013-12-11 13:37:30 -08:00
htu21.c hwmon: (htu21) Add Measurement Specialties HTU21D support 2013-08-29 09:09:12 -07:00
hwmon-vid.c hwmon: (hwmon-vid) Add __maybe_unused attribute to dummy variable 2013-09-10 06:28:17 -07:00
hwmon.c hwmon: Provide managed hwmon registration 2013-10-13 16:16:28 -07:00
i5k_amb.c hwmon: Change my email address. 2013-08-27 08:28:01 -07:00
ibmaem.c hwmon: (ibmaem) Fix return value 2013-09-11 13:01:32 -07:00
ibmpex.c hwmon: Change my email address. 2013-08-27 08:28:01 -07:00
iio_hwmon.c
ina2xx.c hwmon: (ina2xx) Convert to use devm_hwmon_device_register_with_groups 2013-10-13 16:16:29 -07:00
ina209.c hwmon: (ina209) Convert to use devm_hwmon_device_register_with_groups 2013-10-18 09:11:57 -07:00
it87.c Update Jean Delvare's e-mail address 2014-01-29 20:40:08 +01:00
jc42.c hwmon: (jc42) fix coccinelle warnings 2013-10-18 09:12:01 -07:00
jz4740-hwmon.c tree-wide: use reinit_completion instead of INIT_COMPLETION 2013-11-15 09:32:21 +09:00
k8temp.c hwmon: remove DEFINE_PCI_DEVICE_TABLE macro 2014-01-14 21:36:30 -08:00
k10temp.c hwmon: (k10temp) Add support for Kaveri CPUs 2014-01-14 21:36:54 -08:00
Kconfig hwmon: Fix SENSORS_TMP102 dependencies to eliminate build errors 2014-02-02 17:59:07 +01:00
lineage-pem.c
lm63.c Update Jean Delvare's e-mail address 2014-01-29 20:40:08 +01:00
lm70.c hwmon: (lm70) Remove redundant spi_set_drvdata 2013-10-18 09:12:01 -07:00
lm73.c hwmon: (lm73) Convert to use devm_hwmon_device_register_with_groups 2013-10-13 16:16:28 -07:00
lm75.c hwmon: lm75: expose to thermal fw via DT nodes 2013-12-04 09:34:24 -04:00
lm75.h
lm77.c
lm78.c Update Jean Delvare's e-mail address 2014-01-29 20:40:08 +01:00
lm80.c
lm83.c Update Jean Delvare's e-mail address 2014-01-29 20:40:08 +01:00
lm85.c Update Jean Delvare's e-mail address 2014-01-29 20:40:08 +01:00
lm87.c Update Jean Delvare's e-mail address 2014-01-29 20:40:08 +01:00
lm90.c Update Jean Delvare's e-mail address 2014-01-29 20:40:08 +01:00
lm92.c Update Jean Delvare's e-mail address 2014-01-29 20:40:08 +01:00
lm93.c Update Jean Delvare's e-mail address 2014-01-29 20:40:08 +01:00
lm95234.c hwmon: (lm95234) fix coccinelle warnings 2013-10-18 09:12:00 -07:00
lm95241.c
lm95245.c
ltc4151.c
ltc4215.c
ltc4245.c hwmon: (ltc4245) Convert to use hwmon_device_register_with_groups 2013-10-13 16:16:27 -07:00
ltc4261.c hwmon: (ltc4261) fix coccinelle warnings 2013-10-18 09:12:00 -07:00
Makefile hwmon: (htu21) Add Measurement Specialties HTU21D support 2013-08-29 09:09:12 -07:00
max197.c hwmon: use dev_get_platdata() 2013-08-11 22:10:39 -07:00
max1111.c
max1619.c Update Jean Delvare's e-mail address 2014-01-29 20:40:08 +01:00
max1668.c hwmon: (max1668) Fix writing the minimum temperature 2014-02-18 15:53:49 -08:00
max6639.c hwmon: use dev_get_platdata() 2013-08-11 22:10:39 -07:00
max6642.c Update Jean Delvare's e-mail address 2014-01-29 20:40:08 +01:00
max6650.c hwmon: Correct some typos 2013-10-18 09:12:02 -07:00
max6697.c hwmon: (max6697) fix coccinelle warnings 2013-10-18 09:11:59 -07:00
max16065.c hwmon: (max16065) Convert to use devm_hwmon_device_register_with_groups 2013-10-13 16:16:29 -07:00
mc13783-adc.c hwmon: (mc13783-adc) Increase size of name string 2013-10-13 16:16:26 -07:00
mcp3021.c hwmon: use dev_get_platdata() 2013-08-11 22:10:39 -07:00
nct6775.c Merge branch 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging 2014-01-29 18:56:27 -08:00
ntc_thermistor.c hwmon: (ntc_thermistor) Avoid math overflow 2014-02-13 19:43:52 -08:00
pc87360.c Update Jean Delvare's e-mail address 2014-01-29 20:40:08 +01:00
pc87427.c Update Jean Delvare's e-mail address 2014-01-29 20:40:08 +01:00
pcf8591.c Update Jean Delvare's e-mail address 2014-01-29 20:40:08 +01:00
s3c-hwmon.c hwmon: use dev_get_platdata() 2013-08-11 22:10:39 -07:00
sch56xx-common.c
sch56xx-common.h
sch5627.c
sch5636.c
sht15.c New driver for HTU21D (humidity sensor) 2013-09-03 10:43:35 -07:00
sht21.c
sis5595.c Merge branch 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging 2014-01-29 18:56:27 -08:00
smm665.c
smsc47b397.c Update Jean Delvare's e-mail address 2014-01-29 20:40:08 +01:00
smsc47m1.c Update Jean Delvare's e-mail address 2014-01-29 20:40:08 +01:00
smsc47m192.c
thmc50.c
tmp102.c hwmon: tmp102: expose to thermal fw via DT nodes 2013-12-04 09:34:25 -04:00
tmp401.c hwmon: (tmp401) Convert to use devm_hwmon_device_register_with_groups 2013-10-18 09:11:52 -07:00
tmp421.c hwmon: (tmp421) Fix return value 2013-09-11 13:01:41 -07:00
twl4030-madc-hwmon.c
ultra45_env.c
vexpress.c
via686a.c hwmon: remove DEFINE_PCI_DEVICE_TABLE macro 2014-01-14 21:36:30 -08:00
via-cputemp.c hwmon, via-cputemp: Fix CPU hotplug callback registration 2014-03-20 13:43:48 +01:00
vt1211.c
vt8231.c hwmon: remove DEFINE_PCI_DEVICE_TABLE macro 2014-01-14 21:36:30 -08:00
w83l785ts.c Update Jean Delvare's e-mail address 2014-01-29 20:40:08 +01:00
w83l786ng.c hwmon: (w83l768ng) Fix fan speed control range 2013-12-12 08:05:32 +01:00
w83627ehf.c Update Jean Delvare's e-mail address 2014-01-29 20:40:08 +01:00
w83627hf.c Update Jean Delvare's e-mail address 2014-01-29 20:40:08 +01:00
w83781d.c Update Jean Delvare's e-mail address 2014-01-29 20:40:08 +01:00
w83791d.c hwmon: Correct some typos 2013-10-18 09:12:02 -07:00
w83792d.c hwmon: Correct some typos 2013-10-18 09:12:02 -07:00
w83793.c hwmon: (w83793) Clean up a signedness issue 2013-10-19 09:04:25 -07:00
w83795.c Update Jean Delvare's e-mail address 2014-01-29 20:40:08 +01:00
wm831x-hwmon.c
wm8350-hwmon.c