4 * Copyright (C) 1999 VA Linux Systems
5 * Copyright (C) 1999 Walt Drummond <drummond@valinux.com>
6 * Copyright (C) 2000,2001 J.I. Lee <jung-ik.lee@intel.com>
7 * Copyright (C) 2001,2002 Paul Diefenbaugh <paul.s.diefenbaugh@intel.com>
9 * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
11 * This program is free software; you can redistribute it and/or modify
12 * it under the terms of the GNU General Public License as published by
13 * the Free Software Foundation; either version 2 of the License, or
14 * (at your option) any later version.
16 * This program is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU General Public License for more details.
21 * You should have received a copy of the GNU General Public License
22 * along with this program; if not, write to the Free Software
23 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
25 * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
33 #define COMPILER_DEPENDENT_INT64 long
34 #define COMPILER_DEPENDENT_UINT64 unsigned long
37 * Calling conventions:
39 * ACPI_SYSTEM_XFACE - Interfaces to host OS (handlers, threads)
40 * ACPI_EXTERNAL_XFACE - External ACPI interfaces
41 * ACPI_INTERNAL_XFACE - Internal ACPI interfaces
42 * ACPI_INTERNAL_VAR_XFACE - Internal variable-parameter list interfaces
44 #define ACPI_SYSTEM_XFACE
45 #define ACPI_EXTERNAL_XFACE
46 #define ACPI_INTERNAL_XFACE
47 #define ACPI_INTERNAL_VAR_XFACE
51 #define ACPI_ASM_MACROS
53 #define ACPI_DISABLE_IRQS() __cli()
54 #define ACPI_ENABLE_IRQS() __sti()
55 #define ACPI_FLUSH_CPU_CACHE()
57 #define ACPI_ACQUIRE_GLOBAL_LOCK(GLptr, Acq) \
59 __asm__ volatile ("1: ld4 r29=[%1]\n" \
71 "cmpxchg4.acq r30=[%1],r29,ar.ccv\n" \
73 "cmp.eq p6,p7=r2,r30\n" \
74 "(p7) br.dpnt.few 1b\n" \
75 "cmp.gt p8,p9=3,r29\n" \
79 :"=r"(Acq):"r"(GLptr):"r2","r29","r30","memory"); \
82 #define ACPI_RELEASE_GLOBAL_LOCK(GLptr, Acq) \
84 __asm__ volatile ("1: ld4 r29=[%1]\n" \
90 "cmpxchg4.acq r30=[%1],r29,ar.ccv\n" \
92 "cmp.eq p6,p7=r2,r30\n" \
93 "(p7) br.dpnt.few 1b\n" \
96 :"=r"(Acq):"r"(GLptr):"r2","r29","r30","memory"); \
99 const char *acpi_get_sysname (void);
100 int acpi_boot_init (char *cdline);
101 int acpi_request_vector (u32 int_type);
102 int acpi_get_prt (struct pci_vector_struct **vectors, int *count);
103 int acpi_get_interrupt_model (int *type);
104 int acpi_irq_to_vector (u32 irq);
106 #ifdef CONFIG_DISCONTIGMEM
107 #define NODE_ARRAY_INDEX(x) ((x) / 8) /* 8 bits/char */
108 #define NODE_ARRAY_OFFSET(x) ((x) % 8) /* 8 bits/char */
109 #define MAX_PXM_DOMAINS (256)
110 #endif /* CONFIG_DISCONTIGMEM */
112 #endif /*__KERNEL__*/
114 #endif /*_ASM_ACPI_H*/