diff options
-rw-r--r-- | sys/arch/hppa/hppa/ipi.c | 15 | ||||
-rw-r--r-- | sys/arch/hppa/include/intr.h | 9 |
2 files changed, 19 insertions, 5 deletions
diff --git a/sys/arch/hppa/hppa/ipi.c b/sys/arch/hppa/hppa/ipi.c index e4bac94a456..60776162376 100644 --- a/sys/arch/hppa/hppa/ipi.c +++ b/sys/arch/hppa/hppa/ipi.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ipi.c,v 1.2 2010/07/02 00:00:45 jsing Exp $ */ +/* $OpenBSD: ipi.c,v 1.3 2011/01/14 13:09:45 jsing Exp $ */ /* * Copyright (c) 2010 Joel Sing <jsing@openbsd.org> @@ -30,12 +30,14 @@ #include <machine/reg.h> void hppa_ipi_nop(void); +void hppa_ipi_halt(void); void hppa_ipi_fpu_save(void); void hppa_ipi_fpu_flush(void); void (*ipifunc[HPPA_NIPI])(void) = { hppa_ipi_nop, + hppa_ipi_halt, hppa_ipi_fpu_save, hppa_ipi_fpu_flush }; @@ -98,6 +100,17 @@ hppa_ipi_nop(void) } void +hppa_ipi_halt(void) +{ + /* Turn off interrupts and halt CPU. */ + SCHED_ASSERT_UNLOCKED(); + hppa_intr_disable(); + curcpu()->ci_flags &= ~CPUF_RUNNING; + + for (;;) ; +} + +void hppa_ipi_fpu_save(void) { fpu_cpu_save(1); diff --git a/sys/arch/hppa/include/intr.h b/sys/arch/hppa/include/intr.h index 8bb543c0ad1..aae95d7cf37 100644 --- a/sys/arch/hppa/include/intr.h +++ b/sys/arch/hppa/include/intr.h @@ -1,4 +1,4 @@ -/* $OpenBSD: intr.h,v 1.35 2010/12/21 14:56:23 claudio Exp $ */ +/* $OpenBSD: intr.h,v 1.36 2011/01/14 13:09:45 jsing Exp $ */ /* * Copyright (c) 2002-2004 Michael Shalayeff @@ -57,9 +57,10 @@ #ifdef MULTIPROCESSOR #define HPPA_IPI_NOP 0 -#define HPPA_IPI_FPU_SAVE 1 -#define HPPA_IPI_FPU_FLUSH 2 -#define HPPA_NIPI 3 +#define HPPA_IPI_HALT 1 +#define HPPA_IPI_FPU_SAVE 2 +#define HPPA_IPI_FPU_FLUSH 3 +#define HPPA_NIPI 4 #endif #if !defined(_LOCORE) && defined(_KERNEL) |