kernel-ark/arch/powerpc
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
..
boot [POWERPC] ps3: add a default zImage target 2006-12-05 11:28:17 +11:00
configs [POWERPC] Linkstation / kurobox support 2006-12-04 20:42:08 +11:00
kernel [POWERPC] Fix mmap of PCI resource with hack for X 2006-12-08 17:21:06 +11:00
lib [POWERPC] Disallow kprobes on emulate_step and branch_taken 2006-11-01 15:14:12 +11:00
math-emu [POWERPC] ppc math-emu needs -fno-builtin-fabs for math.c and fabs.c 2006-09-26 15:24:35 +10:00
mm [PATCH] slab: remove kmem_cache_t 2006-12-07 08:39:25 -08:00
oprofile [POWERPC] ps3: multiplatform build fixes 2006-12-04 20:41:16 +11:00
platforms [POWERPC] cbe_thermal: Fix initialization of sysfs attribute_group 2006-12-08 17:21:02 +11:00
sysdev [POWERPC] qe_ic: Do a sync when masking interrupts 2006-12-08 17:10:22 +11:00
xmon [POWERPC] Allow xmon to build on legacy iSeries 2006-12-04 20:41:56 +11:00
.gitignore [POWERPC] Add files build to .gitignore 2006-12-04 20:41:29 +11:00
Kconfig [POWERPC] maple: Select PPC_RTAS 2006-12-08 17:10:22 +11:00
Kconfig.debug [POWERPC] Allow CONFIG_BOOTX_TEXT on iSeries 2006-12-04 20:41:58 +11:00
Makefile [POWERPC] Create a "wrapper" script and use it in arch/powerpc/boot 2006-09-28 14:30:02 +10:00