1. 24 3月, 2011 5 次提交
    • R
      cpufreq: Use syscore_ops for boot CPU suspend/resume (v2) · e00e56df
      Rafael J. Wysocki 提交于
      The cpufreq subsystem uses sysdev suspend and resume for
      executing cpufreq_suspend() and cpufreq_resume(), respectively,
      during system suspend, after interrupts have been switched off on the
      boot CPU, and during system resume, while interrupts are still off on
      the boot CPU.  In both cases the other CPUs are off-line at the
      relevant point (either they have been switched off via CPU hotplug
      during suspend, or they haven't been switched on yet during resume).
      For this reason, although it may seem that cpufreq_suspend() and
      cpufreq_resume() are executed for all CPUs in the system, they are
      only called for the boot CPU in fact, which is quite confusing.
      
      To remove the confusion and to prepare for elimiating sysdev
      suspend and resume operations from the kernel enirely, convernt
      cpufreq to using a struct syscore_ops object for the boot CPU
      suspend and resume and rename the callbacks so that their names
      reflect their purpose.  In addition, put some explanatory remarks
      into their kerneldoc comments.
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      e00e56df
    • R
      KVM: Use syscore_ops instead of sysdev class and sysdev · fb3600cc
      Rafael J. Wysocki 提交于
      KVM uses a sysdev class and a sysdev for executing kvm_suspend()
      after interrupts have been turned off on the boot CPU (during system
      suspend) and for executing kvm_resume() before turning on interrupts
      on the boot CPU (during system resume).  However, since both of these
      functions ignore their arguments, the entire mechanism may be
      replaced with a struct syscore_ops object which is simpler.
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      Acked-by: NAvi Kivity <avi@redhat.com>
      fb3600cc
    • R
      PCI / Intel IOMMU: Use syscore_ops instead of sysdev class and sysdev · 134fac3f
      Rafael J. Wysocki 提交于
      The Intel IOMMU subsystem uses a sysdev class and a sysdev for
      executing iommu_suspend() after interrupts have been turned off
      on the boot CPU (during system suspend) and for executing
      iommu_resume() before turning on interrupts on the boot CPU
      (during system resume).  However, since both of these functions
      ignore their arguments, the entire mechanism may be replaced with a
      struct syscore_ops object which is simpler.
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      Acked-by: NJoerg Roedel <joerg.roedel@amd.com>
      134fac3f
    • R
      timekeeping: Use syscore_ops instead of sysdev class and sysdev · e1a85b2c
      Rafael J. Wysocki 提交于
      The timekeeping subsystem uses a sysdev class and a sysdev for
      executing timekeeping_suspend() after interrupts have been turned off
      on the boot CPU (during system suspend) and for executing
      timekeeping_resume() before turning on interrupts on the boot CPU
      (during system resume).  However, since both of these functions
      ignore their arguments, the entire mechanism may be replaced with a
      struct syscore_ops object which is simpler.
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      Reviewed-by: NThomas Gleixner <tglx@linutronix.de>
      e1a85b2c
    • R
      x86: Use syscore_ops instead of sysdev classes and sysdevs · f3c6ea1b
      Rafael J. Wysocki 提交于
      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: NRafael J. Wysocki <rjw@sisk.pl>
      Reviewed-by: NThomas Gleixner <tglx@linutronix.de>
      Acked-by: NIngo Molnar <mingo@elte.hu>
      f3c6ea1b
  2. 23 3月, 2011 35 次提交