08 Jan, 2009

16 commits

  • Device drivers that use pci_request_regions() (and similar APIs) have a
    reasonable expectation that they are the only ones accessing their device.
    As part of the e1000e hunt, we were afraid that some userland (X or some
    bootsplash stuff) was mapping the MMIO region that the driver thought it
    had exclusively via /dev/mem or via various sysfs resource mappings.

    This patch adds the option for device drivers to cause their reserved
    regions to the "banned from /dev/mem use" list, so now both kernel memory
    and device-exclusive MMIO regions are banned.
    NOTE: This is only active when CONFIG_STRICT_DEVMEM is set.

    In addition to the config option, a kernel parameter iomem=relaxed is
    provided for the cases where developers want to diagnose, in the field,
    drivers issues from userspace.

    Reviewed-by: Matthew Wilcox
    Signed-off-by: Arjan van de Ven
    Signed-off-by: Jesse Barnes

    Arjan van de Ven
     
  • The acpi_query_osc, __pci_osc_support_set, pci_osc_support_set, and
    pcie_osc_support_set functions have been obsoleted in favor of setting
    these capabilities during root bridge discovery with
    pci_acpi_osc_support. There are no longer any callers of these
    functions, so remove them.

    Signed-off-by: Andrew Patterson
    Signed-off-by: Jesse Barnes

    Andrew Patterson
     
  • The _OSC capability OSC_MSI_SUPPORT is set when the root bridge is added
    with pci_acpi_osc_support(), so we no longer need to do it in the PCI
    MSI driver. Also adds the function pci_msi_enabled, which returns true
    if pci=nomsi is not on the kernel command-line.

    Signed-off-by: Andrew Patterson
    Signed-off-by: Jesse Barnes

    Andrew Patterson
     
  • The _OSC capability OSC_EXT_PCI_CONFIG_SUPPORT is set when the root
    bridge is added with pci_acpi_osc_support(), so we no longer need to do
    it in the PCIe AER driver.

    Signed-off-by: Andrew Patterson
    Signed-off-by: Jesse Barnes

    Andrew Patterson
     
  • The _OSC capabilities OSC_ACTIVE_STATE_PWR_SUPPORT and
    OSC_CLOCK_PWR_CAPABILITY_SUPPORT are set when the root bridge is added
    with pci_acpi_osc_support(), so we no longer need to do it in the ASPM
    driver. Also add the function pcie_aspm_enabled, which returns true if
    pcie_aspm=off is not on the kernel command-line.

    Signed-off-by: Andrew Patterson
    Signed-off-by: Jesse Barnes

    Andrew Patterson
     
  • The _OSC capability OSC_EXT_PCI_CONFIG_SUPPORT is set when the root
    bridge is added with pci_acpi_osc_support() if we can access PCI
    extended config space.

    This adds the function pci_ext_cfg_avail which returns true if we can
    access PCI extended config space (offset greater than 0xff). It
    currently only returns false if arch=x86 and raw_pci_ext_ops is not set
    (which might happen if pci=nommcfg is set on the kernel command-line).

    Signed-off-by: Andrew Patterson
    Signed-off-by: Jesse Barnes

    Andrew Patterson
     
  • Add pci_acpi_osc_support() and call it when a PCI bridge is added. This
    allows us to avoid having every individual PCI root bridge driver call
    _OSC support for every root bridge in their probe functions, a
    significant savings in boot time.

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

    Andrew Patterson
     
  • The pci-acpi.h file will not compile without including linux/acpi.h.

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

    Andrew Patterson
     
  • Currently, only PHBs get the legacy_* files, which makes it tricky for
    userland to get access to the legacy space. This commit exposes them in
    every bus, since even child buses may forward legacy cycles if
    configured properly.

    Signed-off-by: Benjamin Herrenschmidt
    Signed-off-by: Jesse Barnes

    Benjamin Herrenschmidt
     
  • Some PCI devices implement PCI Advanced Features, which means they
    support Function Level Reset(FLR). Implement support for that in
    pci_reset_function.

    Signed-off-by: Sheng Yang
    Signed-off-by: Jesse Barnes

    Sheng Yang
     
  • PCI Advanced Features Capability is introduced by "Conventional PCI
    Advanced Caps ECN" (can be downloaded in pcisig.com). Add defines for
    the various AF capabilities, including function level reset (FLR).

    Reviewed-by: Matthew Wilcox
    Signed-off-by: Sheng Yang
    Signed-off-by: Jesse Barnes

    Sheng Yang
     
  • Separate out function level reset so that pci_reset_function can be more
    easily extended.

    Signed-off-by: Sheng Yang
    Signed-off-by: Jesse Barnes

    Sheng Yang
     
  • This patch is part of a larger patch series which will remove
    the "char bus_id[20]" name string from struct device. The device
    name is managed in the kobject anyway, and without any size
    limitation, and just needlessly copied into "struct device".

    To set and read the device name dev_name(dev) and dev_set_name(dev)
    must be used. If your code uses static kobjects, which it shouldn't
    do, "const char *init_name" can be used to statically provide the
    name the registered device should have. At registration time, the
    init_name field is cleared, to enforce the use of dev_name(dev) to
    access the device name at a later time.

    We need to get rid of all occurrences of bus_id in the entire tree
    to be able to enable the new interface. Please apply this patch,
    and possibly convert any remaining remaining occurrences of bus_id.

    Acked-by: Greg Kroah-Hartman
    Signed-Off-By: Kay Sievers
    Signed-off-by: Jesse Barnes

    Kay Sievers
     
  • Had a space before tab in do_fixups, prototype wasn't wrapped properly either.

    Signed-off-by: Jesse Barnes

    Jesse Barnes
     
  • The pciehp driver waits for 1000 msec after turning power off to make
    sure the power has been completely removed. But this 1000 msec wait is
    not needed if a slot doesn't implement power control because software
    cannot control the power. Power will be automatically removed at adapter
    removal time on such a slot

    Tested-by: "Phil Endecott"
    Signed-off-by: Kenji Kaneshige
    Signed-off-by: Jesse Barnes

    Kenji Kaneshige
     
  • /proc/bus/pci allows you to mmap resource ranges too, so we should probably be
    checking to make sure the mapping is somewhat valid. Uses the same code as the recent sysfs mmap range checking patch from Linus.

    Acked-by: David Miller
    Signed-off-by: Jesse Barnes

    Jesse Barnes
     

07 Jan, 2009

24 commits