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 -
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 -
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 -
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 -
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 -
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 -
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 -
The pci-acpi.h file will not compile without including linux/acpi.h.
Signed-off-by: Matthew Wilcox
Signed-off-by: Jesse Barnes -
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 -
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 -
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 -
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 -
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 -
Had a space before tab in do_fixups, prototype wasn't wrapped properly either.
Signed-off-by: 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 slotTested-by: "Phil Endecott"
Signed-off-by: Kenji Kaneshige
Signed-off-by: Jesse Barnes -
/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
07 Jan, 2009
24 commits
-
The __SWAB_64_THRU_32__ case of a 64-bit byte swap was depending on the
no-longer-existant ___swab32() method (three underscores). We got rid
of some of the worst indirection and complexity, and now it should just
use the 32-bit swab function that was defined right above it.Reported-and-tested-by: Nicolas Pitre
Reported-by: Benjamin Herrenschmidt
Cc: Harvey Harrison
Signed-off-by: Linus Torvalds -
This implementation caused problems in userspace which can, and does
define _both_ __LITTLE_ENDIAN and __BIG_ENDIAN.Signed-off-by: Harvey Harrison
Signed-off-by: Linus Torvalds -
Signed-off-by: Harvey Harrison
Signed-off-by: Linus Torvalds -
Signed-off-by: Harvey Harrison
Signed-off-by: Linus Torvalds -
Signed-off-by: Harvey Harrison
Signed-off-by: Linus Torvalds -
Signed-off-by: Harvey Harrison
Signed-off-by: Linus Torvalds -
Signed-off-by: Harvey Harrison
Signed-off-by: Linus Torvalds -
Signed-off-by: Harvey Harrison
Signed-off-by: Linus Torvalds -
Signed-off-by: Harvey Harrison
Signed-off-by: Linus Torvalds -
Signed-off-by: Harvey Harrison
Signed-off-by: Linus Torvalds -
Signed-off-by: Harvey Harrison
Signed-off-by: Linus Torvalds -
Signed-off-by: Harvey Harrison
Signed-off-by: Linus Torvalds -
Signed-off-by: Harvey Harrison
Signed-off-by: Linus Torvalds -
Signed-off-by: Harvey Harrison
Signed-off-by: Linus Torvalds -
Signed-off-by: Harvey Harrison
Signed-off-by: Linus Torvalds -
Signed-off-by: Harvey Harrison
Signed-off-by: Linus Torvalds -
Signed-off-by: Harvey Harrison
Signed-off-by: Linus Torvalds -
Signed-off-by: Harvey Harrison
Signed-off-by: Linus Torvalds -
Signed-off-by: Harvey Harrison
Signed-off-by: Linus Torvalds -
The first step to make swab.h a regular header that will
include an asm/swab.h with arch overrides.Avoid the gratuitous differences introduced in the new
linux/swab.h by naming the ___constant_swabXX bits and
__fswabXX bits exactly as found in the old implementation
in byteorder/swab[b].hUse this new swab.h in byteorder/[big|little]_endian.h and
remove the two old swab headers.Although the inclusion of asm/byteorder.h looks strange in
linux/swab.h, this will allow each arch to move the actual
arch overrides for the swab bits in an asm file and then
the includes can be cleaned up without requiring a flag day
for all arches at once.Keep providing __fswabXX in case some userspace was using them
directly, but the revised __swabXX should be used instead in
any new code and will always do constant folding not dependent
on the optimization level, which means the __constant versions
can be phased out in-kernel.Arches that use the old-style arch macros will lose their
optimized versions until they move to the new style, but at
least they will still compile. Many arches have already moved
and the patches to move the remaining arches are trivial.Signed-off-by: Harvey Harrison
Signed-off-by: Linus Torvalds -
* 'drm-next' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6:
drm: fix ordering of driver unload vs agp unload.
drm/i915: Respect the other stolen memory sizes we know of.
drm/i915: Non-mobile parts don't have integrated TV-out.
drm/i915: Add support for integrated HDMI on G4X hardware.
drm/i915: Pin cursor bo and unpin old bo when setting cursor.
drm/i915: Don't allow objects to get bound while VT switched. -
For KMS drivers, we really need to cleanup the driver before disabling
the AGP subsystem.Signed-off-by: Dave Airlie
-
fd.o bug #19336.
Signed-off-by: Eric Anholt
Signed-off-by: Dave Airlie -
Signed-off-by: Eric Anholt
Signed-off-by: Dave Airlie