• Benjamin Herrenschmidt's avatar
    powerpc/pci: mmap anonymous memory when legacy_mem doesn't exist · 5b11abfd
    Benjamin Herrenschmidt authored
    The new legacy_mem file in sysfs is causing problems with X on machines
    that don't support legacy memory access. The way I initially implemented
    it, we would fail with -ENXIO when trying to mmap it, thus exposing to
    X that we do support the API but there is no legacy memory.
    
    Unfortunately, X poor error handling is causing it to fail to start when
    it gets this error.
    
    This implements a workaround hack that instead maps anonymous memory
    instead (using shmem if VM_SHARED is set, just like /dev/zero does).
    Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
    5b11abfd
pci-common.c 45.2 KB