Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/ia32/src/smp/smp.c

    r49e6c6b4 rb2fa1204  
    5252#include <mm/slab.h>
    5353#include <mm/as.h>
    54 #include <print.h>
     54#include <log.h>
    5555#include <memstr.h>
    5656#include <arch/drivers/i8259.h>
    57 #include <cpu.h>
    5857
    5958#ifdef CONFIG_SMP
     
    8180}
    8281
    83 static void cpu_arch_id_init(void)
    84 {
    85         ASSERT(ops != NULL);
    86         ASSERT(cpus != NULL);
    87        
    88         for (unsigned int i = 0; i < config.cpu_count; ++i) {
    89                 cpus[i].arch.id = ops->cpu_apic_id(i);
    90         }
    91 }
    92 
    9382/*
    9483 * Kernel thread for bringing up application processors. It becomes clear
     
    10392       
    10493        ASSERT(ops != NULL);
    105 
    106         /*
    107          * SMP initialized, cpus array allocated. Assign each CPU its
    108          * physical APIC ID.
    109          */
    110         cpu_arch_id_init();
    11194       
    11295        /*
     
    146129               
    147130                if (ops->cpu_apic_id(i) == bsp_l_apic) {
    148                         printf("kmp: bad processor entry #%u, will not send IPI "
    149                             "to myself\n", i);
     131                        log(LF_ARCH, LVL_ERROR, "kmp: bad processor entry #%u, "
     132                            "will not send IPI to myself", i);
    150133                        continue;
    151134                }
     
    179162                        if (waitq_sleep_timeout(&ap_completion_wq, 1000000,
    180163                            SYNCH_FLAGS_NONE) == ESYNCH_TIMEOUT) {
    181                                 printf("%s: waiting for cpu%u (APIC ID = %d) "
    182                                     "timed out\n", __FUNCTION__, i,
    183                                     ops->cpu_apic_id(i));
     164                                log(LF_ARCH, LVL_NOTE, "%s: waiting for cpu%u "
     165                                    "(APIC ID = %d) timed out", __FUNCTION__,
     166                                    i, ops->cpu_apic_id(i));
    184167                        }
    185168                } else
    186                         printf("INIT IPI for l_apic%d failed\n",
     169                        log(LF_ARCH, LVL_ERROR, "INIT IPI for l_apic%d failed",
    187170                            ops->cpu_apic_id(i));
    188171        }
Note: See TracChangeset for help on using the changeset viewer.