From patchwork Tue Apr 12 14:09:11 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 65631 Delivered-To: patch@linaro.org Received: by 10.140.93.198 with SMTP id d64csp1944585qge; Tue, 12 Apr 2016 07:11:45 -0700 (PDT) X-Received: by 10.98.87.216 with SMTP id i85mr4965832pfj.61.1460470305628; Tue, 12 Apr 2016 07:11:45 -0700 (PDT) Return-Path: Received: from bombadil.infradead.org (bombadil.infradead.org. [2001:1868:205::9]) by mx.google.com with ESMTPS id y8si10524924pas.240.2016.04.12.07.11.45 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 12 Apr 2016 07:11:45 -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 1apz1O-00024e-HJ; Tue, 12 Apr 2016 14:10:26 +0000 Received: from mail-wm0-x232.google.com ([2a00:1450:400c:c09::232]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1apz1H-0000ag-V9 for linux-arm-kernel@lists.infradead.org; Tue, 12 Apr 2016 14:10:23 +0000 Received: by mail-wm0-x232.google.com with SMTP id u206so29909725wme.1 for ; Tue, 12 Apr 2016 07:09:59 -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=31xEdhTqYqRBTKrmQOuNMEjU6tUxWkfeIvq+pAVc0Rg=; b=PPQbd0eNq5Xf9g3W6oyXACM2qp6BuvMV3aTzAALOpvYDukrnfysDKySzRyB3e7ybez 09I9SAMSbgNjiXHMwEDauDgEKJCiPLKmD9FcRu4XCo6iBAgHCBFP3A1hLwMdLIakS5Qd TmVsenqePrln+Z4b03FXS3ljkZuRu/TDa7Gx8= 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=31xEdhTqYqRBTKrmQOuNMEjU6tUxWkfeIvq+pAVc0Rg=; b=PNI50PnGgMZqf8Jk/3DCkaPhaJERYs3+UrKM/QPtq8TwSjTBgPnf5rDHdKsBQ6cS0S 2M43Da5SsTE+E/mVb1uJ2rbUiIqGCTuOXEX93GPr+bO+14U7+SVnQqGhID09KTY48Lvn k9ecGMNJzrNvquVmHlA+HU8iGCZWV+Jolk1a43sqPCgiZW3ed/jOhkvn1pBiG4TE/ODu BBFrqGVF93imtq9rJ2O63cPltkJP7i3A1/PtHWywdDHd1uQNLx3CXQZaMudIMpfU3+n+ zLQm7M5rR5fMYuwVsOo1VxJknJmtIBrcr6M0El2bRYbuiEQ/XtFgCfLuepQPqfEgsJlC 5LEw== X-Gm-Message-State: AOPr4FVzXybtQx/BNFGcq5jMVUB41updgo3FVxMKeSco7roAddbvNPVnGRoQQicosE+yxU2o X-Received: by 10.28.60.134 with SMTP id j128mr4593862wma.71.1460470198465; Tue, 12 Apr 2016 07:09:58 -0700 (PDT) Received: from localhost.localdomain ([195.55.142.58]) by smtp.gmail.com with ESMTPSA id q127sm1033166wmd.13.2016.04.12.07.09.56 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 12 Apr 2016 07:09:57 -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 acpi=on cmdline option to prefer ACPI boot over DT Date: Tue, 12 Apr 2016 16:09:11 +0200 Message-Id: <1460470151-19479-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-20160412_071020_368359_FBB8F904 X-CRM114-Status: GOOD ( 16.24 ) 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:232 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: roy.franz@hpe.com, 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 is to prefer DT over ACPI, and preferring ACPI over DT while still allowing DT as a fallback is not possible. Since some enterprise features (such as RAS) depend on ACPI, it may be desirable for, e.g., distro installers to prefer ACPI boot but fall back to DT rather than failing completely if no ACPI tables are available. So introduce the 'acpi=on' kernel command line parameter for arm64, which signifies that ACPI should be used if available, and DT should only be used as a fallback. Signed-off-by: Ard Biesheuvel --- Documentation/kernel-parameters.txt | 6 ++++-- arch/arm64/kernel/acpi.c | 8 ++++++-- 2 files changed, 10 insertions(+), 4 deletions(-) -- 2.5.0 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel Acked-by: Catalin Marinas diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt index ecc74fa4bfde..748129c85f35 100644 --- a/Documentation/kernel-parameters.txt +++ b/Documentation/kernel-parameters.txt @@ -167,16 +167,18 @@ bytes respectively. Such letter suffixes can also be entirely omitted. acpi= [HW,ACPI,X86,ARM64] Advanced Configuration and Power Interface - Format: { force | off | strict | noirq | rsdt | + Format: { force | on | off | strict | noirq | rsdt | copy_dsdt } force -- enable ACPI if default was off + on -- enable ACPI but allow fallback to DT [arm64] off -- disable ACPI if default was on noirq -- do not use ACPI for IRQ routing strict -- Be less tolerant of platforms that are not strictly ACPI specification compliant. rsdt -- prefer RSDT over (default) XSDT copy_dsdt -- copy DSDT to memory - For ARM64, ONLY "acpi=off" or "acpi=force" are available + For ARM64, ONLY "acpi=off", "acpi=on" or "acpi=force" + are available See also Documentation/power/runtime_pm.txt, pci=noacpi diff --git a/arch/arm64/kernel/acpi.c b/arch/arm64/kernel/acpi.c index d1ce8e2f98b9..60d728620a1b 100644 --- a/arch/arm64/kernel/acpi.c +++ b/arch/arm64/kernel/acpi.c @@ -42,6 +42,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_force __initdata; static int __init parse_acpi(char *arg) @@ -52,6 +53,8 @@ static int __init parse_acpi(char *arg) /* "acpi=off" disables both ACPI table parsing and interpreter */ if (strcmp(arg, "off") == 0) param_acpi_off = true; + else if (strcmp(arg, "on") == 0) /* prefer ACPI over DT */ + param_acpi_on = true; else if (strcmp(arg, "force") == 0) /* force ACPI to be enabled */ param_acpi_force = true; else @@ -185,10 +188,11 @@ void __init acpi_boot_table_init(void) * Enable ACPI instead of device tree unless * - ACPI has been disabled explicitly (acpi=off), or * - the device tree is not empty (it has more than just a /chosen node) - * and ACPI has not been force enabled (acpi=force) + * and ACPI has not been [force] enabled (acpi=on|force) */ if (param_acpi_off || - (!param_acpi_force && of_scan_flat_dt(dt_scan_depth1_nodes, NULL))) + (!param_acpi_on && !param_acpi_force && + of_scan_flat_dt(dt_scan_depth1_nodes, NULL))) return; /*