For your consideration:
Commit "Remove the remnants of Jensen
support" (c7680befe5aebd0f4277d11ff3984d8a7deb9d5b) not only removed the
Jensen support but also the dense support leaving behind only sparse
support for Linux Alpha. This breaks the SlowBCopy routines on all BWX
enabled Alphas.
Re-add the test for sparse and dense systems and re-introduce the dense
code path.
Michael Cree.
diff --git a/hw/xfree86/os-support/misc/SlowBcopy.c b/hw/xfree86/os-support/misc/SlowBcopy.c
index 182a3e6..21ab116 100644
--- a/hw/xfree86/os-support/misc/SlowBcopy.c
+++ b/hw/xfree86/os-support/misc/SlowBcopy.c
@@ -59,6 +59,8 @@ xf86SlowBcopy(unsigned char *src, unsigned char *dst, int len)
#ifdef linux
+extern unsigned long _bus_base_sparse(void);
+
#define SPARSE (7)
#else
@@ -70,32 +72,38 @@ xf86SlowBcopy(unsigned char *src, unsigned char *dst, int len)
void
xf86SlowBCopyFromBus(unsigned char *src, unsigned char *dst, int count)
{
- unsigned long addr;
- long result;
-
- addr = (unsigned long) src;
- while( count ){
- result = *(volatile int *) addr;
- result >>= ((addr>>SPARSE) & 3) * 8;
- *dst++ = (unsigned char) (0xffUL & result);
- addr += 1<<SPARSE;
- count--;
- outb(0x80, 0x00);
- }
+ if (_bus_base_sparse()) {
+ unsigned long addr;
+ long result;
+
+ addr = (unsigned long) src;
+ while( count ){
+ result = *(volatile int *) addr;
+ result >>= ((addr>>SPARSE) & 3) * 8;
+ *dst++ = (unsigned char) (0xffUL & result);
+ addr += 1<<SPARSE;
+ count--;
+ outb(0x80, 0x00);
+ }
+ }else
+ xf86SlowBcopy(src, dst, count);
}
void
xf86SlowBCopyToBus(unsigned char *src, unsigned char *dst, int count)
{
- unsigned long addr;
-
- addr = (unsigned long) dst;
- while(count) {
- *(volatile unsigned int *) addr = (unsigned short)(*src) * 0x01010101;
- src++;
- addr += 1<<SPARSE;
- count--;
- outb(0x80, 0x00);
- }
+ if (_bus_base_sparse()) {
+ unsigned long addr;
+
+ addr = (unsigned long) dst;
+ while(count) {
+ *(volatile unsigned int *) addr = (unsigned short)(*src) * 0x01010101;
+ src++;
+ addr += 1<<SPARSE;
+ count--;
+ outb(0x80, 0x00);
+ }
+ }else
+ xf86SlowBcopy(src, dst, count);
}
#endif
_______________________________________________
xorg-devel mailing list
[email protected]
http://lists.x.org/mailman/listinfo/xorg-devel