Changeset 7d365305 in mainline


Ignore:
Timestamp:
2005-07-20T11:26:40Z (19 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
59532eb
Parents:
0970f43
Message:

Initialize kmp_completion_wq during configuration via ACPI MADT.
Move some generic SMP configuration code from mps.c to smp.c.

Location:
arch/ia32/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • arch/ia32/src/acpi/madt.c

    r0970f43 r7d365305  
    3333#include <arch/smp/apic.h>
    3434#include <arch/smp/smp.h>
    35 #include <mm/page.h>
    3635#include <panic.h>
    3736#include <debug.h>
     
    112111        struct madt_apic_header *end = (struct madt_apic_header *) (((__u8 *) acpi_madt) + acpi_madt->header.length);
    113112        struct madt_apic_header *h = &acpi_madt->apic_header[0];
    114         __u8 prev_type = 0; /* used to detect incosecutive entries */
     113        __u8 prev_type = 0; /* used to detect inconsecutive entries */
    115114
    116115
     
    178177                madt_io_apic_entries = ioa;
    179178                io_apic = (__u32 *) ioa->io_apic_address;
    180                 map_page_to_frame((__address) io_apic, (__address) io_apic, PAGE_NOT_CACHEABLE, 0);
    181179        }
    182180        else {
  • arch/ia32/src/smp/mps.c

    r0970f43 r7d365305  
    3838#include <arch/types.h>
    3939#include <typedefs.h>
    40 #include <mm/page.h>
    4140#include <cpu.h>
    4241#include <arch/asm.h>
     
    203202                config.cpu_count = configure_via_default(fs->config_type);
    204203
    205         if (config.cpu_count > 1) {
    206                 map_page_to_frame((__address) l_apic, (__address) l_apic, PAGE_NOT_CACHEABLE, 0);
    207         }               
    208        
    209        
    210         /*
    211          * Must be initialized outside the kmp thread, since it is waited
    212          * on before the kmp thread is created.
    213          */
    214         waitq_initialize(&kmp_completion_wq);
    215204        return;
    216205}
     
    344333        }
    345334       
    346         map_page_to_frame((__address) ioa->io_apic, (__address) ioa->io_apic, PAGE_NOT_CACHEABLE, 0);
    347        
    348335        io_apic = ioa->io_apic;
    349336}
  • arch/ia32/src/smp/smp.c

    r0970f43 r7d365305  
    5858                ops = &mps_config_operations;
    5959        }
     60
     61        if (config.cpu_count > 1) {
     62                map_page_to_frame((__address) l_apic, (__address) l_apic, PAGE_NOT_CACHEABLE, 0);
     63                map_page_to_frame((__address) io_apic, (__address) io_apic, PAGE_NOT_CACHEABLE, 0);
     64        }
     65
     66        /*
     67         * Must be initialized outside the kmp thread, since it is waited
     68         * on before the kmp thread is created.
     69         */
     70        waitq_initialize(&kmp_completion_wq);
     71
    6072}
    6173
Note: See TracChangeset for help on using the changeset viewer.