1. 24 7月, 2007 2 次提交
  2. 22 7月, 2007 7 次提交
  3. 21 7月, 2007 1 次提交
  4. 20 7月, 2007 4 次提交
    • P
      mm: Remove slab destructors from kmem_cache_create(). · 20c2df83
      Paul Mundt 提交于
      Slab destructors were no longer supported after Christoph's
      c59def9f change. They've been
      BUGs for both slab and slub, and slob never supported them
      either.
      
      This rips out support for the dtor pointer from kmem_cache_create()
      completely and fixes up every single callsite in the kernel (there were
      about 224, not including the slab allocator definitions themselves,
      or the documentation references).
      Signed-off-by: NPaul Mundt <lethal@linux-sh.org>
      20c2df83
    • R
      PM: Introduce pm_power_off_prepare · bd804eba
      Rafael J. Wysocki 提交于
      Introduce the pm_power_off_prepare() callback that can be registered by the
      interested platforms in analogy with pm_idle() and pm_power_off(), used for
      preparing the system to power off (needed by ACPI).
      
      This allows us to drop acpi_sysclass and device_acpi that are only defined in
      order to register the ACPI power off preparation callback, which is needed by
      pm_power_off() registered in a much different way.
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      Acked-by: NPavel Machek <pavel@ucw.cz>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      bd804eba
    • R
      ACPI: Do not prepare for hibernation in acpi_shutdown · d7372cdf
      Rafael J. Wysocki 提交于
      Since we are now explicitly calling hibernation_ops->prepare() before
      hibernation_ops->enter() in hibernation_platform_enter() (defined in
      kernel/power/disk.c), ACPI should not call acpi_sleep_prepare(ACPI_STATE_S4)
      from acpi_shutdown().
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      Acked-by: NPavel Machek <pavel@ucw.cz>
      Cc: Len Brown <lenb@kernel.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      d7372cdf
    • R
      swsusp: introduce restore platform operations · a634cc10
      Rafael J. Wysocki 提交于
      At least on some machines it is necessary to prepare the ACPI firmware for the
      restoration of the system memory state from the hibernation image if the
      "platform" mode of hibernation has been used.  Namely, in that cases we need
      to disable the GPEs before replacing the "boot" kernel with the "frozen"
      kernel (cf.  http://bugzilla.kernel.org/show_bug.cgi?id=7887).  After the
      restore they will be re-enabled by hibernation_ops->finish(), but if the
      restore fails, they have to be re-enabled by the restore code explicitly.
      
      For this purpose we can introduce two additional hibernation operations,
      called pre_restore() and restore_cleanup() and call them from the restore code
      path.  Still, they should be called if the "platform" mode of hibernation has
      been used, so we need to pass the information about the hibernation mode from
      the "frozen" kernel to the "boot" kernel in the image header.
      
      Apparently, we can't drop the disabling of GPEs before the restore because of
      Bug #7887 .   We also can't do it unconditionally, because the GPEs wouldn't
      have been enabled after a successful restore if the suspend had been done in
      the 'shutdown' or 'reboot' mode.
      
      In principle we could (and probably should) unconditionally disable the GPEs
      before each snapshot creation *and* before the restore, but then we'd have to
      unconditionally enable them after the snapshot creation as well as after the
      restore (or restore failure)   Still, for this purpose we'd need to modify
      acpi_enter_sleep_state_prep() and acpi_leave_sleep_state() and we'd have to
      introduce some mechanism synchronizing the disablind/enabling of the GPEs with
      the device drivers' .suspend()/.resume() routines and with
      disable_/enable_nonboot_cpus().   However, this would have affected the
      suspend (ie.  s2ram) code as well as the hibernation, which I'd like to avoid
      in this patch series.
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      Cc: Nigel Cunningham <nigel@nigel.suspend2.net>
      Cc: Pavel Machek <pavel@ucw.cz>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      a634cc10
  5. 19 7月, 2007 3 次提交
  6. 18 7月, 2007 1 次提交
    • J
      Add common orderly_poweroff() · 10a0a8d4
      Jeremy Fitzhardinge 提交于
      Various pieces of code around the kernel want to be able to trigger an
      orderly poweroff.  This pulls them together into a single
      implementation.
      
      By default the poweroff command is /sbin/poweroff, but it can be set
      via sysctl: kernel/poweroff_cmd.  This is split at whitespace, so it
      can include command-line arguments.
      
      This patch replaces four other instances of invoking either "poweroff"
      or "shutdown -h now": two sbus drivers, and acpi thermal
      management.
      
      sparc64 has its own "powerd"; still need to determine whether it should
      be replaced by orderly_poweroff().
      Signed-off-by: NJeremy Fitzhardinge <jeremy@xensource.com>
      Acked-by: NLen Brown <lenb@kernel.org>
      Signed-off-by: NChris Wright <chrisw@sous-sol.org>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Randy Dunlap <randy.dunlap@oracle.com>
      Cc: Andi Kleen <ak@suse.de>
      Cc: Al Viro <viro@zeniv.linux.org.uk>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: David S. Miller <davem@davemloft.net>
      10a0a8d4
  7. 16 7月, 2007 1 次提交
  8. 12 7月, 2007 1 次提交
    • A
      PCI: Change all drivers to use pci_device->revision · 44c10138
      Auke Kok 提交于
      Instead of all drivers reading pci config space to get the revision
      ID, they can now use the pci_device->revision member.
      
      This exposes some issues where drivers where reading a word or a dword
      for the revision number, and adding useless error-handling around the
      read. Some drivers even just read it for no purpose of all.
      
      In devices where the revision ID is being copied over and used in what
      appears to be the equivalent of hotpath, I have left the copy code
      and the cached copy as not to influence the driver's performance.
      
      Compile tested with make all{yes,mod}config on x86_64 and i386.
      Signed-off-by: NAuke Kok <auke-jan.h.kok@intel.com>
      Acked-by: NDave Jones <davej@redhat.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      44c10138
  9. 04 7月, 2007 2 次提交
  10. 03 7月, 2007 9 次提交
  11. 02 7月, 2007 1 次提交
    • M
      asus_acpi: fix oops on non-asus machines · 5ebffd7c
      Maxime Austruy 提交于
      If asus_acpi_init doesn't find any device it knows about, it mistakenly
      returns a "success" error code even though it cleans up after itself.  Later
      when trying to rmmod asus_acpi, the module_exit routine would try to clean up
      one more time and we would end up calling
      acpi_bus_unregister_driver(&asus_hotk_driver) twice.  This patch addresses
      this first problem by returning -ENODEV when no appropriate device is found.
      
      Then there was also another bug with the code handling the return value of
      backlight_device_register.  If this function ever failed, the driver would
      cleanup by calling the module_exit routine from module_init, but it would
      still return "success".  So any attempt to rmmod this module would result in
      asus_acpi_exit being called twice but it's not ready to handle it (I haven't
      hit this bug, just found it by code inspection).  This patch fixes that by
      inserting a return -ENODEV; at the end of this error handling path.
      Signed-off-by: NMaxime Austruy <maxime@tralhalla.org>
      Cc: Len Brown <lenb@kernel.org>
      Cc: Richard Purdie <rpurdie@rpsys.net>
      Cc: Jan Engelhardt <jengelh@computergmbh.de>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      5ebffd7c
  12. 24 6月, 2007 4 次提交
  13. 23 6月, 2007 1 次提交
    • V
      ACPI: fix 2.6.20 SMP boot regression · d5a3d32a
      Venkatesh Pallipadi 提交于
      Always disable/enable interrupts in the acpi idle routine,
      even in the error path.
      
      This is required as the 2.6.20 change in git commit d331e739...
      "Fix interrupt race in idle callback" expects the idle handler
      to enable interrupt before returning.
      
      There was a case in acpi idle routine, in which interrupt was not being
      enabled before return, which caused the system to hang at bootup, while
      enabling C-states on an SMP system.
      
      The signature of the hang was that "processor.nocst"
      was required to enable boot.
      Signed-off-by: NVenkatesh Pallipadi <venkatesh.pallipadi@intel.com>
      Signed-off-by: NLen Brown <len.brown@intel.com>
      d5a3d32a
  14. 20 6月, 2007 1 次提交
  15. 18 6月, 2007 2 次提交