1. 29 7月, 2010 1 次提交
  2. 17 5月, 2010 1 次提交
  3. 09 2月, 2010 1 次提交
  4. 08 12月, 2009 1 次提交
  5. 14 10月, 2009 1 次提交
    • B
      powerpc/pmac: Fix issues with sleep on some powerbooks · 11a50873
      Benjamin Herrenschmidt 提交于
      Since the change of how interrupts are disabled during suspend,
      certain PowerBook models started exhibiting various issues during
      suspend or resume from sleep.
      
      I finally tracked it down to the code that runs various "platform"
      functions (kind of little scripts extracted from the device-tree),
      which uses our i2c and PMU drivers expecting interrutps to work,
      and at a time where with the new scheme, they have been disabled.
      
      This causes timeouts internally which for some reason results in
      the PMU being unable to see the trackpad, among other issues, really
      it depends on the machine. Most of the time, we fail to properly adjust
      some clocks for suspend/resume so the results are not always
      predictable.
      
      This patch fixes it by using IRQF_TIMER for both the PMU and the I2C
      interrupts. I prefer doing it this way than moving the call sites since
      I really want those platform functions to still be called after all
      drivers (and before sysdevs).
      
      We also do a slight cleanup to via-pmu.c driver to make sure the
      ADB autopoll mask is handled correctly when doing bus resets
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      11a50873
  6. 21 12月, 2008 1 次提交
  7. 03 7月, 2008 1 次提交
  8. 13 3月, 2008 1 次提交
    • G
      [POWERPC] Fix build of modular drivers/macintosh/apm_emu.c · 620a2459
      Guido Guenther 提交于
      Currently, if drivers/macintosh/apm_emu is a module and the config
      doesn't have CONFIG_SUSPEND we get:
      
      ERROR: "pmu_batteries" [drivers/macintosh/apm_emu.ko] undefined!
      ERROR: "pmu_battery_count" [drivers/macintosh/apm_emu.ko] undefined!
      ERROR: "pmu_power_flags" [drivers/macintosh/apm_emu.ko] undefined!
      
      on PPC32.  The variables aren't wrapped in '#if defined(CONFIG_SUSPEND)'
      so we probably shouldn't wrap the exports either.  This removes the
      CONFIG_SUSPEND part of the export, which fixes compilation on ppc32.
      Signed-off-by: NGuido Guenther <agx@sigxcpu.org>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      620a2459
  9. 25 1月, 2008 1 次提交
  10. 21 12月, 2007 2 次提交
  11. 19 12月, 2007 3 次提交
    • J
      [POWERPC] powermac: Use generic suspend code · f91266ed
      Johannes Berg 提交于
      This adds platform_suspend_ops for PMU based machines, directly in
      the PMU driver.  This allows suspending via /sys/power/state
      on powerbooks.
      
      The patch also replaces the PMU ioctl with a simple call to
      pm_suspend(PM_SUSPEND_MEM).
      
      Additionally, it cleans up some debug code.
      Signed-off-by: NJohannes Berg <johannes@sipsolutions.net>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      f91266ed
    • P
      [POWERPC] Fix sleep on powerbook 3400 · 887ef35a
      Paul Mackerras 提交于
      Sleep on the powerbook 3400 has been broken since the change that made
      powerbook_sleep_3400 call pmac_suspend_devices(), which disables
      interrupts.  There are a couple of loops in powerbook_sleep_3400 that
      depend on interrupts being enabled, and in fact it has to have
      interrupts enabled at the point of going to sleep since it is an
      interrupt from the PMU that wakes it up.
      
      This fixes it by using pmu_wait_complete() instead of a spinloop, and
      by explicitly enabling interrupts before putting the CPU into sleep
      mode (which is OK since all interrupts except the PMU interrupt have
      been disabled at the interrupt controller by this stage).
      
      This changes the logic so that it keeps putting the CPU into sleep mode
      until the completion of the interrupt transaction from the PMU that
      signals the end of sleep.  Also, we now call pmu_unlock() before sleep
      so that the via_pmu_interrupt() code can process the interrupt event
      from the PMU properly.
      
      Now that generic code saves and restores PCI state, it is no longer
      necessary to do that here.  Thus pbook_pci_save/restore and related
      functions are no longer necessary, so this removes them.
      
      Lastly, this moves the ioremap of the memory controller to init code
      rather than doing it on every sleep/wakeup cycle.
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      887ef35a
    • J
      [POWERPC] via-pmu: Kill sleep notifiers completely · b819a9bf
      Johannes Berg 提交于
      This kills off the remnants of the old sleep notifiers now that they
      are no longer used.
      Signed-off-by: NJohannes Berg <johannes@sipsolutions.net>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      b819a9bf
  12. 18 12月, 2007 1 次提交
  13. 03 12月, 2007 2 次提交
  14. 20 10月, 2007 1 次提交
  15. 25 8月, 2007 1 次提交
    • O
      [POWERPC] Fix undefined reference to device_power_up/resume · e120e8d0
      Olaf Hering 提交于
      Current Linus tree fails to link on pmac32:
      
      drivers/built-in.o: In function `pmac_wakeup_devices':
      via-pmu.c:(.text+0x5bab4): undefined reference to `device_power_up'
      via-pmu.c:(.text+0x5bb08): undefined reference to `device_resume'
      drivers/built-in.o: In function `pmac_suspend_devices':
      via-pmu.c:(.text+0x5c260): undefined reference to `device_power_down'
      via-pmu.c:(.text+0x5c27c): undefined reference to `device_resume'
      make[1]: *** [.tmp_vmlinux1] Error 1
      
      changing CONFIG_PM > CONFIG_PM_SLEEP leads to:
      
      drivers/built-in.o: In function `pmu_led_set':
      via-pmu-led.c:(.text+0x5cdca): undefined reference to `pmu_sys_suspended'
      via-pmu-led.c:(.text+0x5cdce): undefined reference to `pmu_sys_suspended'
      drivers/built-in.o: In function `pmu_req_done':
      via-pmu-led.c:(.text+0x5ce3e): undefined reference to `pmu_sys_suspended'
      via-pmu-led.c:(.text+0x5ce42): undefined reference to `pmu_sys_suspended'
      drivers/built-in.o: In function `adb_init':
      (.init.text+0x4c5c): undefined reference to `pmu_register_sleep_notifier'
      make[1]: *** [.tmp_vmlinux1] Error 1
      
      So change even more places from PM to PM_SLEEP to allow linking.
      Signed-off-by: NOlaf Hering <olaf@aepfle.de>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      e120e8d0
  16. 17 8月, 2007 1 次提交
  17. 08 5月, 2007 1 次提交
  18. 07 5月, 2007 1 次提交
  19. 27 4月, 2007 1 次提交
  20. 26 4月, 2007 1 次提交
  21. 24 4月, 2007 3 次提交
  22. 13 4月, 2007 1 次提交
  23. 26 3月, 2007 1 次提交
  24. 13 2月, 2007 3 次提交
  25. 12 2月, 2007 1 次提交
  26. 06 1月, 2007 1 次提交
  27. 08 12月, 2006 1 次提交
  28. 05 10月, 2006 1 次提交
    • D
      IRQ: Maintain regs pointer globally rather than passing to IRQ handlers · 7d12e780
      David Howells 提交于
      Maintain a per-CPU global "struct pt_regs *" variable which can be used instead
      of passing regs around manually through all ~1800 interrupt handlers in the
      Linux kernel.
      
      The regs pointer is used in few places, but it potentially costs both stack
      space and code to pass it around.  On the FRV arch, removing the regs parameter
      from all the genirq function results in a 20% speed up of the IRQ exit path
      (ie: from leaving timer_interrupt() to leaving do_IRQ()).
      
      Where appropriate, an arch may override the generic storage facility and do
      something different with the variable.  On FRV, for instance, the address is
      maintained in GR28 at all times inside the kernel as part of general exception
      handling.
      
      Having looked over the code, it appears that the parameter may be handed down
      through up to twenty or so layers of functions.  Consider a USB character
      device attached to a USB hub, attached to a USB controller that posts its
      interrupts through a cascaded auxiliary interrupt controller.  A character
      device driver may want to pass regs to the sysrq handler through the input
      layer which adds another few layers of parameter passing.
      
      I've build this code with allyesconfig for x86_64 and i386.  I've runtested the
      main part of the code on FRV and i386, though I can't test most of the drivers.
      I've also done partial conversion for powerpc and MIPS - these at least compile
      with minimal configurations.
      
      This will affect all archs.  Mostly the changes should be relatively easy.
      Take do_IRQ(), store the regs pointer at the beginning, saving the old one:
      
      	struct pt_regs *old_regs = set_irq_regs(regs);
      
      And put the old one back at the end:
      
      	set_irq_regs(old_regs);
      
      Don't pass regs through to generic_handle_irq() or __do_IRQ().
      
      In timer_interrupt(), this sort of change will be necessary:
      
      	-	update_process_times(user_mode(regs));
      	-	profile_tick(CPU_PROFILING, regs);
      	+	update_process_times(user_mode(get_irq_regs()));
      	+	profile_tick(CPU_PROFILING);
      
      I'd like to move update_process_times()'s use of get_irq_regs() into itself,
      except that i386, alone of the archs, uses something other than user_mode().
      
      Some notes on the interrupt handling in the drivers:
      
       (*) input_dev() is now gone entirely.  The regs pointer is no longer stored in
           the input_dev struct.
      
       (*) finish_unlinks() in drivers/usb/host/ohci-q.c needs checking.  It does
           something different depending on whether it's been supplied with a regs
           pointer or not.
      
       (*) Various IRQ handler function pointers have been moved to type
           irq_handler_t.
      Signed-Off-By: NDavid Howells <dhowells@redhat.com>
      (cherry picked from 1b16e7ac850969f38b375e511e3fa2f474a33867 commit)
      7d12e780
  29. 02 10月, 2006 1 次提交
  30. 01 10月, 2006 1 次提交
  31. 02 9月, 2006 1 次提交
    • B
      [PATCH] powerpc: More via-pmu backlight fixes · d565dd3b
      Benjamin Herrenschmidt 提交于
      The via-pmu backlight code (introduced in 2.6.18) has various design issues
      causing crashes on machines using it like the old Wallstreet powerbook
      (Michael, the author, never managed to test on these and I just got my hand
      on one of those old beasts).
      
      This fixes them by no longer trying to hijack the backlight device of the
      frontmost framebuffer (causing that framebuffer to crash) but having it's
      own local bits instead.  Might look weird but it's better that way on those
      old machines, at least as a last-minute fix for 2.6.18.  We might rework
      the whole thing later.  This patch also changes the way it gets notified of
      sleep and wakeup in order to properly shut the backlight down on sleep and
      bring it back on wakeup.
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: "Antonino A. Daplas" <adaplas@pol.net>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      d565dd3b
  32. 01 8月, 2006 1 次提交