diff options
author | dfr <dfr@FreeBSD.org> | 2002-03-20 10:04:08 +0000 |
---|---|---|
committer | dfr <dfr@FreeBSD.org> | 2002-03-20 10:04:08 +0000 |
commit | d0f60a59c9bb4d69370dd8ce40f1baf9c6f26046 (patch) | |
tree | b27371236f8fb8214b958fb1cc45d310538c7c3a /sys | |
parent | fb7bce66e919c1ad1c24b783e94a38553133913c (diff) | |
download | FreeBSD-src-d0f60a59c9bb4d69370dd8ce40f1baf9c6f26046.zip FreeBSD-src-d0f60a59c9bb4d69370dd8ce40f1baf9c6f26046.tar.gz |
Replace calls to cpu_critical_enter/exit with appropriate calls to
either explicitly disable interrupts or use a real critical section,
as appropriate.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/ia64/ia64/db_interface.c | 4 | ||||
-rw-r--r-- | sys/ia64/ia64/pmap.c | 13 | ||||
-rw-r--r-- | sys/ia64/ia64/sapic.c | 10 |
3 files changed, 14 insertions, 13 deletions
diff --git a/sys/ia64/ia64/db_interface.c b/sys/ia64/ia64/db_interface.c index d6966ab..f44fd77 100644 --- a/sys/ia64/ia64/db_interface.c +++ b/sys/ia64/ia64/db_interface.c @@ -328,7 +328,7 @@ kdb_trap(int vector, struct trapframe *regs) * XXX Should switch to DDB's own stack, here. */ - s = cpu_critical_enter(); + s = intr_disable(); #ifdef SMP #ifdef CPUSTOP_ON_DDBBREAK @@ -394,7 +394,7 @@ kdb_trap(int vector, struct trapframe *regs) *regs = ddb_regs; - cpu_critical_exit(s); + intr_enable(s); /* diff --git a/sys/ia64/ia64/pmap.c b/sys/ia64/ia64/pmap.c index 9571de1f..b6a795a 100644 --- a/sys/ia64/ia64/pmap.c +++ b/sys/ia64/ia64/pmap.c @@ -601,7 +601,7 @@ pmap_invalidate_all_1(void *arg) int i, j; critical_t psr; - psr = cpu_critical_enter(); + psr = intr_disable(); addr = pmap_ptc_e_base; for (i = 0; i < pmap_ptc_e_count1; i++) { for (j = 0; j < pmap_ptc_e_count2; j++) { @@ -610,7 +610,7 @@ pmap_invalidate_all_1(void *arg) } addr += pmap_ptc_e_stride1; } - cpu_critical_exit(psr); + intr_enable(psr); } static void @@ -2590,15 +2590,14 @@ pmap_t pmap_install(pmap_t pmap) { pmap_t oldpmap; - critical_t c; int i; - c = cpu_critical_enter(); + critical_enter(); oldpmap = PCPU_GET(current_pmap); if (pmap == oldpmap || pmap == kernel_pmap) { - cpu_critical_exit(c); + critical_exit(); return pmap; } @@ -2617,7 +2616,7 @@ pmap_install(pmap_t pmap) ia64_set_rr(IA64_RR_BASE(2), (2 << 8)|(PAGE_SHIFT << 2)|1); ia64_set_rr(IA64_RR_BASE(3), (3 << 8)|(PAGE_SHIFT << 2)|1); ia64_set_rr(IA64_RR_BASE(4), (4 << 8)|(PAGE_SHIFT << 2)|1); - cpu_critical_exit(c); + critical_exit(); return oldpmap; } @@ -2627,7 +2626,7 @@ pmap_install(pmap_t pmap) ia64_set_rr(IA64_RR_BASE(i), (pmap->pm_rid[i] << 8)|(PAGE_SHIFT << 2)|1); - cpu_critical_exit(c); + critical_exit(); return oldpmap; } diff --git a/sys/ia64/ia64/sapic.c b/sys/ia64/ia64/sapic.c index 5e87fef..72279a6 100644 --- a/sys/ia64/ia64/sapic.c +++ b/sys/ia64/ia64/sapic.c @@ -86,10 +86,11 @@ sapic_read_rte(struct sapic *sa, int which, { u_int32_t *p = (u_int32_t *) rte; critical_t c; - c = cpu_critical_enter(); + + c = intr_disable(); p[0] = sapic_read(sa, SAPIC_RTE_BASE + 2*which); p[1] = sapic_read(sa, SAPIC_RTE_BASE + 2*which + 1); - cpu_critical_exit(c); + intr_enable(c); } #endif @@ -100,10 +101,11 @@ sapic_write_rte(struct sapic *sa, int which, { u_int32_t *p = (u_int32_t *) rte; critical_t c; - c = cpu_critical_enter(); + + c = intr_disable(); sapic_write(sa, SAPIC_RTE_BASE + 2*which, p[0]); sapic_write(sa, SAPIC_RTE_BASE + 2*which + 1, p[1]); - cpu_critical_exit(c); + intr_enable(c); } struct sapic * |