diff options
author | Artur Grabowski <art@cvs.openbsd.org> | 2008-11-22 14:42:30 +0000 |
---|---|---|
committer | Artur Grabowski <art@cvs.openbsd.org> | 2008-11-22 14:42:30 +0000 |
commit | 74c8fafc99a7d1c884138462d4f8df03656fbb87 (patch) | |
tree | 1480c6538bd1a0943da27edd8c6c731cc8c5cdcb | |
parent | 2056bd4b305a27b57a0072c3f4d95d752d5e7822 (diff) |
cpu_unidle for macppc
ok drahn@
-rw-r--r-- | sys/arch/macppc/macppc/machdep.c | 14 | ||||
-rw-r--r-- | sys/arch/powerpc/include/cpu.h | 6 |
2 files changed, 15 insertions, 5 deletions
diff --git a/sys/arch/macppc/macppc/machdep.c b/sys/arch/macppc/macppc/machdep.c index 927b4952496..f44acf2b272 100644 --- a/sys/arch/macppc/macppc/machdep.c +++ b/sys/arch/macppc/macppc/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.102 2008/11/21 17:35:52 deraadt Exp $ */ +/* $OpenBSD: machdep.c,v 1.103 2008/11/22 14:42:29 art Exp $ */ /* $NetBSD: machdep.c,v 1.4 1996/10/16 19:33:11 ws Exp $ */ /* @@ -1022,11 +1022,17 @@ void signotify(struct proc *p) { aston(p); + cpu_unidle(p->p_cpu); +} + #ifdef MULTIPROCESSOR - if (p->p_cpu != curcpu() && p->p_cpu != NULL) - ppc_send_ipi(p->p_cpu, PPC_IPI_NOP); -#endif +void +cpu_unidle(struct cpu_info *ci) +{ + if (ci != curcpu()) + ppc_send_ipi(ci, PPC_IPI_NOP); } +#endif /* * set system type from string diff --git a/sys/arch/powerpc/include/cpu.h b/sys/arch/powerpc/include/cpu.h index 5bb8462ef08..1116f5db74e 100644 --- a/sys/arch/powerpc/include/cpu.h +++ b/sys/arch/powerpc/include/cpu.h @@ -1,4 +1,4 @@ -/* $OpenBSD: cpu.h,v 1.41 2008/10/15 23:23:49 deraadt Exp $ */ +/* $OpenBSD: cpu.h,v 1.42 2008/11/22 14:42:29 art Exp $ */ /* $NetBSD: cpu.h,v 1.1 1996/09/30 16:34:21 ws Exp $ */ /* @@ -117,6 +117,8 @@ void cpu_boot_secondary_processors(void); #define CPU_INFO_FOREACH(cii, ci) \ for (cii = 0, ci = &cpu_info[0]; cii < PPC_MAXPROCS; cii++, ci++) +void cpu_unidle(struct cpu_info *); + #else #define PPC_MAXPROCS 1 @@ -128,6 +130,8 @@ void cpu_boot_secondary_processors(void); #define CPU_INFO_FOREACH(cii, ci) \ for (cii = 0, ci = curcpu(); ci != NULL; ci = NULL) +#define cpu_unidle(ci) + #endif #define MAXCPUS PPC_MAXPROCS |