aboutsummaryrefslogtreecommitdiffstats
path: root/arch/ia64/include
diff options
context:
space:
mode:
authorAlex Chiang <achiang@hp.com>2010-02-25 16:09:52 -0500
committerTony Luck <tony.luck@intel.com>2010-02-25 18:15:13 -0500
commitd868080d2a1c95526cb01e3d0c14096721cbb87a (patch)
treed87e4a8c2807beb582b20e296ff6dd694172ed18 /arch/ia64/include
parent60b341b778cc2929df16c0a504c91621b3c6a4ad (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/include')
-rw-r--r--arch/ia64/include/asm/acpi.h25
1 files changed, 25 insertions, 0 deletions
diff --git a/arch/ia64/include/asm/acpi.h b/arch/ia64/include/asm/acpi.h
index e97b255d97bc..d3b48305a08f 100644
--- a/arch/ia64/include/asm/acpi.h
+++ b/arch/ia64/include/asm/acpi.h
@@ -99,7 +99,32 @@ ia64_acpi_release_global_lock (unsigned int *lock)
99#define acpi_processor_cstate_check(x) (x) /* no idle limits on IA64 :) */ 99#define acpi_processor_cstate_check(x) (x) /* no idle limits on IA64 :) */
100static inline void disable_acpi(void) { } 100static inline void disable_acpi(void) { }
101 101
102#ifdef CONFIG_IA64_GENERIC
102const char *acpi_get_sysname (void); 103const char *acpi_get_sysname (void);
104#else
105static inline const char *acpi_get_sysname (void)
106{
107# if defined (CONFIG_IA64_HP_SIM)
108 return "hpsim";
109# elif defined (CONFIG_IA64_HP_ZX1)
110 return "hpzx1";
111# elif defined (CONFIG_IA64_HP_ZX1_SWIOTLB)
112 return "hpzx1_swiotlb";
113# elif defined (CONFIG_IA64_SGI_SN2)
114 return "sn2";
115# elif defined (CONFIG_IA64_SGI_UV)
116 return "uv";
117# elif defined (CONFIG_IA64_DIG)
118 return "dig";
119# elif defined (CONFIG_IA64_XEN_GUEST)
120 return "xen";
121# elif defined(CONFIG_IA64_DIG_VTD)
122 return "dig_vtd";
123# else
124# error Unknown platform. Fix acpi.c.
125# endif
126}
127#endif
103int acpi_request_vector (u32 int_type); 128int acpi_request_vector (u32 int_type);
104int acpi_gsi_to_irq (u32 gsi, unsigned int *irq); 129int acpi_gsi_to_irq (u32 gsi, unsigned int *irq);
105 130