Changes in kernel/generic/src/cpu/cpu.c [4760793:128359eb] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/src/cpu/cpu.c
r4760793 r128359eb 45 45 #include <config.h> 46 46 #include <panic.h> 47 #include <mem w.h>47 #include <mem.h> 48 48 #include <adt/list.h> 49 49 #include <stdio.h> … … 81 81 panic("Cannot allocate CPU stack."); 82 82 83 cpus[i]. local.stack = (uint8_t *) PA2KA(stack_phys);83 cpus[i].stack = (uint8_t *) PA2KA(stack_phys); 84 84 cpus[i].id = i; 85 85 86 #ifdef CONFIG_FPU_LAZY 87 irq_spinlock_initialize(&cpus[i].fpu_lock, "cpus[].fpu_lock"); 88 #endif 89 irq_spinlock_initialize(&cpus[i].tlb_lock, "cpus[].tlb_lock"); 86 irq_spinlock_initialize(&cpus[i].lock, "cpus[].lock"); 90 87 91 88 for (unsigned int j = 0; j < RQ_COUNT; j++) { … … 104 101 CPU->tlb_active = true; 105 102 106 CPU _LOCAL->idle = false;107 CPU _LOCAL->last_cycle = get_cycle();108 CPU->idle_cycles = ATOMIC_TIME_INITIALIZER();109 CPU->busy_cycles = ATOMIC_TIME_INITIALIZER();103 CPU->idle = false; 104 CPU->last_cycle = get_cycle(); 105 CPU->idle_cycles = 0; 106 CPU->busy_cycles = 0; 110 107 111 108 cpu_identify();
Note:
See TracChangeset
for help on using the changeset viewer.