Received: by 2002:a05:6358:7058:b0:131:369:b2a3 with SMTP id 24csp5400272rwp; Mon, 17 Jul 2023 03:35:27 -0700 (PDT) X-Google-Smtp-Source: APBJJlEB39AoYw/fVl8XqHYlhn6NXhTCL7zp3rcc1V1/0EQxJmmTwmp8b3BCBEqIOzP/kTky3ojo X-Received: by 2002:a17:906:bcd2:b0:96b:e93:3aa8 with SMTP id lw18-20020a170906bcd200b0096b0e933aa8mr11414152ejb.21.1689590126391; Mon, 17 Jul 2023 03:35:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689590126; cv=none; d=google.com; s=arc-20160816; b=QMzJaOVZ/h/p8UhvCLZVDSiDtAw2skEjsf0VKq6288n65V1DiyEd83etyPARO8Nov6 +QC7VUYdTDGA2fmA5FEEVa8ZGBJhs0A4vrvvqmKr/gf5oAsWvyzkEiZkYxPlkx90V73H fpTThZ2zwzT7Cs/apFcfcS4RidNt0jcetle2QRaLmUuSpdabdmRpqAdtPj25jrAogFxK ojzwlfY0jzhQViC1+103C2yy05erW73hc9RO1xB9IjUXd1ykIa6HOoDohvKcP79suVB3 1TwSt4bU0pXBvTSj1tuGkWXtsScF1ronw0aGh+ovRyHF3zvc/368hWjWKP2XjT4+Yb7X PTvg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=Ll/mtv+6AHcUMeEMdO7PccO+prH01aqXOEm8FcgpuZo=; fh=sxbu35vTAgHRaKZLaMgALOjJtCKAHNtx39KGvoGwNMM=; b=rFSktlpMCA+0AsZU3ZIHlTW8raddIZvjHVH7CG9zNUtt6YzuXxe7+o9UHuGFzBqu0T GYFrxiTKdPKqNg4x7+ZTchAs/0/Y5MuIE2kgWMVLNr5xoV4nnjz1boBejtLbdTBgSoIW NymhwHE4KdslF5364icoEsbuQCgHDn1QKiCjirV53GkEydTj7ZVrre+EXbonXv2bdWtB r5LKuZCXa9QQCRcLqP4GDDWQaf6pSBmINHFSpwXvPb+3cpfaiRPpU07duX4c1GKBEumV /fBlSdGF7cDQVMVar1Bum18wpwcCIpMUFXGx64Oqg2UbhE97eX18Lwd5uSUmpCtaZg8z 9/KA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id v25-20020a170906489900b00992e21b04aasi11790567ejq.720.2023.07.17.03.34.52; Mon, 17 Jul 2023 03:35:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230367AbjGQKTQ (ORCPT + 99 others); Mon, 17 Jul 2023 06:19:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36266 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230336AbjGQKTO (ORCPT ); Mon, 17 Jul 2023 06:19:14 -0400 Received: from out30-111.freemail.mail.aliyun.com (out30-111.freemail.mail.aliyun.com [115.124.30.111]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 638C01BE; Mon, 17 Jul 2023 03:19:09 -0700 (PDT) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R581e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018046049;MF=guanghuifeng@linux.alibaba.com;NM=1;PH=DS;RN=9;SR=0;TI=SMTPD_---0VnaoQQL_1689589138; Received: from VM20190228-102.tbsite.net(mailfrom:guanghuifeng@linux.alibaba.com fp:SMTPD_---0VnaoQQL_1689589138) by smtp.aliyun-inc.com; Mon, 17 Jul 2023 18:19:05 +0800 From: Guanghui Feng To: lpieralisi@kernel.org, guohanjun@huawei.com, sudeep.holla@arm.com, rafael@kernel.org Cc: linux-acpi@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, baolin.wang@linux.alibaba.com, alikernel-developer@linux.alibaba.com Subject: [PATCH v1] ACPI/IORT: fix IORT Reserved Memory Range node mapping error Date: Mon, 17 Jul 2023 18:18:58 +0800 Message-Id: <1689589138-58042-1-git-send-email-guanghuifeng@linux.alibaba.com> X-Mailer: git-send-email 1.8.3.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-9.9 required=5.0 tests=BAYES_00, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE,UNPARSEABLE_RELAY,USER_IN_DEF_SPF_WL autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org In the ARM IORT specifications DEN 0049E.d, the recommended ID mapping format: Field Note Description -------------------------------- Input base The lowest value in the input range Number of IDs The number of IDs in the range "minus" one When there is only one id mapping in the Reserved Memory Range (RMR) node, the node filed: "Number of IDs" is zero and iort_node_get_rmr_info will not analyse id mapping. This is not in compliance with the regulations. Signed-off-by: Guanghui Feng --- drivers/acpi/arm64/iort.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/acpi/arm64/iort.c b/drivers/acpi/arm64/iort.c index 3631230..56d8873 100644 --- a/drivers/acpi/arm64/iort.c +++ b/drivers/acpi/arm64/iort.c @@ -1007,9 +1007,6 @@ static void iort_node_get_rmr_info(struct acpi_iort_node *node, for (i = 0; i < node->mapping_count; i++, map++) { struct acpi_iort_node *parent; - if (!map->id_count) - continue; - parent = ACPI_ADD_PTR(struct acpi_iort_node, iort_table, map->output_reference); if (parent != iommu) -- 1.8.3.1