Rev 673 | Rev 779 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 673 | Rev 681 | ||
---|---|---|---|
Line 39... | Line 39... | ||
39 | #include <config.h> |
39 | #include <config.h> |
40 | #include <list.h> |
40 | #include <list.h> |
41 | 41 | ||
42 | #define CPU_STACK_SIZE STACK_SIZE |
42 | #define CPU_STACK_SIZE STACK_SIZE |
43 | 43 | ||
- | 44 | /** CPU structure. |
|
- | 45 | * |
|
- | 46 | * There is one structure like this for every processor. |
|
- | 47 | */ |
|
44 | struct cpu { |
48 | struct cpu { |
45 | SPINLOCK_DECLARE(lock); |
49 | SPINLOCK_DECLARE(lock); |
- | 50 | ||
46 | context_t saved_context; |
51 | context_t saved_context; |
47 | 52 | ||
48 | volatile count_t nrdy; |
53 | volatile count_t nrdy; |
49 | runq_t rq[RQ_COUNT]; |
54 | runq_t rq[RQ_COUNT]; |
50 | volatile count_t needs_relink; |
55 | volatile count_t needs_relink; |
Line 55... | Line 60... | ||
55 | #ifdef CONFIG_SMP |
60 | #ifdef CONFIG_SMP |
56 | atomic_t kcpulbstarted; |
61 | atomic_t kcpulbstarted; |
57 | waitq_t kcpulb_wq; |
62 | waitq_t kcpulb_wq; |
58 | #endif /* CONFIG_SMP */ |
63 | #endif /* CONFIG_SMP */ |
59 | 64 | ||
- | 65 | /** |
|
- | 66 | * Processor ID assigned by kernel. |
|
- | 67 | */ |
|
60 | int id; |
68 | int id; |
- | 69 | ||
61 | int active; |
70 | int active; |
62 | int tlb_active; |
71 | int tlb_active; |
63 | 72 | ||
64 | __u16 frequency_mhz; |
73 | __u16 frequency_mhz; |
65 | __u32 delay_loop_const; |
74 | __u32 delay_loop_const; |
66 | 75 | ||
67 | cpu_arch_t arch; |
76 | cpu_arch_t arch; |
68 | 77 | ||
69 | thread_t *fpu_owner; |
78 | thread_t *fpu_owner; |
70 | 79 | ||
- | 80 | /** |
|
- | 81 | * Stack used by scheduler when there is no running thread. |
|
- | 82 | */ |
|
71 | __u8 *stack; |
83 | __u8 *stack; |
72 | }; |
84 | }; |
73 | 85 | ||
74 | extern cpu_t *cpus; |
86 | extern cpu_t *cpus; |
75 | 87 |