Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/generic/src/main/kinit.c

    ra4e23f8c r36df4109  
    5959#include <mm/km.h>
    6060#include <print.h>
     61#include <log.h>
    6162#include <memstr.h>
    6263#include <console/console.h>
     
    7879#include <synch/waitq.h>
    7980#include <synch/spinlock.h>
     81#include <synch/workqueue.h>
     82#include <synch/rcu.h>
    8083
    8184#define ALIVE_CHARS  4
     
    104107         */
    105108        thread_detach(THREAD);
    106        
     109
    107110        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();
    108119       
    109120#ifdef CONFIG_SMP
     
    140151                                thread_ready(thread);
    141152                        } 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);
    143155                }
    144156        }
     
    148160         * At this point SMP, if present, is configured.
    149161         */
    150         arch_post_smp_init();
     162        ARCH_OP(post_smp_init);
    151163       
    152164        /* Start thread computing system load */
     
    156168                thread_ready(thread);
    157169        else
    158                 printf("Unable to create kload thread\n");
     170                log(LF_OTHER, LVL_ERROR, "Unable to create kload thread");
    159171       
    160172#ifdef CONFIG_KCONSOLE
     
    168180                        thread_ready(thread);
    169181                else
    170                         printf("Unable to create kconsole thread\n");
     182                        log(LF_OTHER, LVL_ERROR,
     183                            "Unable to create kconsole thread");
    171184        }
    172185#endif /* CONFIG_KCONSOLE */
     
    210223        for (i = 0; i < init.cnt; i++) {
    211224                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);
    213227                        programs[i].task = NULL;
    214228                        continue;
     
    226240                        name = "<unknown>";
    227241               
    228                 ASSERT(TASK_NAME_BUFLEN >= INIT_PREFIX_LEN);
     242                STATIC_ASSERT(TASK_NAME_BUFLEN >= INIT_PREFIX_LEN);
    229243                str_cpy(namebuf, TASK_NAME_BUFLEN, INIT_PREFIX);
    230244                str_cpy(namebuf + INIT_PREFIX_LEN,
     
    273287                        init_rd((void *) init.tasks[i].paddr, init.tasks[i].size);
    274288                } 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,
    277292                            programs[i].loader_status);
    278293        }
Note: See TracChangeset for help on using the changeset viewer.