Changeset da68871a in mainline for kernel/arch/ia32/src/smp/apic.c


Ignore:
Timestamp:
2012-08-08T08:46:22Z (12 years ago)
Author:
Adam Hraska <adam.hraska+hos@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
30c0826
Parents:
bc216a0 (diff), 1d01cca (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merged changes from mainline.

File:
1 edited

Legend:

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

    rbc216a0 rda68871a  
    259259}
    260260
    261 static void ipi_wait_for_idle(void)
     261/* Waits for the destination cpu to accept the previous ipi. */
     262static void l_apic_wait_for_delivery(void)
    262263{
    263264        icr_t icr;
    264265       
    265         /* Wait for the destination cpu to accept the previous ipi. */
    266266        do {
    267267                icr.lo = l_apic[ICRlo];
     
    281281
    282282        /* Wait for a destination cpu to accept our previous ipi. */
    283         ipi_wait_for_idle();
     283        l_apic_wait_for_delivery();
    284284       
    285285        icr.lo = l_apic[ICRlo];
     
    298298        l_apic[ICRlo] = icr.lo;
    299299       
    300 #ifdef CONFIG_DEBUG
    301         icr.lo = l_apic[ICRlo];
    302         if (icr.delivs == DELIVS_PENDING) {
    303                 printf("IPI is pending.\n");
    304         }
    305 #endif
    306        
    307300        return apic_poll_errors();
    308301}
     
    320313
    321314        /* Wait for a destination cpu to accept our previous ipi. */
    322         ipi_wait_for_idle();
     315        l_apic_wait_for_delivery();
    323316       
    324317        icr.lo = l_apic[ICRlo];
     
    332325        l_apic[ICRlo] = icr.lo;
    333326       
    334         icr.lo = l_apic[ICRlo];
    335         if (icr.delivs == DELIVS_PENDING) {
    336 #ifdef CONFIG_DEBUG
    337                 printf("IPI is pending.\n");
    338 #endif
    339         }
    340        
    341327        return apic_poll_errors();
    342328}
     
    379365                return 0;
    380366       
     367        l_apic_wait_for_delivery();
     368
    381369        icr.lo = l_apic[ICRlo];
    382         if (icr.delivs == DELIVS_PENDING) {
    383 #ifdef CONFIG_DEBUG
    384                 printf("IPI is pending.\n");
    385 #endif
    386         }
    387        
    388370        icr.delmod = DELMOD_INIT;
    389371        icr.destmod = DESTMOD_PHYS;
     
    518500        dfr.model = MODEL_FLAT;
    519501        l_apic[DFR] = dfr.value;
    520        
    521         if (CPU->arch.id != l_apic_id()) {
    522 #ifdef CONFIG_DEBUG
    523                 printf("lapic error: LAPIC ID (%" PRIu8 ") and hw ID assigned by BSP"
    524                         " (%u) differ. Correcting to LAPIC ID.\n", l_apic_id(),
    525                         CPU->arch.id);
    526 #endif
    527                 CPU->arch.id = l_apic_id();
    528         }
    529        
    530502}
    531503
Note: See TracChangeset for help on using the changeset viewer.