Module Name: src Committed By: jruoho Date: Fri Feb 25 12:08:35 UTC 2011
Modified Files: src/sys/arch/x86/acpi: acpi_cpu_md.c src/sys/dev/acpi: acpi_cpu.c acpi_cpu.h acpi_cpu_cstate.c Log Message: Rename couple of badly named functions for consistency. No functional change. To generate a diff of this commit: cvs rdiff -u -r1.42 -r1.43 src/sys/arch/x86/acpi/acpi_cpu_md.c cvs rdiff -u -r1.27 -r1.28 src/sys/dev/acpi/acpi_cpu.c cvs rdiff -u -r1.30 -r1.31 src/sys/dev/acpi/acpi_cpu.h cvs rdiff -u -r1.44 -r1.45 src/sys/dev/acpi/acpi_cpu_cstate.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/arch/x86/acpi/acpi_cpu_md.c diff -u src/sys/arch/x86/acpi/acpi_cpu_md.c:1.42 src/sys/arch/x86/acpi/acpi_cpu_md.c:1.43 --- src/sys/arch/x86/acpi/acpi_cpu_md.c:1.42 Fri Feb 25 10:59:32 2011 +++ src/sys/arch/x86/acpi/acpi_cpu_md.c Fri Feb 25 12:08:35 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: acpi_cpu_md.c,v 1.42 2011/02/25 10:59:32 jruoho Exp $ */ +/* $NetBSD: acpi_cpu_md.c,v 1.43 2011/02/25 12:08:35 jruoho Exp $ */ /*- * Copyright (c) 2010, 2011 Jukka Ruohonen <jruoho...@iki.fi> @@ -27,7 +27,7 @@ * SUCH DAMAGE. */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: acpi_cpu_md.c,v 1.42 2011/02/25 10:59:32 jruoho Exp $"); +__KERNEL_RCSID(0, "$NetBSD: acpi_cpu_md.c,v 1.43 2011/02/25 12:08:35 jruoho Exp $"); #include <sys/param.h> #include <sys/bus.h> @@ -98,7 +98,7 @@ static char native_idle_text[16]; void (*native_idle)(void) = NULL; -static int acpicpu_md_quirks_piix4(struct pci_attach_args *); +static int acpicpu_md_quirk_piix4(struct pci_attach_args *); static void acpicpu_md_pstate_percent_reset(struct acpicpu_softc *); static void acpicpu_md_pstate_percent_status(void *, void *); static void acpicpu_md_pstate_status(void *, void *); @@ -153,7 +153,7 @@ } uint32_t -acpicpu_md_quirks(void) +acpicpu_md_flags(void) { struct cpu_info *ci = curcpu(); struct pci_attach_args pa; @@ -313,14 +313,14 @@ /* * There are several erratums for PIIX4. */ - if (pci_find_device(&pa, acpicpu_md_quirks_piix4) != 0) + if (pci_find_device(&pa, acpicpu_md_quirk_piix4) != 0) val |= ACPICPU_FLAG_PIIX4; return val; } static int -acpicpu_md_quirks_piix4(struct pci_attach_args *pa) +acpicpu_md_quirk_piix4(struct pci_attach_args *pa) { /* @@ -339,7 +339,7 @@ } void -acpicpu_md_quirks_c1e(void) +acpicpu_md_quirk_c1e(void) { const uint64_t c1e = MSR_CMPHALT_SMI | MSR_CMPHALT_C1E; uint64_t val; @@ -351,7 +351,7 @@ } int -acpicpu_md_idle_start(struct acpicpu_softc *sc) +acpicpu_md_cstate_start(struct acpicpu_softc *sc) { const size_t size = sizeof(native_idle_text); struct acpicpu_cstate *cs; @@ -376,7 +376,7 @@ } int -acpicpu_md_idle_stop(void) +acpicpu_md_cstate_stop(void) { uint64_t xc; bool ipi; @@ -399,7 +399,7 @@ * Caller should enable interrupts after return. */ void -acpicpu_md_idle_enter(int method, int state) +acpicpu_md_cstate_enter(int method, int state) { struct cpu_info *ci = curcpu(); Index: src/sys/dev/acpi/acpi_cpu.c diff -u src/sys/dev/acpi/acpi_cpu.c:1.27 src/sys/dev/acpi/acpi_cpu.c:1.28 --- src/sys/dev/acpi/acpi_cpu.c:1.27 Fri Feb 25 06:18:02 2011 +++ src/sys/dev/acpi/acpi_cpu.c Fri Feb 25 12:08:35 2011 @@ -1,7 +1,7 @@ -/* $NetBSD: acpi_cpu.c,v 1.27 2011/02/25 06:18:02 jruoho Exp $ */ +/* $NetBSD: acpi_cpu.c,v 1.28 2011/02/25 12:08:35 jruoho Exp $ */ /*- - * Copyright (c) 2010 Jukka Ruohonen <jruoho...@iki.fi> + * Copyright (c) 2010, 2011 Jukka Ruohonen <jruoho...@iki.fi> * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -27,7 +27,7 @@ * SUCH DAMAGE. */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: acpi_cpu.c,v 1.27 2011/02/25 06:18:02 jruoho Exp $"); +__KERNEL_RCSID(0, "$NetBSD: acpi_cpu.c,v 1.28 2011/02/25 12:08:35 jruoho Exp $"); #include <sys/param.h> #include <sys/cpu.h> @@ -145,7 +145,7 @@ acpicpu_sc[id] = sc; sc->sc_cap = acpicpu_cap(sc); - sc->sc_flags |= acpicpu_md_quirks(); + sc->sc_flags |= acpicpu_md_flags(); mutex_init(&sc->sc_mtx, MUTEX_DEFAULT, IPL_NONE); Index: src/sys/dev/acpi/acpi_cpu.h diff -u src/sys/dev/acpi/acpi_cpu.h:1.30 src/sys/dev/acpi/acpi_cpu.h:1.31 --- src/sys/dev/acpi/acpi_cpu.h:1.30 Fri Feb 25 09:16:00 2011 +++ src/sys/dev/acpi/acpi_cpu.h Fri Feb 25 12:08:35 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: acpi_cpu.h,v 1.30 2011/02/25 09:16:00 jruoho Exp $ */ +/* $NetBSD: acpi_cpu.h,v 1.31 2011/02/25 12:08:35 jruoho Exp $ */ /*- * Copyright (c) 2010, 2011 Jukka Ruohonen <jruoho...@iki.fi> @@ -236,11 +236,11 @@ int acpicpu_tstate_set(struct acpicpu_softc *, uint32_t); uint32_t acpicpu_md_cap(void); -uint32_t acpicpu_md_quirks(void); -void acpicpu_md_quirks_c1e(void); -int acpicpu_md_idle_start(struct acpicpu_softc *); -int acpicpu_md_idle_stop(void); -void acpicpu_md_idle_enter(int, int); +uint32_t acpicpu_md_flags(void); +void acpicpu_md_quirk_c1e(void); +int acpicpu_md_cstate_start(struct acpicpu_softc *); +int acpicpu_md_cstate_stop(void); +void acpicpu_md_cstate_enter(int, int); int acpicpu_md_pstate_start(struct acpicpu_softc *); int acpicpu_md_pstate_stop(void); int acpicpu_md_pstate_pss(struct acpicpu_softc *); Index: src/sys/dev/acpi/acpi_cpu_cstate.c diff -u src/sys/dev/acpi/acpi_cpu_cstate.c:1.44 src/sys/dev/acpi/acpi_cpu_cstate.c:1.45 --- src/sys/dev/acpi/acpi_cpu_cstate.c:1.44 Wed Feb 23 06:02:00 2011 +++ src/sys/dev/acpi/acpi_cpu_cstate.c Fri Feb 25 12:08:35 2011 @@ -1,7 +1,7 @@ -/* $NetBSD: acpi_cpu_cstate.c,v 1.44 2011/02/23 06:02:00 jruoho Exp $ */ +/* $NetBSD: acpi_cpu_cstate.c,v 1.45 2011/02/25 12:08:35 jruoho Exp $ */ /*- - * Copyright (c) 2010 Jukka Ruohonen <jruoho...@iki.fi> + * Copyright (c) 2010, 2011 Jukka Ruohonen <jruoho...@iki.fi> * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -27,7 +27,7 @@ * SUCH DAMAGE. */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: acpi_cpu_cstate.c,v 1.44 2011/02/23 06:02:00 jruoho Exp $"); +__KERNEL_RCSID(0, "$NetBSD: acpi_cpu_cstate.c,v 1.45 2011/02/25 12:08:35 jruoho Exp $"); #include <sys/param.h> #include <sys/cpu.h> @@ -187,7 +187,7 @@ static ONCE_DECL(once_detach); int rv; - rv = RUN_ONCE(&once_detach, acpicpu_md_idle_stop); + rv = RUN_ONCE(&once_detach, acpicpu_md_cstate_stop); if (rv != 0) return rv; @@ -218,7 +218,7 @@ { struct acpicpu_softc *sc = device_private(self); - (void)acpicpu_md_idle_start(sc); + (void)acpicpu_md_cstate_start(sc); } bool @@ -692,7 +692,7 @@ * Apply AMD C1E quirk. */ if ((sc->sc_flags & ACPICPU_FLAG_C_C1E) != 0) - acpicpu_md_quirks_c1e(); + acpicpu_md_quirk_c1e(); /* * Check for bus master activity. Note that particularly usb(4) @@ -767,7 +767,7 @@ case ACPICPU_C_STATE_FFH: case ACPICPU_C_STATE_HALT: - acpicpu_md_idle_enter(cs->cs_method, state); + acpicpu_md_cstate_enter(cs->cs_method, state); break; case ACPICPU_C_STATE_SYSIO: