From: Benjamin Herrenschmidt Date: Sun, 8 Feb 2009 14:27:21 +0000 (+0000) Subject: powerpc/pci: mmap anonymous memory when legacy_mem doesn't exist X-Git-Tag: v2.6.29-rc5~40^2~1 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5b11abfdb572bf9284e596dd198ac2aaf95b6616;p=pandora-kernel.git powerpc/pci: mmap anonymous memory when legacy_mem doesn't exist 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: Benjamin Herrenschmidt --- Reading git-diff-tree failed