kernel-ark/drivers
David Miller f1a2a9b618 drm: Preserve SHMLBA bits in hash key for _DRM_SHM mappings.
Platforms such as sparc64 have D-cache aliasing issues.  We
cannot allow virtual mappings in different contexts to be such
that two cache lines can be loaded for the same backing data.
Updates to one cache line won't be seen by accesses to the other
cache line.

Code in sparc64 and other architectures solve this problem by
making sure that all userland mappings of MAP_SHARED objects have
the same virtual address base.  They implement this by keying
off of the page offset, and using that to choose a suitably
consistent virtual address for mmap() requests.

Making things even worse, getting this wrong on sparc64 can result
in hangs during DRM lock acquisition.  This is because, at least on
UltraSPARC-III, normal loads consult the D-cache but atomics such
as 'cas' (which is what cmpxchg() is implement using) only consult
the L2 cache.  So if a D-cache alias is inserted, the load can
see different data than the atomic, and we'll loop forever because
the atomic compare-and-exchange will never complete successfully.

So to make this all work properly, we need to make sure that the
hash address computed by drm_map_handle() preserves the SHMLBA
relevant bits, and that's what this patch does for _DRM_SHM mappings.

As a historical note, many years ago this bug didn't exist because we
used to just use the low 32-bits of the address as the hash and just
hope for the best.  This preserved the SHMLBA bits properly.  But when
the hashtab code was added to DRM, this was no longer the case.

Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2009-03-13 14:24:03 +10:00
..
accessibility
acpi Merge branches 'release', 'bugzilla-12011', 'bugzilla-12632', 'misc' and 'suspend' into release 2009-02-21 22:01:43 -05:00
amba
ata libata: Don't trust current capacity values in identify words 57-58 2009-03-05 07:26:10 -05:00
atm ATM: misplaced parentheses? 2009-02-18 17:41:38 -08:00
auxdisplay
base mm: get_nid_for_pfn() returns int 2009-03-10 15:55:10 -07:00
block Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6 2009-03-09 09:15:40 -07:00
bluetooth
cdrom
char Merge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc 2009-03-11 12:14:04 -07:00
clocksource
connector
cpufreq Revert "[CPUFREQ] Disable sysfs ui for p4-clockmod." 2009-03-09 15:07:33 -04:00
cpuidle
crypto crypto: ixp4xx - Fix qmgr_request_queue build failure 2009-03-04 08:01:22 +08:00
dca I/OAT: update driver version and copyright dates 2009-03-04 16:04:40 -07:00
dio
dma Merge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/djbw/async_tx 2009-03-08 10:23:05 -07:00
edac
eisa
firewire firewire: core: Remove card from list of cards when enable fails 2009-02-01 11:17:24 +01:00
firmware Bernhard has moved 2009-02-18 15:37:56 -08:00
gpio
gpu drm: Preserve SHMLBA bits in hash key for _DRM_SHM mappings. 2009-03-13 14:24:03 +10:00
hid HID: move tmff and zpff devices from ignore_list to blacklist 2009-02-17 13:25:01 +01:00
hwmon hwmon: (f75375s) Remove unnecessary and confusing initialization 2009-03-12 13:36:39 +01:00
i2c Merge master.kernel.org:/home/rmk/linux-2.6-arm 2009-03-03 14:12:41 -08:00
ide ide: add at91_ide driver 2009-03-05 16:10:58 +01:00
idle
ieee1394 Make ieee1394_init a fs-initcall 2009-02-26 10:32:31 -08:00
infiniband RDMA/nes: Don't allow userspace QPs to use STag zero 2009-03-12 16:21:41 -07:00
input Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input 2009-03-02 15:43:03 -08:00
isdn ISDN: fix sc/shmem printk format warning 2009-02-20 00:54:44 -08:00
leds
lguest lguest: fix for CONFIG_SPARSE_IRQ=y 2009-03-09 10:06:29 +10:30
macintosh
mca
md md: fix deadlock when stopping arrays 2009-03-04 00:57:25 -07:00
media Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input 2009-03-02 15:43:03 -08:00
memstick
message [SCSI] mpt: fix disable lsi sas to use msi as default 2009-02-22 08:51:07 -06:00
mfd mfd: add support for WM8351 revision B 2009-03-12 16:20:24 -07:00
misc hpilo: new pci device 2009-02-27 16:26:22 -08:00
mmc mmc: s3cmci: fix s3c2410_dma_config() arguments. 2009-03-12 16:20:24 -07:00
mtd mtd: physmap: fix NULL pointer dereference in error path 2009-03-10 15:55:11 -07:00
net Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6 2009-03-12 09:27:53 -07:00
nubus
of
oprofile
parisc
parport m68k: atari - Rename "mfp" to "st_mfp" 2009-02-22 09:23:02 -08:00
pci PCIe: portdrv: call pci_disable_device during remove 2009-03-12 15:42:35 -04:00
pcmcia
platform acer-wmi: fix regression in backlight detection 2009-03-12 16:20:24 -07:00
pnp
power ds2760_battery.c: fix division by zero 2009-03-12 16:20:23 -07:00
ps3
rapidio
regulator
rtc rtc: t reaches -1, tested 0 2009-02-11 14:25:36 -08:00
s390 [S390] fix "mem=" handling in case of standby memory 2009-02-19 15:19:19 +01:00
sbus sparc64: wait_event_interruptible_timeout may return -ERESTARTSYS 2009-03-04 00:19:28 -08:00
scsi [SCSI] fix ABORTED_COMMAND looping forever problem 2009-02-21 20:29:38 -06:00
serial Merge branch 'sh/for-2.6.29' of git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6 2009-02-27 16:40:00 -08:00
sh
sn
spi spi-gpio: sanitize MISO bitvalue 2009-02-18 15:37:56 -08:00
ssb
staging Staging: w35und: fix usb_control_msg() error handling in wb35_probe() 2009-02-27 12:56:24 -08:00
tc
telephony
thermal
uio
usb USB: musb: fix srp sysfs entry deletion 2009-02-27 14:40:51 -08:00
uwb
video Merge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc 2009-03-11 12:14:04 -07:00
virtio virtio-pci: do not oops on config change if driver not loaded 2009-02-02 19:17:56 -08:00
w1 drivers/w1/masters/w1-gpio.c: fix read_bit() 2009-03-12 16:20:23 -07:00
watchdog [WATCHDOG] orion5x_wdt.c: 'ORION5X_TCLK' undeclared 2009-03-05 19:25:05 +00:00
xen PM: Split up sysdev_[suspend|resume] from device_power_[down|up] 2009-02-22 10:33:44 -08:00
zorro
Kconfig
Makefile