kernel-ark/arch/ppc/kernel
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
..
asm-offsets.c
cpu_setup_power4.S
dma-mapping.c
entry.S
head_4xx.S
head_8xx.S
head_44x.S
head_booke.h
head_fsl_booke.S
head.S
machine_kexec.c
Makefile
misc.S [POWERPC] Consolidate feature fixup code 2006-10-25 11:42:10 +10:00
pci.c [POWERPC] Fix mmap of PCI resource with hack for X 2006-12-08 17:21:06 +11:00
ppc_htab.c
ppc_ksyms.c
ppc-stub.c
relocate_kernel.S
rio.c
semaphore.c
setup.c [POWERPC] Distinguish POWER6 partition modes and tell userspace 2006-12-04 20:40:16 +11:00
smp-tbsync.c
smp.c [POWERPC] ARCH=ppc pt_regs fixes 2006-10-10 11:55:25 +10:00
softemu8xx.c
time.c [POWERPC] ppc: Add missing calls to set_irq_regs 2006-10-16 15:52:14 +10:00
traps.c [POWERPC] Book-E reg MCSR msg misquoted 2006-12-04 20:39:22 +11:00
vmlinux.lds.S [PATCH] relocatable kernel: Kallsyms generate relocatable symbols 2006-12-07 02:14:04 +01:00