@@ -369,6 +369,28 @@ config ACPI_REDUCED_HARDWARE_ONLY
If you are unsure what to do, do not enable this option.
+config ACPI_ARCH_SPECIFIC_OSI
+ bool "Use an arch-specific _OSI implementation" if EXPERT
+ def_bool n
+ help
+ If this option is set, the ACPI driver will use an
+ implementation of _OSI that is specific to the target
+ architecture, instead of the default implementation
+ originally created for x86 and then used on ia64.
+
+ If you are unsure what to do, do not enable this option.
+
+config ACPI_ARCH_SPECIFIC_BLACKLIST
+ bool "Use an arch-specific ACPI blacklist" if EXPERT
+ def_bool n
+ help
+ If this option is set, the ACPI driver will use a blacklist
+ that is specific to the target architecture, instead of the
+ default implementation originally created for x86 and then
+ used on ia64.
+
+ If you are unsure what to do, do not enable this option.
+
source "drivers/acpi/apei/Kconfig"
config ACPI_EXTLOG
@@ -18,9 +18,26 @@ obj-y += acpi.o \
acpica/
# All the builtin files are in the "acpi." module_param namespace.
-acpi-y += osl.o utils.o reboot.o osi.o
+acpi-y += osl.o utils.o reboot.o
acpi-y += nvs.o
+# _OSI related files
+ifeq ($(CONFIG_ACPI_ARCH_SPECIFIC_OSI), y)
+ifeq ($(ARCH), arm64)
+acpi-y += osi-arm.o
+endif
+else # X86, IA64
+acpi-y += osi.o
+endif
+
+ifeq ($(CONFIG_ACPI_ARCH_SPECIFIC_BLACKLIST), y)
+ifeq ($(ARCH), arm64)
+acpi-y += blacklist-arm.o
+endif
+else # X86, IA64
+acpi-y += blacklist.o
+endif
+
# Power management related files
acpi-y += wakeup.o
ifeq ($(ARCH), arm64)
new file mode 100644
@@ -0,0 +1,20 @@
+/*
+ * ARM64 Specific ACPI Blacklist Support
+ *
+ * Copyright (C) 2015, Linaro Ltd.
+ * Author: Al Stone <al.stone@linaro.org>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+
+#define pr_fmt(fmt) "ACPI: " fmt
+
+#include <linux/acpi.h>
+
+/* The arm64 ACPI blacklist is currently empty. */
+int __init acpi_blacklisted(void)
+{
+ return 0;
+}
@@ -34,9 +34,14 @@
#include "internal.h"
+#ifdef CONFIG_ACPI_ARCH_SPECIFIC_OSI
+void __init acpi_dmi_osi_linux(int enable, const struct dmi_system_id *d) { }
+void __init acpi_osi_setup(char *str) { }
+#else
extern void __init acpi_dmi_osi_linux(int enable,
const struct dmi_system_id *d);
extern void __init acpi_osi_setup(char *str);
+#endif
enum acpi_blacklist_predicates {
all_versions,
new file mode 100644
@@ -0,0 +1,25 @@
+/*
+ * ARM64 Specific ACPI _OSI Support
+ *
+ * Copyright (C) 2015, Linaro Ltd.
+ * Author: Al Stone <al.stone@linaro.org>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+
+#define pr_fmt(fmt) "ACPI: " fmt
+
+#include <linux/acpi.h>
+
+/*
+ * Consensus is to deprecate _OSI for all new ACPI-supported architectures.
+ * So, for arm64, reduce _OSI to a warning message, and tell the firmware
+ * nothing of value.
+ */
+u32 acpi_osi_handler(acpi_string interface, u32 supported)
+{
+ pr_warn("_OSI was called, but is deprecated for this architecture.\n");
+ return false;
+}