From patchwork Wed Oct 14 21:26:23 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Al Stone X-Patchwork-Id: 54966 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-lb0-f199.google.com (mail-lb0-f199.google.com [209.85.217.199]) by patches.linaro.org (Postfix) with ESMTPS id 1ABA320490 for ; Wed, 14 Oct 2015 21:26:46 +0000 (UTC) Received: by lbbms9 with SMTP id ms9sf754609lbb.3 for ; Wed, 14 Oct 2015 14:26:45 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-unsubscribe; bh=uVFDLAYUL/iQvVSZUc3vQtadXkIyUxeRiG3XVfZIRKA=; b=aoGFIqYXXDVpg8XuwoOJkaQdJG+uqfX6r0bePACATblh86NpUp9/uli9qR8iKNJ8H/ /vWdurKoUoAp87XzJ1LvY7gmKhI311u/9un2FHTVuepOe0wfgBjb1uOq26Mk2AS0TVl3 2pOI3IlAFJF+ks5ZwjWEAYvJ890n94BavwPQMOJsVLO+VWISESmhtITYrR/NBytQrvbQ AsxRU/SFI4+7Dh7lpREqbaCEdcUV0r6+3py3kxxcJjaJ+uZRgzXGxv1EAumZM675MXPP j5fowILQ/iAtBO+gVETvAY/h6gNXFkzg5iLuyg0AzzIpuZBpoUNmWsQ0CxF0l/6bzQNO Kbog== X-Gm-Message-State: ALoCoQmB4eT0BpCJrLd/k42uuT/ui4QEyTSpuCEqPHiZVedGYJx7HbVmlt+JsNX1bsTF3BnpT3Qk X-Received: by 10.194.94.66 with SMTP id da2mr1259450wjb.7.1444858004828; Wed, 14 Oct 2015 14:26:44 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.25.148.143 with SMTP id w137ls78111lfd.105.gmail; Wed, 14 Oct 2015 14:26:44 -0700 (PDT) X-Received: by 10.112.161.168 with SMTP id xt8mr1735792lbb.88.1444858004685; Wed, 14 Oct 2015 14:26:44 -0700 (PDT) Received: from mail-lb0-f182.google.com (mail-lb0-f182.google.com. [209.85.217.182]) by mx.google.com with ESMTPS id d5si6869009lbi.126.2015.10.14.14.26.44 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 14 Oct 2015 14:26:44 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.182 as permitted sender) client-ip=209.85.217.182; Received: by lbwr8 with SMTP id r8so55635443lbw.2 for ; Wed, 14 Oct 2015 14:26:44 -0700 (PDT) X-Received: by 10.112.163.131 with SMTP id yi3mr2735397lbb.36.1444858004558; Wed, 14 Oct 2015 14:26:44 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.112.59.35 with SMTP id w3csp239218lbq; Wed, 14 Oct 2015 14:26:43 -0700 (PDT) X-Received: by 10.107.167.199 with SMTP id q190mr6079486ioe.87.1444857999991; Wed, 14 Oct 2015 14:26:39 -0700 (PDT) Received: from mail-ig0-f174.google.com (mail-ig0-f174.google.com. [209.85.213.174]) by mx.google.com with ESMTPS id o186si8975899ioe.63.2015.10.14.14.26.39 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 14 Oct 2015 14:26:39 -0700 (PDT) Received-SPF: pass (google.com: domain of al.stone@linaro.org designates 209.85.213.174 as permitted sender) client-ip=209.85.213.174; Received: by igbni9 with SMTP id ni9so1374892igb.1 for ; Wed, 14 Oct 2015 14:26:39 -0700 (PDT) X-Received: by 10.50.88.9 with SMTP id bc9mr7062541igb.31.1444857999683; Wed, 14 Oct 2015 14:26:39 -0700 (PDT) Received: from fidelio.ahs3.com (c-50-134-239-249.hsd1.co.comcast.net. [50.134.239.249]) by smtp.googlemail.com with ESMTPSA id d7sm4385194igl.1.2015.10.14.14.26.38 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 14 Oct 2015 14:26:38 -0700 (PDT) From: Al Stone To: linux-acpi@vger.kernel.org Cc: linaro-acpi@lists.linaro.org, linaro-kernel@lists.linaro.org, patches@linaro.org, Al Stone Subject: [PATCH 2/4] ACPI: workaround x86 firmware with mis-matched FADT/MADT revisions Date: Wed, 14 Oct 2015 15:26:23 -0600 Message-Id: <1444857985-28844-3-git-send-email-al.stone@linaro.org> X-Mailer: git-send-email 2.4.3 In-Reply-To: <1444857985-28844-1-git-send-email-al.stone@linaro.org> References: <1444857985-28844-1-git-send-email-al.stone@linaro.org> X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: al.stone@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.182 as permitted sender) smtp.mailfrom=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Looking across multiple versions of the ACPI specification, certain versions introduce new revision numbers for the FADT and/or MADT tables. So, for example, an FADT indicating it is revision 4 should not be paired with an MADT revision of anything less than 2. However, there are systems out there that do not update the revision fields in the FADT and MADT tables as they should. So, for arm64, we can be stricter in complying with the specification, but we need to relax the checking for legacy systems. Signed-off-by: Al Stone --- drivers/acpi/tables.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/drivers/acpi/tables.c b/drivers/acpi/tables.c index e5cfd72..3b5ddfb 100644 --- a/drivers/acpi/tables.c +++ b/drivers/acpi/tables.c @@ -407,9 +407,17 @@ static int __init bad_madt_entry(struct acpi_table_header *table, ms++; } if (!ms->num_types) { - pr_err("undefined version for either FADT %d.%d or MADT %d\n", - major, minor, madt->header.revision); - return 1; + if (IS_ENABLED(CONFIG_ARM64)) { + /* Enforce this stricture on arm64... */ + pr_err("undefined version for either FADT %d.%d or MADT %d\n", + major, minor, madt->header.revision); + return 1; + } else { + /* ... but relax it on legacy systems so they boot */ + pr_warn("undefined version for either FADT %d.%d or MADT %d\n", + major, minor, madt->header.revision); + return 0; + } } if (entry->type >= ms->num_types) {