Received: by 10.223.185.116 with SMTP id b49csp4640587wrg; Mon, 26 Feb 2018 23:23:33 -0800 (PST) X-Google-Smtp-Source: AH8x226yti0GPlXRJT9RUUE5eHyddBPEy+E38AHidcGmNdt6+HWRfZRTP+u6rlBAQh0YJ30AAnfC X-Received: by 2002:a17:902:bb81:: with SMTP id m1-v6mr13201631pls.71.1519716213766; Mon, 26 Feb 2018 23:23:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519716213; cv=none; d=google.com; s=arc-20160816; b=CcWge4nG1CoB9VahjOmWP72RGB9ioJmMed4JSqGxSxA+azZCGzK7DNX3dr009RjQnP 6R1blrMAXSGOy6NNvk13flf5gxSgmCTYDk0dxlvhyOvyy5H9ZJnCd5u6H0nSomcbmLQy ujkruVNvJ9OXw3ilH4HLeYsvrjm2B2rgqkJ9+cNjzt1hAk35DHbsmqrsWI65n+4r36iE Bojnn7FVE5ObdQMnaJDUlIVSbd6DBaH0yEaeaHG75SFtSVeSLzG09wehyUdZqbUk0FeY Ep6jC1BgY/YPyafydkjsZDiV/ImTGPIDnjAbYo9wApB2crhX7WSI4ChfHWOMFI+Y47sk 8GRQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=SfEzLVFANaDi3v5WiPM7FzNIE/yysUQpXZhGP/cIA5U=; b=OeBcDTRekP9YZYBFFkQkWyWS4KhbMyWTAS+cbfeByRdIWIXdj+sw2XMWGPAStw8/bz XBefJ3DYOgFoDgzbewsB7G2v+BHOVU5uxeAJScej4S7zJo3dDvhGj9Qoc2f+ZrGdn8l/ WTxQy1bWJmr0sR3l2b1541D8voQzpWS5qAUzoXLcW7aAK+6crStiAR+mGEmIFFsjXdrG DLbUdh9AFxS9zAgcaAQSyrpJWKsffPA9WiJn3sybU4n9WBIUMBCnOC6vvUUjQ4hHaQKF KvZo0vaV4kIhKbcVoDexiJbWkB+ZrbSt983HiDP41LYVfXqKVH8aGl3LSLYIrp6AMEeM 06OA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=f5tnYQA5; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a5-v6si1594580pll.348.2018.02.26.23.23.18; Mon, 26 Feb 2018 23:23:33 -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; dkim=pass header.i=@linaro.org header.s=google header.b=f5tnYQA5; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752332AbeB0HWc (ORCPT + 99 others); Tue, 27 Feb 2018 02:22:32 -0500 Received: from mail-io0-f196.google.com ([209.85.223.196]:40279 "EHLO mail-io0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752153AbeB0HWb (ORCPT ); Tue, 27 Feb 2018 02:22:31 -0500 Received: by mail-io0-f196.google.com with SMTP id v6so18999128iog.7 for ; Mon, 26 Feb 2018 23:22:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=SfEzLVFANaDi3v5WiPM7FzNIE/yysUQpXZhGP/cIA5U=; b=f5tnYQA5nd2aH23U5tnKZMwswLTkq9SIRDV8roa0tJdLQwqhwvufQv1hr9Q/LVdpLx KCQ7i0kCFb3KTkbWKa2bvs6qKECxMkyxbQw0fye4B5kb7FcCGEpwPxjLt5+5BT1GMDz/ prhzPS/5LF64PSrprf0UN4gMkHeTQtVPmHGXY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=SfEzLVFANaDi3v5WiPM7FzNIE/yysUQpXZhGP/cIA5U=; b=VGyt5cBNtelI/ZMJh9lzixP7G5jIE2fWfFua+xjTsRXaouOZo60PEblmqBpyGke8n5 3aM2F7wuQIOIxSSblXpExPPiSARp68Yr/t34wAtlcSFPHgtn9fBNJZy9hlL34iwefiw5 dmzh/EYg/7NBciYMZWGBbpZE6Gm2jBVWX+JbUWT+mGaWqYNM4bqiwg6HPKvrTvcZtmEU bGvWmoSPulSa3KANiF+jocuroC1GIEYp2UU0xG9HgJlEniF+VZRH4SSh+lqF4iBx06h5 xqxNipVPnX66H8txje91FY+QlTR8BxmxrF0TVaQvIWUJNMLDRRyMrmAFWyiiOQvRKYcK QjAA== X-Gm-Message-State: APf1xPChPx6dRpnX8LKzrp+VTw8jt6lwNbAyEJfq2htNOGAMEab848RT 3982Vqc9t3+ulLVbCAy+em4zSC7Kd+IWcVPD2rMPWA== X-Received: by 10.107.56.69 with SMTP id f66mr14758158ioa.170.1519716150410; Mon, 26 Feb 2018 23:22:30 -0800 (PST) MIME-Version: 1.0 Received: by 10.107.138.209 with HTTP; Mon, 26 Feb 2018 23:22:29 -0800 (PST) In-Reply-To: <85047448dc1d2d3c725b6b78d5ef2a89fc81b83b.1519659254.git.jtoppins@redhat.com> References: <85047448dc1d2d3c725b6b78d5ef2a89fc81b83b.1519659254.git.jtoppins@redhat.com> From: Ard Biesheuvel Date: Tue, 27 Feb 2018 07:22:29 +0000 Message-ID: Subject: Re: [PATCH] arm64/acpi: make ACPI boot preference configurable To: Jonathan Toppins Cc: linux-arm-kernel , prarit@redhat.com, rhkernel-list@redhat.com, Jon Masters , Bhupesh Sharma , "Rafael J. Wysocki" , Will Deacon , Linux Kernel Mailing List , astone@redhat.com, James Morse , Catalin Marinas , Andy Shevchenko , Ingo Molnar Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Jonathan, On 27 February 2018 at 06:05, Jonathan Toppins wrote: > This patch allows a user to configure ACPI to be preferred over > device-tree. > This comes up once a year or so, and the consensus has been so far that it is not up to the kernel to reason about whether DT or ACPI should be preferred if both are supplied, Instead, it is up to the firmware to ensure that only one of those is provided, and we added a generic driver to EDK2 that implements this. > 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. Your firmware is terminally broken if it provides an incorrect DT, and we should not be fixing it in the kernel. > 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. > 'only intended to be booted via ACPI' is a property of the system, not of the OS. If you need this functionality for development, you can append 'acpi=on' to the kernel command line via kconfig. > 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 > > > _______________________________________________ > linux-arm-kernel mailing list > linux-arm-kernel@lists.infradead.org > http://lists.infradead.org/mailman/listinfo/linux-arm-kernel