From patchwork Wed Jun 19 12:18:31 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 167230 Delivered-To: patch@linaro.org Received: by 2002:a92:4782:0:0:0:0:0 with SMTP id e2csp657728ilk; Wed, 19 Jun 2019 05:18:51 -0700 (PDT) X-Google-Smtp-Source: APXvYqz5oA85DMW1WoUBSwO8Y+6ULHHrAzEvX1qz6bfgSjAGJ4YeE2CKVqU4n1ghbqDbwcASmBjk X-Received: by 2002:a17:902:e490:: with SMTP id cj16mr116982945plb.136.1560946731623; Wed, 19 Jun 2019 05:18:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560946731; cv=none; d=google.com; s=arc-20160816; b=Xjyxx0hJWkvobOg6k9w/EXghnYkUOwjLaVbE0YsvH0iWqz3qx1szvo1sSFJXSqF4ht q6GRhcUUDcqsDTgLN1uL+U6aAwTI7DF+27HmVKkG58UAmM0PHdRJUHZgL+YTIXv2SAxW mIbsHHJrWO9ANgRa4MqeoG5rVRp5zsNNMk6jVKrRxOz1YWu+tJ42G7c4Gaxn/ZkbeIwn CojyPyoea8eYPxlB07i33462eJbZ7td0bNntcnhZ25ttR9sM06BY3dgiKstbbSUgVF67 J+0kkyLAiFfbpvGVooGiCoF3JCxMQ3VvrD08Y1nU+JweH8lSJ9z2sogCfQ/7wZjlS7z/ Y4Jw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=7vQWMM04qjKoqvfboQwGxdL+4IwL/Af9mC5Qcpbu+To=; b=hSsdqMwuQKQPLoFnJLOSjTrRVGr7dMjjnkMl3k3uZ54L2qCtXNRZsl1/CcAYRQcaYS 82jaaaKzeT3MEaU5xcTODXMZTUVLtd8E2G0c1lawCsNdjv1JIdIsSKl2TlCN1FK8x88O a2txqnYrqnToOeYr6WG0zaqkFywzqNhZP/urJRglSMdWjAylRRXCTA3fK0qLbR9paYhG QCUDlyjVtHdHX14V4p+PP9ImcivTYAjBrUhHtKAC3Dr2egSXuaKH7lRuQQpzBr0mOfQd pwpipN3OSjzfXlworyDi4kbwTAwB1MgUssoVedUFl2pavVwiiarAMVRWRxvlbW7tqrDZ XAUg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=j8h7hwqk; spf=pass (google.com: best guess record for domain of linux-acpi-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-acpi-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 b191si2955304pga.589.2019.06.19.05.18.51; Wed, 19 Jun 2019 05:18:51 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-acpi-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=j8h7hwqk; spf=pass (google.com: best guess record for domain of linux-acpi-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-acpi-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 S1727076AbfFSMSt (ORCPT + 8 others); Wed, 19 Jun 2019 08:18:49 -0400 Received: from mail-wr1-f68.google.com ([209.85.221.68]:43966 "EHLO mail-wr1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726246AbfFSMSt (ORCPT ); Wed, 19 Jun 2019 08:18:49 -0400 Received: by mail-wr1-f68.google.com with SMTP id p13so3125238wru.10 for ; Wed, 19 Jun 2019 05:18:47 -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:mime-version :content-transfer-encoding; bh=7vQWMM04qjKoqvfboQwGxdL+4IwL/Af9mC5Qcpbu+To=; b=j8h7hwqk/6xqaFEt6OOoRh7tpGPbjyYjJQ3Qb540gSRoOdA2c+HOIWbsBug6YKGtRj K3G8XmS0qLhJw9wJZjBZ5m7t9CmnLs61UmAaN7apJq1WJ/WEyrqijL2z/XCJhn7OCNtY wNf4d/xSw2Ux1cJDB3z+DoykyNzzJnxFSdxj2xgp4kYBalm5W4m9WkXQ7YPm8sM0hBBz 1N33eXUzFsDoHsnke7h5acQUiukL20gjlJ1vTn1wWCexatchAXJpkVIjwafa2KDB14Wc +9BSSENlfxbg4S0RFD+raL7crb0iQ7xWlHMTxNGb7tuoAEF0BohDd44vqorWdnLD2pXH VcCQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=7vQWMM04qjKoqvfboQwGxdL+4IwL/Af9mC5Qcpbu+To=; b=SrWFN/PDxnjvckyjwyJI89grokE8L1I+a9/7J1lPBrB1sRIHcZVn0k/zDl+x48nm57 3+kZnMASMEE+DXOWtdVRti8a6lBxbIk6EiQGas5OeW/3k0EMBczTXAL74d6oz5qVAcmI CLaq4PbFRK0qvbRug2ZUWoW/XZB96fXH+68AS7Kw7I6JgfBCBXOy7Helso3kZM5uRZcu THgmQ9obbemVyC+6vyqOSuJFTUxmFEbt6QCyYDr4T8eXAuVVYQsPv+4/qoTH5Nl89b8H wYVvH+qbwVPg+11w+TiLzXaliGASabFnDxjz4COSfmPInmkqDXV8Q8EJPkP10cOmw656 Ry1Q== X-Gm-Message-State: APjAAAW0VcJ5BwXTCqdjfxmsMyva25O5yh6exWe/54SrRP+yHKTMMfup A1KG8joawjh8Ihpmt8xhW2zTQNIZYH8= X-Received: by 2002:adf:ea92:: with SMTP id s18mr9348470wrm.257.1560946727177; Wed, 19 Jun 2019 05:18:47 -0700 (PDT) Received: from localhost.localdomain (aaubervilliers-681-1-6-209.w90-88.abo.wanadoo.fr. [90.88.128.209]) by smtp.gmail.com with ESMTPSA id 5sm20419966wrc.76.2019.06.19.05.18.46 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Wed, 19 Jun 2019 05:18:46 -0700 (PDT) From: Ard Biesheuvel To: linux-arm-kernel@lists.infradead.org Cc: linux-acpi@vger.kernel.org, catalin.marinas@arm.com, will.deacon@arm.com, lorenzo.pieralisi@arm.com, lee.jones@linaro.org, leif.lindholm@linaro.org, Ard Biesheuvel Subject: [RFC PATCH] acpi/arm64: ignore 5.1 FADTs that are reported as 5.0 Date: Wed, 19 Jun 2019 14:18:31 +0200 Message-Id: <20190619121831.7614-1-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org Some Qualcomm Snapdragon based laptops built to run Microsoft Windows are clearly ACPI 5.1 based, given that that is the first ACPI revision that supports ARM, and introduced the FADT 'arm_boot_flags' field, which has a non-zero field on those systems. So in these cases, infer from the ARM boot flags that the FADT must be 5.1 or later, and treat it as 5.1. Signed-off-by: Ard Biesheuvel --- arch/arm64/kernel/acpi.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) -- 2.20.1 Acked-by: Sudeep Holla Tested-by: Lee Jones Reviewed-by: Graeme Gregory Acked-by: Lorenzo Pieralisi Acked-by: Hanjun Guo diff --git a/arch/arm64/kernel/acpi.c b/arch/arm64/kernel/acpi.c index 803f0494dd3e..7722e85fb69c 100644 --- a/arch/arm64/kernel/acpi.c +++ b/arch/arm64/kernel/acpi.c @@ -155,10 +155,14 @@ static int __init acpi_fadt_sanity_check(void) */ if (table->revision < 5 || (table->revision == 5 && fadt->minor_revision < 1)) { - pr_err("Unsupported FADT revision %d.%d, should be 5.1+\n", + pr_err(FW_BUG "Unsupported FADT revision %d.%d, should be 5.1+\n", table->revision, fadt->minor_revision); - ret = -EINVAL; - goto out; + + if (!fadt->arm_boot_flags) { + ret = -EINVAL; + goto out; + } + pr_err("FADT has ARM boot flags set, assuming 5.1\n"); } if (!(fadt->flags & ACPI_FADT_HW_REDUCED)) {