1. 27 2月, 2010 12 次提交
    • J
      PM / Hibernate: Swap, remove useless check from swsusp_read() · 09c09bc6
      Jiri Slaby 提交于
      It will never reach here if the sws_resume_bdev is erratic.
      swsusp_read() is called only from software_resume(), but after
      swsusp_check() which would catch the error state.
      Signed-off-by: NJiri Slaby <jslaby@suse.cz>
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      09c09bc6
    • J
      PM / Hibernate: Really deprecate deprecated user ioctls · b694e52e
      Jiri Slaby 提交于
      They were deprecated and removed from exported headers more than 2
      years ago. Inform users about their removal in the future now.
      
      (Switch cases needed to be reorderded for an easy fall through.)
      
      And add an entry to feature-removal-schedule.
      Signed-off-by: NJiri Slaby <jslaby@suse.cz>
      Acked-by: NPavel Machek <pavel@ucw.cz>
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      b694e52e
    • R
      PM: Allow device drivers to use dpm_wait() · f8824cee
      Rafael J. Wysocki 提交于
      There are some dependencies between devices (in particular, between
      EHCI USB controllers and their OHCI/UHCI siblings) which are not
      reflected by the structure of the device tree.  With synchronous
      suspend and resume these dependencies are taken into accout
      automatically, because the devices in question are always registered
      in the right order, but to meet these constraints with asynchronous
      suspend and resume the drivers of these devices will need to use
      dpm_wait() in their suspend/resume routines, so introduce a helper
      function allowing them to do that.
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      f8824cee
    • R
      PM: Start asynchronous resume threads upfront · 97df8c12
      Rafael J. Wysocki 提交于
      It has been shown by testing that total device resume time can be
      reduced significantly (by as much as 50% or more) if the async
      threads executing some devices' resume routines are all started
      before the main resume thread starts to handle the "synchronous"
      devices.
      
      This is a consequence of the fact that the slowest devices tend to be
      located at the end of dpm_list, so their resume routines are started
      very late.  Consequently, they have to wait for all the preceding
      "synchronous" devices before their resume routines can be started
      by the main resume thread, even if they are "asynchronous".  By
      starting their async threads upfront we effectively move those
      devices towards the beginning of dpm_list, without breaking their
      ordering with respect to their parents and children.  As a result,
      their resume routines are started much earlier and we are able to
      save much more device resume time this way.
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      97df8c12
    • R
      PM: Add facility for advanced testing of async suspend/resume · 5a2eb858
      Rafael J. Wysocki 提交于
      Add configuration switch CONFIG_PM_ADVANCED_DEBUG for compiling in
      extra PM debugging/testing code allowing one to access some
      PM-related attributes of devices from the user space via sysfs.
      
      If CONFIG_PM_ADVANCED_DEBUG is set, add sysfs attribute power/async
      for every device allowing the user space to access the device's
      power.async_suspend flag and modify it, if desired.
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      5a2eb858
    • R
      PM: Add a switch for disabling/enabling asynchronous suspend/resume · 0e06b4a8
      Rafael J. Wysocki 提交于
      Add sysfs attribute /sys/power/pm_async allowing the user space to
      disable/enable asynchronous suspend/resume of devices.
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      0e06b4a8
    • R
      PM: Asynchronous suspend and resume of devices · 5af84b82
      Rafael J. Wysocki 提交于
      Theoretically, the total time of system sleep transitions (suspend
      to RAM, hibernation) can be reduced by running suspend and resume
      callbacks of device drivers in parallel with each other.  However,
      there are dependencies between devices such that we're not allowed
      to suspend the parent of a device before suspending the device
      itself.  Analogously, we're not allowed to resume a device before
      resuming its parent.
      
      The most straightforward way to take these dependencies into accout
      is to start the async threads used for suspending and resuming
      devices at the core level, so that async_schedule() is called for
      each suspend and resume callback supposed to be executed
      asynchronously.
      
      For this purpose, introduce a new device flag, power.async_suspend,
      used to mark the devices whose suspend and resume callbacks are to be
      executed asynchronously (ie. in parallel with the main suspend/resume
      thread and possibly in parallel with each other) and helper function
      device_enable_async_suspend() allowing one to set power.async_suspend
      for given device (power.async_suspend is unset by default for all
      devices).  For each device with the power.async_suspend flag set the
      PM core will use async_schedule() to execute its suspend and resume
      callbacks.
      
      The async threads started for different devices as a result of
      calling async_schedule() are synchronized with each other and with
      the main suspend/resume thread with the help of completions, in the
      following way:
      (1) There is a completion, power.completion, for each device object.
      (2) Each device's completion is reset before calling async_schedule()
          for the device or, in the case of devices with the
          power.async_suspend flags unset, before executing the device's
          suspend and resume callbacks.
      (3) During suspend, right before running the bus type, device type
          and device class suspend callbacks for the device, the PM core
          waits for the completions of all the device's children to be
          completed.
      (4) During resume, right before running the bus type, device type and
          device class resume callbacks for the device, the PM core waits
          for the completion of the device's parent to be completed.
      (5) The PM core completes power.completion for each device right
          after the bus type, device type and device class suspend (or
          resume) callbacks executed for the device have returned.
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      5af84b82
    • R
      PM: Add parent information to timing messages · 8cc6b39f
      Rafael J. Wysocki 提交于
      Add parent information to the messages printed by the suspend/resume
      core when initcall_debug is set.
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      8cc6b39f
    • R
      PM: Document device power attributes in sysfs · 971cb7fb
      Rafael J. Wysocki 提交于
      There are sysfs attributes in /sys/devices/.../power/ that haven't
      been documented yet in Documentation/ABI/.  Document them as
      appropriate.
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      971cb7fb
    • R
      PM / Runtime: Add sysfs switch for disabling device run-time PM · 53823639
      Rafael J. Wysocki 提交于
      Add new device sysfs attribute, power/control, allowing the user
      space to block the run-time power management of the devices.  If this
      attribute is set to "on", the driver of the device won't be able to power
      manage it at run time (without breaking the rules) and the device will
      always be in the full power state (except when the entire system goes
      into a sleep state).
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      Acked-by: NAlan Stern <stern@rowland.harvard.edu>
      53823639
    • L
      Merge branch 'linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6 · 68c6b859
      Linus Torvalds 提交于
      * 'linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6: (48 commits)
        x86/PCI: Prevent mmconfig memory corruption
        ACPI: Use GPE reference counting to support shared GPEs
        x86/PCI: use host bridge _CRS info by default on 2008 and newer machines
        PCI: augment bus resource table with a list
        PCI: add pci_bus_for_each_resource(), remove direct bus->resource[] refs
        PCI: read bridge windows before filling in subtractive decode resources
        PCI: split up pci_read_bridge_bases()
        PCIe PME: use pci_pcie_cap()
        PCI PM: Run-time callbacks for PCI bus type
        PCIe PME: use pci_is_pcie()
        PCI / ACPI / PM: Platform support for PCI PME wake-up
        ACPI / ACPICA: Multiple system notify handlers per device
        ACPI / PM: Add more run-time wake-up fields
        ACPI: Use GPE reference counting to support shared GPEs
        PCI PM: Make it possible to force using INTx for PCIe PME signaling
        PCI PM: PCIe PME root port service driver
        PCI PM: Add function for checking PME status of devices
        PCI: mark is_pcie obsolete
        PCI: set PCI_PREF_RANGE_TYPE_64 in pci_bridge_check_ranges
        PCI: pciehp: second try to get big range for pcie devices
        ...
      68c6b859
    • L
      Lower USB storage settling delay to something more reasonable · a4a47bc0
      Linus Torvalds 提交于
      The five-second delay can be rather annoying, and makes the system
      appear much less responsive when you connect a USB drive.
      
      It's also not entirely clear that it is needed - the settling delay has
      at least historically been an issue on some Apple iPods, for example,
      and some devices have been reported to need even more than the old 5s
      delay.
      
      But before we penalize them all, let's see how bad it really is.  Some
      of the reasons for long delays seem to be actual historical kernel bugs
      that should probably never have been papered over with a delay in the
      first place (there's a Ubuntu bug report for 2.6.20 about a NULL pointer
      dereference unless 'delay_use' is 8 or more, for example).
      
      It also looks like some distros have already shipped with delay_use=0,
      so the five second default may well be totally historical.
      
      In other words: "Let's see if anybody screams".
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      a4a47bc0
  2. 26 2月, 2010 7 次提交
    • L
      Merge branch 'next-devicetree' of git://git.secretlab.ca/git/linux-2.6 · 6ebdc661
      Linus Torvalds 提交于
      * 'next-devicetree' of git://git.secretlab.ca/git/linux-2.6: (41 commits)
        of: remove undefined request_OF_resource & release_OF_resource
        of/sparc: Remove sparc-local declaration of allnodes and devtree_lock
        of: move definition of of_chosen into common code.
        of: remove unused extern reference to devtree_lock
        of: put default string compare and #a/s-cell values into common header
        of/flattree: Don't assume HAVE_LMB
        of: protect linux/of.h with CONFIG_OF
        proc_devtree: fix THIS_MODULE without module.h
        of: Remove old and misplaced function declarations
        of/flattree: Make the kernel accept ePAPR style phandle information
        of/flattree: endian-convert members of boot_param_header
        of: assume big-endian properties, adding conversions where necessary
        of: use __be32 for cell value accessors
        of/flattree: use OF_ROOT_NODE_{SIZE,ADDR}_CELLS DEFAULT for fdt parsing
        of/flattree: use callback to setup initrd from /chosen
        proc_devtree: include linux/of.h
        of: make set_node_proc_entry private to proc_devtree.c
        of: include linux/proc_fs.h
        of/flattree: merge early_init_dt_scan_memory() common code
        of: add 'of_' prefix to machine_is_compatible()
        ...
      6ebdc661
    • L
      Merge branch 'next-spi' of git://git.secretlab.ca/git/linux-2.6 · d7930c9e
      Linus Torvalds 提交于
      * 'next-spi' of git://git.secretlab.ca/git/linux-2.6: (31 commits)
        spi: Correct SPI clock frequency setting in spi_mpc8xxx
        spi/spi_s3c64xx.c: Fix continuation line formats
        spi/dw_spi: Fix dw_spi_mmio to depend on HAVE_CLK
        spi/dw_spi: Allow dw_spi.c to be a module
        spi/dw_spi: mmio code style fixups
        Memory-mapped dw_spi driver
        spi/dw_spi: fix missing export of dw_spi_remove_host
        spi/dw_spi: conditional transfer mode changes
        spi/dw_spi: remove conditional from 'poll_transfer'.
        spi/dw_spi: fixed a spelling typo in a warning message.
        spi/dw_spi: add return value to empty mrst_spi_debugfs_init()
        spi/dw_spi: enable platform specific chipselect.
        spi/dw_spi: add a FIFO depth detection
        spi/dw_spi: fix __init/__devinit section mismatch
        spi: xilinx_spi: Fix up I/O routine wrapping bogosity.
        spi/spi_imx: add device information by switching pr_debug() to dev_dbg()
        spi: update MSIOF includes
        spi/dw_spi: refine the IRQ mode working flow
        spi/dw_spi: add a missed dw_spi_remove_host() in exit sequence
        spi/dw_spi: bug fix in wait_till_not_busy()
        ...
      d7930c9e
    • L
      Merge branch 'for-linus-2' of... · b6d97026
      Linus Torvalds 提交于
      Merge branch 'for-linus-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-2.6-kconfig
      
      * 'for-linus-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-2.6-kconfig:
        kconfig: Simplify LSMOD= handling
        kconfig: Add LSMOD=file to override the lsmod for localmodconfig
        kconfig: Look in both /bin and /sbin for lsmod in streamline_config.pl
        kconfig: Check for if conditions in Kconfig for localmodconfig
        kconfig: Create include/generated for localmodconfig
      b6d97026
    • L
      Merge branch 'for-linus-1' of... · 1954ee55
      Linus Torvalds 提交于
      Merge branch 'for-linus-1' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-2.6-kconfig
      
      * 'for-linus-1' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-2.6-kconfig:
        kconfig: simplification of scripts/extract-ikconfig
      1954ee55
    • L
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid · a85821fc
      Linus Torvalds 提交于
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid: (41 commits)
        HID: usbhid: initialize interface pointers early enough
        HID: extend mask for BUTTON usage page
        HID: hid-ntrig: Single touch mode tap
        HID: hid-ntrig: multitouch cleanup and fix
        HID: n-trig: remove unnecessary tool switching
        HID: hid-ntrig add multi input quirk and clean up
        HID: usbhid: introduce timeout for stuck ctrl/out URBs
        HID: magicmouse: coding style and probe failure fixes
        HID: remove MODULE_VERSION from new drivers
        HID: fix up Kconfig entry for MagicMouse
        HID: add a device driver for the Apple Magic Mouse.
        HID: Export hid_register_report
        HID: Support for MosArt multitouch panel
        HID: add pressure support for the Stantum multitouch panel
        HID: fixed bug in single-touch emulation on the stantum panel
        HID: fix typo in error message
        HID: add mapping for "AL Network Chat" usage
        HID: use multi input quirk for TouchPack touchscreen
        HID: make full-fledged hid-bus drivers properly selectable
        HID: make Wacom modesetting failures non-fatal
        ...
      a85821fc
    • J
      Merge branches 'upstream', 'raw_report_modifications' and 'apple_magic_mouse' into for-linus · 14ef2b0c
      Jiri Kosina 提交于
      Conflicts:
      	drivers/hid/Kconfig
      14ef2b0c
    • T
      x86/PCI: Prevent mmconfig memory corruption · bb8d4133
      Thomas Gleixner 提交于
      commit ff097ddd (x86/PCI: MMCONFIG: manage pci_mmcfg_region as a
      list, not a table) introduced a nasty memory corruption when
      pci_mmcfg_list is empty.
      
      pci_mmcfg_check_end_bus_number() dereferences pci_mmcfg_list.prev even
      when the list is empty. The following write hits some variable near to
      pci_mmcfg_list.
      
      Further down a similar problem exists, where cfg->list.next is
      dereferenced unconditionally and a comparison with some variable near
      to pci_mmcfg_list happens.
      
      Add a check for the last element into the for_each_entry() loop and
      remove all the other crappy logic which is just a leftover of the old
      array based code which was replaced by the list conversion.
      Reported-by: NIngo Molnar <mingo@elte.hu>
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      Cc: Bjorn Helgaas <bjorn.helgaas@hp.com>
      Cc: Yinghai Lu <yinghai@kernel.org>
      Cc: stable@kernel.org
      Signed-off-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      bb8d4133
  3. 25 2月, 2010 11 次提交
  4. 24 2月, 2010 10 次提交