Age | Commit message (Collapse) | Author | Files | Lines |
|
The new macro set has a consistent namespace and uses C99 initializers
instead of the grufty C89 ones.
Signed-off-by: Thomas Gleixner <[email protected]>
Signed-off-by: Borislav Petkov <[email protected]>
Reviewed-by: Greg Kroah-Hartman <[email protected]>
Link: https://lkml.kernel.org/r/[email protected]
|
|
Based on 1 normalized pattern(s):
this program is free software you can redistribute it and or modify
it under the terms of the gnu general public license as published by
the free software foundation version 2 of the license this program
is distributed in the hope that it will be useful but without any
warranty without even the implied warranty of merchantability or
fitness for a particular purpose see the gnu general public license
for more details you should have received a copy of the gnu general
public license along with this program if not write to the free
software foundation inc 51 franklin street fifth floor boston ma
02110 1301 usa
extracted by the scancode license scanner the SPDX license identifier
GPL-2.0-only
has been chosen to replace the boilerplate/reference in 12 file(s).
Signed-off-by: Thomas Gleixner <[email protected]>
Reviewed-by: Richard Fontana <[email protected]>
Reviewed-by: Kate Stewart <[email protected]>
Reviewed-by: Allison Randal <[email protected]>
Cc: [email protected]
Link: https://lkml.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Use SENSOR[_DEVICE]_ATTR[_2]_{RO,RW,WO} to simplify the source code,
to improve readability, and to reduce the chance of inconsistencies.
Also replace any remaining S_<PERMS> in the driver with octal values.
The conversion was done automatically with coccinelle. The semantic patches
and the scripts used to generate this commit log are available at
https://github.com/groeck/coccinelle-patches/hwmon/.
This patch does not introduce functional changes. It was verified by
compiling the old and new files and comparing text and data sizes.
Signed-off-by: Guenter Roeck <[email protected]>
|
|
New centaur CPUs (Familiy == 7) also support this cpu temperature sensor.
Signed-off-by: David Wang <[email protected]>
[groeck: Dropped changelog, updated subject]
Signed-off-by: Guenter Roeck <[email protected]>
|
|
Use DEVICE_ATTR_RO for read-only attributes. This simplifies the source
code, improves readbility, and reduces the chance of inconsistencies.
The conversion was done automatically using coccinelle. It was validated
by compiling both the old and the new source code and comparing its text,
data, and bss size.
Signed-off-by: Julia Lawall <[email protected]>
[groeck: Updated description]
Signed-off-by: Guenter Roeck <[email protected]>
|
|
Install the callbacks via the state machine and let the core invoke the
callbacks on the already online CPUs. When the hotplug state is
unregistered the cleanup function is called for each cpu. So both cpu loops
in init() and exit() are not longer required.
Cc: Jean Delvare <[email protected]>
Cc: Guenter Roeck <[email protected]>
Cc: [email protected]
Signed-off-by: Sebastian Andrzej Siewior <[email protected]>
Signed-off-by: Guenter Roeck <[email protected]>
|
|
The check loop for the cpu type is pointless as we already have a cpu model
match before that. The only thing which is not covered by that check would
be a smp system with two different cores. Not likely to happen.
Cc: Jean Delvare <[email protected]>
Cc: Guenter Roeck <[email protected]>
Signed-off-by: Thomas Gleixner <[email protected]>
Signed-off-by: Sebastian Andrzej Siewior <[email protected]>
Signed-off-by: Guenter Roeck <[email protected]>
|
|
A platform_driver does not need to set an owner, it will be populated by the
driver core.
Signed-off-by: Wolfram Sang <[email protected]>
|
|
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 <[email protected]>
Cc: Ingo Molnar <[email protected]>
Acked-by: Guenter Roeck <[email protected]>
Signed-off-by: Srivatsa S. Bhat <[email protected]>
Signed-off-by: Rafael J. Wysocki <[email protected]>
|
|
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 <[email protected]>
Cc: [email protected]
Acked-by: Guenter Roeck <[email protected]>
Signed-off-by: Paul Gortmaker <[email protected]>
|
|
CONFIG_HOTPLUG is going away as an option so __devexit is no
longer needed.
Signed-off-by: Bill Pemberton <[email protected]>
Cc: Hans de Goede <[email protected]>
Cc: Jean Delvare <[email protected]>
Cc: Alistair John Strachan <[email protected]>
Cc: Fenghua Yu <[email protected]>
Cc: Juerg Haefliger <[email protected]>
Cc: Andreas Herrmann <[email protected]>
Cc: Clemens Ladisch <[email protected]>
Cc: Rudolf Marek <[email protected]>
Cc: Jim Cromie <[email protected]>
Cc: "Mark M. Hoffman" <[email protected]>
Cc: Roger Lucas <[email protected]>
Acked-by: Guenter Roeck <[email protected]>
Acked-by: Mark Brown <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
CONFIG_HOTPLUG is going away as an option so __devinit is no longer
needed.
Signed-off-by: Bill Pemberton <[email protected]>
Cc: Hans de Goede <[email protected]>
Cc: Jean Delvare <[email protected]>
Cc: Alistair John Strachan <[email protected]>
Cc: Fenghua Yu <[email protected]>
Cc: Juerg Haefliger <[email protected]>
Cc: Andreas Herrmann <[email protected]>
Cc: Clemens Ladisch <[email protected]>
Cc: Rudolf Marek <[email protected]>
Cc: Jim Cromie <[email protected]>
Cc: "Mark M. Hoffman" <[email protected]>
Cc: Roger Lucas <[email protected]>
Acked-by: Guenter Roeck <[email protected]>
Acked-by: Mark Brown <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
CONFIG_HOTPLUG is going away as an option so __devexit_p is no longer
needed.
Signed-off-by: Bill Pemberton <[email protected]>
Cc: Hans de Goede <[email protected]>
Cc: Jean Delvare <[email protected]>
Cc: Alistair John Strachan <[email protected]>
Cc: Fenghua Yu <[email protected]>
Cc: Juerg Haefliger <[email protected]>
Cc: Andreas Herrmann <[email protected]>
Cc: Clemens Ladisch <[email protected]>
Cc: Rudolf Marek <[email protected]>
Cc: Jim Cromie <[email protected]>
Cc: "Mark M. Hoffman" <[email protected]>
Cc: Roger Lucas <[email protected]>
Acked-by: Guenter Roeck <[email protected]>
Acked-by: Mark Brown <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Convert to use devm_ functions to reduce code size and simplify the code.
Signed-off-by: Guenter Roeck <[email protected]>
|
|
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 <[email protected]>
Acked-by: Harald Welte <[email protected]>
Signed-off-by: Jean Delvare <[email protected]>
|
|
... as being referenced from __init code only.
Signed-off-by: Jan Beulich <[email protected]>
Signed-off-by: Jean Delvare <[email protected]>
|
|
Use the new x86 cpuid autoprobe interface.
Cc: Jean Delvare <[email protected]>
Cc: Guenter Roeck <[email protected]>
Signed-off-by: Andi Kleen <[email protected]>
Signed-off-by: Thomas Renninger <[email protected]>
Acked-by: H. Peter Anvin <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
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 <[email protected]>
Acked-by: Guenter Roeck <[email protected]>
Tested-by: Jeff Rickman <[email protected]>
|
|
Signed-off-by: Jan Beulich <[email protected]>
Signed-off-by: Guenter Roeck <[email protected]>
|
|
Added #define pr_fmt KBUILD_MODNAME ": " fmt
Converted printks to pr_<level>
Coalesced any long formats
Removed prefixes from formats
Signed-off-by: Joe Perches <[email protected]>
Signed-off-by: Guenter Roeck <[email protected]>
|
|
CONFIG_HOTPLUG_CPU is used too much in some drivers.
This patch clean them up.
Signed-off-by: Chen Gong <[email protected]>
Signed-off-by: Guenter Roeck <[email protected]>
|
|
via-cpu}temp.c
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 <[email protected]>
Signed-off-by: Guenter Roeck <[email protected]>
|
|
... as they're being called only from a __cpuinit function.
Signed-off-by: Jan Beulich <[email protected]>
Signed-off-by: Guenter Roeck <[email protected]>
|
|
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 <[email protected]>
Acked-by: Harald Welte <[email protected]>
Cc: Juerg Haefliger <[email protected]>
Signed-off-by: Jean Delvare <[email protected]>
|
|
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 <[email protected]>
Cc: Juerg Haefliger <[email protected]>
Signed-off-by: Jean Delvare <[email protected]>
Tested-by: Adam Nielsen <[email protected]>
|