linux/arch/x86/pci
Jan Beulich db34a363b9 x86/PCI: config space accessor functions should not ignore the segment argument
Without this change, the majority of the raw PCI config space access
functions silently ignore a non-zero segment argument, which is
certainly wrong.

Apart from pci_direct_conf1, all other non-MMCFG access methods get
used only for non-extended accesses (i.e. assigned to raw_pci_ops
only). Consequently, with the way raw_pci_{read,write}() work, it would
be a coding error to call these functions with a non-zero segment (with
the current call flow this cannot happen afaict).

The access method 1 accessor, as it can be used for extended accesses
(on AMD systems) instead gets checks added for the passed in segment to
be zero. This would be the case when on such a system having multiple
PCI segments (don't know whether any exist in practice) MMCFG for some
reason is not usable, and method 1 gets selected for doing extended
accesses. Rather than accessing the wrong device's config space, the
function will now error out.

v2: Convert BUG_ON() to WARN_ON(), and extend description as per Ingo's
request.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
Reviewed-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
2011-07-22 08:25:41 -07:00
..
acpi.c x86/PCI: reduce severity of host bridge window conflict warnings 2011-07-22 08:25:39 -07:00
amd_bus.c x86: Adjust section placement in AMD northbridge related code 2011-02-10 13:32:52 +01:00
broadcom_bus.c x86/PCI: don't use native Broadcom CNB20LE driver when ACPI is available 2011-01-14 08:55:41 -08:00
bus_numa.c Merge branch 'x86-bootmem-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip 2010-03-03 08:15:05 -08:00
bus_numa.h Merge branch 'x86-bootmem-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip 2010-03-03 08:15:05 -08:00
ce4100.c x86/PCI: config space accessor functions should not ignore the segment argument 2011-07-22 08:25:41 -07:00
common.c PCI: enable pci=bfsort by default on future Dell systems 2011-01-14 08:55:41 -08:00
direct.c x86/PCI: config space accessor functions should not ignore the segment argument 2011-07-22 08:25:41 -07:00
early.c x86/PCI: remove early PCI pr_debug statements 2009-11-24 15:25:19 -08:00
fixup.c Merge branch 'linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6 2009-04-01 09:47:12 -07:00
i386.c x86: Fix common misspellings 2011-03-18 10:39:30 +01:00
init.c x86, olpc: Use pci subarch init for OLPC 2010-02-25 19:26:23 -08:00
irq.c x86/PCI: irq and pci_ids patch for Intel Panther Point DeviceIDs 2011-05-10 15:43:36 -07:00
legacy.c x86/PCI: pci, fix section mismatch 2010-07-30 09:29:09 -07:00
Makefile ce4100: Add PCI register emulation for CE4100 2010-11-12 00:45:41 +01:00
mmconfig_32.c x86/PCI: Convert pci_config_lock to raw_spinlock 2010-05-11 12:01:09 -07:00
mmconfig_64.c x86/PCI: MMCONFIG: add lookup function 2009-11-24 15:30:36 -08:00
mmconfig-shared.c x86/PCI: derive pcibios_last_bus from ACPI MCFG 2011-05-21 09:00:35 -07:00
mrst.c x86, pci, mrst: Add extra sanity check in walking the PCI extended cap chain 2010-07-16 16:52:15 -07:00
numaq_32.c x86/PCI: config space accessor functions should not ignore the segment argument 2011-07-22 08:25:41 -07:00
olpc.c x86/PCI: config space accessor functions should not ignore the segment argument 2011-07-22 08:25:41 -07:00
pcbios.c x86/PCI: config space accessor functions should not ignore the segment argument 2011-07-22 08:25:41 -07:00
visws.c x86: Move pci init function to x86_init 2010-02-19 16:12:29 -08:00
xen.c xen/pci: Use the INT_SRC_OVR IRQ (instead of GSI) to preset the ACPI SCI IRQ. 2011-06-30 11:23:39 -04:00