All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] arm64: acpi: add a Kconfig option to prefer ACPI boot over DT
@ 2016-04-11 11:19 Ard Biesheuvel
  2016-04-11 12:01 ` Graeme Gregory
  2016-04-12 13:07 ` Catalin Marinas
  0 siblings, 2 replies; 10+ messages in thread
From: Ard Biesheuvel @ 2016-04-11 11:19 UTC (permalink / raw)
  To: linux-arm-kernel

If both ACPI and DT platform descriptions are available, and the
kernel was configured at build time to support both flavours, the
default policy in absence of a acpi=[off|force] kernel command line
parameter is to prefer DT over ACPI.

This adds an option to invert that default policy, and prefer ACPI
over DT instead. Note that this policy is still superseded by the
value of the acpi= command line parameter.

Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
---
 arch/arm64/Kconfig       | 13 +++++++++++++
 arch/arm64/kernel/acpi.c |  3 ++-
 2 files changed, 15 insertions(+), 1 deletion(-)

diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
index 4f436220384f..f3aef40ad0ac 100644
--- a/arch/arm64/Kconfig
+++ b/arch/arm64/Kconfig
@@ -918,6 +918,19 @@ config DMI
 	  However, even with this option, the resultant kernel should
 	  continue to boot on existing non-UEFI platforms.
 
+config PREFER_ACPI_OVER_DT
+	bool "Prefer booting via ACPI if both ACPI and DT are available"
+	depends on ACPI
+	help
+	  If both ACPI and DT platform descriptions are available, and the
+	  kernel was configured at build time to support both flavours, the
+	  default policy in absence of a acpi=[off|force] kernel command line
+	  parameter is to prefer DT over ACPI.
+
+	  This option inverts that default policy, by preferring ACPI over DT
+	  instead. Note that this default policy is still superseded by the
+	  value of the acpi= command line parameter.
+
 endmenu
 
 menu "Userspace binary formats"
diff --git a/arch/arm64/kernel/acpi.c b/arch/arm64/kernel/acpi.c
index d1ce8e2f98b9..50ac056fb1fd 100644
--- a/arch/arm64/kernel/acpi.c
+++ b/arch/arm64/kernel/acpi.c
@@ -188,7 +188,8 @@ void __init acpi_boot_table_init(void)
 	 *   and ACPI has not been force enabled (acpi=force)
 	 */
 	if (param_acpi_off ||
-	    (!param_acpi_force && of_scan_flat_dt(dt_scan_depth1_nodes, NULL)))
+	    (!IS_ENABLED(CONFIG_PREFER_ACPI_OVER_DT) &&
+	     !param_acpi_force && of_scan_flat_dt(dt_scan_depth1_nodes, NULL)))
 		return;
 
 	/*
-- 
2.5.0

^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2016-04-14 16:46 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-04-11 11:19 [PATCH] arm64: acpi: add a Kconfig option to prefer ACPI boot over DT Ard Biesheuvel
2016-04-11 12:01 ` Graeme Gregory
2016-04-11 23:53   ` Roy Franz
2016-04-12 13:07 ` Catalin Marinas
2016-04-12 13:19   ` Ard Biesheuvel
2016-04-12 13:35     ` Catalin Marinas
2016-04-12 19:41       ` Roy Franz (HPE)
2016-04-13 13:59         ` Catalin Marinas
2016-04-13 17:21           ` Roy Franz
2016-04-14 16:46             ` Catalin Marinas

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.