diff options
author | Mark Kettenis <kettenis@cvs.openbsd.org> | 2007-10-17 19:25:23 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@cvs.openbsd.org> | 2007-10-17 19:25:23 +0000 |
commit | 3c26c5c2c2b37ca05f25e1963c8376729f31d936 (patch) | |
tree | ab6b5837dc7dff1de4934aca449ad64342f0533c /sys/arch/sparc64 | |
parent | 8e00c60cbbae185d37142e3965f2d6cc9e1250b9 (diff) |
Proper TLB flushing for MULTIPROCESSOR kernels.
Diffstat (limited to 'sys/arch/sparc64')
-rw-r--r-- | sys/arch/sparc64/include/pte.h | 16 | ||||
-rw-r--r-- | sys/arch/sparc64/sparc64/locore.s | 14 |
2 files changed, 20 insertions, 10 deletions
diff --git a/sys/arch/sparc64/include/pte.h b/sys/arch/sparc64/include/pte.h index 520260ca9bf..cd5a30efbf0 100644 --- a/sys/arch/sparc64/include/pte.h +++ b/sys/arch/sparc64/include/pte.h @@ -1,4 +1,4 @@ -/* $OpenBSD: pte.h,v 1.7 2006/06/02 19:53:30 miod Exp $ */ +/* $OpenBSD: pte.h,v 1.8 2007/10/17 19:25:22 kettenis Exp $ */ /* $NetBSD: pte.h,v 1.7 2001/07/31 06:55:46 eeh Exp $ */ /* @@ -121,8 +121,18 @@ struct sun4u_tte { typedef struct sun4u_tte pte_t; /* Assembly routine to flush a mapping */ -extern void tlb_flush_pte(vaddr_t addr, int ctx); -extern void tlb_flush_ctx(int ctx); +extern void sp_tlb_flush_pte(vaddr_t addr, int ctx); +extern void sp_tlb_flush_ctx(int ctx); + +#if defined(MULTIPROCESSOR) +void smp_tlb_flush_pte(vaddr_t, int); +void smp_tlb_flush_ctx(int); +#define tlb_flush_pte(va,ctx) smp_tlb_flush_pte(va, ctx) +#define tlb_flush_ctx(ctx) smp_tlb_flush_ctx(ctx) +#else +#define tlb_flush_pte(va,ctx) sp_tlb_flush_pte(va, ctx) +#define tlb_flush_ctx(ctx) sp_tlb_flush_ctx(ctx) +#endif #endif /* _LOCORE */ diff --git a/sys/arch/sparc64/sparc64/locore.s b/sys/arch/sparc64/sparc64/locore.s index 7f61543bd87..3916e49e993 100644 --- a/sys/arch/sparc64/sparc64/locore.s +++ b/sys/arch/sparc64/sparc64/locore.s @@ -1,4 +1,4 @@ -/* $OpenBSD: locore.s,v 1.86 2007/10/16 21:44:25 kettenis Exp $ */ +/* $OpenBSD: locore.s,v 1.87 2007/10/17 19:25:22 kettenis Exp $ */ /* $NetBSD: locore.s,v 1.137 2001/08/13 06:10:10 jdolecek Exp $ */ /* @@ -4621,10 +4621,10 @@ _C_LABEL(openfirmware): * */ .align 8 - .globl _C_LABEL(tlb_flush_pte) + .globl _C_LABEL(sp_tlb_flush_pte) .proc 1 - FTYPE(tlb_flush_pte) -_C_LABEL(tlb_flush_pte): + FTYPE(sp_tlb_flush_pte) +_C_LABEL(sp_tlb_flush_pte): #ifdef DEBUG set DATA_START, %o4 ! Forget any recent TLB misses stx %g0, [%o4] @@ -4702,10 +4702,10 @@ _C_LABEL(tlb_flush_pte): * */ .align 8 - .globl _C_LABEL(tlb_flush_ctx) + .globl _C_LABEL(sp_tlb_flush_ctx) .proc 1 - FTYPE(tlb_flush_ctx) -_C_LABEL(tlb_flush_ctx): + FTYPE(sp_tlb_flush_ctx) +_C_LABEL(sp_tlb_flush_ctx): #ifdef DEBUG set DATA_START, %o4 ! Forget any recent TLB misses stx %g0, [%o4] |