Index: cpu.c =================================================================== RCS file: /home/joerg/repo/netbsd/src/sys/arch/x86/x86/cpu.c,v retrieving revision 1.62 diff -u -p -r1.62 cpu.c --- cpu.c 21 Jan 2009 21:26:01 -0000 1.62 +++ cpu.c 2 Feb 2009 14:38:43 -0000 @@ -121,6 +121,7 @@ __KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.62 int cpu_match(device_t, cfdata_t, void *); void cpu_attach(device_t, device_t, void *); +static bool cpu_shutdown(device_t, int); static bool cpu_suspend(device_t PMF_FN_PROTO); static bool cpu_resume(device_t PMF_FN_PROTO); @@ -420,7 +421,7 @@ cpu_attach(device_t parent, device_t sel atomic_or_32(&cpus_attached, ci->ci_cpumask); - if (!pmf_device_register(self, cpu_suspend, cpu_resume)) + if (!pmf_device_register1(self, cpu_suspend, cpu_resume, cpu_shutdown)) aprint_error_dev(self, "couldn't establish power handler\n"); if (mp_verbose) { @@ -995,9 +996,8 @@ cpu_offline_md(void) splx(s); } -/* XXX joerg restructure and restart CPUs individually */ static bool -cpu_suspend(device_t dv PMF_FN_ARGS) +cpu_shutdown(device_t dv, int dummy) { struct cpu_softc *sc = device_private(dv); struct cpu_info *ci = sc->sc_info; @@ -1025,6 +1025,12 @@ cpu_suspend(device_t dv PMF_FN_ARGS) } static bool +cpu_suspend(device_t dv PMF_FN_ARGS) +{ + return cpu_shutdown(dv, 0); +} + +static bool cpu_resume(device_t dv PMF_FN_ARGS) { struct cpu_softc *sc = device_private(dv);