Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/acpi/acpica/Subsystem Avoid some strict-alias warnings.



details:   https://anonhg.NetBSD.org/src/rev/c0514b540d6e
branches:  trunk
changeset: 547043:c0514b540d6e
user:      fvdl <fvdl%NetBSD.org@localhost>
date:      Sun May 11 21:20:23 2003 +0000

description:
Avoid some strict-alias warnings.

diffstat:

 sys/dev/acpi/acpica/Subsystem/acnetbsd.h |  47 +-------------------------------
 sys/dev/acpi/acpica/Subsystem/tbget.c    |   6 ++--
 sys/dev/acpi/acpica/Subsystem/tbrsdt.c   |   4 +-
 sys/dev/acpi/acpica/Subsystem/tbxfroot.c |   8 ++--
 sys/dev/acpi/acpica/Subsystem/utglobal.c |   8 ++--
 5 files changed, 14 insertions(+), 59 deletions(-)

diffs (179 lines):

diff -r 17fbf54f10dc -r c0514b540d6e sys/dev/acpi/acpica/Subsystem/acnetbsd.h
--- a/sys/dev/acpi/acpica/Subsystem/acnetbsd.h  Sun May 11 21:05:19 2003 +0000
+++ b/sys/dev/acpi/acpica/Subsystem/acnetbsd.h  Sun May 11 21:20:23 2003 +0000
@@ -146,6 +146,7 @@
 #include <sys/param.h>
 #include <sys/systm.h>
 #include <machine/stdarg.h>
+#include <machine/acpi_func.h>
 
 #define asm         __asm
 
@@ -159,52 +160,6 @@
 #define        ACPI_INTERNAL_VAR_XFACE
 #define        ACPI_DISASSEMBLER
 
-/* XXX This is not a perfect world. */
-#ifdef __i386__
-#include <machine/cpufunc.h>
-
-#if 0
-#define        ACPI_DISABLE_IRQS()             disable_intr()
-#define        ACPI_ENABLE_IRQS()              enable_intr()
-#endif
-
-#define        ACPI_ACQUIRE_GLOBAL_LOCK(GLptr, Acq) \
-do { \
-       int dummy; \
-       __asm __volatile( \
-       "1:     movl (%1),%%eax         ;" \
-       "       movl %%eax,%%edx        ;" \
-       "       andl %2,%%edx           ;" \
-       "       btsl $0x1,%%edx         ;" \
-       "       adcl $0x0,%%edx         ;" \
-       "       lock                    ;" \
-       "       cmpxchgl %%edx,(%1)     ;" \
-       "       jnz 1b                  ;" \
-       "       cmpb $0x3,%%dl          ;" \
-       "       sbbl %%eax,%%eax        " \
-       : "=a" (Acq), "=c" (dummy) \
-       : "c" (GLptr), "i" (~1L) \
-       : "dx"); \
-} while (0)
-
-#define ACPI_RELEASE_GLOBAL_LOCK(GLptr, Acq) \
-do { \
-       int dummy; \
-       __asm __volatile( \
-       "1:     movl (%1),%%eax         ;" \
-       "       andl %2,%%edx           ;" \
-       "       lock                    ;" \
-       "       cmpxchgl %%edx,(%1)     ;" \
-       "       jnz 1b                  ;" \
-       "       andl $0x1,%%eax         ;" \
-       : "=a" (Acq), "=c" (dummy) \
-       : "c" (GLptr), "i" (~3L) \
-       : "dx"); \
-} while (0)
-
-#define        ACPI_FLUSH_CPU_CACHE()          wbinvd()
-#endif /* __i386__ */
-
 #ifdef ACPI_DEBUG
 #define ACPI_DEBUG_OUTPUT
 #ifdef DEBUGGER_THREADING
