ia64: remove CONFIG_ACPI ifdefs
[linux-2.6-block.git] / arch / ia64 / include / asm / acpi.h
CommitLineData
1a59d1b8 1/* SPDX-License-Identifier: GPL-2.0-or-later */
1da177e4 2/*
1da177e4
LT
3 * Copyright (C) 1999 VA Linux Systems
4 * Copyright (C) 1999 Walt Drummond <drummond@valinux.com>
5 * Copyright (C) 2000,2001 J.I. Lee <jung-ik.lee@intel.com>
6 * Copyright (C) 2001,2002 Paul Diefenbaugh <paul.s.diefenbaugh@intel.com>
1da177e4
LT
7 */
8
9#ifndef _ASM_ACPI_H
10#define _ASM_ACPI_H
11
12#ifdef __KERNEL__
13
35729449
VP
14#include <acpi/pdc_intel.h>
15
1da177e4
LT
16#include <linux/init.h>
17#include <linux/numa.h>
2c6e6db4 18#include <asm/numa.h>
1da177e4 19
2e0f2b16 20
247dba58 21extern int acpi_lapic;
1da177e4
LT
22#define acpi_disabled 0 /* ACPI always enabled on IA64 */
23#define acpi_noirq 0 /* ACPI always enabled on IA64 */
24#define acpi_pci_disabled 0 /* ACPI PCI always enabled on IA64 */
25#define acpi_strict 1 /* no ACPI spec workarounds on IA64 */
b50154d5
GG
26
27static inline bool acpi_has_cpu_in_madt(void)
28{
29 return !!acpi_lapic;
30}
2e0f2b16 31
c1c30634 32#define acpi_processor_cstate_check(x) (x) /* no idle limits on IA64 :) */
1da177e4
LT
33static inline void disable_acpi(void) { }
34
d868080d 35#ifdef CONFIG_IA64_GENERIC
1da177e4 36const char *acpi_get_sysname (void);
d868080d
AC
37#else
38static inline const char *acpi_get_sysname (void)
39{
fc5bad03 40# if defined (CONFIG_IA64_HP_ZX1)
d868080d
AC
41 return "hpzx1";
42# elif defined (CONFIG_IA64_HP_ZX1_SWIOTLB)
43 return "hpzx1_swiotlb";
d868080d
AC
44# elif defined (CONFIG_IA64_SGI_UV)
45 return "uv";
46# elif defined (CONFIG_IA64_DIG)
47 return "dig";
d868080d
AC
48# elif defined(CONFIG_IA64_DIG_VTD)
49 return "dig_vtd";
50# else
51# error Unknown platform. Fix acpi.c.
52# endif
53}
54#endif
1da177e4
LT
55int acpi_request_vector (u32 int_type);
56int acpi_gsi_to_irq (u32 gsi, unsigned int *irq);
57
f1a2003e
RW
58/* Low-level suspend routine. */
59extern int acpi_suspend_lowlevel(void);
c41b93fb 60
e8b2fd01
LB
61extern unsigned long acpi_wakeup_address;
62
55e59c51
AR
63/*
64 * Record the cpei override flag and current logical cpu. This is
65 * useful for CPU removal.
66 */
67extern unsigned int can_cpei_retarget(void);
68extern unsigned int is_cpu_cpei_target(unsigned int cpu);
69extern void set_cpei_target_cpu(unsigned int cpu);
70extern unsigned int get_cpei_target_cpu(void);
a6b14fa6 71extern void prefill_possible_map(void);
2c6e6db4 72#ifdef CONFIG_ACPI_HOTPLUG_CPU
a6b14fa6 73extern int additional_cpus;
2c6e6db4 74#else
75#define additional_cpus 0
76#endif
55e59c51 77
1da177e4 78#ifdef CONFIG_ACPI_NUMA
0d9adec5
JS
79#if MAX_NUMNODES > 256
80#define MAX_PXM_DOMAINS MAX_NUMNODES
3ad5ef8b 81#else
1da177e4 82#define MAX_PXM_DOMAINS (256)
3ad5ef8b 83#endif
5b5e76e9 84extern int pxm_to_nid_map[MAX_PXM_DOMAINS];
1da177e4
LT
85extern int __initdata nid_to_pxm_map[MAX_NUMNODES];
86#endif
87
1d9cb470 88static inline bool arch_has_acpi_pdc(void) { return true; }
6c5807d7
AC
89static inline void arch_acpi_set_pdc_bits(u32 *buf)
90{
91 buf[2] |= ACPI_PDC_EST_CAPABILITY_SMP;
92}
1d9cb470 93
67535736
AL
94#define acpi_unlazy_tlb(x)
95
2c6e6db4 96#ifdef CONFIG_ACPI_NUMA
97extern cpumask_t early_cpu_possible_map;
98#define for_each_possible_early_cpu(cpu) \
5d2068da 99 for_each_cpu((cpu), &early_cpu_possible_map)
2c6e6db4 100
101static inline void per_cpu_scan_finalize(int min_cpus, int reserve_cpus)
102{
103 int low_cpu, high_cpu;
104 int cpu;
105 int next_nid = 0;
106
5d2068da 107 low_cpu = cpumask_weight(&early_cpu_possible_map);
2c6e6db4 108
109 high_cpu = max(low_cpu, min_cpus);
110 high_cpu = min(high_cpu + reserve_cpus, NR_CPUS);
111
112 for (cpu = low_cpu; cpu < high_cpu; cpu++) {
5d2068da 113 cpumask_set_cpu(cpu, &early_cpu_possible_map);
2c6e6db4 114 if (node_cpuid[cpu].nid == NUMA_NO_NODE) {
115 node_cpuid[cpu].nid = next_nid;
116 next_nid++;
117 if (next_nid >= num_online_nodes())
118 next_nid = 0;
119 }
120 }
121}
312521d0
RR
122
123extern void acpi_numa_fixup(void);
124
2c6e6db4 125#endif /* CONFIG_ACPI_NUMA */
126
1da177e4
LT
127#endif /*__KERNEL__*/
128
129#endif /*_ASM_ACPI_H*/