From: Jonathan Toppins <jtoppins@redhat.com>
To: linux-arm-kernel@lists.infradead.org
Cc: jtoppins@redhat.com, astone@redhat.com, jcm@redhat.com,
catalin.marinas@arm.com, will.deacon@arm.com,
rafael.j.wysocki@intel.com, mingo@kernel.org, prarit@redhat.com,
james.morse@arm.com, andriy.shevchenko@linux.intel.com,
bhsharma@redhat.com, linux-kernel@vger.kernel.org,
rhkernel-list@redhat.com
Subject: [PATCH] arm64/acpi: make ACPI boot preference configurable
Date: Tue, 27 Feb 2018 01:05:32 -0500 [thread overview]
Message-ID: <85047448dc1d2d3c725b6b78d5ef2a89fc81b83b.1519659254.git.jtoppins@redhat.com> (raw)
This patch allows a user to configure ACPI to be preferred over
device-tree.
Currently for ACPI to be used a user either has to set acpi=on on the
kernel command line or make sure any device tree passed to the kernel
is empty. If the dtb passed to the kernel is non-empty then device-tree
will be chosen as the boot method of choice even if it is not correct.
To prevent this situation where a system is only intended to be booted
via ACPI a user can set this kernel configuration so it ignores
device-tree settings unless ACPI table checks fail.
Signed-off-by: Jonathan Toppins <jtoppins@redhat.com>
---
arch/arm64/Kconfig | 13 +++++++++++++
arch/arm64/kernel/acpi.c | 2 +-
2 files changed, 14 insertions(+), 1 deletion(-)
diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
index 7381eeb7ef8e..da8d9ab62825 100644
--- a/arch/arm64/Kconfig
+++ b/arch/arm64/Kconfig
@@ -1170,6 +1170,19 @@ config ARM64_ACPI_PARKING_PROTOCOL
protocol even if the corresponding data is present in the ACPI
MADT table.
+config ARM64_PREFER_ACPI
+ bool "Prefer usage of ACPI boot tables over device-tree"
+ depends on ACPI
+ help
+ Normally device-tree is preferred over ACPI on arm64 unless
+ explicitly preferred via kernel command line, something like: acpi=on
+ This configuration changes this default behaviour by pretending
+ the user set acpi=on on the command line. This configuration still
+ allows the user to turn acpi table parsing off via acpi=off. If
+ for some reason the table checks fail the system will still fall
+ back to using device-tree unless the user explicitly sets acpi=force
+ on the command line.
+
config CMDLINE
string "Default kernel command string"
default ""
diff --git a/arch/arm64/kernel/acpi.c b/arch/arm64/kernel/acpi.c
index 7b09487ff8fb..315b001c45f1 100644
--- a/arch/arm64/kernel/acpi.c
+++ b/arch/arm64/kernel/acpi.c
@@ -44,7 +44,7 @@ int acpi_pci_disabled = 1; /* skip ACPI PCI scan and IRQ initialization */
EXPORT_SYMBOL(acpi_pci_disabled);
static bool param_acpi_off __initdata;
-static bool param_acpi_on __initdata;
+static bool param_acpi_on __initdata = IS_ENABLED(CONFIG_ARM64_PREFER_ACPI);
static bool param_acpi_force __initdata;
static int __init parse_acpi(char *arg)
--
2.13.6
next reply other threads:[~2018-02-27 6:05 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-27 6:05 Jonathan Toppins [this message]
2018-02-27 7:22 ` [PATCH] arm64/acpi: make ACPI boot preference configurable Ard Biesheuvel
2018-02-27 14:28 ` Jonathan Toppins
2018-02-27 14:54 ` Ard Biesheuvel
2018-02-27 14:55 ` Robin Murphy
2018-02-27 12:40 ` Bhupesh Sharma
2018-02-27 14:44 ` Jonathan Toppins
2018-02-27 17:05 ` Mark Rutland
2018-02-27 18:59 ` Bhupesh Sharma
2018-02-28 10:07 ` Andy Shevchenko
2018-02-28 10:10 ` Rafael J. Wysocki
2018-02-28 10:32 ` Bhupesh Sharma
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=85047448dc1d2d3c725b6b78d5ef2a89fc81b83b.1519659254.git.jtoppins@redhat.com \
--to=jtoppins@redhat.com \
--cc=andriy.shevchenko@linux.intel.com \
--cc=astone@redhat.com \
--cc=bhsharma@redhat.com \
--cc=catalin.marinas@arm.com \
--cc=james.morse@arm.com \
--cc=jcm@redhat.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=prarit@redhat.com \
--cc=rafael.j.wysocki@intel.com \
--cc=rhkernel-list@redhat.com \
--cc=will.deacon@arm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).