@@ -52,7 +52,9 @@ struct bootinfo __initdata bootinfo;
struct cpuinfo_arm __read_mostly boot_cpu_data;
+#ifdef CONFIG_ACPI
bool_t __read_mostly acpi_disabled;
+#endif
#ifdef CONFIG_ARM_32
static unsigned long opt_xenheap_megabytes __initdata;
@@ -101,7 +103,7 @@ static void __init parse_acpi_param(char *s)
}
else if ( !strcmp(s, "force") )
{
- acpi_disabled = 0;
+ enable_acpi();
}
}
@@ -29,7 +29,6 @@
#define COMPILER_DEPENDENT_INT64 long long
#define COMPILER_DEPENDENT_UINT64 unsigned long long
-extern bool_t acpi_disabled;
/* Tables marked as reserved in efi table */
typedef enum {
@@ -43,22 +42,14 @@ typedef enum {
TBL_MMAX,
} EFI_MEM_RES;
-#ifdef CONFIG_ACPI
bool_t __init acpi_psci_present(void);
bool_t __init acpi_psci_hvc_present(void);
void __init acpi_smp_init_cpus(void);
unsigned int acpi_get_irq_type(u32 flags);
unsigned int acpi_get_table_offset(struct membank tbl_add[], EFI_MEM_RES index);
-#else
-static inline bool_t acpi_psci_present(void) { return false; }
-static inline bool_t acpi_psci_hvc_present(void) {return false; }
-static inline void acpi_smp_init_cpus(void) { }
-static inline unsigned int acpi_get_irq_type(u32 flags) { return 0; }
-unsigned int acpi_get_table_offset(struct membank tbl_add[], EFI_MEM_RES index)
-{
- return 0;
-}
-#endif /* CONFIG_ACPI */
+
+#ifdef CONFIG_ACPI
+extern bool_t acpi_disabled;
/* Basic configuration for ACPI */
static inline void disable_acpi(void)
@@ -66,6 +57,18 @@ static inline void disable_acpi(void)
acpi_disabled = 1;
}
+static inline void enable_acpi(void)
+{
+ acpi_disabled = 0;
+}
+#else
+
+#define acpi_disabled (1)
+#define disable_acpi(x)
+#define enable_acpi(x)
+
+#endif /* CONFIG_ACPI */
+
#define ACPI_GTDT_INTR_MASK ( ACPI_GTDT_INTERRUPT_MODE | ACPI_GTDT_INTERRUPT_POLARITY )
/* Triggering */