From f534f13d874c97cd5c99d98519cdefeebcae7f18 Mon Sep 17 00:00:00 2001 From: jruoho Date: Sat, 24 Jul 2010 21:53:53 +0000 Subject: [PATCH] Revert the previous partially for the time being. --- sys/arch/ia64/include/acpi_func.h | 10 ++-------- sys/arch/x86/include/acpi_machdep.h | 8 +------- sys/dev/acpi/acpica/acpi_func.h | 15 ++++++++++++++- 3 files changed, 17 insertions(+), 16 deletions(-) diff --git a/sys/arch/ia64/include/acpi_func.h b/sys/arch/ia64/include/acpi_func.h index 5c1f375155a5..0cd3b3180f92 100644 --- a/sys/arch/ia64/include/acpi_func.h +++ b/sys/arch/ia64/include/acpi_func.h @@ -1,4 +1,4 @@ -/* $NetBSD: acpi_func.h,v 1.3 2010/07/24 09:35:36 jruoho Exp $ */ +/* $NetBSD: acpi_func.h,v 1.4 2010/07/24 21:53:53 jruoho Exp $ */ /*- * Copyright (c) 2002 Mitsuru IWASAKI @@ -31,7 +31,7 @@ /****************************************************************************** * * Name: acpica_machdep.h - arch-specific defines, etc. - * $Revision: 1.3 $ + * $Revision: 1.4 $ * *****************************************************************************/ @@ -48,12 +48,6 @@ #define ACPI_DISABLE_IRQS() disable_intr() #define ACPI_ENABLE_IRQS() enable_intr() -#ifdef ACPI_FLUSH_CPU_CACHE -#undef ACPI_FLUSH_CPU_CACHE -#endif - -#define ACPI_FLUSH_CPU_CACHE() /* XXX ia64_fc()? */ - /* Section 5.2.9.1: global lock acquire/release functions */ extern int acpi_acquire_global_lock(uint32_t *lock); extern int acpi_release_global_lock(uint32_t *lock); diff --git a/sys/arch/x86/include/acpi_machdep.h b/sys/arch/x86/include/acpi_machdep.h index a16b3f9b17e3..90301fd0cd27 100644 --- a/sys/arch/x86/include/acpi_machdep.h +++ b/sys/arch/x86/include/acpi_machdep.h @@ -1,4 +1,4 @@ -/* $NetBSD: acpi_machdep.h,v 1.6 2010/07/24 09:35:36 jruoho Exp $ */ +/* $NetBSD: acpi_machdep.h,v 1.7 2010/07/24 21:53:54 jruoho Exp $ */ /* * Copyright 2001 Wasabi Systems, Inc. @@ -49,12 +49,6 @@ ACPI_STATUS acpi_md_OsInitialize(void); ACPI_STATUS acpi_md_OsTerminate(void); ACPI_PHYSICAL_ADDRESS acpi_md_OsGetRootPointer(void); -#ifdef ACPI_FLUSH_CPU_CACHE -#undef ACPI_FLUSH_CPU_CACHE -#endif - -#define ACPI_FLUSH_CPU_CACHE() wbinvd() - #define acpi_md_OsIn8(x) inb((x)) #define acpi_md_OsIn16(x) inw((x)) #define acpi_md_OsIn32(x) inl((x)) diff --git a/sys/dev/acpi/acpica/acpi_func.h b/sys/dev/acpi/acpica/acpi_func.h index 255589211c36..e2b77a793805 100644 --- a/sys/dev/acpi/acpica/acpi_func.h +++ b/sys/dev/acpi/acpica/acpi_func.h @@ -1,4 +1,4 @@ -/* $NetBSD: acpi_func.h,v 1.3 2010/07/24 09:35:36 jruoho Exp $ */ +/* $NetBSD: acpi_func.h,v 1.4 2010/07/24 21:53:54 jruoho Exp $ */ /*- * Copyright (c) 2000 Michael Smith @@ -28,6 +28,9 @@ * SUCH DAMAGE. */ +#ifndef _SYS_DEV_ACPI_ACPICA_ACPI_FUNC_H +#define _SYS_DEV_ACPI_ACPICA_ACPI_FUNC_H + #include #include @@ -77,3 +80,13 @@ acpi_release_global_lock(uint32_t *lock) return old & GL_BIT_PENDING; } +/* + * XXX: Should be in a MD header. + */ +#ifndef __ia64__ +#define ACPI_FLUSH_CPU_CACHE() wbinvd() +#else +#define ACPI_FLUSH_CPU_CACHE() /* XXX: ia64_fc()? */ +#endif + +#endif /* !_SYS_DEV_ACPI_ACPICA_ACPI_FUNC_H */