[parisc-linux-cvs] Sign extend MMIO addresses for 64-bit dino

Ryan Bradetich rbradetich@uswest.net
Wed, 28 Feb 2001 22:26:08 -0700


This patch by Grant Grundler (thanks Grant!) sign extends
the MMIO addresses for 64-bit kernels that use dino.

I have tested the patch on both 32-bit and 64-bit kernels on
the C200 and it works great.

- Ryan

diff -u -p -r1.24 dino.c
--- dino.c 2000/12/02 21:03:47 1.24
+++ dino.c 2001/03/01 05:17:13
@@ -686,6 +686,14 @@ dino_fixup_bus(struct pci_bus *bus)
     res->start |= hba_num;
     res->end |= hba_num;
    }
+#ifdef __LP64__
+   /* Sign Extend MMIO addresses */
+   if (res->flags & IORESOURCE_MEM) {
+    res->start |= 0xffffffff00000000UL;
+    res->end   |= 0xffffffff00000000UL;
+   }
+#endif
+
   }

   /* Adjust INT_LINE for that busses region */