diff -r 17fbf54f10dc -r c0514b540d6e sys/dev/acpi/acpica/Subsystem/tbget.c
--- a/sys/dev/acpi/acpica/Subsystem/tbget.c     Sun May 11 21:05:19 2003 +0000
+++ b/sys/dev/acpi/acpica/Subsystem/tbget.c     Sun May 11 21:20:23 2003 +0000
@@ -115,7 +115,7 @@
  *****************************************************************************/
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: tbget.c,v 1.6 2003/03/04 17:25:27 kochi Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tbget.c,v 1.7 2003/05/11 21:20:23 fvdl Exp $");
 
 #define __TBGET_C__
 
@@ -225,7 +225,7 @@
         /* Create a logical address for the physical pointer*/
 
         Status = AcpiOsMapMemory (Address->Pointer.Physical, sizeof (ACPI_TABLE_HEADER),
-                                    (void **) &Header);
+                                    (void *) &Header);
         if (ACPI_FAILURE (Status))
         {
             ACPI_REPORT_ERROR (("Could not map memory at %8.8X%8.8X for length %X\n",
@@ -449,7 +449,7 @@
          * into our address space.
          */
         Status = AcpiOsMapMemory (Address->Pointer.Physical, (ACPI_SIZE) Header->Length,
-                                    (void **) &FullTable);
+                                    (void *) &FullTable);
         if (ACPI_FAILURE (Status))
         {
             ACPI_REPORT_ERROR (("Could not map memory for table [%4.4s] at %8.8X%8.8X for length %X\n",
diff -r 17fbf54f10dc -r c0514b540d6e sys/dev/acpi/acpica/Subsystem/tbrsdt.c
--- a/sys/dev/acpi/acpica/Subsystem/tbrsdt.c    Sun May 11 21:05:19 2003 +0000
+++ b/sys/dev/acpi/acpica/Subsystem/tbrsdt.c    Sun May 11 21:20:23 2003 +0000
@@ -115,7 +115,7 @@
  *****************************************************************************/
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: tbrsdt.c,v 1.2 2003/02/13 14:16:25 kanaoka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tbrsdt.c,v 1.3 2003/05/11 21:20:23 fvdl Exp $");
 
 #define __TBRSDT_C__
 
@@ -163,7 +163,7 @@
          * Obtain access to the RSDP structure
          */
         Status = AcpiOsMapMemory (Address->Pointer.Physical, sizeof (RSDP_DESCRIPTOR),
-                                    (void **) &Rsdp);
+                                    (void *) &Rsdp);
         if (ACPI_FAILURE (Status))
         {
             return_ACPI_STATUS (Status);
diff -r 17fbf54f10dc -r c0514b540d6e sys/dev/acpi/acpica/Subsystem/tbxfroot.c
--- a/sys/dev/acpi/acpica/Subsystem/tbxfroot.c  Sun May 11 21:05:19 2003 +0000
+++ b/sys/dev/acpi/acpica/Subsystem/tbxfroot.c  Sun May 11 21:20:23 2003 +0000
@@ -115,7 +115,7 @@
  *****************************************************************************/
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: tbxfroot.c,v 1.6 2003/03/04 17:25:28 kochi Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tbxfroot.c,v 1.7 2003/05/11 21:20:24 fvdl Exp $");
 
 #define __TBXFROOT_C__
 
@@ -263,7 +263,7 @@
         if ((Flags & ACPI_MEMORY_MODE) == ACPI_LOGICAL_ADDRESSING)
         {
             Status = AcpiOsMapMemory (RsdpAddress.Pointer.Physical, sizeof (RSDP_DESCRIPTOR),
-                                        (void **) &AcpiGbl_RSDP);
+                                        (void *) &AcpiGbl_RSDP);
             if (ACPI_FAILURE (Status))
             {
                 return_ACPI_STATUS (Status);
@@ -524,7 +524,7 @@
          * 1) Search EBDA (low memory) paragraphs
          */
         Status = AcpiOsMapMemory ((UINT64) ACPI_LO_RSDP_WINDOW_BASE, ACPI_LO_RSDP_WINDOW_SIZE,
-                                    (void **) &TablePtr);
+                                    (void *) &TablePtr);
         if (ACPI_FAILURE (Status))
         {
             ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "Could not map memory at %X for length %X\n",
@@ -550,7 +550,7 @@
          * 2) Search upper memory: 16-byte boundaries in E0000h-F0000h
          */
         Status = AcpiOsMapMemory ((UINT64) ACPI_HI_RSDP_WINDOW_BASE, ACPI_HI_RSDP_WINDOW_SIZE,
-                                    (void **) &TablePtr);
+                                    (void *) &TablePtr);
         if (ACPI_FAILURE (Status))
         {
             ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "Could not map memory at %X for length %X\n",
diff -r 17fbf54f10dc -r c0514b540d6e sys/dev/acpi/acpica/Subsystem/utglobal.c
--- a/sys/dev/acpi/acpica/Subsystem/utglobal.c  Sun May 11 21:05:19 2003 +0000
+++ b/sys/dev/acpi/acpica/Subsystem/utglobal.c  Sun May 11 21:20:23 2003 +0000
@@ -115,7 +115,7 @@
  *****************************************************************************/
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: utglobal.c,v 1.6 2003/03/04 17:25:29 kochi Exp $");
+__KERNEL_RCSID(0, "$NetBSD: utglobal.c,v 1.7 2003/05/11 21:20:24 fvdl Exp $");
 
 #define __UTGLOBAL_C__
 #define DEFINE_ACPI_GLOBALS
@@ -391,9 +391,9 @@
     /***********    Name,   Signature, Global typed pointer     Signature size,      Type                  How many allowed?,    Contains valid AML? */
 
     /* RSDP 0 */ {RSDP_NAME, RSDP_SIG, NULL,                    sizeof (RSDP_SIG)-1, ACPI_TABLE_ROOT     | ACPI_TABLE_SINGLE},
-    /* DSDT 1 */ {DSDT_SIG,  DSDT_SIG, (void **) &AcpiGbl_DSDT, sizeof (DSDT_SIG)-1, ACPI_TABLE_SECONDARY| ACPI_TABLE_SINGLE   | ACPI_TABLE_EXECUTABLE},
-    /* FADT 2 */ {FADT_SIG,  FADT_SIG, (void **) &AcpiGbl_FADT, sizeof (FADT_SIG)-1, ACPI_TABLE_PRIMARY  | ACPI_TABLE_SINGLE},
-    /* FACS 3 */ {FACS_SIG,  FACS_SIG, (void **) &AcpiGbl_FACS, sizeof (FACS_SIG)-1, ACPI_TABLE_SECONDARY| ACPI_TABLE_SINGLE},
+    /* DSDT 1 */ {DSDT_SIG,  DSDT_SIG, (void *) &AcpiGbl_DSDT, sizeof (DSDT_SIG)-1, ACPI_TABLE_SECONDARY| ACPI_TABLE_SINGLE   | ACPI_TABLE_EXECUTABLE},
+    /* FADT 2 */ {FADT_SIG,  FADT_SIG, (void *) &AcpiGbl_FADT, sizeof (FADT_SIG)-1, ACPI_TABLE_PRIMARY  | ACPI_TABLE_SINGLE},
+    /* FACS 3 */ {FACS_SIG,  FACS_SIG, (void *) &AcpiGbl_FACS, sizeof (FACS_SIG)-1, ACPI_TABLE_SECONDARY| ACPI_TABLE_SINGLE},
     /* PSDT 4 */ {PSDT_SIG,  PSDT_SIG, NULL,                    sizeof (PSDT_SIG)-1, ACPI_TABLE_PRIMARY  | ACPI_TABLE_MULTIPLE | ACPI_TABLE_EXECUTABLE},
     /* SSDT 5 */ {SSDT_SIG,  SSDT_SIG, NULL,                    sizeof (SSDT_SIG)-1, ACPI_TABLE_PRIMARY  | ACPI_TABLE_MULTIPLE | ACPI_TABLE_EXECUTABLE},
     /* XSDT 6 */ {XSDT_SIG,  XSDT_SIG, NULL,                    sizeof (RSDT_SIG)-1, ACPI_TABLE_ROOT     | ACPI_TABLE_SINGLE},



Home | Main Index | Thread Index | Old Index