21 Dec, 2008

1 commit

  • This splits the mmu_context handling between 32-bit hash based
    processors, 64-bit hash based processors and everybody else. This is
    preliminary work for adding SMP support for BookE processors.

    Signed-off-by: Benjamin Herrenschmidt
    Acked-by: Kumar Gala
    Signed-off-by: Paul Mackerras

    Benjamin Herrenschmidt
     

03 Jul, 2008

1 commit


13 Mar, 2008

1 commit

  • 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: Guido Guenther
    Signed-off-by: Paul Mackerras

    Guido Guenther
     

31 Jan, 2008

1 commit


25 Jan, 2008

1 commit


21 Dec, 2007

2 commits

  • This fixes a few issues with via-pmu based backlight control.

    First, it fixes a sign problem with the setup of the backlight
    curve since the `range' value there -can- (and will) go negative.

    Then, it reworks the interaction between this and the via-pmu sleep
    code to properly restore backlight on wakeup from sleep.

    Signed-off-by: Benjamin Herrenschmidt
    Signed-off-by: Paul Mackerras

    Benjamin Herrenschmidt
     
  • These hooks ensure that a decrementer interrupt is not pending when
    suspending; otherwise, problems may occur on 6xx/7xx/7xxx-based
    systems (except for powermacs, which use a separate suspend path).
    For example, with deep sleep on the 831x, a pending decrementer will
    cause a system freeze because the SoC thinks the decrementer interrupt
    would have woken the system, but the core must have interrupts
    disabled due to the setup required for deep sleep.

    Changed via-pmu.c to use the new ppc_md hooks, and made the arch_*
    functions call the generic_* functions unconditionally. -- paulus

    Signed-off-by: Scott Wood
    Signed-off-by: Paul Mackerras

    Scott Wood
     

19 Dec, 2007

3 commits

  • 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: Johannes Berg
    Cc: Benjamin Herrenschmidt
    Signed-off-by: Paul Mackerras

    Johannes Berg
     
  • 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: Paul Mackerras

    Paul Mackerras
     
  • This kills off the remnants of the old sleep notifiers now that they
    are no longer used.

    Signed-off-by: Johannes Berg
    Cc: Benjamin Herrenschmidt
    Signed-off-by: Paul Mackerras

    Johannes Berg
     

18 Dec, 2007

1 commit

  • The error handling code should undo the ioremap as well.

    The problem was detected using the following semantic match
    (http://www.emn.fr/x-info/coccinelle/)

    //
    @@
    type T,T1,T2;
    identifier E;
    statement S;
    expression x1,x2;
    constant C;
    int ret;
    @@

    T E;
    ...
    * E = ioremap(...);
    if (E == NULL) S
    ... when != iounmap(E)
    when != if (E != NULL) { ... iounmap(E); ...}
    when != x1 = (T1)E
    if (...) {
    ... when != iounmap(E)
    when != if (E != NULL) { ... iounmap(E); ...}
    when != x2 = (T2)E
    (
    * return;
    |
    * return C;
    |
    * return ret;
    )
    }
    //

    Signed-off-by: Julia Lawall
    Cc: Johannes Berg
    Cc: Olaf Hering
    Cc: Benjamin Herrenschmidt
    Cc: Paul Mackerras
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Julia Lawall
     

03 Dec, 2007

2 commits


20 Oct, 2007

1 commit


28 Aug, 2007

1 commit


25 Aug, 2007

1 commit

  • 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: Olaf Hering
    Signed-off-by: Paul Mackerras

    Olaf Hering
     

17 Aug, 2007

1 commit


08 May, 2007

1 commit

  • The generic LED code now makes sure that suspended devices don't blink,
    so we no longer need to do it ourselves. For the suspend to disk case,
    however, we need to make sure that we don't blink if the PMU sysdev
    was suspended before the LED device.

    Signed-off-by: Johannes Berg
    Acked-by: Benjamin Herrenschmidt
    Signed-off-by: Paul Mackerras

    Johannes Berg
     

07 May, 2007

1 commit


27 Apr, 2007

1 commit


26 Apr, 2007

1 commit


24 Apr, 2007

3 commits


13 Apr, 2007

1 commit


26 Mar, 2007

1 commit


13 Feb, 2007

3 commits


12 Feb, 2007

1 commit

  • Bug: pnx8550 code creates directory but resets ->nlink to 1.

    create_proc_entry() et al will correctly set ->nlink for you.

    Signed-off-by: Alexey Dobriyan
    Cc: Ralf Baechle
    Cc: Benjamin Herrenschmidt
    Cc: Paul Mackerras
    Cc: Jeff Dike
    Cc: Corey Minyard
    Cc: Alan Cox
    Cc: Kyle McMartin
    Cc: Martin Schwidefsky
    Cc: Greg KH
    Cc: Ingo Molnar
    Cc: Thomas Gleixner
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alexey Dobriyan
     

06 Jan, 2007

1 commit

  • drivers/macintosh/via-pmu.c: In function 'pmac_suspend_devices':
    drivers/macintosh/via-pmu.c:2014: error: implicit declaration of function 'pm_prepare_console'
    drivers/macintosh/via-pmu.c: In function 'pmac_wakeup_devices':
    drivers/macintosh/via-pmu.c:2139: error: implicit declaration of function 'pm_restore_console'

    Signed-off-by: Dave Jones
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Dave Jones
     

08 Dec, 2006

1 commit


05 Oct, 2006

1 commit

  • 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: David Howells
    (cherry picked from 1b16e7ac850969f38b375e511e3fa2f474a33867 commit)

    David Howells
     

03 Oct, 2006

1 commit

  • * git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc: (29 commits)
    [POWERPC] Fix rheap alignment problem
    [POWERPC] Use check_legacy_ioport() for ISAPnP
    [POWERPC] Avoid NULL pointer in gpio1_interrupt
    [POWERPC] Enable generic rtc hook for the MPC8349 mITX
    [POWERPC] Add powerpc get/set_rtc_time interface to new generic rtc class
    [POWERPC] Create a "wrapper" script and use it in arch/powerpc/boot
    [POWERPC] fix spin lock nesting in hvc_iseries
    [POWERPC] EEH failure to mark pci slot as frozen.
    [POWERPC] update powerpc defconfig files after libata kconfig breakage
    [POWERPC] enable sysrq in pmac32_defconfig
    [POWERPC] UPIO_TSI cleanup
    [POWERPC] rewrite mkprep and mkbugboot in sane C
    [POWERPC] maple/pci iomem annotations
    [POWERPC] powerpc oprofile __user annotations
    [POWERPC] cell spufs iomem annotations
    [POWERPC] NULL noise removal: spufs
    [POWERPC] ppc math-emu needs -fno-builtin-fabs for math.c and fabs.c
    [POWERPC] update mpc8349_itx_defconfig and remove some debug settings
    [POWERPC] Always call cede in pseries dedicated idle loop
    [POWERPC] Fix loop logic in irq_alloc_virt()
    ...

    Linus Torvalds
     

02 Oct, 2006

1 commit


01 Oct, 2006

1 commit


14 Sep, 2006

1 commit


02 Sep, 2006

1 commit

  • 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: Benjamin Herrenschmidt
    Cc: "Antonino A. Daplas"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Benjamin Herrenschmidt
     

01 Aug, 2006

2 commits

  • Paul Mackerras
     
  • This patch fixes several problems:
    - The legacy backlight value might be set at interrupt time. Introduced
    a worker to prevent it from directly calling the backlight code.
    - via-pmu allows the backlight to be grabbed, in which case we need to
    prevent other kernel code from changing the brightness.
    - Don't send PMU requests in via-pmu-backlight when the machine is about
    to sleep or waking up.
    - More Kconfig fixes.

    Signed-off-by: Michael Hanselmann
    Cc: Benjamin Herrenschmidt
    Cc: "Antonino A. Daplas"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Michael Hanselmann