Received: by 10.223.185.116 with SMTP id b49csp4586743wrg; Mon, 26 Feb 2018 22:07:43 -0800 (PST) X-Google-Smtp-Source: AH8x227lQl0zil9rDnDrurpvUw6cXBhs7eok1cfiLqqHH7hxoMIInFHGl5AbfVevJBApGhpUYags X-Received: by 10.98.166.85 with SMTP id t82mr12981426pfe.237.1519711663770; Mon, 26 Feb 2018 22:07:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519711663; cv=none; d=google.com; s=arc-20160816; b=uENm5EVfMc+n21jP/vVwO2ZOp3eSCp7wc+fVW+sIYb7ifKn44ESd69Epk2HYsXPDhA wYg4dWCGImQ+JK/FxtbaSOJiX8qzq08HUhJLsYOJyrMDhKUomXByyOkg/x25M6tZzk/q 3DXJpn+BrmyYGunbUaZe5MsmU5L/eETLYsFRkj1NkXy/+EaApROahsyDXKx0aj/zUbvM FSEMVNAyJrn2JNzcdAqV1411uK64FTsL67Cd5rmt0wCp6GW5eq8vr4HgyjQWLM41M2N7 kPb0DrOO1D/OL5/C3NFbVSRh8yecAQEJdHw6jNNK/mp8ehu+Jy4eHBJ3TiTB59ZN7efS x3qg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :arc-authentication-results; bh=G43/lBYDRc1iOBQweyiSEnUnMPdRMkPyrXxiXv24qms=; b=tQcF+o7N4ARQ3Yu5ZOPzsyetB9zC4arf9ALB6QLdUIcXrcklljLBdWJdzRliiYkhUT qWjKPpdZW7CoNGdkwnzFVF3UqCfh6WrHhA5fWyFUtnAkrQMjw5zSZeCBlTeGx1xaLsAQ 2pr5y/thRv1eI2RsGgnHpgxXEDziJtiEiVJAJuqn+vG4Uw9Yc7HTmlArqxa7mP/vrOJz 99JnGSJjrp2eghm+SNObt2A2vrSwf8S2MhPOMMagFcYkwwBOJRFsCcw9Yl2nQuE7LPED v4H2XR4Ls1VcvNiW/jYZuMwEKHXCl+ZZ6bzpB4mxCZ/9L9y3+VOmuM/G7EyTjgX6FMW5 xy6w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b89-v6si8004485plb.809.2018.02.26.22.07.27; Mon, 26 Feb 2018 22:07:43 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751128AbeB0GFh (ORCPT + 99 others); Tue, 27 Feb 2018 01:05:37 -0500 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:38146 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750770AbeB0GFg (ORCPT ); Tue, 27 Feb 2018 01:05:36 -0500 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 355687D845; Tue, 27 Feb 2018 06:05:36 +0000 (UTC) Received: from jtoppins.rdu.csb (ovpn-120-82.rdu2.redhat.com [10.10.120.82]) by smtp.corp.redhat.com (Postfix) with ESMTP id B0EAE213AEF4; Tue, 27 Feb 2018 06:05:35 +0000 (UTC) From: Jonathan Toppins 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 Message-Id: <85047448dc1d2d3c725b6b78d5ef2a89fc81b83b.1519659254.git.jtoppins@redhat.com> X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.2]); Tue, 27 Feb 2018 06:05:36 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.2]); Tue, 27 Feb 2018 06:05:36 +0000 (UTC) for IP:'10.11.54.6' DOMAIN:'int-mx06.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'jtoppins@redhat.com' RCPT:'' Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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