]> git.baikalelectronics.ru Git - kernel.git/commit
sparc64: Fix PCI resource mapping on sparc64
authorMax Dmitrichenko <dmitrmax@gmail.com>
Sun, 2 Nov 2008 07:34:10 +0000 (00:34 -0700)
committerDavid S. Miller <davem@davemloft.net>
Sun, 2 Nov 2008 07:34:10 +0000 (00:34 -0700)
commit7c59ad08d041596d70b2933b8be6f109df76fa13
tree620a1fd9938abb10abfb0dde236a6e29026ab4ab
parentf534b84e44eca792088225ec3c01fb1a9c93dc5d
sparc64: Fix PCI resource mapping on sparc64

There is a problem discovered in recent versions of ATI Mach64 driver
in X.org on sparc64 architecture. In short, the driver fails to mmap
MMIO aperture (PCI resource #2).

I've found that kernel's __pci_mmap_make_offset() returns EINVAL. It
checks whether user attempts to mmap more than the resource length,
which is 0x1000 bytes in our case. But PAGE_SIZE on SPARC64 is 0x2000
and this is what actually is being mmaped. So __pci_mmap_make_offset()
failed for this PCI resource.

Signed-off-by: Max Dmitrichenko <dmitrmax@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
arch/sparc64/kernel/pci.c