Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys Remove a redundant function.
details: https://anonhg.NetBSD.org/src/rev/e0066ad0dcc8
branches: trunk
changeset: 756982:e0066ad0dcc8
user: jruoho <jruoho%NetBSD.org@localhost>
date: Mon Aug 09 13:41:38 2010 +0000
description:
Remove a redundant function.
diffstat:
sys/arch/x86/acpi/acpi_cpu_md.c | 16 +++-------------
sys/dev/acpi/acpi_cpu.h | 3 +--
sys/dev/acpi/acpi_cpu_cstate.c | 10 ++--------
3 files changed, 6 insertions(+), 23 deletions(-)
diffs (96 lines):
diff -r 903e95076d97 -r e0066ad0dcc8 sys/arch/x86/acpi/acpi_cpu_md.c
--- a/sys/arch/x86/acpi/acpi_cpu_md.c Mon Aug 09 10:57:23 2010 +0000
+++ b/sys/arch/x86/acpi/acpi_cpu_md.c Mon Aug 09 13:41:38 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: acpi_cpu_md.c,v 1.7 2010/08/09 04:27:07 jruoho Exp $ */
+/* $NetBSD: acpi_cpu_md.c,v 1.8 2010/08/09 13:41:39 jruoho Exp $ */
/*-
* Copyright (c) 2010 Jukka Ruohonen <jruohonen%iki.fi@localhost>
@@ -27,7 +27,7 @@
* SUCH DAMAGE.
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: acpi_cpu_md.c,v 1.7 2010/08/09 04:27:07 jruoho Exp $");
+__KERNEL_RCSID(0, "$NetBSD: acpi_cpu_md.c,v 1.8 2010/08/09 13:41:39 jruoho Exp $");
#include <sys/param.h>
#include <sys/bus.h>
@@ -138,22 +138,12 @@
}
int
-acpicpu_md_idle_init(void)
+acpicpu_md_idle_start(void)
{
const size_t size = sizeof(native_idle_text);
x86_disable_intr();
x86_cpu_idle_get(&native_idle, native_idle_text, size);
- x86_enable_intr();
-
- return 0;
-}
-
-int
-acpicpu_md_idle_start(void)
-{
-
- x86_disable_intr();
x86_cpu_idle_set(acpicpu_cstate_idle, "acpi");
x86_enable_intr();
diff -r 903e95076d97 -r e0066ad0dcc8 sys/dev/acpi/acpi_cpu.h
--- a/sys/dev/acpi/acpi_cpu.h Mon Aug 09 10:57:23 2010 +0000
+++ b/sys/dev/acpi/acpi_cpu.h Mon Aug 09 13:41:38 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: acpi_cpu.h,v 1.10 2010/08/08 18:47:54 jruoho Exp $ */
+/* $NetBSD: acpi_cpu.h,v 1.11 2010/08/09 13:41:38 jruoho Exp $ */
/*-
* Copyright (c) 2010 Jukka Ruohonen <jruohonen%iki.fi@localhost>
@@ -191,7 +191,6 @@
uint32_t acpicpu_md_cap(void);
uint32_t acpicpu_md_quirks(void);
uint32_t acpicpu_md_cpus_running(void);
-int acpicpu_md_idle_init(void);
int acpicpu_md_idle_start(void);
int acpicpu_md_idle_stop(void);
void acpicpu_md_idle_enter(int, int);
diff -r 903e95076d97 -r e0066ad0dcc8 sys/dev/acpi/acpi_cpu_cstate.c
--- a/sys/dev/acpi/acpi_cpu_cstate.c Mon Aug 09 10:57:23 2010 +0000
+++ b/sys/dev/acpi/acpi_cpu_cstate.c Mon Aug 09 13:41:38 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: acpi_cpu_cstate.c,v 1.17 2010/08/09 05:00:24 jruoho Exp $ */
+/* $NetBSD: acpi_cpu_cstate.c,v 1.18 2010/08/09 13:41:38 jruoho Exp $ */
/*-
* Copyright (c) 2010 Jukka Ruohonen <jruohonen%iki.fi@localhost>
@@ -27,7 +27,7 @@
* SUCH DAMAGE.
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: acpi_cpu_cstate.c,v 1.17 2010/08/09 05:00:24 jruoho Exp $");
+__KERNEL_RCSID(0, "$NetBSD: acpi_cpu_cstate.c,v 1.18 2010/08/09 13:41:38 jruoho Exp $");
#include <sys/param.h>
#include <sys/cpu.h>
@@ -165,18 +165,12 @@
{
struct acpicpu_softc *sc = device_private(self);
static ONCE_DECL(once_start);
- static ONCE_DECL(once_save);
int rv;
/*
* Save the existing idle-mechanism and claim the idle_loop(9).
* This should be called after all ACPI CPUs have been attached.
*/
- rv = RUN_ONCE(&once_save, acpicpu_md_idle_init);
-
- if (rv != 0)
- return rv;
-
rv = RUN_ONCE(&once_start, acpicpu_md_idle_start);
if (rv == 0)
Home |
Main Index |
Thread Index |
Old Index