Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/sun2/sun2 Make softintr_handler return one, not zer...
details: https://anonhg.NetBSD.org/src/rev/131050919a4a
branches: trunk
changeset: 508367:131050919a4a
user: fredette <fredette%NetBSD.org@localhost>
date: Tue Apr 10 12:33:09 2001 +0000
description:
Make softintr_handler return one, not zero, to properly
claim the interrupt. Added special bus_space_probe
handling to sun2_bus_map.
diffstat:
sys/arch/sun2/sun2/machdep.c | 21 +++++++++++++++------
1 files changed, 15 insertions(+), 6 deletions(-)
diffs (57 lines):
diff -r 07db7a3b0f48 -r 131050919a4a sys/arch/sun2/sun2/machdep.c
--- a/sys/arch/sun2/sun2/machdep.c Tue Apr 10 12:29:10 2001 +0000
+++ b/sys/arch/sun2/sun2/machdep.c Tue Apr 10 12:33:09 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: machdep.c,v 1.1 2001/04/06 15:05:56 fredette Exp $ */
+/* $NetBSD: machdep.c,v 1.2 2001/04/10 12:33:09 fredette Exp $ */
/*
* Copyright (c) 2001 Matthew Fredette.
@@ -907,7 +907,7 @@
}
}
- return (0);
+ return (1);
}
/*
@@ -1282,7 +1282,7 @@
#ifdef DIAGNOSTIC
if ((size & PAGE_MASK) != 0)
- panic("_bus_dma_valloc_skewed: invalid size %lx", size);
+ panic("_bus_dma_valloc_skewed: invalid size %lx", (unsigned long) size);
if ((align & PAGE_MASK) != 0)
panic("_bus_dma_valloc_skewed: invalid alignment %lx", align);
if (align < skew)
@@ -1650,6 +1650,7 @@
{
bus_size_t offset;
vaddr_t v;
+ int pte;
/*
* If we suspect there might be one, try to find
@@ -1683,10 +1684,18 @@
*hp = (bus_space_handle_t)(v | offset);
/*
- * Map the device.
+ * Map the device. If we think that this is a probe,
+ * make and set the PTE by hand, otherwise use the pmap.
*/
- addr |= iospace | PMAP_NC;
- pmap_map(v, addr, addr + size, VM_PROT_ALL);
+ if (v == tmp_vpages[1]) {
+ pte = PA_PGNUM(addr);
+ pte |= (iospace << PG_MOD_SHIFT);
+ pte |= (PG_VALID | PG_WRITE | PG_SYSTEM | PG_NC);
+ set_pte(v, pte);
+ } else {
+ addr |= iospace | PMAP_NC;
+ pmap_map(v, addr, addr + size, VM_PROT_ALL);
+ }
return (0);
}
Home |
Main Index |
Thread Index |
Old Index