From patchwork Mon Apr 11 11:19:28 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 65495 Delivered-To: patch@linaro.org Received: by 10.112.43.237 with SMTP id z13csp1409788lbl; Mon, 11 Apr 2016 04:27:39 -0700 (PDT) X-Received: by 10.66.121.97 with SMTP id lj1mr31917686pab.51.1460374059430; Mon, 11 Apr 2016 04:27:39 -0700 (PDT) Return-Path: Received: from bombadil.infradead.org (bombadil.infradead.org. [2001:1868:205::9]) by mx.google.com with ESMTPS id ld10si3170065pab.98.2016.04.11.04.27.39 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 11 Apr 2016 04:27:39 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org designates 2001:1868:205::9 as permitted sender) client-ip=2001:1868:205::9; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org; spf=pass (google.com: best guess record for domain of linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org designates 2001:1868:205::9 as permitted sender) smtp.mailfrom=linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org; dmarc=fail (p=NONE dis=NONE) header.from=linaro.org Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1apZst-0006tm-DQ; Mon, 11 Apr 2016 11:19:59 +0000 Received: from mail-wm0-x22c.google.com ([2a00:1450:400c:c09::22c]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1apZsq-0006nb-6U for linux-arm-kernel@lists.infradead.org; Mon, 11 Apr 2016 11:19:57 +0000 Received: by mail-wm0-x22c.google.com with SMTP id v188so81869497wme.1 for ; Mon, 11 Apr 2016 04:19:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=MEpiPc34EzpVUXfvmizQA2Pw2IRO0VecbzQmjL+rcCM=; b=DiSknU9iERCDQ54lAm1A/h/11Dz1FTeDcqgDKBpxisL7Suz7nfJkqRRElF4VDc6iom 1XxMsjQr5VlxToP2WArmW2A1ovlgonOIlpJ5b1U6cge6d9kEzh0WWeIGmWUxiw1k5tFI J4Ln0UmOqmEET/A8ObTEUoz3eCE9PPy3V8C+M= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=MEpiPc34EzpVUXfvmizQA2Pw2IRO0VecbzQmjL+rcCM=; b=UwFN3cmbiWrbhGPAmAG1o4Zf6/bMqCb8QPiUtndXN8CRimz3t+N//WjOFCTksk4OWv I+Je73140d/j9frPHWRagw+kzRZPFDIppkNhjHrkc71txSegXCgH2DIhW0liA4O5eDh3 CoQDP/Ygd/NobEj+4iPQsbwy7LGYA1YpQsG3kW2vWO4Vt0u5WroOa97fiKbkkahBcQZQ M1CrNuh3vw50wy3+tEfnrNFLZfCAIeBxBX6hhsoSeSXwiA4UriuL6qqv5UhGL//RE+Ll +CAVW51F8DeEwjMY7hMnnHgoDGFY1FOXdu4/3xA3WbAeLXZZMUksUW1QmtlY8auUSh4/ EzJA== X-Gm-Message-State: AD7BkJJ2rogEJ6wjLKty06tegiF9+cNhbNVp9WlDCgqZ8U21dhXKqtKP8FCal/Hv17DC3VMG X-Received: by 10.28.144.20 with SMTP id s20mr18539153wmd.12.1460373574282; Mon, 11 Apr 2016 04:19:34 -0700 (PDT) Received: from localhost.localdomain ([195.55.142.58]) by smtp.gmail.com with ESMTPSA id c144sm16871253wmd.0.2016.04.11.04.19.31 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 11 Apr 2016 04:19:33 -0700 (PDT) From: Ard Biesheuvel To: linux-arm-kernel@lists.infradead.org, will.deacon@arm.com, catalin.marinas@arm.com, graeme.gregory@linaro.org, hanjun.guo@linaro.org, al.stone@linaro.org Subject: [PATCH] arm64: acpi: add a Kconfig option to prefer ACPI boot over DT Date: Mon, 11 Apr 2016 13:19:28 +0200 Message-Id: <1460373568-4374-1-git-send-email-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.5.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160411_041956_394603_C5E454C0 X-CRM114-Status: GOOD ( 14.22 ) X-Spam-Score: -2.7 (--) X-Spam-Report: SpamAssassin version 3.4.0 on bombadil.infradead.org summary: Content analysis details: (-2.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [2a00:1450:400c:c09:0:0:0:22c listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: leif.lindholm@linaro.org, Ard Biesheuvel MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org 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 --- arch/arm64/Kconfig | 13 +++++++++++++ arch/arm64/kernel/acpi.c | 3 ++- 2 files changed, 15 insertions(+), 1 deletion(-) -- 2.5.0 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel Reviewed-by: Graeme Gregory 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; /*