Changes in kernel/generic/src/main/kinit.c [a4e23f8c:36df4109] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/src/main/kinit.c
ra4e23f8c r36df4109 59 59 #include <mm/km.h> 60 60 #include <print.h> 61 #include <log.h> 61 62 #include <memstr.h> 62 63 #include <console/console.h> … … 78 79 #include <synch/waitq.h> 79 80 #include <synch/spinlock.h> 81 #include <synch/workqueue.h> 82 #include <synch/rcu.h> 80 83 81 84 #define ALIVE_CHARS 4 … … 104 107 */ 105 108 thread_detach(THREAD); 106 109 107 110 interrupts_disable(); 111 112 /* Start processing RCU callbacks. RCU is fully functional afterwards. */ 113 rcu_kinit_init(); 114 115 /* 116 * Start processing work queue items. Some may have been queued during boot. 117 */ 118 workq_global_worker_init(); 108 119 109 120 #ifdef CONFIG_SMP … … 140 151 thread_ready(thread); 141 152 } else 142 printf("Unable to create kcpulb thread for cpu%u\n", i); 153 log(LF_OTHER, LVL_ERROR, 154 "Unable to create kcpulb thread for cpu%u", i); 143 155 } 144 156 } … … 148 160 * At this point SMP, if present, is configured. 149 161 */ 150 arch_post_smp_init();162 ARCH_OP(post_smp_init); 151 163 152 164 /* Start thread computing system load */ … … 156 168 thread_ready(thread); 157 169 else 158 printf("Unable to create kload thread\n");170 log(LF_OTHER, LVL_ERROR, "Unable to create kload thread"); 159 171 160 172 #ifdef CONFIG_KCONSOLE … … 168 180 thread_ready(thread); 169 181 else 170 printf("Unable to create kconsole thread\n"); 182 log(LF_OTHER, LVL_ERROR, 183 "Unable to create kconsole thread"); 171 184 } 172 185 #endif /* CONFIG_KCONSOLE */ … … 210 223 for (i = 0; i < init.cnt; i++) { 211 224 if (init.tasks[i].paddr % FRAME_SIZE) { 212 printf("init[%zu]: Address is not frame aligned\n", i); 225 log(LF_OTHER, LVL_ERROR, 226 "init[%zu]: Address is not frame aligned", i); 213 227 programs[i].task = NULL; 214 228 continue; … … 226 240 name = "<unknown>"; 227 241 228 ASSERT(TASK_NAME_BUFLEN >= INIT_PREFIX_LEN);242 STATIC_ASSERT(TASK_NAME_BUFLEN >= INIT_PREFIX_LEN); 229 243 str_cpy(namebuf, TASK_NAME_BUFLEN, INIT_PREFIX); 230 244 str_cpy(namebuf + INIT_PREFIX_LEN, … … 273 287 init_rd((void *) init.tasks[i].paddr, init.tasks[i].size); 274 288 } else 275 printf("init[%zu]: Init binary load failed " 276 "(error %d, loader status %u)\n", i, rc, 289 log(LF_OTHER, LVL_ERROR, 290 "init[%zu]: Init binary load failed " 291 "(error %d, loader status %u)", i, rc, 277 292 programs[i].loader_status); 278 293 }
Note:
See TracChangeset
for help on using the changeset viewer.