From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_GIT autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 71320C47253 for ; Fri, 1 May 2020 16:10:26 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 50FB8216FD for ; Fri, 1 May 2020 16:10:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1588349426; bh=WdDDo0kFFFObg+/uRnNWj+161scQaRmsJMatdV7pV5U=; h=From:To:Cc:Subject:Date:List-ID:From; b=jAocGH1U0gyUr68JR/UKl+8kBUKQN8T19fLO576H8cLxZ6kpPTMHWj5xzfd173CX1 UYxDRB7RmXoE2Eui1kbP4Hadg+HThoqDHom+i5QmgylJJdie7QjWGzzGDSI8OTrths ip04FUhdeeuME+hCyuRyzH3JWS9wCsHyk7IODJZs= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729950AbgEAQKZ (ORCPT ); Fri, 1 May 2020 12:10:25 -0400 Received: from mail.kernel.org ([198.145.29.99]:33228 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728495AbgEAQKZ (ORCPT ); Fri, 1 May 2020 12:10:25 -0400 Received: from e123331-lin.home (amontpellier-657-1-18-247.w109-210.abo.wanadoo.fr [109.210.65.247]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 3DA7B208DB; Fri, 1 May 2020 16:10:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1588349425; bh=WdDDo0kFFFObg+/uRnNWj+161scQaRmsJMatdV7pV5U=; h=From:To:Cc:Subject:Date:From; b=MA3fRVpgbAwk4MbkZocX2oK8yNI5ti+nmUYRwldUlDMHT8FS7vzyfXKBySKSJw6Sv j2ONn/PcdhgJQky4VdZfA4hNPog25MFejK61c769W9psABCI0DJ6M02r6MCTWDuTep mJd1gZUoZpGNGP3YejCeuN7NBeptjthM0XnXMM7c= From: Ard Biesheuvel To: linux-arm-kernel@lists.infradead.org Cc: linux-acpi@vger.kernel.org, Ard Biesheuvel , Hanjun Guo , Lorenzo Pieralisi , Pankaj Bansal , Will Deacon , Sudeep Holla , Catalin Marinas , Robin Murphy Subject: [PATCH v2 0/2] ACPI/IORT: rework num_ids off-by-one quirk Date: Fri, 1 May 2020 18:10:12 +0200 Message-Id: <20200501161014.5935-1-ardb@kernel.org> X-Mailer: git-send-email 2.17.1 Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org Replace the ACPI OEM ID matching based IORT quirk for the ID region size ambiguity with runtime handling of this condition. This is based on the observation that we only care about this when it causes ambiguity regarding the output reference, which means that we will have more than one match for the input ID. In this case, we can just disregard the one at the end of a multi-ID region: if we hit it first, we record it tentatively but allow a subsequent match to supersede it. If we hit the correct match first, there is nothing we need to do. Changes since v1: - print FW_BUG error to the kernel log when a duplicate match is found - ignore duplicate matches unless they occur at the start of a region (for compatibility with broken systems that might exist that happen to work today because the first match is always chosen) Cc: Hanjun Guo Cc: Lorenzo Pieralisi Cc: Pankaj Bansal Cc: Will Deacon Cc: Sudeep Holla Cc: Catalin Marinas Cc: Robin Murphy Ard Biesheuvel (2): Revert "ACPI/IORT: Fix 'Number of IDs' handling in iort_id_map()" ACPI/IORT: work around num_ids ambiguity drivers/acpi/arm64/iort.c | 95 ++++++++------------ 1 file changed, 35 insertions(+), 60 deletions(-) -- 2.17.1 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.0 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id EF06DC4724C for ; Fri, 1 May 2020 16:10:38 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 9E234208DB for ; Fri, 1 May 2020 16:10:38 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="AOH7RQ4g"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="MA3fRVpg" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9E234208DB Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Owner; bh=18GsUzlCIHq/rB5UOwqD+X8Peu3eWxN+J9YkNazGn/c=; b=AOH 7RQ4giPglCERwm7psfKk9k47K8IKNxV7AJ6kALYJpxhibkZT06bcJUBxj5Zkty1pWyoZS3Ho9hSKz OteIRo3H/UUTvptc8373XQoEcehLlh3JhG8ahqNNod4ySG1uSjpN6/0kefZXe6AbyfIjH51jzV7s/ 1Gt0on5nv9p6ZZg7pSI0nF37zpxo2fLsW1v1KTUWLBYIiATkwem5LNhZSWGl8R7JrNu3IQdPnE+OO 37mDRPU1g5x6msE0WjMNV7h39Iu/wDcl1/nSphq4BlhKcLOSnacWObU0oDQmVywwlR5Pifqrp1+AS lAc03lMaOMirO3HfYlD0qDs2dFRLF7A==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jUYFG-0006jb-Cc; Fri, 01 May 2020 16:10:34 +0000 Received: from mail.kernel.org ([198.145.29.99]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jUYF9-0006ap-Q8 for linux-arm-kernel@lists.infradead.org; Fri, 01 May 2020 16:10:29 +0000 Received: from e123331-lin.home (amontpellier-657-1-18-247.w109-210.abo.wanadoo.fr [109.210.65.247]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 3DA7B208DB; Fri, 1 May 2020 16:10:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1588349425; bh=WdDDo0kFFFObg+/uRnNWj+161scQaRmsJMatdV7pV5U=; h=From:To:Cc:Subject:Date:From; b=MA3fRVpgbAwk4MbkZocX2oK8yNI5ti+nmUYRwldUlDMHT8FS7vzyfXKBySKSJw6Sv j2ONn/PcdhgJQky4VdZfA4hNPog25MFejK61c769W9psABCI0DJ6M02r6MCTWDuTep mJd1gZUoZpGNGP3YejCeuN7NBeptjthM0XnXMM7c= From: Ard Biesheuvel To: linux-arm-kernel@lists.infradead.org Subject: [PATCH v2 0/2] ACPI/IORT: rework num_ids off-by-one quirk Date: Fri, 1 May 2020 18:10:12 +0200 Message-Id: <20200501161014.5935-1-ardb@kernel.org> X-Mailer: git-send-email 2.17.1 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200501_091027_877595_2E6FF575 X-CRM114-Status: GOOD ( 11.02 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Lorenzo Pieralisi , Catalin Marinas , Pankaj Bansal , Sudeep Holla , Robin Murphy , linux-acpi@vger.kernel.org, Hanjun Guo , Will Deacon , Ard Biesheuvel MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org Replace the ACPI OEM ID matching based IORT quirk for the ID region size ambiguity with runtime handling of this condition. This is based on the observation that we only care about this when it causes ambiguity regarding the output reference, which means that we will have more than one match for the input ID. In this case, we can just disregard the one at the end of a multi-ID region: if we hit it first, we record it tentatively but allow a subsequent match to supersede it. If we hit the correct match first, there is nothing we need to do. Changes since v1: - print FW_BUG error to the kernel log when a duplicate match is found - ignore duplicate matches unless they occur at the start of a region (for compatibility with broken systems that might exist that happen to work today because the first match is always chosen) Cc: Hanjun Guo Cc: Lorenzo Pieralisi Cc: Pankaj Bansal Cc: Will Deacon Cc: Sudeep Holla Cc: Catalin Marinas Cc: Robin Murphy Ard Biesheuvel (2): Revert "ACPI/IORT: Fix 'Number of IDs' handling in iort_id_map()" ACPI/IORT: work around num_ids ambiguity drivers/acpi/arm64/iort.c | 95 ++++++++------------ 1 file changed, 35 insertions(+), 60 deletions(-) -- 2.17.1 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel