summaryrefslogtreecommitdiff
path: root/kern
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2020-09-19 21:51:22 +0200
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2020-09-19 21:55:57 +0200
commita76bc939142f61e615fcc39fc940961e39a26207 (patch)
tree5224c805761fd68311de079f32b7c4ef0c613bf6 /kern
parentb26973c8018b99bcf8fb071eb2aedc634039eea1 (diff)
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 'kern')
-rw-r--r--kern/cpu_number.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/kern/cpu_number.h b/kern/cpu_number.h
index e7b65324..0be2d338 100644
--- a/kern/cpu_number.h
+++ b/kern/cpu_number.h
@@ -27,6 +27,8 @@
#ifndef _KERN_CPU_NUMBER_H_
#define _KERN_CPU_NUMBER_H_
+#include <machine/cpu_number.h>
+
/*
* Definitions for cpu identification in multi-processors.
*/