diff options
author | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2020-09-19 21:51:22 +0200 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2020-09-19 21:55:57 +0200 |
commit | a76bc939142f61e615fcc39fc940961e39a26207 (patch) | |
tree | 5224c805761fd68311de079f32b7c4ef0c613bf6 /i386/intel | |
parent | b26973c8018b99bcf8fb071eb2aedc634039eea1 (diff) | |
download | gnumach-a76bc939142f61e615fcc39fc940961e39a26207.tar.gz gnumach-a76bc939142f61e615fcc39fc940961e39a26207.tar.bz2 gnumach-a76bc939142f61e615fcc39fc940961e39a26207.zip |
smp: Add --enable-ncpus option and fix build
* configfrag.ac (--enable-ncpus): Add option to set $mach_ncpus.
* i386/i386/cpu_number.h (CPU_NUMBER, cpu_number): New macros, set to 0 for
now.
* i386/i386/db_interface.c (cpu_interrupt_to_db): New function.
* i386/i386/db_interface.h (cpu_interrupt_to_db): New declaration.
* i386/i386/mp_desc.c (int_stack_base): New array.
(intel_startCPU): New function.
* i386/i386at/model_dep.c: Include <i386/smp.h>
(int_stack_top, int_stack_base): Turn into arrays
(i386at_init): Update accesses accordingly.
* i386/i386at/model_dep.h (int_stack_top, int_stack_base, ON_INT_STACK):
Likewise.
* i386/intel/pmap.c (cpus_active, cpus_idle, cpu_update_needed): Add
variables.
* i386/intel/pmap.h (cpus_active, cpus_idle, cpu_update_needed): Mark
extern.
* kern/cpu_number.h: Include <machine/cpu_number.h>
* linux/dev/arch/i386/kernel/irq.c (local_bh_count, local_irq_count):
Hardcode to the address of intr_count. We will not use the Linux code in
SMP mode anyway.
Diffstat (limited to 'i386/intel')
-rw-r--r-- | i386/intel/pmap.c | 5 | ||||
-rw-r--r-- | i386/intel/pmap.h | 6 |
2 files changed, 8 insertions, 3 deletions
diff --git a/i386/intel/pmap.c b/i386/intel/pmap.c index 0f650f2a..34b1153c 100644 --- a/i386/intel/pmap.c +++ b/i386/intel/pmap.c @@ -381,6 +381,11 @@ typedef struct pmap_update_list *pmap_update_list_t; struct pmap_update_list cpu_update_list[NCPUS]; +cpu_set cpus_active; +cpu_set cpus_idle; +volatile +boolean_t cpu_update_needed[NCPUS]; + #endif /* NCPUS > 1 */ /* diff --git a/i386/intel/pmap.h b/i386/intel/pmap.h index d6224d87..d2b533c8 100644 --- a/i386/intel/pmap.h +++ b/i386/intel/pmap.h @@ -247,18 +247,18 @@ extern void pmap_put_mapwindow(pmap_mapwindow_t *map); * Update operations must still be queued to cpus not in this * list. */ -cpu_set cpus_active; +extern cpu_set cpus_active; /* * List of cpus that are idle, but still operating, and will want * to see any kernel pmap updates when they become active. */ -cpu_set cpus_idle; +extern cpu_set cpus_idle; /* * Quick test for pmap update requests. */ -volatile +extern volatile boolean_t cpu_update_needed[NCPUS]; /* |