Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys Rename couple of badly named functions for consistency. ...



details:   https://anonhg.NetBSD.org/src/rev/2e8357e1f409
branches:  trunk
changeset: 762672:2e8357e1f409
user:      jruoho <jruoho%NetBSD.org@localhost>
date:      Fri Feb 25 12:08:35 2011 +0000

description:
Rename couple of badly named functions for consistency. No functional change.

diffstat:

 sys/arch/x86/acpi/acpi_cpu_md.c |  20 ++++++++++----------
 sys/dev/acpi/acpi_cpu.c         |   8 ++++----
 sys/dev/acpi/acpi_cpu.h         |  12 ++++++------
 sys/dev/acpi/acpi_cpu_cstate.c  |  14 +++++++-------
 4 files changed, 27 insertions(+), 27 deletions(-)

diffs (204 lines):

diff -r 00c1f572ed92 -r 2e8357e1f409 sys/arch/x86/acpi/acpi_cpu_md.c
--- a/sys/arch/x86/acpi/acpi_cpu_md.c   Fri Feb 25 11:55:28 2011 +0000
+++ b/sys/arch/x86/acpi/acpi_cpu_md.c   Fri Feb 25 12:08:35 2011 +0000
@@ -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 <jruohonen%iki.fi@localhost>
@@ -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();
 
diff -r 00c1f572ed92 -r 2e8357e1f409 sys/dev/acpi/acpi_cpu.c
--- a/sys/dev/acpi/acpi_cpu.c   Fri Feb 25 11:55:28 2011 +0000
+++ b/sys/dev/acpi/acpi_cpu.c   Fri Feb 25 12:08:35 2011 +0000
@@ -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 <jruohonen%iki.fi@localhost>
+ * Copyright (c) 2010, 2011 Jukka Ruohonen <jruohonen%iki.fi@localhost>
  * 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);
 
diff -r 00c1f572ed92 -r 2e8357e1f409 sys/dev/acpi/acpi_cpu.h
--- a/sys/dev/acpi/acpi_cpu.h   Fri Feb 25 11:55:28 2011 +0000
+++ b/sys/dev/acpi/acpi_cpu.h   Fri Feb 25 12:08:35 2011 +0000
@@ -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 <jruohonen%iki.fi@localhost>
@@ -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 *);
diff -r 00c1f572ed92 -r 2e8357e1f409 sys/dev/acpi/acpi_cpu_cstate.c
--- a/sys/dev/acpi/acpi_cpu_cstate.c    Fri Feb 25 11:55:28 2011 +0000
+++ b/sys/dev/acpi/acpi_cpu_cstate.c    Fri Feb 25 12:08:35 2011 +0000
@@ -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 <jruohonen%iki.fi@localhost>
+ * Copyright (c) 2010, 2011 Jukka Ruohonen <jruohonen%iki.fi@localhost>
  * 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:



Home | Main Index | Thread Index | Old Index