From patchwork Wed Oct 14 21:26:22 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Al Stone X-Patchwork-Id: 54965 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wi0-f199.google.com (mail-wi0-f199.google.com [209.85.212.199]) by patches.linaro.org (Postfix) with ESMTPS id 145A523087 for ; Wed, 14 Oct 2015 21:26:41 +0000 (UTC) Received: by wicid10 with SMTP id id10sf762518wic.2 for ; Wed, 14 Oct 2015 14:26:40 -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=TWowBZ6gRaWL0knztTb1WBsbdFgnjr8vnSAM680HaMY=; b=QnAAz0Gv6KhF9wD95sgWv7OhFFEmQjlxPVgSCOGzzS/RRiXfTQ2Z1uAIo+PMfbdUOg hCnla0xvxf3JwCSyFeiA7Oiu55b/sNxh9eQX3tVigYnuIYkVEHrFr7+OtZfvVV+jD6Zk pMHhVJfHs/VnDdM3fL8Ej5tLArobA53NuQqLWnfDMCu8VnOd3OyA2F3uwLEur/vcaias U5qXht2nHnwgSzi4Hliz3gcR8ZOjiFmqNXZFLvRMZRyy0H+Bl/8+xKm3B/+upzHvrZuD Pl2HTIlKEdKNE174Tbb3S7EfOtCp+xdrGTy4e/Iye9biM2jcIMu+hounW2J+dvLxVIca ZxEQ== X-Gm-Message-State: ALoCoQl8fbw5siVWIhvVtyIbgu4XHn6QjAywXuCJCOPGcNCGne15C2mi2b0UyuWXqrsNp0BrvEqb X-Received: by 10.112.169.34 with SMTP id ab2mr1254702lbc.23.1444858000334; Wed, 14 Oct 2015 14:26:40 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.25.164.77 with SMTP id n74ls82858lfe.94.gmail; Wed, 14 Oct 2015 14:26:40 -0700 (PDT) X-Received: by 10.25.20.97 with SMTP id k94mr1784237lfi.27.1444858000075; Wed, 14 Oct 2015 14:26:40 -0700 (PDT) Received: from mail-lf0-f54.google.com (mail-lf0-f54.google.com. [209.85.215.54]) by mx.google.com with ESMTPS id f72si6894223lff.48.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 patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.54 as permitted sender) client-ip=209.85.215.54; Received: by lfaz124 with SMTP id z124so18898890lfa.1 for ; Wed, 14 Oct 2015 14:26:39 -0700 (PDT) X-Received: by 10.25.82.10 with SMTP id g10mr1849508lfb.56.1444857999778; Wed, 14 Oct 2015 14:26:39 -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 w3csp239188lbq; Wed, 14 Oct 2015 14:26:38 -0700 (PDT) X-Received: by 10.50.142.1 with SMTP id rs1mr6774403igb.17.1444857998725; Wed, 14 Oct 2015 14:26:38 -0700 (PDT) Received: from mail-ig0-f177.google.com (mail-ig0-f177.google.com. [209.85.213.177]) by mx.google.com with ESMTPS id b5si8928225igx.100.2015.10.14.14.26.38 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 14 Oct 2015 14:26:38 -0700 (PDT) Received-SPF: pass (google.com: domain of al.stone@linaro.org designates 209.85.213.177 as permitted sender) client-ip=209.85.213.177; Received: by igsu6 with SMTP id u6so27048175igs.1 for ; Wed, 14 Oct 2015 14:26:38 -0700 (PDT) X-Received: by 10.50.79.232 with SMTP id m8mr6742057igx.79.1444857998401; Wed, 14 Oct 2015 14:26:38 -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.36 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 14 Oct 2015 14:26:37 -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 1/4] ACPI: workaround x86 firmware using reserved MADT subtable IDs Date: Wed, 14 Oct 2015 15:26:22 -0600 Message-Id: <1444857985-28844-2-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.215.54 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: , According to the ACPI specification, version 6.0, table 5-46, MADT subtable IDs in the range of 0x10-0x7f are reserved for possible future use by the specification. The function bad_madt_entry() tries to enforce the spec, but it turns out there are x86 machines that use 0x7f even though they should not. So, continue to enforce this rule for arm64, since we're starting out fresh, but relax it for systems already out there so we don't keep them from booting. 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 a2ed38a..e5cfd72 100644 --- a/drivers/acpi/tables.c +++ b/drivers/acpi/tables.c @@ -413,9 +413,17 @@ static int __init bad_madt_entry(struct acpi_table_header *table, } if (entry->type >= ms->num_types) { - pr_err("undefined MADT subtable type for FADT %d.%d: %d (length %d)\n", - major, minor, entry->type, entry->length); - return 1; + if (IS_ENABLED(CONFIG_ARM64)) { + /* Enforce this stricture on arm64... */ + pr_err("undefined MADT subtable type for FADT %d.%d: %d (length %d)\n", + major, minor, entry->type, entry->length); + return 1; + } else { + /* ... but relax it on legacy systems so they boot */ + pr_warn("undefined MADT subtable type for FADT %d.%d: %d (length %d)\n", + major, minor, entry->type, entry->length); + return 0; + } } /* verify that the table is allowed for this version of the spec */