diff options
author | Alex Chiang <achiang@hp.com> | 2010-02-25 16:09:52 -0500 |
---|---|---|
committer | Tony Luck <tony.luck@intel.com> | 2010-02-25 18:15:13 -0500 |
commit | d868080d2a1c95526cb01e3d0c14096721cbb87a (patch) | |
tree | d87e4a8c2807beb582b20e296ff6dd694172ed18 /arch/ia64/kernel/acpi.c | |
parent | 60b341b778cc2929df16c0a504c91621b3c6a4ad (diff) |
[IA64] Only build arch/ia64/kernel/acpi.o when CONFIG_ACPI
The following commit broke the ia64 sim_defconfig build:
3b2b84c0b81108a9a869a88bf2beeb5a95d81dd1
ACPI: processor: driver doesn't need to evaluate _PDC
This is because it added:
+#include <acpi/processor.h>
To arch/ia64/kernel/acpi.c. Unfortunately, the ia64_simdefconfig does
not turn on CONFIG_ACPI, and we get build errors.
The fix described in $subject seems to be the most sensible way to
untangle the mess.
The other issue is that acpi_get_sysname() is required for all configs,
most of which define CONFIG_ACPI, but are not CONFIG_IA64_GENERIC. Turn
it into an inline to cover the "non generic" ia64 configs; to prevent
a duplicate definition build error, we need to wrap the definition in
acpi.o inside an #ifdef.
Finally, move the pm_idle and pm_power_off exports into process.c (which
is always built), similar to other architectures, and allow the sim
defconfig to link.
Signed-off-by: Alex Chiang <achiang@hp.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
Diffstat (limited to 'arch/ia64/kernel/acpi.c')
-rw-r--r-- | arch/ia64/kernel/acpi.c | 33 |
1 files changed, 1 insertions, 32 deletions
diff --git a/arch/ia64/kernel/acpi.c b/arch/ia64/kernel/acpi.c index 40574ae11401..c16fb03037d4 100644 --- a/arch/ia64/kernel/acpi.c +++ b/arch/ia64/kernel/acpi.c | |||
@@ -60,11 +60,6 @@ | |||
60 | 60 | ||
61 | #define PREFIX "ACPI: " | 61 | #define PREFIX "ACPI: " |
62 | 62 | ||
63 | void (*pm_idle) (void); | ||
64 | EXPORT_SYMBOL(pm_idle); | ||
65 | void (*pm_power_off) (void); | ||
66 | EXPORT_SYMBOL(pm_power_off); | ||
67 | |||
68 | u32 acpi_rsdt_forced; | 63 | u32 acpi_rsdt_forced; |
69 | unsigned int acpi_cpei_override; | 64 | unsigned int acpi_cpei_override; |
70 | unsigned int acpi_cpei_phys_cpuid; | 65 | unsigned int acpi_cpei_phys_cpuid; |
@@ -83,12 +78,10 @@ static unsigned long __init acpi_find_rsdp(void) | |||
83 | "v1.0/r0.71 tables no longer supported\n"); | 78 | "v1.0/r0.71 tables no longer supported\n"); |
84 | return rsdp_phys; | 79 | return rsdp_phys; |
85 | } | 80 | } |
86 | #endif | ||
87 | 81 | ||
88 | const char __init * | 82 | const char __init * |
89 | acpi_get_sysname(void) | 83 | acpi_get_sysname(void) |
90 | { | 84 | { |
91 | #ifdef CONFIG_IA64_GENERIC | ||
92 | unsigned long rsdp_phys; | 85 | unsigned long rsdp_phys; |
93 | struct acpi_table_rsdp *rsdp; | 86 | struct acpi_table_rsdp *rsdp; |
94 | struct acpi_table_xsdt *xsdt; | 87 | struct acpi_table_xsdt *xsdt; |
@@ -143,30 +136,8 @@ acpi_get_sysname(void) | |||
143 | #endif | 136 | #endif |
144 | 137 | ||
145 | return "dig"; | 138 | return "dig"; |
146 | #else | ||
147 | # if defined (CONFIG_IA64_HP_SIM) | ||
148 | return "hpsim"; | ||
149 | # elif defined (CONFIG_IA64_HP_ZX1) | ||
150 | return "hpzx1"; | ||
151 | # elif defined (CONFIG_IA64_HP_ZX1_SWIOTLB) | ||
152 | return "hpzx1_swiotlb"; | ||
153 | # elif defined (CONFIG_IA64_SGI_SN2) | ||
154 | return "sn2"; | ||
155 | # elif defined (CONFIG_IA64_SGI_UV) | ||
156 | return "uv"; | ||
157 | # elif defined (CONFIG_IA64_DIG) | ||
158 | return "dig"; | ||
159 | # elif defined (CONFIG_IA64_XEN_GUEST) | ||
160 | return "xen"; | ||
161 | # elif defined(CONFIG_IA64_DIG_VTD) | ||
162 | return "dig_vtd"; | ||
163 | # else | ||
164 | # error Unknown platform. Fix acpi.c. | ||
165 | # endif | ||
166 | #endif | ||
167 | } | 139 | } |
168 | 140 | #endif /* CONFIG_IA64_GENERIC */ | |
169 | #ifdef CONFIG_ACPI | ||
170 | 141 | ||
171 | #define ACPI_MAX_PLATFORM_INTERRUPTS 256 | 142 | #define ACPI_MAX_PLATFORM_INTERRUPTS 256 |
172 | 143 | ||
@@ -1060,5 +1031,3 @@ void acpi_restore_state_mem(void) {} | |||
1060 | * do_suspend_lowlevel() | 1031 | * do_suspend_lowlevel() |
1061 | */ | 1032 | */ |
1062 | void do_suspend_lowlevel(void) {} | 1033 | void do_suspend_lowlevel(void) {} |
1063 | |||
1064 | #endif /* CONFIG_ACPI */ | ||