Changeset b109ebb in mainline
- Timestamp:
- 2005-02-22T08:31:53Z (20 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 4ffa9e0
- Parents:
- 169587a
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
arch/ia32/include/interrupt.h
r169587a rb109ebb 60 60 61 61 #define VECTOR_SYSCALL (IVT_FREEBASE+0) 62 #define VECTOR_TLB_SH UTDOWN (IVT_FREEBASE+1)62 #define VECTOR_TLB_SHOOTDOWN (IVT_FREEBASE+1) 63 63 64 64 typedef void (* iroutine)(__u8 n, __u32 stack[]); … … 78 78 extern void page_fault(__u8 n, __u32 stack[]); 79 79 extern void syscall(__u8 n, __u32 stack[]); 80 extern void tlb_sh utdown_ipi(__u8 n, __u32 stack[]);80 extern void tlb_shootdown_ipi(__u8 n, __u32 stack[]); 81 81 82 82 extern void trap_virtual_enable_irqs(__u16 irqmask); -
arch/ia32/src/ia32.c
r169587a rb109ebb 59 59 60 60 #ifdef __SMP__ 61 trap_register(VECTOR_TLB_SH UTDOWN, tlb_shutdown_ipi);61 trap_register(VECTOR_TLB_SHOOTDOWN, tlb_shootdown_ipi); 62 62 #endif /* __SMP__ */ 63 63 } -
arch/ia32/src/interrupt.c
r169587a rb109ebb 95 95 } 96 96 97 void tlb_sh utdown_ipi(__u8 n, __u32 stack[])97 void tlb_shootdown_ipi(__u8 n, __u32 stack[]) 98 98 { 99 99 trap_virtual_eoi(); 100 tlb_sh utdown_ipi_recv();100 tlb_shootdown_ipi_recv(); 101 101 } 102 102 -
arch/ia32/src/mm/tlb.c
r169587a rb109ebb 41 41 42 42 #ifdef __SMP__ 43 void tlb_sh utdown_ipi_send(void)43 void tlb_shootdown_ipi_send(void) 44 44 { 45 (void) l_apic_broadcast_custom_ipi(VECTOR_TLB_SH UTDOWN);45 (void) l_apic_broadcast_custom_ipi(VECTOR_TLB_SHOOTDOWN); 46 46 } 47 47 #endif /* __SMP__ */ -
include/mm/tlb.h
r169587a rb109ebb 32 32 #ifdef __SMP__ 33 33 extern void tlb_init(void); 34 extern void tlb_sh utdown_start(void);35 extern void tlb_sh utdown_finalize(void);36 extern void tlb_sh utdown_ipi_recv(void);34 extern void tlb_shootdown_start(void); 35 extern void tlb_shootdown_finalize(void); 36 extern void tlb_shootdown_ipi_recv(void); 37 37 #else 38 38 39 39 #define tlb_init() ; 40 #define tlb_sh utdown_start() ;41 #define tlb_sh utdown_finalize() ;42 #define tlb_sh utdown_ipi_recv() ;40 #define tlb_shootdown_start() ; 41 #define tlb_shootdown_finalize() ; 42 #define tlb_shootdown_ipi_recv() ; 43 43 44 44 #endif /* __SMP__ */ … … 46 46 /* Export TLB interface that each architecture must implement. */ 47 47 extern void tlb_invalidate(int asid); 48 extern void tlb_sh utdown_ipi_send(void);48 extern void tlb_shootdown_ipi_send(void); 49 49 50 50 #endif -
src/mm/tlb.c
r169587a rb109ebb 35 35 #ifdef __SMP__ 36 36 static spinlock_t tlblock; 37 static volatile int tlb_sh utdown_cnt;37 static volatile int tlb_shootdown_cnt; 38 38 39 39 void tlb_init(void) 40 40 { 41 41 spinlock_initialize(&tlblock); 42 tlb_sh utdown_cnt = 0;42 tlb_shootdown_cnt = 0; 43 43 } 44 44 45 45 /* must be called with interrupts disabled */ 46 void tlb_sh utdown_start(void)46 void tlb_shootdown_start(void) 47 47 { 48 48 spinlock_lock(&tlblock); 49 tlb_sh utdown_ipi_send();49 tlb_shootdown_ipi_send(); 50 50 51 while (tlb_sh utdown_cnt < config.cpu_active - 1)51 while (tlb_shootdown_cnt < config.cpu_active - 1) 52 52 ; 53 53 54 tlb_sh utdown_cnt = 0;54 tlb_shootdown_cnt = 0; 55 55 } 56 56 57 void tlb_sh utdown_finalize(void)57 void tlb_shootdown_finalize(void) 58 58 { 59 59 spinlock_unlock(&tlblock); 60 60 } 61 61 62 void tlb_sh utdown_ipi_recv(void)62 void tlb_shootdown_ipi_recv(void) 63 63 { 64 atomic_inc((int *) &tlb_sh utdown_cnt);64 atomic_inc((int *) &tlb_shootdown_cnt); 65 65 spinlock_lock(&tlblock); 66 66 spinlock_unlock(&tlblock); -
src/mm/vm.c
r169587a rb109ebb 171 171 pri = cpu_priority_high(); 172 172 173 tlb_sh utdown_start();173 tlb_shootdown_start(); 174 174 175 175 spinlock_lock(&m->lock); … … 181 181 182 182 tlb_invalidate(0); 183 tlb_sh utdown_finalize();183 tlb_shootdown_finalize(); 184 184 185 185 cpu_priority_restore(pri);
Note:
See TracChangeset
for help on using the changeset viewer.