1. 08 7月, 2008 3 次提交
    • R
      PCI PM: Introduce pci_prepare_to_sleep and pci_back_from_sleep · 404cc2d8
      Rafael J. Wysocki 提交于
      Introduce functions pci_prepare_to_sleep() and pci_back_from_sleep(),
      to be used by the PCI drivers that want to place their devices into
      the lowest power state appropiate for them (PCI_D3hot, if the device
      is not supposed to wake up the system, or the deepest state from
      which the wake-up is possible, otherwise) while the system is being
      prepared to go into a sleeping state and to put them back into D0
      during the subsequent transition to the working state.
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      Signed-off-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      404cc2d8
    • R
      PCI ACPI: Rework PCI handling of wake-up · eb9d0fe4
      Rafael J. Wysocki 提交于
      * Introduce function acpi_pm_device_sleep_wake() for enabling and
        disabling the system wake-up capability of devices that are power
        manageable by ACPI.
      
      * Introduce function acpi_bus_can_wakeup() allowing other (dependent)
        subsystems to check if ACPI is able to enable the system wake-up
        capability of given device.
      
      * Introduce callback .sleep_wake() in struct pci_platform_pm_ops and
        for the ACPI PCI 'driver' make it use acpi_pm_device_sleep_wake().
      
      * Introduce callback .can_wakeup() in struct pci_platform_pm_ops and
        for the ACPI 'driver' make it use acpi_bus_can_wakeup().
      
      * Move the PME# handlig code out of pci_enable_wake() and split it
        into two functions, pci_pme_capable() and pci_pme_active(),
        allowing the caller to check if given device is capable of
        generating PME# from given power state and to enable/disable the
        device's PME# functionality, respectively.
      
      * Modify pci_enable_wake() to use the new ACPI callbacks and the new
        PME#-related functions.
      
      * Drop the generic .platform_enable_wakeup() callback that is not
        used any more.
      
      * Introduce device_set_wakeup_capable() that will set the
        power.can_wakeup flag of given device.
      
      * Rework PCI device PM initialization so that, if given device is
        capable of generating wake-up events, either natively through the
        PME# mechanism, or with the help of the platform, its
        power.can_wakeup flag is set and its power.should_wakeup flag is
        unset as appropriate.
      
      * Make ACPI set the power.can_wakeup flag for devices found to be
        wake-up capable by it.
      
      * Make the ACPI wake-up code enable/disable GPEs for devices that
        have the wakeup.flags.prepared flag set (which means that their
        wake-up power has been enabled).
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      Signed-off-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      eb9d0fe4
    • G
      PCI: make pci_name use dev_name · c6c4f070
      Greg KH 提交于
      Also fixes up the sparc code that was assuming this is not a constant.
      Acked-by: NDavid S. Miller <davem@davemloft.net>
      Signed-off-by: NKay Sievers <kay.sievers@vrfy.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      Signed-off-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      c6c4f070
  2. 01 7月, 2008 1 次提交
  3. 28 6月, 2008 1 次提交
  4. 13 6月, 2008 1 次提交
    • R
      Suspend-related patches for 2.6.27 · d8f3de0d
      Rafael J. Wysocki 提交于
      ACPI PM: Add possibility to change suspend sequence
      
      There are some systems out there that don't work correctly with
      our current suspend/hibernation code ordering.  Provide a workaround
      for these systems allowing them to pass 'acpi_sleep=old_ordering' in
      the kernel command line so that it will use the pre-ACPI 2.0 ("old")
      suspend code ordering.
      
      Unfortunately, this requires us to add a platform hook to the
      resuming of devices for recovering the platform in case one of the
      device drivers' .suspend() routines returns error code.  Namely,
      ACPI 1.0 specifies that _PTS should be called before suspending
      devices, but _WAK still should be called before resuming them in
      order to undo the changes made by _PTS.  However, if there is an
      error during suspending devices, they are automatically resumed
      without returning control to the PM core, so the _WAK has to be
      called from within device_resume() in that cases.
      
      The patch also reorders and refactors the ACPI suspend/hibernation
      code to avoid duplication as far as reasonably possible.
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      Acked-by: NPavel Machek <pavel@suse.cz>
      Signed-off-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      d8f3de0d
  5. 11 6月, 2008 8 次提交
    • A
      PCI: introduce pci_slot · f46753c5
      Alex Chiang 提交于
      Currently, /sys/bus/pci/slots/ only exposes hotplug attributes when a
      hotplug driver is loaded, but PCI slots have attributes such as address,
      speed, width, etc.  that are not related to hotplug at all.
      
      Introduce pci_slot as the primary data structure and kobject model.
      Hotplug attributes described in hotplug_slot become a secondary
      structure associated with the pci_slot.
      
      This patch only creates the infrastructure that allows the separation of
      PCI slot attributes and hotplug attributes.  In this patch, the PCI
      hotplug core remains the only user of this infrastructure, and thus,
      /sys/bus/pci/slots/ will still only become populated when a hotplug
      driver is loaded.
      
      A later patch in this series will add a second user of this new
      infrastructure and demonstrate splitting the task of exposing pci_slot
      attributes from hotplug_slot attributes.
      
        - Make pci_slot the primary sysfs entity. hotplug_slot becomes a
          subsidiary structure.
          o pci_create_slot() creates and registers a slot with the PCI core
          o pci_slot_add_hotplug() gives it hotplug capability
      
        - Change the prototype of pci_hp_register() to take the bus and
          slot number (on parent bus) as parameters.
      
        - Remove all the ->get_address methods since this functionality is
          now handled by pci_slot directly.
      
      [achiang@hp.com: rpaphp-correctly-pci_hp_register-for-empty-pci-slots]
      Tested-by: NBadari Pulavarty <pbadari@us.ibm.com>
      Acked-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      [akpm@linux-foundation.org: build fix]
      [akpm@linux-foundation.org: make headers_check happy]
      [akpm@linux-foundation.org: nuther build fix]
      [akpm@linux-foundation.org: fix typo in #include]
      Signed-off-by: NAlex Chiang <achiang@hp.com>
      Signed-off-by: NMatthew Wilcox <matthew@wil.cx>
      Cc: Greg KH <greg@kroah.com>
      Cc: Kristen Carlson Accardi <kristen.c.accardi@intel.com>
      Cc: Len Brown <lenb@kernel.org>
      Acked-by: NKenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      f46753c5
    • A
      ide: remove the ide_etrax100 chipset type · b7691646
      Adrian Bunk 提交于
      I forgot to remove the ide_etrax100 chipset type when removing the
      ETRAX_IDE driver.
      Reported-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      Signed-off-by: NAdrian Bunk <bunk@kernel.org>
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      b7691646
    • K
      shpchp: check firmware before taking control · ac9c052d
      Kenji Kaneshige 提交于
      Fix the following problems of shpchp driver about getting hotplug
      control from firmware.
      
        - The shpchp driver must not control the hotplug controller if it
          fails to get control from the firmware. But current shpchp
          controls the hotplug controller regardless the result, because it
          doesn't check the return value of get_hp_hw_control_from_firmware().
      
        - Current shpchp driver doesn't support _OSC.
      
      The pciehp driver already have the code for evaluating _OSC and OSHP
      and shpchp and pciehp can share it. So this patch move that code from
      pciehp to acpi_pcihp.c.
      Signed-off-by: NKenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
      Signed-off-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      ac9c052d
    • R
      Implement new suspend and hibernation callbacks for platform busses · 25e18499
      Rafael J. Wysocki 提交于
      Implement new suspend and hibernation callbacks for the platform bus
      type.
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      Acked-by: NPavel Machek <pavel@ucw.cz>
      Signed-off-by: NGreg KH <greg@kroah.com>
      Signed-off-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      25e18499
    • R
      PCI: implement new suspend/resume callbacks · bbb44d9f
      Rafael J. Wysocki 提交于
      Implement new suspend and hibernation callbacks for the PCI bus type.
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      Acked-by: NPavel Machek <pavel@ucw.cz>
      Signed-off-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      bbb44d9f
    • R
      Introduce new top level suspend and hibernation callbacks · 1eede070
      Rafael J. Wysocki 提交于
      Introduce 'struct pm_ops' and 'struct pm_ext_ops' ('ext' meaning
      'extended') representing suspend and hibernation operations for bus
      types, device classes, device types and device drivers.
      
      Modify the PM core to use 'struct pm_ops' and 'struct pm_ext_ops'
      objects, if defined, instead of the ->suspend(), ->resume(),
      ->suspend_late(), and ->resume_early() callbacks (the old callbacks
      will be considered as legacy and gradually phased out).
      
      The main purpose of doing this is to separate suspend (aka S2RAM and
      standby) callbacks from hibernation callbacks in such a way that the
      new callbacks won't take arguments and the semantics of each of them
      will be clearly specified.  This has been requested for multiple
      times by many people, including Linus himself, and the reason is that
      within the current scheme if ->resume() is called, for example, it's
      difficult to say why it's been called (ie. is it a resume from RAM or
      from hibernation or a suspend/hibernation failure etc.?).
      
      The second purpose is to make the suspend/hibernation callbacks more
      flexible so that device drivers can handle more than they can within
      the current scheme.  For example, some drivers may need to prevent
      new children of the device from being registered before their
      ->suspend() callbacks are executed or they may want to carry out some
      operations requiring the availability of some other devices, not
      directly bound via the parent-child relationship, in order to prepare
      for the execution of ->suspend(), etc.
      
      Ultimately, we'd like to stop using the freezing of tasks for suspend
      and therefore the drivers' suspend/hibernation code will have to take
      care of the handling of the user space during suspend/hibernation.
      That, in turn, would be difficult within the current scheme, without
      the new ->prepare() and ->complete() callbacks.
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      Acked-by: NPavel Machek <pavel@ucw.cz>
      Signed-off-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      1eede070
    • R
      Suspend/Resume bug in PCI layer wrt quirks · e1a2a51e
      Rafael J. Wysocki 提交于
      Some quirks should be called with interrupt disabled, we can't directly
      call them in .resume_early. Also the patch introduces
      pci_fixup_resume_early and pci_fixup_suspend, which matches current
      device core callbacks (.suspend/.resume_early).
      
      TBD: Somebody knows why we need quirk resume should double check if a
      quirk should be called in resume or resume_early. I changed some per my
      understanding, but can't make sure I fixed all.
      Signed-off-by: NShaohua Li <shaohua.li@intel.com>
      Signed-off-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      e1a2a51e
    • A
      PCI: drivers/pci/pci.c: add prototypes · 19792a08
      Adrian Bunk 提交于
      This patch adds prototypes for pcibios_disable_device() and
      pcibios_set_pcie_reset_state() in include/linux/pci.h
      
      While I was at it, I also removed the unneeded "extern" from the
      prototype of pcibios_add_platform_entries().
      Signed-off-by: NAdrian Bunk <bunk@kernel.org>
      Signed-off-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      19792a08
  6. 10 6月, 2008 1 次提交
  7. 09 6月, 2008 2 次提交
  8. 07 6月, 2008 5 次提交
  9. 05 6月, 2008 1 次提交
    • D
      V4L/DVB (7166): [v4l] Add new user class controls and deprecate others · 39028ec6
      David Woodhouse 提交于
      These were removed in commit 26d507fc:
      
      > -#define V4L2_CID_HCENTER               (V4L2_CID_BASE+22)
      > -#define V4L2_CID_VCENTER               (V4L2_CID_BASE+23)
      > -#define V4L2_CID_LASTP1                        (V4L2_CID_BASE+24) /*
      > last CID + 1 */
      > +
      > +/* Deprecated, use V4L2_CID_PAN_RESET and V4L2_CID_TILT_RESET */
      > +#define V4L2_CID_HCENTER_DEPRECATED    (V4L2_CID_BASE+22)
      > +#define V4L2_CID_VCENTER_DEPRECATED    (V4L2_CID_BASE+23)
      
      But there was no warning in Documentation/feature-removal-schedule.txt
      and I'm receiving reports that it's breaking userspace apps (the
      gstreamer-v4l2 plugin breaks in Fedora rawhide). You can't just pull
      things from the published userspace API like that.
      
      Please can we revert the addition of _DEPRECATED to these ioctl
      definitions. Perhaps we can add a runtime warning if they actually get
      used? Or a compile-time warning if we can manage that?
      Signed-off-by: NDavid Woodhouse <dwmw2@infradead.org>
      Signed-off-by: NMauro Carvalho Chehab <mchehab@infradead.org>
      39028ec6
  10. 04 6月, 2008 5 次提交
  11. 03 6月, 2008 2 次提交
  12. 01 6月, 2008 1 次提交
    • A
      capabilities: remain source compatible with 32-bit raw legacy capability support. · ca05a99a
      Andrew G. Morgan 提交于
      Source code out there hard-codes a notion of what the
      _LINUX_CAPABILITY_VERSION #define means in terms of the semantics of the
      raw capability system calls capget() and capset().  Its unfortunate, but
      true.
      
      Since the confusing header file has been in a released kernel, there is
      software that is erroneously using 64-bit capabilities with the semantics
      of 32-bit compatibilities.  These recently compiled programs may suffer
      corruption of their memory when sys_getcap() overwrites more memory than
      they are coded to expect, and the raising of added capabilities when using
      sys_capset().
      
      As such, this patch does a number of things to clean up the situation
      for all. It
      
        1. forces the _LINUX_CAPABILITY_VERSION define to always retain its
           legacy value.
      
        2. adopts a new #define strategy for the kernel's internal
           implementation of the preferred magic.
      
        3. deprecates v2 capability magic in favor of a new (v3) magic
           number. The functionality of v3 is entirely equivalent to v2,
           the only difference being that the v2 magic causes the kernel
           to log a "deprecated" warning so the admin can find applications
           that may be using v2 inappropriately.
      
      [User space code continues to be encouraged to use the libcap API which
      protects the application from details like this.  libcap-2.10 is the first
      to support v3 capabilities.]
      
      Fixes issue reported in https://bugzilla.redhat.com/show_bug.cgi?id=447518.
      Thanks to Bojan Smojver for the report.
      
      [akpm@linux-foundation.org: s/depreciate/deprecate/g]
      [akpm@linux-foundation.org: be robust about put_user size]
      [akpm@linux-foundation.org: coding-style fixes]
      Signed-off-by: NAndrew G. Morgan <morgan@kernel.org>
      Cc: Serge E. Hallyn <serue@us.ibm.com>
      Cc: Bojan Smojver <bojan@rexursive.com>
      Cc: stable@kernel.org
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NChris Wright <chrisw@sous-sol.org>
      ca05a99a
  13. 30 5月, 2008 7 次提交
  14. 29 5月, 2008 2 次提交
    • I
      sched: re-tune NUMA topologies · ea3f01f8
      Ingo Molnar 提交于
      improve the sysbench ramp-up phase and its peak throughput on
      a 16way NUMA box, by turning on WAKE_AFFINE:
      
                   tip/sched   tip/sched+wake-affine
      -------------------------------------------------
          1:             700              830    +15.65%
          2:            1465             1391    -5.28%
          4:            3017             3105    +2.81%
          8:            5100             6021    +15.30%
         16:           10725            10745    +0.19%
         32:           10135            10150    +0.16%
         64:            9338             9240    -1.06%
        128:            8599             8252    -4.21%
        256:            8475             8144    -4.07%
      -------------------------------------------------
        SUM:           57558            57882    +0.56%
      
      this change also improves lat_ctx from 6.69 usecs to 1.11 usec:
      
        $ ./lat_ctx -s 0 2
        "size=0k ovr=1.19
        2 1.11
      
        $ ./lat_ctx -s 0 2
        "size=0k ovr=1.22
        2 6.69
      
      in sysbench it's an overall win with some weakness at the lots-of-clients
      side. That happens because we now under-balance this workload
      a bit. To counter that effect, turn on NEWIDLE:
      
                    wake-idle          wake-idle+newidle
       -------------------------------------------------
           1:             830              834    +0.43%
           2:            1391             1401    +0.65%
           4:            3105             3091    -0.43%
           8:            6021             6046    +0.42%
          16:           10745            10736    -0.08%
          32:           10150            10206    +0.55%
          64:            9240             9533    +3.08%
         128:            8252             8355    +1.24%
         256:            8144             8384    +2.87%
       -------------------------------------------------
         SUM:           57882            58591    +1.21%
      
      as a bonus this not only improves the many-clients case but
      also improves the (more important) rampup phase.
      
      sysbench is a workload that quickly breaks down if the
      scheduler over-balances, so since it showed an improvement
      under NEWIDLE this change is definitely good.
      ea3f01f8
    • I
      revert ("sched: fair-group: SMP-nice for group scheduling") · 6363ca57
      Ingo Molnar 提交于
      Yanmin Zhang reported:
      
      Comparing with 2.6.25, volanoMark has big regression with kernel 2.6.26-rc1.
      It's about 50% on my 8-core stoakley, 16-core tigerton, and Itanium Montecito.
      
      With bisect, I located the following patch:
      
      | 18d95a28 is first bad commit
      | commit 18d95a28
      | Author: Peter Zijlstra <a.p.zijlstra@chello.nl>
      | Date:   Sat Apr 19 19:45:00 2008 +0200
      |
      |     sched: fair-group: SMP-nice for group scheduling
      
      Revert it so that we get v2.6.25 behavior.
      Bisected-by: NYanmin Zhang <yanmin_zhang@linux.intel.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      6363ca57