07 Jan, 2012

31 commits

  • This patch removes sh's architecture-specific 'pcibios_set_master()'
    routine and lets the default PCI core based implementation handle PCI
    device 'latency timer' setup.

    No functional change.

    Signed-off-by: Myron Stowe
    Signed-off-by: Jesse Barnes

    Myron Stowe
     
  • This patch removes mn10300's architecture-specific 'pcibios_set_master()'
    routine for ASB2305 and lets the default PCI core based implementation
    handle PCI device 'latency timer' setup.

    No functional change.

    Signed-off-by: Myron Stowe
    Signed-off-by: Jesse Barnes

    Myron Stowe
     
  • This patch removes MIPS' architecture-specific 'pcibios_set_master()'
    routine and lets the default PCI core based implementation handle PCI
    device 'latency timer' setup.

    No functional change.

    Acked-by: Ralf Baechle
    Signed-off-by: Myron Stowe
    Signed-off-by: Jesse Barnes

    Myron Stowe
     
  • This patch removes frv's architecture-specific 'pcibios_set_master()'
    routine and lets the default PCI core based implementation handle PCI
    device 'latency timer' setup.

    No functional change.

    Signed-off-by: Myron Stowe
    Signed-off-by: Jesse Barnes

    Myron Stowe
     
  • The 'latency timer' of PCI devices, both Type 0 and Type 1,
    is setup in architecture-specific code [see: 'pcibios_set_master()'].
    There are two approaches being taken by all the architectures - check
    if the 'latency timer' is currently set between 16 and 255 and if not
    bring it within bounds, or, do nothing (and then there is the
    gratuitously different PA-RISC implementation).

    There is nothing architecture-specific about PCI's 'latency timer' so
    this patch pulls its setup functionality up into the PCI core by
    creating a generic 'pcibios_set_master()' function using the '__weak'
    attribute which can be used by all architectures as a default which,
    if necessary, can then be over-ridden by architecture-specific code.

    No functional change.

    Signed-off-by: Myron Stowe
    Signed-off-by: Jesse Barnes

    Myron Stowe
     
  • This patch converts Xtensa's architecture-specific
    'pcibios_set_master()' routine to a non-inlined function. This will
    allow follow on patches to create a generic 'pcibios_set_master()'
    function using the '__weak' attribute which can be used by all
    architectures as a default which, if necessary, can then be over-
    ridden by architecture-specific code.

    Converting 'pci_bios_set_master()' to a non-inlined function will
    allow Xtensa's 'pcibios_set_master()' implementation to remain
    architecture-specific after the generic version is introduced and
    thus, not change current behavior.

    No functional change.

    Signed-off-by: Myron Stowe
    Signed-off-by: Jesse Barnes

    Myron Stowe
     
  • This patch converts UniCore's architecture-specific
    'pcibios_set_master()' routine to a non-inlined function. This will
    allow follow on patches to create a generic 'pcibios_set_master()'
    function using the '__weak' attribute which can be used by all
    architectures as a default which, if necessary, can then be over-
    ridden by architecture-specific code.

    Converting 'pci_bios_set_master()' to a non-inlined function will
    allow UniCore's 'pcibios_set_master()' implementation to remain
    architecture-specific after the generic version is introduced and
    thus, not change current behavior.

    No functional change.

    Signed-off-by: Myron Stowe
    Signed-off-by: Jesse Barnes

    Myron Stowe
     
  • This patch converts TILE's architecture-specific 'pcibios_set_master()'
    routine to a non-inlined function. This will allow follow on patches
    to create a generic 'pcibios_set_master()' function using the '__weak'
    attribute which can be used by all architectures as a default which,
    if necessary, can then be over-ridden by architecture-specific code.

    Converting 'pci_bios_set_master()' to a non-inlined function will
    allow TILE's 'pcibios_set_master()' implementation to remain
    architecture-specific after the generic version is introduced and
    thus, not change current behavior.

    No functional change.

    Acked-by: Chris Metcalf
    Signed-off-by: Myron Stowe
    Signed-off-by: Jesse Barnes

    Myron Stowe
     
  • This patch converts SPARC's architecture-specific
    'pcibios_set_master()' routine to a non-inlined function. This will
    allow follow on patches to create a generic 'pcibios_set_master()'
    function using the '__weak' attribute which can be used by all
    architectures as a default which, if necessary, can then be over-
    ridden by architecture-specific code.

    Converting 'pci_bios_set_master()' to a non-inlined function will
    allow SPARC's 'pcibios_set_master()' implementation to remain
    architecture-specific after the generic version is introduced and
    thus, not change current behavior.

    No functional change.

    Signed-off-by: Myron Stowe
    Signed-off-by: Jesse Barnes

    Myron Stowe
     
  • This patch converts PowerPC's architecture-specific
    'pcibios_set_master()' routine to a non-inlined function. This will
    allow follow on patches to create a generic 'pcibios_set_master()'
    function using the '__weak' attribute which can be used by all
    architectures as a default which, if necessary, can then be over-
    ridden by architecture-specific code.

    Converting 'pci_bios_set_master()' to a non-inlined function will
    allow PowerPC's 'pcibios_set_master()' implementation to remain
    architecture-specific after the generic version is introduced and
    thus, not change current behavior.

    No functional change.

    Acked-by: Benjamin Herrenschmidt
    Signed-off-by: Myron Stowe
    Signed-off-by: Jesse Barnes

    Myron Stowe
     
  • This patch converts MicroBlaze's architecture-specific
    'pcibios_set_master()' routine to a non-inlined function. This will
    allow follow on patches to create a generic 'pcibios_set_master()'
    function using the '__weak' attribute which can be used by all
    architectures as a default which, if necessary, can then be over-
    ridden by architecture-specific code.

    Converting 'pci_bios_set_master()' to a non-inlined function will
    allow MicroBlaze's 'pcibios_set_master()' implementation to remain
    architecture-specific after the generic version is introduced and thus,
    not change current behavior.

    No functional change.

    Signed-off-by: Myron Stowe
    Signed-off-by: Jesse Barnes

    Myron Stowe
     
  • This patch converts IA64's architecture-specific 'pcibios_set_master()'
    routine to a non-inlined function. This will allow follow on
    patches to create a generic 'pcibios_set_master()' function using the
    '__weak' attribute which can be used by all architectures as a default
    which, if necessary, can then be over-ridden by architecture-
    specific code.

    Converting 'pci_bios_set_master()' to a non-inlined function will allow
    IA64's 'pcibios_set_master()' implementation to remain architecture-
    specific after the generic version is introduced and thus, not change
    current behavior.

    No functional change.

    Signed-off-by: Myron Stowe
    Signed-off-by: Jesse Barnes

    Myron Stowe
     
  • This patch converts ARM's architecture-specific inlined
    'pcibios_set_master()' routine to a non-inlined function. This will
    allow follow on patches to create a generic 'pcibios_set_master()'
    function using the '__weak' attribute which can be used by all
    architectures as a default which, if necessary, can then be over-
    ridden by architecture-specific code.

    Converting 'pci_bios_set_master()' to a non-inlined function will allow
    ARM's 'pcibios_set_master()' implementation to remain architecture-
    specific after the generic version is introduced and thus, not change
    current behavior.

    Note that ARM also has a non-inlined 'pcibios_set_master()' that is
    used if CONFIG_PCI_HOST_ITE8152 is defined. This patch does not
    change any behavior here either.

    No functional change.

    Signed-off-by: Myron Stowe
    Signed-off-by: Jesse Barnes

    Myron Stowe
     
  • Currently, pcibios_set_master() is implemented in architecture-
    specific code. There is nothing architecture-specific about PCI's
    'latency timer'.

    This patch adds a declaration for pcibios_set_master() to PCI's core
    in preperation for pulling the function itself up into the core.
    Without the addition of this declaration, subsequent patches that
    remove inline definitions of pcibios_set_master() would be removing
    the only declaration of such.

    No functional change.

    Signed-off-by: Myron Stowe
    Signed-off-by: Jesse Barnes

    Myron Stowe
     
  • The new PCI API provides both generic probing for 2.3 masking support
    and check&mask in the interrupt handler.

    Acked-by: Michael S. Tsirkin
    Signed-off-by: Jan Kiszka
    Signed-off-by: Jesse Barnes

    Jan Kiszka
     
  • These new PCI services allow to probe for 2.3-compliant INTx masking
    support and then use the feature from PCI interrupt handlers. The
    services are properly synchronized with concurrent config space access
    via sysfs or on device reset.

    This enables generic PCI device drivers like uio_pci_generic or KVM's
    device assignment to implement the necessary kernel-side IRQ handling
    without any knowledge about device-specific interrupt status and control
    registers.

    Acked-by: Michael S. Tsirkin
    Signed-off-by: Jan Kiszka
    Signed-off-by: Jesse Barnes

    Jan Kiszka
     
  • pci_block_user_cfg_access was designed for the use case that a single
    context, the IPR driver, temporarily delays user space accesses to the
    config space via sysfs. This assumption became invalid by the time
    pci_dev_reset was added as locking instance. Today, if you run two loops
    in parallel that reset the same device via sysfs, you end up with a
    kernel BUG as pci_block_user_cfg_access detect the broken assumption.

    This reworks the pci_block_user_cfg_access to a sleeping service
    pci_cfg_access_lock and an atomic-compatible variant called
    pci_cfg_access_trylock. The former not only blocks user space access as
    before but also waits if access was already locked. The latter service
    just returns false in this case, allowing the caller to resolve the
    conflict instead of raising a BUG.

    Adaptions of the ipr driver were originally written by Brian King.

    Acked-by: Brian King
    Acked-by: Michael S. Tsirkin
    Signed-off-by: Jan Kiszka
    Signed-off-by: Jesse Barnes

    Jan Kiszka
     
  • This assures that a _CRS reserved host bridge window or window region is
    not used if it is not addressable by the CPU. The new code either trims
    the window to exclude the non-addressable portion or totally ignores the
    window if the entire window is non-addressable.

    The current code has been shown to be problematic with 32-bit non-PAE
    kernels on systems where _CRS reserves resources above 4GB.

    Signed-off-by: Gary Hade
    Reviewed-by: Bjorn Helgaas
    Cc: Thomas Renninger
    Cc: linux-kernel@vger.kernel.org
    Cc: stable@kernel.org
    Signed-off-by: Jesse Barnes

    Gary Hade
     
  • Spec shows this as 1010b = 0xa

    Signed-off-by: Alex Williamson
    Signed-off-by: Jesse Barnes

    Alex Williamson
     
  • Fixed a brace coding style issue.

    Signed-off-by: Zac Storer
    Signed-off-by: Jesse Barnes

    Zac Storer
     
  • Include the driver name and device in warning when a pci driver
    supports both legacy pm and new framework as just the stack trace
    gives no way to identify the driver.

    Signed-off-by: David Fries
    Acked-by: Rafael J. Wysocki
    Signed-off-by: Jesse Barnes

    David Fries
     
  • I traced a nasty kexec on panic boot failure to the fact that we had
    screaming msi interrupts and we were not disabling the msi messages at
    kernel startup. The booting kernel had not enabled those interupts so
    was not prepared to handle them.

    I can see no reason why we would ever want to leave the msi interrupts
    enabled at boot if something else has enabled those interrupts. The pci
    spec specifies that msi interrupts should be off by default. Drivers
    are expected to enable the msi interrupts if they want to use them. Our
    interrupt handling code reprograms the interrupt handlers at boot and
    will not be be able to do anything useful with an unexpected interrupt.

    This patch applies cleanly all of the way back to 2.6.32 where I noticed
    the problem.

    Cc: stable@kernel.org
    Signed-off-by: Eric W. Biederman
    Signed-off-by: Jesse Barnes

    Eric W. Biederman
     
  • Modify pci_acpi_wake_dev() to avoid resuming PME-capable devices
    whose PME Status bits are not set, which may happen currently if
    several devices are associated with the same wakeup GPE and all
    of them are notified whenever at least one of them signals PME.

    Signed-off-by: Rafael J. Wysocki
    Signed-off-by: Jesse Barnes

    Rafael J. Wysocki
     
  • Use non-ordered workqueue for attention button events.

    Attention button events on each slot can be handled asynchronously. So
    we should use non-ordered workqueue. This patch also removes ordered
    workqueue in pciehp as a result.

    Signed-off-by: Kenji Kaneshige
    Signed-off-by: Jesse Barnes

    Kenji Kaneshige
     
  • Fix improper workqueue cleanup.

    In the current pciehp, pcied_cleanup() calls destroy_workqueue()
    before calling pcie_port_service_unregister(). This causes kernel oops
    because flush_workqueue() is called in the pcie_port_service_unregister()
    code path after the workqueue was destroyed. So pcied_cleanup() must call
    pcie_port_service_unregister() first before calling destroy_workqueue().

    Signed-off-by: Kenji Kaneshige
    Signed-off-by: Jesse Barnes

    Kenji Kaneshige
     
  • Right now we forcibly clear ASPM state on all devices if the BIOS indicates
    that the feature isn't supported. Based on the Microsoft presentation
    "PCI Express In Depth for Windows Vista and Beyond", I'm starting to think
    that this may be an error. The implication is that unless the platform
    grants full control via _OSC, Windows will not touch any PCIe features -
    including ASPM. In that case clearing ASPM state would be an error unless
    the platform has granted us that control.

    This patch reworks the ASPM disabling code such that the actual clearing
    of state is triggered by a successful handoff of PCIe control to the OS.
    The general ASPM code undergoes some changes in order to ensure that the
    ability to clear the bits isn't overridden by ASPM having already been
    disabled. Further, this theoretically now allows for situations where
    only a subset of PCIe roots hand over control, leaving the others in the
    BIOS state.

    It's difficult to know for sure that this is the right thing to do -
    there's zero public documentation on the interaction between all of these
    components. But enough vendors enable ASPM on platforms and then set this
    bit that it seems likely that they're expecting the OS to leave them alone.

    Measured to save around 5W on an idle Thinkpad X220.

    Signed-off-by: Matthew Garrett
    Signed-off-by: Jesse Barnes

    Matthew Garrett
     
  • These are extended capabilities, rename and move to proper
    group for consistency.

    Signed-off-by: Alex Williamson
    Signed-off-by: Jesse Barnes

    Alex Williamson
     
  • This patch adds a per-pci-device subdirectory in sysfs called:
    /sys/bus/pci/devices//msi_irqs

    This sub-directory exports the set of msi vectors allocated by a given
    pci device, by creating a numbered sub-directory for each vector beneath
    msi_irqs. For each vector various attributes can be exported.
    Currently the only attribute is called mode, which tracks the
    operational mode of that vector (msi vs. msix)

    Acked-by: Greg Kroah-Hartman
    Signed-off-by: Jesse Barnes

    Neil Horman
     
  • Enabling CRS by default breaks suspend on the Thinkpad SL510.
    Details in https://bugzilla.redhat.com/show_bug.cgi?id=769657

    Reported-by: Stefan Kirrmann
    Signed-off-by: Dave Jones
    Signed-off-by: Jesse Barnes

    Dave Jones
     
  • The Dell Studio 1557 also doesn't suspend correctly when CRS is enabled.
    Details at https://bugzilla.redhat.com/show_bug.cgi?id=769657

    Reported-by: Gregory S. Hoerner
    Signed-off-by: Dave Jones
    Signed-off-by: Jesse Barnes

    Dave Jones
     
  • Some machines don't boot unless passed pci=nocrs.
    (See https://bugzilla.redhat.com/show_bug.cgi?id=770308 for details of
    one report. Waiting on dmidecode output for others).

    Currently there is a DMI whitelist, even though the default is on.

    v2: drop the 1536 blacklist entry, superceded by the PNP/MMCONFIG changes from
    Bjorn

    Acked-by: Bjorn Helgaas
    Acked-by: Ingo Molnar
    Signed-off-by: Dave Jones
    Signed-off-by: Jesse Barnes

    Dave Jones
     

