Received: by 10.223.185.116 with SMTP id b49csp5082240wrg; Tue, 27 Feb 2018 07:31:41 -0800 (PST) X-Google-Smtp-Source: AG47ELvkJg2d9mcCnAsI+xsTmgt6Q3GbZnd7xA1t7wfATnlk1fQheauZAPdTp7tKlJ+2c6pR3lFp X-Received: by 10.99.55.11 with SMTP id e11mr10071432pga.237.1519745501749; Tue, 27 Feb 2018 07:31:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519745501; cv=none; d=google.com; s=arc-20160816; b=mt3axfAYTPQSwbULFtvirFgn/TWwpW+Fb1SzEyR9aaaRlktc3yYbcs7F+DY04M9Q7l G+EwNbPmhPkCbjZpGXxg1iNnAJqxk3QjuHwWTI/C9wfXlERorxdrzoCAd7/Ps7cVw99N DZ+DzG/tUIk2hAXC/XQnrVkmvpNfq5JQLari6H5z4NkrNOUAIDTogt4fCqD3BuVQFnU7 ODlEM+1wUXW7Ir/OW6OaIDvCe2bb8tugTSQzAUKUh5wq2jTUlHJmQLduRXJwVy1NWL1B QzQRkbQEi3DkO7bjRKH2tLeFu6taDLihRi7aJBFiCQT9UG5UgbNdBmre+JSJ3PsT2yts 5asg== 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=dP8vdaU1b19aNSoBnVb3BTIRVqz8zRoJ8B0+Lc7DxBA=; b=sM467go/ueaFVWeC8e2njUhrYAesiCvO953xGxhE/oCzArMJ6Og13H78ZJPpGxnqqz tH7ehbkEf6HUvcp/DLhAMbewvgdRjV1sPEABp9skBXIBah7cYymhg8qyLT4SPy+fdgYL 7uw/Q+IX2JUrvFAuaZ8HyVHHWs7qgd4wCztYshUXkspymdXdNuhi4+/Z87LNnazUBq6d IXDCQCryMwf+ze19npERW+3SWWbRaUO+OlZP7UM1VGj/Di2oypdhPmYzynioYzSnBvB7 QKKXUarEAjs8NLAPFSpCE034O3a57/FmuSNGBQOQhyHh8Kggy1fgPHxkK6y3+kKxLqO6 lZXQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=NB3k9iWN; 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 i23-v6si1388439pll.579.2018.02.27.07.31.24; Tue, 27 Feb 2018 07:31:41 -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=NB3k9iWN; 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 S1753522AbeB0Oyu (ORCPT + 99 others); Tue, 27 Feb 2018 09:54:50 -0500 Received: from mail-it0-f66.google.com ([209.85.214.66]:54879 "EHLO mail-it0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752193AbeB0Oyt (ORCPT ); Tue, 27 Feb 2018 09:54:49 -0500 Received: by mail-it0-f66.google.com with SMTP id c11so6099823ith.4 for ; Tue, 27 Feb 2018 06:54:49 -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=dP8vdaU1b19aNSoBnVb3BTIRVqz8zRoJ8B0+Lc7DxBA=; b=NB3k9iWNj9py3NHShCyRT0hjq6qZVcCNEXQJgyCAG9UNloy4ESLgOYExlsNXlpKijH gi9tPBOTnSBsMh+zy1JTE+mfFQfUHfApqyD7tXNpG6lDrAtiDtfawVmOyke4KOD97w8Y ZDjrNtV7fiPqvdHVO8YaEWOUOfoNhz4lcanuk= 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=dP8vdaU1b19aNSoBnVb3BTIRVqz8zRoJ8B0+Lc7DxBA=; b=WUcc9AlREL/hEeDwyXhJ4SO92qz7PNzv2KdQU9Mkb1I329AW62IUqEMJbG+xxsGnR7 Zhxb8iT1xMEghsmgxZTMEbbHFXdRF1xKT2Sl63tPwJCL4TOpRqDUo6QUjne5OouZWeQq nhwhb/+H57bS553Sd2BjV4wU7AoR0WFyS6QaSCuQD/ljDmgFN9ZPKL9++Mpc+lauBgrw K/2e8KUENDHb9+UqCiqy97bVIh8kk8YeGIjz0jhi4rQ8/VKyDCZanqtql/H71w7jFA1O 1YeSIsNV4HsrO2oIOH5HbNcLaSepMKpolbbxXPJP0nncxrQ4eRpB8f9WGlyLtSrBj8Cr SYlw== X-Gm-Message-State: APf1xPDzHeb1KtHxcWGgMzcLPJ9/0bvxb1Sdw0bGYTs+dEpPMSHClxP8 mpqqAraSAywwBh6mIk4B3Zyy4eIZ+6KbvyTsuq18Cw== X-Received: by 10.36.230.69 with SMTP id e66mr1252568ith.42.1519743288955; Tue, 27 Feb 2018 06:54:48 -0800 (PST) MIME-Version: 1.0 Received: by 10.107.138.209 with HTTP; Tue, 27 Feb 2018 06:54:48 -0800 (PST) In-Reply-To: <1454e833-e3b9-780b-c5db-a6f73e799352@redhat.com> References: <85047448dc1d2d3c725b6b78d5ef2a89fc81b83b.1519659254.git.jtoppins@redhat.com> <1454e833-e3b9-780b-c5db-a6f73e799352@redhat.com> From: Ard Biesheuvel Date: Tue, 27 Feb 2018 14:54:48 +0000 Message-ID: Subject: Re: [PATCH] arm64/acpi: make ACPI boot preference configurable To: Jonathan Toppins Cc: prarit@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 , linux-arm-kernel 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 On 27 February 2018 at 14:28, Jonathan Toppins wrote: > On 02/27/2018 02:22 AM, Ard Biesheuvel wrote: >> 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. > > I am assuming EDK2 is some sort of firmware code base, not that I have > ever heard of it before. This logic compared with the implementation in > the kernel seems divergent. The kernel is clearly making a choice about > which boot table (DT vs ACPI) to configure with. So to claim it is not > the kernel's job to reason about which to use is clearly incorrect. The arm64 ACPI kernel requires DT support to boot in the first place (due to its dependency on UEFI), and DT support predates ACPI support by a couple of years. So it is far from unreasonable that the default assumption is DT. > The > only thing this patch is doing is making it easier for distributions to > configure which preference the kernel has. > No, it does more than that: - it doubles the size of your validation matrix, because now you will have 'DT kernels' and 'ACPI kernels' - it will remove the little incentive vendors have to get with the program, adhere to the SBBR and ensure that the OS is not left to choose between DT and ACPI. >> >>> 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. > > This logic would seem akin to me asking Bjorn to remove all PCI quirks > from the kernel, because the systems that use them are "terminally > broken" or "don't follow the standard". Do you really think PCI quirks are there to work around software bugs? > This doesn't seem like a valid > reason to deny a change that would allow the kernel to boot on more > hardware. Further it seems rather rigid to effectively say that we only > run on perfect firmware. > Could you please try to respond to what is actually being said rather than put words in my mouth? Nobody is saying we only run on perfect firmware. I am saying it should not be left to the OS to reason about which hardware description it should use. >> >>> 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. > > This is not for development this is for production rate shipping firmware. ... that is unmaintained and exposes a broken DT alongside ACPI tables?