diff options
author | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2021-04-04 16:47:38 +0200 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2021-04-04 16:47:38 +0200 |
commit | b21f84ef1bb9e9ba69bfea069295ad4618f671eb (patch) | |
tree | af3e80941a206353b0eb7a1a21b95e02601f5c09 | |
parent | e5facfba3d2dba679d72c859066260eb0d33456c (diff) | |
download | gnumach-b21f84ef1bb9e9ba69bfea069295ad4618f671eb.tar.gz gnumach-b21f84ef1bb9e9ba69bfea069295ad4618f671eb.tar.bz2 gnumach-b21f84ef1bb9e9ba69bfea069295ad4618f671eb.zip |
SMP: Fix warnings
-rw-r--r-- | ddb/db_mp.c | 2 | ||||
-rw-r--r-- | ddb/db_mp.h | 3 | ||||
-rw-r--r-- | device/intr.c | 4 | ||||
-rw-r--r-- | i386/i386/db_interface.c | 1 | ||||
-rw-r--r-- | i386/i386/fpu.c | 2 | ||||
-rw-r--r-- | i386/i386/mp_desc.c | 2 | ||||
-rw-r--r-- | i386/i386/mp_desc.h | 4 | ||||
-rw-r--r-- | i386/i386/pcb.h | 4 | ||||
-rw-r--r-- | kern/ast.h | 1 | ||||
-rw-r--r-- | kern/machine.c | 6 | ||||
-rw-r--r-- | kern/processor.c | 2 |
11 files changed, 28 insertions, 3 deletions
diff --git a/ddb/db_mp.c b/ddb/db_mp.c index 8d1a5605..7c0f6f26 100644 --- a/ddb/db_mp.c +++ b/ddb/db_mp.c @@ -35,10 +35,12 @@ #include <kern/lock.h> #include <machine/db_machdep.h> +#include <machine/db_interface.h> #include <ddb/db_command.h> #include <ddb/db_run.h> #include <ddb/db_mp.h> +#include <ddb/db_output.h> /* * Routines to interlock access to the kernel debugger on diff --git a/ddb/db_mp.h b/ddb/db_mp.h index 722f28c7..b0d221ea 100644 --- a/ddb/db_mp.h +++ b/ddb/db_mp.h @@ -27,4 +27,7 @@ void unlock_db(void); void db_console(void); #endif /* CONSOLE_ON_MASTER */ +boolean_t db_enter(void); +void db_leave(void); + #endif /* _DDB_DB_MP_H_ */ diff --git a/device/intr.c b/device/intr.c index 01a382df..66bc3759 100644 --- a/device/intr.c +++ b/device/intr.c @@ -200,7 +200,7 @@ install_user_intr_handler (struct irqdev *dev, int id, unsigned long flags, /* Don't allow overriding hardclock/kdintr etc */ if ((ivect[irq] != user_irq_handler) && (ivect[irq] != intnull)) { - mach_print("You can't have this interrupt\n"); + printf("You can't have this interrupt\n"); return D_ALREADY_OPEN; } @@ -208,7 +208,7 @@ install_user_intr_handler (struct irqdev *dev, int id, unsigned long flags, { if (!(old->flags & flags & SA_SHIRQ)) { - mach_print ("Cannot share irq\n"); + printf ("Cannot share irq\n"); return D_ALREADY_OPEN; } } diff --git a/i386/i386/db_interface.c b/i386/i386/db_interface.c index cc23c15c..1a7070e3 100644 --- a/i386/i386/db_interface.c +++ b/i386/i386/db_interface.c @@ -56,6 +56,7 @@ #include <ddb/db_task_thread.h> #include <ddb/db_trap.h> #include <ddb/db_watch.h> +#include <ddb/db_mp.h> #include <machine/db_interface.h> #include <machine/machspl.h> diff --git a/i386/i386/fpu.c b/i386/i386/fpu.c index cdfe264b..b47bd339 100644 --- a/i386/i386/fpu.c +++ b/i386/i386/fpu.c @@ -927,7 +927,9 @@ void fpintr(int unit) { spl_t s; +#if NCPUS == 1 thread_t thread = current_thread(); +#endif /* NCPUS == 1 */ ASSERT_IPL(SPL1); /* diff --git a/i386/i386/mp_desc.c b/i386/i386/mp_desc.c index e4bc12de..1e9ea0fc 100644 --- a/i386/i386/mp_desc.c +++ b/i386/i386/mp_desc.c @@ -30,12 +30,14 @@ #include <kern/cpu_number.h> #include <kern/debug.h> +#include <kern/printf.h> #include <mach/machine.h> #include <mach/xen.h> #include <vm/vm_kern.h> #include <i386/mp_desc.h> #include <i386/lock.h> +#include <i386at/model_dep.h> #include <machine/ktss.h> #include <machine/tss.h> #include <machine/io_perm.h> diff --git a/i386/i386/mp_desc.h b/i386/i386/mp_desc.h index 4a9cbdf6..ebe1471d 100644 --- a/i386/i386/mp_desc.h +++ b/i386/i386/mp_desc.h @@ -84,4 +84,8 @@ extern void interrupt_processor(int cpu); extern void start_other_cpus(void); +extern kern_return_t cpu_start(int cpu); + +extern kern_return_t cpu_control(int cpu, const int *info, unsigned int count); + #endif /* _I386_MP_DESC_H_ */ diff --git a/i386/i386/pcb.h b/i386/i386/pcb.h index 30d96271..5bc78066 100644 --- a/i386/i386/pcb.h +++ b/i386/i386/pcb.h @@ -79,6 +79,10 @@ extern thread_t Load_context (thread_t new); extern thread_t Switch_context (thread_t old, void (*continuation)(), thread_t new); +extern void switch_to_shutdown_context(thread_t thread, + void (*routine)(processor_t), + processor_t processor); + extern void Thread_continue (void); extern void pcb_module_init (void); @@ -133,6 +133,7 @@ extern void ast_init (void); extern void ast_check (void); #if NCPUS > 1 +extern void init_ast_check(const processor_t processor); extern void cause_ast_check(const processor_t processor); #endif diff --git a/kern/machine.c b/kern/machine.c index 3f7a7f7f..2fe30cee 100644 --- a/kern/machine.c +++ b/kern/machine.c @@ -50,8 +50,10 @@ #include <kern/sched.h> #include <kern/task.h> #include <kern/thread.h> +#include <kern/printf.h> #include <machine/machspl.h> /* for splsched */ #include <machine/model_dep.h> +#include <machine/pcb.h> #include <sys/reboot.h> @@ -358,7 +360,7 @@ processor_shutdown(processor_t processor) /* * action_thread() shuts down processors or changes their assignment. */ -void action_thread_continue(void) +void __attribute__((noreturn)) action_thread_continue(void) { processor_t processor; spl_t s; @@ -589,7 +591,9 @@ Restart_pset: s = splsched(); processor_lock(processor); +#if MACH_HOST shutdown: +#endif /* MACH_HOST */ pset_remove_processor(pset, processor); processor_unlock(processor); pset_unlock(pset); diff --git a/kern/processor.c b/kern/processor.c index 6ed716d3..ec56952e 100644 --- a/kern/processor.c +++ b/kern/processor.c @@ -39,12 +39,14 @@ #include <kern/lock.h> #include <kern/host.h> #include <kern/ipc_tt.h> +#include <kern/machine.h> #include <kern/processor.h> #include <kern/sched.h> #include <kern/task.h> #include <kern/thread.h> #include <kern/ipc_host.h> #include <ipc/ipc_port.h> +#include <machine/mp_desc.h> #if MACH_HOST #include <kern/slab.h> |