139923942SSimon Schubert /*- 239923942SSimon Schubert * Copyright (c) 2002 Mitsuru IWASAKI 339923942SSimon Schubert * All rights reserved. 439923942SSimon Schubert * 539923942SSimon Schubert * Redistribution and use in source and binary forms, with or without 639923942SSimon Schubert * modification, are permitted provided that the following conditions 739923942SSimon Schubert * are met: 839923942SSimon Schubert * 1. Redistributions of source code must retain the above copyright 939923942SSimon Schubert * notice, this list of conditions and the following disclaimer. 1039923942SSimon Schubert * 2. Redistributions in binary form must reproduce the above copyright 1139923942SSimon Schubert * notice, this list of conditions and the following disclaimer in the 1239923942SSimon Schubert * documentation and/or other materials provided with the distribution. 1339923942SSimon Schubert * 1439923942SSimon Schubert * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 1539923942SSimon Schubert * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 1639923942SSimon Schubert * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 1739923942SSimon Schubert * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 1839923942SSimon Schubert * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 1939923942SSimon Schubert * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 2039923942SSimon Schubert * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 2139923942SSimon Schubert * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 2239923942SSimon Schubert * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 2339923942SSimon Schubert * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 2439923942SSimon Schubert * SUCH DAMAGE. 2539923942SSimon Schubert * 2639923942SSimon Schubert * $FreeBSD: src/sys/amd64/include/acpica_machdep.h,v 1.6 2004/10/11 05:39:15 njl Exp $ 2739923942SSimon Schubert */ 2839923942SSimon Schubert 2939923942SSimon Schubert /****************************************************************************** 3039923942SSimon Schubert * 3139923942SSimon Schubert * Name: acpica_machdep.h - arch-specific defines, etc. 3239923942SSimon Schubert * $Revision$ 3339923942SSimon Schubert * 3439923942SSimon Schubert *****************************************************************************/ 3539923942SSimon Schubert 36d36cdf29SSascha Wildner #ifndef _MACHINE_ACPICA_MACHDEP_H_ 37d36cdf29SSascha Wildner #define _MACHINE_ACPICA_MACHDEP_H_ 3839923942SSimon Schubert 3939923942SSimon Schubert #ifdef _KERNEL 40e774ca6dSMatthew Dillon #define ACPI_DISABLE_IRQS() cpu_disable_intr() 41e774ca6dSMatthew Dillon #define ACPI_ENABLE_IRQS() cpu_enable_intr() 4239923942SSimon Schubert #define ACPI_FLUSH_CPU_CACHE() wbinvd() 4339923942SSimon Schubert 4439923942SSimon Schubert /* Section 5.2.9.1: global lock acquire/release functions */ 45*b5516a55SSascha Wildner int acpi_acquire_global_lock(uint32_t *); 46*b5516a55SSascha Wildner int acpi_release_global_lock(uint32_t *); 47d21705bcSSascha Wildner #define ACPI_ACQUIRE_GLOBAL_LOCK(FACSptr, Acq) \ 48d21705bcSSascha Wildner ((Acq) = acpi_acquire_global_lock(&(FACSptr)->GlobalLock)) 49d21705bcSSascha Wildner #define ACPI_RELEASE_GLOBAL_LOCK(FACSptr, Acq) \ 50d21705bcSSascha Wildner ((Acq) = acpi_release_global_lock(&(FACSptr)->GlobalLock)) 5139923942SSimon Schubert #endif /* _KERNEL */ 5239923942SSimon Schubert 53d36cdf29SSascha Wildner #endif /* _MACHINE_ACPICA_MACHDEP_H_ */ 54