linux/arch/ppc
Benjamin Herrenschmidt 396a1a5832 [POWERPC] Fix mmap of PCI resource with hack for X
The powerpc version of pci_resource_to_user() and associated hooks
used by /proc/bus/pci and /sys/bus/pci mmap have been broken for some
time on machines that don't have a 1:1 mapping of devices (basically
on non-PowerMacs) and have PCI devices above 32 bits.

This attempts to fix it as well as possible.

The rule is supposed to be that pci_resource_to_user() always converts
the resources back into a BAR values since that's what the /proc
interface was supposed to deal with. However, for X to work on
platforms where PCI MMIO is not mapped 1:1, it became a habit of
platforms like powerpc to pass "fixed up" values there since X expects
to be able to use values from /proc/bus/pci/devices as offsets to mmap
of /dev/mem...

So we keep that contraption here, causing also /sys/*/resource to
expose fully absolute MMIO addresses instead of BAR values, which is
ugly, but should still work as long as those are only used to calculate
alignment within a page.

X is still broken when built 32 bits on machines where PCI MMIO can be
above 32-bit space unfortunately.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-12-08 17:21:06 +11:00
..
4xx_io [POWERPC] ARCH=ppc pt_regs fixes 2006-10-10 11:55:25 +10:00
8xx_io WorkQueue: Fix up arch-specific work items where possible 2006-12-05 19:36:26 +00:00
8260_io WorkQueue: Fix up arch-specific work items where possible 2006-12-05 19:36:26 +00:00
amiga Remove all inclusions of <linux/config.h> 2006-10-04 03:38:54 -04:00
boot [POWERPC] Add files build to .gitignore 2006-12-04 20:41:29 +11:00
configs [POWERPC] update prep_defconfig 2006-09-13 18:30:08 +10:00
kernel [POWERPC] Fix mmap of PCI resource with hack for X 2006-12-08 17:21:06 +11:00
lib Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
mm [PATCH] mm: use symbolic names instead of indices for zone initialisation 2006-10-11 11:14:14 -07:00
platforms [POWERPC] Compilation fixes for ppc4xx PCI-less configs 2006-12-04 20:39:24 +11:00
syslib [POWERPC] 8xx: Off-by-one fixes to SCC parameter RAM definitions 2006-12-04 20:39:40 +11:00
xmon [POWERPC] PPC: Fix xmon stack frame address in backtrace 2006-09-21 22:55:06 +10:00
.gitignore [POWERPC] Add files build to .gitignore 2006-12-04 20:41:29 +11:00
Kconfig [POWERPC] Generic DCR infrastructure 2006-12-04 16:08:25 +11:00
Kconfig.debug ppc: Remove CHRP, POWER3 and POWER4 support from arch/ppc 2006-03-28 10:22:10 +11:00
Makefile Merge branch '85xx' of git://git.kernel.org/pub/scm/linux/kernel/git/galak/powerpc 2006-03-28 17:03:19 +11:00