04 Jan, 2012

4 commits

  • This reverts commit 93b2ec0128c431148b216b8f7337c1a52131ef03.

    The call to "schedule_work()" in rtc_initialize_alarm() happens too
    early, and can cause oopses at bootup

    Neil Brown explains why we do it:

    "If you set an alarm in the future, then shutdown and boot again after
    that time, then you will end up with a timer_queue node which is in
    the past.

    When this happens the queue gets stuck. That entry-in-the-past won't
    get removed until and interrupt happens and an interrupt won't happen
    because the RTC only triggers an interrupt when the alarm is "now".

    So you'll find that e.g. "hwclock" will always tell you that
    'select' timed out.

    So we force the interrupt work to happen at the start just in case."

    and has a patch that convert it to do things in-process rather than with
    the worker thread, but right now it's too late to play around with this,
    so we just revert the patch that caused problems for now.

    Reported-by: Sander Eikelenboom
    Requested-by: Konrad Rzeszutek Wilk
    Requested-by: John Stultz
    Cc: Neil Brown
    Signed-off-by: Linus Torvalds

    Linus Torvalds
     
  • This reverts commit c0afabd3d553c521e003779c127143ffde55a16f.

    It causes failures on Toshiba laptops - instead of disabling the alarm,
    it actually seems to enable it on the affected laptops, resulting in
    (for example) the laptop powering on automatically five minutes after
    shutdown.

    There's a patch for it that appears to work for at least some people,
    but it's too late to play around with this, so revert for now and try
    again in the next merge window.

    See for example

    http://bugs.debian.org/652869

    Reported-and-bisected-by: Andreas Friedrich (Toshiba Tecra)
    Reported-by: Antonio-M. Corbi Bellot (Toshiba Portege R500)
    Reported-by: Marco Santos (Toshiba Portege Z830)
    Reported-by: Christophe Vu-Brugier (Toshiba Portege R830)
    Cc: Jonathan Nieder
    Requested-by: John Stultz
    Cc: stable@kernel.org # for the versions that applied this
    Signed-off-by: Linus Torvalds

    Linus Torvalds
     
  • vfork parent uninterruptibly and unkillably waits for its child to
    exec/exit. This wait is of unbounded length. Ignore such waits
    in the hung_task detector.

    Signed-off-by: Mandeep Singh Baines
    Reported-by: Sasha Levin
    LKML-Reference:
    Cc: Linus Torvalds
    Cc: Ingo Molnar
    Cc: Peter Zijlstra
    Cc: Andrew Morton
    Cc: John Kacur
    Cc: stable@kernel.org
    Signed-off-by: Linus Torvalds

    Mandeep Singh Baines
     
  • Commit 1e39f384bb01 ("evm: fix build problems") makes the stub version
    of security_old_inode_init_security() return 0 when CONFIG_SECURITY is
    not set.

    But that makes callers such as reiserfs_security_init() assume that
    security_old_inode_init_security() has set name, value, and len
    arguments properly - but security_old_inode_init_security() left them
    uninitialized which then results in interesting failures.

    Revert security_old_inode_init_security() to the old behavior of
    returning EOPNOTSUPP since both callers (reiserfs and ocfs2) handle this
    just fine.

    [ Also fixed the S_PRIVATE(inode) case of the actual non-stub
    security_old_inode_init_security() function to return EOPNOTSUPP
    for the same reason, as pointed out by Mimi Zohar.

    It got incorrectly changed to match the new function in commit
    fb88c2b6cbb1: "evm: fix security/security_old_init_security return
    code". - Linus ]

    Reported-by: Jorge Bastos
    Acked-by: James Morris
    Acked-by: Mimi Zohar
    Signed-off-by: Jan Kara
    Signed-off-by: Linus Torvalds

    Jan Kara
     

03 Jan, 2012

2 commits


02 Jan, 2012

1 commit


01 Jan, 2012

2 commits