[parisc-linux-cvs] Need to sign-extend i/o addresses for ccio on 64 bit
Richard Hirst
rhirst@linuxcare.com
Thu, 4 Oct 2001 17:35:29 +0100
EXTRAVERSION = -pa37
Index: arch/parisc/kernel/ccio-dma.c
===================================================================
RCS file: /home/cvs/parisc/linux/arch/parisc/kernel/ccio-dma.c,v
retrieving revision 1.41
diff -u -r1.41 ccio-dma.c
--- ccio-dma.c 2001/10/04 15:07:20 1.41
+++ ccio-dma.c 2001/10/04 16:11:24
@@ -1337,7 +1337,7 @@
static int ccio_probe(struct parisc_device *dev)
{
int i, start_index, num_devices;
- unsigned long io_io_low, io_io_high;
+ unsigned long io_io_low;
struct ioc *ioc, **ioc_p = &ioc_list;
ioc = kmalloc(sizeof(struct ioc), GFP_KERNEL);
@@ -1374,8 +1374,11 @@
ioc_count++;
io_io_low = READ_U32(&ioc->ioc_hpa->io_io_low) << 16;
- io_io_high = READ_U32(&ioc->ioc_hpa->io_io_high) << 16;
- printk(KERN_INFO "io_io_high: 0x%08lx io_io_low: 0x%08lx\n", io_io_high, io_io_low);
+#ifdef __LP64__
+ /* Need to sign extend these io addresses */
+ io_io_low |= 0xffffffff00000000UL;
+#endif
+ printk(KERN_INFO "io_io_low: 0x%lx\n", io_io_low);
start_index = get_num_pa_dev();
num_devices = do_native_bus_walk(io_io_low);
print_pa_devices(start_index, num_devices);