x86: Use syscore_ops instead of sysdev classes and sysdevs
authorRafael J. Wysocki <rjw@sisk.pl>
Wed, 23 Mar 2011 21:15:54 +0000 (22:15 +0100)
committerRafael J. Wysocki <rjw@sisk.pl>
Wed, 23 Mar 2011 21:15:54 +0000 (22:15 +0100)
commitf3c6ea1b06c71b43f751b36bd99345369fe911af
treea7ed142d4a183cc97fa7fc2af1cc5dec61827aa2
parent4bbba111d94781d34081c37856bbc5eb33f6c72a
x86: Use syscore_ops instead of sysdev classes and sysdevs

Some subsystems in the x86 tree need to carry out suspend/resume and
shutdown operations with one CPU on-line and interrupts disabled and
they define sysdev classes and sysdevs or sysdev drivers for this
purpose.  This leads to unnecessarily complicated code and excessive
memory usage, so switch them to using struct syscore_ops objects for
this purpose instead.

Generally, there are three categories of subsystems that use
sysdevs for implementing PM operations: (1) subsystems whose
suspend/resume callbacks ignore their arguments entirely (the
majority), (2) subsystems whose suspend/resume callbacks use their
struct sys_device argument, but don't really need to do that,
because they can be implemented differently in an arguably simpler
way (io_apic.c), and (3) subsystems whose suspend/resume callbacks
use their struct sys_device argument, but the value of that argument
is always the same and could be ignored (microcode_core.c).  In all
of these cases the subsystems in question may be readily converted to
using struct syscore_ops objects for power management and shutdown.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Ingo Molnar <mingo@elte.hu>
arch/x86/kernel/amd_iommu_init.c
arch/x86/kernel/apic/apic.c
arch/x86/kernel/apic/io_apic.c
arch/x86/kernel/cpu/mcheck/mce.c
arch/x86/kernel/cpu/mtrr/main.c
arch/x86/kernel/i8237.c
arch/x86/kernel/i8259.c
arch/x86/kernel/microcode_core.c
arch/x86/kernel/pci-gart_64.c
arch/x86/oprofile/nmi_int.c
This page took 0.031359 seconds and 5 git commands to generate.