Changeset 434f700 in mainline
- Timestamp:
- 2005-04-26T16:17:41Z (20 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- babcb148
- Parents:
- dba84ff
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
arch/ia32/src/bios/bios.c
rdba84ff r434f700 34 34 void bios_init(void) 35 35 { 36 /* Copy the EBDA out from BIOS Data Area */36 /* Copy the EBDA address out from BIOS Data Area */ 37 37 ebda = *((__u16 *) BIOS_EBDA_PTR) * 0x10; 38 38 } -
arch/ia32/src/interrupt.c
rdba84ff r434f700 93 93 { 94 94 printf("cpu%d: syscall\n", CPU->id); 95 thread_usleep(1000 000);95 thread_usleep(1000); 96 96 } 97 97 -
arch/ia32/src/smp/apic.c
rdba84ff r434f700 231 231 l_apic[TPR] &= TPRClear; 232 232 233 //if (CPU->arch.family >= 6)234 //enable_l_apic_in_msr();233 if (CPU->arch.family >= 6) 234 enable_l_apic_in_msr(); 235 235 236 236 tmp = l_apic[ICRlo] & ICRloClear; … … 257 257 258 258 l_apic[ICRT] = t1-t2; 259 259 260 } 260 261 -
include/cpu.h
rdba84ff r434f700 61 61 int id; 62 62 int active; 63 int tlb_active; 63 64 64 65 __u16 frequency_mhz; -
src/Makefile.config
rdba84ff r434f700 23 23 #TEST_DIR=synch/rwlock2/ 24 24 #TEST_DIR=synch/rwlock3/ 25 #TEST_DIR=synch/rwlock4/26 TEST_DIR=synch/rwlock5/25 TEST_DIR=synch/rwlock4/ 26 #TEST_DIR=synch/rwlock5/ 27 27 #TEST_DIR=synch/semaphore1/ 28 28 #TEST_DIR=synch/semaphore2/ -
src/cpu/cpu.c
rdba84ff r434f700 83 83 84 84 CPU->active = 1; 85 CPU->tlb_active = 1; 85 86 86 87 cpu_identify(); -
src/mm/tlb.c
rdba84ff r434f700 34 34 #include <arch/interrupt.h> 35 35 #include <config.h> 36 #include <arch.h> 36 37 37 38 #ifdef __SMP__ 38 39 static spinlock_t tlblock; 39 static volatile int tlb_shootdown_cnt;40 40 41 41 void tlb_init(void) 42 42 { 43 43 spinlock_initialize(&tlblock); 44 tlb_shootdown_cnt = 0;45 44 } 46 45 … … 48 47 void tlb_shootdown_start(void) 49 48 { 49 int i; 50 51 CPU->tlb_active = 0; 50 52 spinlock_lock(&tlblock); 51 53 tlb_shootdown_ipi_send(); 54 tlb_invalidate(0); /* TODO: use valid ASID */ 52 55 53 while (tlb_shootdown_cnt < config.cpu_active - 1) 54 ;55 56 tlb_shootdown_cnt = 0;56 busy_wait: 57 for (i = 0; i<config.cpu_active; i++) 58 if (cpus[i].tlb_active) 59 goto busy_wait; 57 60 } 58 61 … … 60 63 { 61 64 spinlock_unlock(&tlblock); 65 CPU->tlb_active = 1; 62 66 } 63 67 … … 69 73 void tlb_shootdown_ipi_recv(void) 70 74 { 71 atomic_inc((int *) &tlb_shootdown_cnt);75 CPU->tlb_active = 0; 72 76 spinlock_lock(&tlblock); 73 77 spinlock_unlock(&tlblock); 74 78 tlb_invalidate(0); /* TODO: use valid ASID */ 79 CPU->tlb_active = 1; 75 80 } 76 81 #endif /* __SMP__ */ -
src/mm/vm.c
rdba84ff r434f700 180 180 spinlock_unlock(&m->lock); 181 181 182 tlb_invalidate(0);183 182 tlb_shootdown_finalize(); 184 183
Note:
See TracChangeset
for help on using the changeset viewer.