Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/xen/x86 Remove code that is commented out and out-o...
details: https://anonhg.NetBSD.org/src/rev/5af7bfe88701
branches: trunk
changeset: 770529:5af7bfe88701
user: jruoho <jruoho%NetBSD.org@localhost>
date: Thu Oct 20 13:21:11 2011 +0000
description:
Remove code that is commented out and out-of-sync with x86. If Xen needs to
use cpu_resume(), cpu_suspend(), or cpu_shutdown() in the future, it is
better to expose these from x86 rather than duplicate code.
diffstat:
sys/arch/xen/x86/cpu.c | 75 +------------------------------------------------
1 files changed, 2 insertions(+), 73 deletions(-)
diffs (103 lines):
diff -r 371225b59052 -r 5af7bfe88701 sys/arch/xen/x86/cpu.c
--- a/sys/arch/xen/x86/cpu.c Thu Oct 20 12:14:12 2011 +0000
+++ b/sys/arch/xen/x86/cpu.c Thu Oct 20 13:21:11 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: cpu.c,v 1.67 2011/10/06 06:56:30 mrg Exp $ */
+/* $NetBSD: cpu.c,v 1.68 2011/10/20 13:21:11 jruoho Exp $ */
/* NetBSD: cpu.c,v 1.18 2004/02/20 17:35:01 yamt Exp */
/*-
@@ -66,7 +66,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.67 2011/10/06 06:56:30 mrg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.68 2011/10/20 13:21:11 jruoho Exp $");
#include "opt_ddb.h"
#include "opt_multiprocessor.h"
@@ -535,11 +535,6 @@
pat_init(ci);
atomic_or_32(&cpus_attached, ci->ci_cpumask);
-#if 0
- if (!pmf_device_register(self, cpu_suspend, cpu_resume))
- aprint_error_dev(self, "couldn't establish power handler\n");
-#endif
-
#ifdef MPVERBOSE
if (mp_verbose) {
struct lwp *l = ci->ci_data.cpu_idlelwp;
@@ -1132,72 +1127,6 @@
splx(s);
}
-#if 0
-/* XXX joerg restructure and restart CPUs individually */
-static bool
-cpu_suspend(device_t dv, const pmf_qual_t *qual)
-{
- struct cpu_softc *sc = device_private(dv);
- struct cpu_info *ci = sc->sc_info;
- int err;
-
- if ((ci->ci_flags & CPUF_PRESENT) == 0)
- return true;
-
- cpufreq_suspend(ci);
-
- if ((ci->ci_flags & CPUF_PRIMARY) != 0)
- return true;
-
- if (ci->ci_data.cpu_idlelwp == NULL)
- return true;
-
- sc->sc_wasonline = !(ci->ci_schedstate.spc_flags & SPCF_OFFLINE);
-
- if (sc->sc_wasonline) {
- mutex_enter(&cpu_lock);
- err = cpu_setstate(ci, false);
- mutex_exit(&cpu_lock);
-
- if (err != 0)
- return false;
- }
-
- return true;
-}
-
-static bool
-cpu_resume(device_t dv, const pmf_qual_t *qual)
-{
- struct cpu_softc *sc = device_private(dv);
- struct cpu_info *ci = sc->sc_info;
- int err = 0;
-
- if ((ci->ci_flags & CPUF_PRESENT) == 0)
- return true;
-
- if ((ci->ci_flags & CPUF_PRIMARY) != 0)
- goto out;
-
- if (ci->ci_data.cpu_idlelwp == NULL)
- goto out;
-
- if (sc->sc_wasonline) {
- mutex_enter(&cpu_lock);
- err = cpu_setstate(ci, true);
- mutex_exit(&cpu_lock);
- }
-
-out:
- if (err != 0)
- return false;
-
- cpufreq_resume(ci);
-
- return true;
-}
-#endif
-
void
cpu_get_tsc_freq(struct cpu_info *ci)
{
Home |
Main Index |
Thread Index |
Old Index