aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/pci.h
diff options
context:
space:
mode:
authorMichael Ellerman <michael@ellerman.id.au>2005-05-13 03:44:10 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2005-06-28 00:52:45 -0400
commit2311b1f2bbd36fa5f366a7448c718b2556e0f02c (patch)
tree10e836c5c34893f8098464a5ae15aba351a7bb2a /include/linux/pci.h
parenta0d399a808916d22c1c222c6b5ca4e8edd6d91a9 (diff)
[PATCH] PCI: fix-pci-mmap-on-ppc-and-ppc64.patch
This is an updated version of Ben's fix-pci-mmap-on-ppc-and-ppc64.patch which is in 2.6.12-rc4-mm1. It fixes the patch to work on PPC iSeries, removes some debug printks at Ben's request, and incorporates your fix-pci-mmap-on-ppc-and-ppc64-fix.patch also. Originally from Benjamin Herrenschmidt <benh@kernel.crashing.org> This patch was discussed at length on linux-pci and so far, the last iteration of it didn't raise any comment. It's effect is a nop on architecture that don't define the new pci_resource_to_user() callback anyway. It allows architecture like ppc who put weird things inside of PCI resource structures to convert to some different value for user visible ones. It also fixes mmap'ing of IO space on those archs. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Michael Ellerman <michael@ellerman.id.au> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'include/linux/pci.h')
-rw-r--r--include/linux/pci.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/include/linux/pci.h b/include/linux/pci.h
index 0e9844929fe3..cfa1455848f4 100644
--- a/include/linux/pci.h
+++ b/include/linux/pci.h
@@ -1020,6 +1020,20 @@ static inline char *pci_name(struct pci_dev *pdev)
1020#define pci_pretty_name(dev) "" 1020#define pci_pretty_name(dev) ""
1021#endif 1021#endif
1022 1022
1023
1024/* Some archs don't want to expose struct resource to userland as-is
1025 * in sysfs and /proc
1026 */
1027#ifndef HAVE_ARCH_PCI_RESOURCE_TO_USER
1028static inline void pci_resource_to_user(const struct pci_dev *dev, int bar,
1029 const struct resource *rsrc, u64 *start, u64 *end)
1030{
1031 *start = rsrc->start;
1032 *end = rsrc->end;
1033}
1034#endif /* HAVE_ARCH_PCI_RESOURCE_TO_USER */
1035
1036
1023/* 1037/*
1024 * The world is not perfect and supplies us with broken PCI devices. 1038 * The world is not perfect and supplies us with broken PCI devices.
1025 * For at least a part of these bugs we need a work-around, so both 1039 * For at least a part of these bugs we need a work-around, so both