1. 31 3月, 2009 20 次提交
    • R
      PCI PM: Restore config spaces of all devices during early resume · 931ff68a
      Rafael J. Wysocki 提交于
      At present the configuration spaces of PCI devices that have no
      drivers or no PM support in the drivers (either legacy or through a
      pm object) are not saved during suspend and, consequently, they are
      not restored during resume.  This generally may lead to the state of
      the system being slightly inconsistent after the resume, so it's
      better to save and restore the configuration spaces of these devices
      as well.
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      Acked-by: NIngo Molnar <mingo@elte.hu>
      Acked-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      931ff68a
    • R
      PCI PM: Make pci_set_power_state() handle devices with no PM support · 4a865905
      Rafael J. Wysocki 提交于
      There is a problem with PCI devices without any PM support (either
      native or through the platform) that pci_set_power_state() always
      returns error code for them, even if they are being put into D0.
      However, such devices are always in D0, so pci_set_power_state()
      should return success when attempting to put such a device into D0.
      It also should update the current_state field for these devices as
      appropriate.  This modification is necessary so that the standard
      configuration registers of these devices are successfully restored by
      pci_restore_standard_config() during the "early" phase of resume.
      
      In addition, pci_set_power_state() should check the value of
      current_state before calling the platform to change the power state
      of the device to avoid doing that unnecessarily.
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      Acked-by: NIngo Molnar <mingo@elte.hu>
      Acked-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      4a865905
    • R
      PCI PM: Put devices into low power states during late suspend (rev. 2) · 46939f8b
      Rafael J. Wysocki 提交于
      Once we have allowed timer interrupts to be enabled during the late
      phase of suspending devices, we are now able to use the generic
      pci_set_power_state() to put PCI devices into low power states at
      that time.  We can also use some related platform callbacks, like the
      ones preparing devices for wake-up, during the late suspend.
      
      Doing this will allow us to avoid the race condition where a device
      using shared interrupts is put into a low power state with interrupts
      enabled and then an interrupt (for another device) comes in and
      confuses its driver.  At the same time, devices that don't support
      the native PCI PM or that require some additional, platform-specific
      operations to be carried out to put them into low power states will
      be handled as appropriate.
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      Acked-by: NIngo Molnar <mingo@elte.hu>
      Acked-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      46939f8b
    • R
      PCI PM: Move pci_restore_standard_config to pci-driver.c · 0128a89c
      Rafael J. Wysocki 提交于
      Move pci_restore_standard_config() from pci.c to pci-driver.c and
      make it static.
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      Acked-by: NIngo Molnar <mingo@elte.hu>
      Acked-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      0128a89c
    • R
      PCI PM: Use pci_set_power_state during early resume · f00a20ef
      Rafael J. Wysocki 提交于
      Once we have allowed timer interrupts to be enabled during the early
      phase of resuming devices, we are now able to use the generic
      pci_set_power_state() to put PCI devices into D0 at that time.  Then,
      the platform-specific PM code will have a chance to handle devices
      that don't implement the native PCI PM or that require some
      additional, platform-specific operations to be carried out to power
      them up.  Also, by doing this we can simplify the code quite a bit.
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      Acked-by: NIngo Molnar <mingo@elte.hu>
      Acked-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      f00a20ef
    • F
      PCI PM: Consistently use variable name "error" for pm call return values · 57ef8026
      Frans Pop 提交于
      I noticed two functions use a variable "i" to store the return value of PM
      function calls while the rest of the file uses "error". As "i" normally
      indicates a counter of some sort it seems better to keep this consistent.
      Signed-off-by: NFrans Pop <elendil@planet.nl>
      Signed-off-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      57ef8026
    • R
      kexec: Change kexec jump code ordering · 749b0afc
      Rafael J. Wysocki 提交于
      Change the ordering of the kexec jump code so that the nonboot CPUs
      are disabled after calling device drivers' "late suspend" methods.
      
      This change reflects the recent modifications of the power management
      code that is also used by kexec jump.
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      Acked-by: NIngo Molnar <mingo@elte.hu>
      749b0afc
    • R
      PM: Change hibernation code ordering · 4aecd671
      Rafael J. Wysocki 提交于
      Change the ordering of the hibernation core code so that the platform
      "prepare" callbacks are executed and the nonboot CPUs are disabled
      after calling device drivers' "late suspend" methods.
      
      This change (along with the previous analogous change of the suspend
      core code) will allow us to rework the PCI PM core so that the power
      state of devices is changed in the "late" phase of suspend (and
      analogously in the "early" phase of resume), which in turn will allow
      us to avoid the race condition where a device using shared interrupts
      is put into a low power state with interrupts enabled and then an
      interrupt (for another device) comes in and confuses its driver.
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      Acked-by: NIngo Molnar <mingo@elte.hu>
      4aecd671
    • R
      PM: Change suspend code ordering · 900af0d9
      Rafael J. Wysocki 提交于
      Change the ordering of the suspend core code so that the platform
      "prepare" callback is executed and the nonboot CPUs are disabled
      after calling device drivers' "late suspend" methods.
      
      This change will allow us to rework the PCI PM core so that the power
      state of devices is changed in the "late" phase of suspend (and
      analogously in the "early" phase of resume), which in turn will allow
      us to avoid the race condition where a device using shared interrupts
      is put into a low power state with interrupts enabled and then an
      interrupt (for another device) comes in and confuses its driver.
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      Acked-by: NIngo Molnar <mingo@elte.hu>
      900af0d9
    • R
      PM: Rework handling of interrupts during suspend-resume · 2ed8d2b3
      Rafael J. Wysocki 提交于
      Use the functions introduced in by the previous patch,
      suspend_device_irqs(), resume_device_irqs() and check_wakeup_irqs(),
      to rework the handling of interrupts during suspend (hibernation) and
      resume.  Namely, interrupts will only be disabled on the CPU right
      before suspending sysdevs, while device drivers will be prevented
      from receiving interrupts, with the help of the new helper function,
      before their "late" suspend callbacks run (and analogously during
      resume).
      
      In addition, since the device interrups are now disabled before the
      CPU has turned all interrupts off and the CPU will ACK the interrupts
      setting the IRQ_PENDING bit for them, check in sysdev_suspend() if
      any wake-up interrupts are pending and abort suspend if that's the
      case.
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      Acked-by: NIngo Molnar <mingo@elte.hu>
      2ed8d2b3
    • R
      PM: Introduce functions for suspending and resuming device interrupts · 0a0c5168
      Rafael J. Wysocki 提交于
      Introduce helper functions allowing us to prevent device drivers from
      getting any interrupts (without disabling interrupts on the CPU)
      during suspend (or hibernation) and to make them start to receive
      interrupts again during the subsequent resume.  These functions make it
      possible to keep timer interrupts enabled while the "late" suspend and
      "early" resume callbacks provided by device drivers are being
      executed.  In turn, this allows device drivers' "late" suspend and
      "early" resume callbacks to sleep, execute ACPI callbacks etc.
      
      The functions introduced here will be used to rework the handling of
      interrupts during suspend (hibernation) and resume.  Namely,
      interrupts will only be disabled on the CPU right before suspending
      sysdevs, while device drivers will be prevented from receiving
      interrupts, with the help of the new helper function, before their
      "late" suspend callbacks run (and analogously during resume).
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      Acked-by: NIngo Molnar <mingo@elte.hu>
      0a0c5168
    • L
      Merge branch 'x86-stage-3-for-linus' of... · 019abbc8
      Linus Torvalds 提交于
      Merge branch 'x86-stage-3-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
      
      * 'x86-stage-3-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (190 commits)
        Revert "cpuacct: reduce one NULL check in fast-path"
        Revert "x86: don't compile vsmp_64 for 32bit"
        x86: Correct behaviour of irq affinity
        x86: early_ioremap_init(), use __fix_to_virt(), because we are sure it's safe
        x86: use default_cpu_mask_to_apicid for 64bit
        x86: fix set_extra_move_desc calling
        x86, PAT, PCI: Change vma prot in pci_mmap to reflect inherited prot
        x86/dmi: fix dmi_alloc() section mismatches
        x86: e820 fix various signedness issues in setup.c and e820.c
        x86: apic/io_apic.c define msi_ir_chip and ir_ioapic_chip all the time
        x86: irq.c keep CONFIG_X86_LOCAL_APIC interrupts together
        x86: irq.c use same path for show_interrupts
        x86: cpu/cpu.h cleanup
        x86: Fix a couple of sparse warnings in arch/x86/kernel/apic/io_apic.c
        Revert "x86: create a non-zero sized bm_pte only when needed"
        x86: pci-nommu.c cleanup
        x86: io_delay.c cleanup
        x86: rtc.c cleanup
        x86: i8253 cleanup
        x86: kdebugfs.c cleanup
        ...
      019abbc8
    • L
      Merge branch 'bkl-removal' of git://git.lwn.net/linux-2.6 · 2d25ee36
      Linus Torvalds 提交于
      * 'bkl-removal' of git://git.lwn.net/linux-2.6:
        Fix a lockdep warning in fasync_helper()
        Add a missing unlock_kernel() in raw_open()
      2d25ee36
    • L
      Merge branch 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus · 915db32d
      Linus Torvalds 提交于
      * 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus: (21 commits)
        MIPS: Alchemy: PB1200: use SMC91X platform data.
        MIPS: Alchemy: MIPS hazard workarounds are not required.
        MIPS: Alchemy: provide cpu feature overrides.
        MIPS: Alchemy: unify CPU model constants.
        MIPS: Make a needlessly global symbol static in arch/mips/kernel/smp.c
        MIPS: Fix global namespace pollution in arch/mips/kernel/smp-up.c
        MIPS: Malta: make a needlessly global integer variable static
        MIPS: Use BUG_ON() where possible.
        MIPS: Convert obsolete irq_desc_t to struct irq_desc
        MIPS: Enable GENERIC_HARDIRQS_NO__DO_IRQ for all platforms
        MIPS: EMMA2RH: Set UART mapbase
        MIPS: EMMA2RH: Use set_irq_chip_and_handler_name
        MIPS: EMMA2RH: Use handle_edge_irq() handler for GPIO interrupts
        MIPS: Mark Eins: Fix cascading interrupt dispatcher
        MIPS: Au1000: convert to using gpiolib
        MIPS: Stop using <asm-generic/int-l64.h>.
        MIPS: Cavium: Add -Werror
        MIPS: Makefile: Add simple make install target.
        MIPS: Compat: Zero upper 32-bit of offset_high and offset_low.
        MIPS: __raw_spin_lock() may spin forever on ticket wrap.
        ...
      915db32d
    • L
      Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc · ebc8eca1
      Linus Torvalds 提交于
      * 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc: (180 commits)
        powerpc: clean up ssi.txt, add definition for fsl,ssi-asynchronous
        powerpc/85xx: Add support for the "socrates" board (MPC8544).
        powerpc: Fix bugs introduced by sysfs changes
        powerpc: Sanitize stack pointer in signal handling code
        powerpc: Add write barrier before enabling DTL flags
        powerpc/83xx: Update ranges in gianfar node to match other dts
        powerpc/86xx: Move gianfar mdio nodes under the ethernet nodes
        powerpc/85xx: Move gianfar mdio nodes under the ethernet nodes
        powerpc/83xx: Move gianfar mdio nodes under the ethernet nodes
        powerpc/83xx: Add power management support for MPC837x boards
        powerpc/mm: Introduce early_init_mmu() on 64-bit
        powerpc/mm: Add option for non-atomic PTE updates to ppc64
        powerpc/mm: Fix printk type warning in mmu_context_nohash
        powerpc/mm: Rename arch/powerpc/kernel/mmap.c to mmap_64.c
        powerpc/mm: Merge various PTE bits and accessors definitions
        powerpc/mm: Tweak PTE bit combination definitions
        powerpc/cell: Fix iommu exception reporting
        powerpc/mm: e300c2/c3/c4 TLB errata workaround
        powerpc/mm: Used free register to save a few cycles in SW TLB miss handling
        powerpc/mm: Remove unused register usage in SW TLB miss handling
        ...
      ebc8eca1
    • S
    • L
      Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6 · b94d10e7
      Linus Torvalds 提交于
      * 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6: (707 commits)
        V4L/DVB (11316): saa7191: tuner ops wasn't set.
        V4L/DVB (11315): cx25840: fix 'unused variable' warning.
        V4L/DVB (11314): au8522: remove unused I2C_DRIVERID
        V4L/DVB (11313): v4l2-subdev: add enum_framesizes and enum_frameintervals.
        V4L/DVB (11312): tuner: remove V4L1 code from this driver.
        V4L/DVB (11311): v4l: replace 'ioctl' references in v4l i2c drivers
        V4L/DVB (11310): cx18: remove intermediate 'ioctl' step
        V4L/DVB (11309): cx25840: cleanup: remove intermediate 'ioctl' step
        V4L/DVB (11308): msp3400: use the V4L2 header since no V4L1 code is there
        V4L/DVB (11305): cx88: prevent probing rtc and ir devices
        V4L/DVB (11304): v4l2: remove v4l2_subdev_command calls where they are no longer needed.
        V4L/DVB (11303): tda7432: remove legacy code for old-style i2c API
        V4L/DVB (11302): tda9875: remove legacy code for old-style i2c API
        V4L/DVB (11301): wm8775: remove legacy code for old-style i2c API
        V4L/DVB (11300): cx88: convert to v4l2_subdev.
        V4L/DVB (11298): cx25840: remove legacy code for old-style i2c API
        V4L/DVB (11297): cx23885: convert to v4l2_subdev.
        V4L/DVB (11296): cx23885: bugfix error message if firmware is not found
        V4L/DVB (11295): cx23885: convert to v4l2_device.
        V4L/DVB (11293): uvcvideo: Add zero fill for VIDIOC_ENUM_FMT
        ...
      b94d10e7
    • L
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/fuse · b80e0d27
      Linus Torvalds 提交于
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/fuse:
        fuse: fix fuse_file_lseek returning with lock held
      b80e0d27
    • L
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6 · 83826dc5
      Linus Torvalds 提交于
      * git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6: (70 commits)
        ide: keep track of number of bytes instead of sectors in struct ide_cmd
        ide: remove ide_execute_pkt_cmd() (v2)
        ide: add ->dma_timer_expiry method and remove ->dma_exec_cmd one (v2)
        ide: set hwif->expiry prior to calling [__]ide_set_handler()
        ide: use do_rw_taskfile() for ATA_CMD_PACKET commands
        ide: pass command to ide_map_sg()
        ide: remove ide_end_request()
        ide: use ide_end_rq() in ide_complete_rq()
        ide: pass number of bytes to complete to ide_complete_rq()
        ide: remove BUG() from ide_complete_rq()
        ide: move rq->errors quirk out from ide_end_request()
        ide: pass error value to ide_complete_rq()
        ide: sanitize ide_end_rq()
        ide: add ide_end_rq() (v2)
        ide: make ide_special_rq() BUG() on unknown requests
        ide: sanitize ide_finish_cmd()
        ide: use ide_complete_cmd() for REQ_UNPARK_HEADS
        ide: use ide_complete_cmd() for head unload commands
        ide: task_error() -> task_error_cmd()
        ide: unify exit paths in task_pio_intr()
        ...
      83826dc5
    • L
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/shaggy/jfs-2.6 · ffd14285
      Linus Torvalds 提交于
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/shaggy/jfs-2.6:
        jfs: needs crc32_le
        jfs: Fix error handling in metapage_writepage()
        jfs: return f_fsid for statfs(2)
        jfs: remove xtLookupList()
        jfs: clean up a dangling comment
      ffd14285
  2. 30 3月, 2009 20 次提交