Received: by 2002:a05:7412:a9a2:b0:e2:908c:2ebd with SMTP id o34csp456024rdh; Thu, 26 Oct 2023 06:59:23 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHlH3qX890S/oKcgLUd1MbMj0KGqXJJtRoQHKBUeI/ikyBP4P1Q1ZAiE4oZNJsASIN6HrIF X-Received: by 2002:a0d:cc4d:0:b0:5a7:d4c2:d59e with SMTP id o74-20020a0dcc4d000000b005a7d4c2d59emr21546611ywd.22.1698328763001; Thu, 26 Oct 2023 06:59:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698328762; cv=none; d=google.com; s=arc-20160816; b=DfS4//hd3KF9xUT8UDhwZf7unLgj9h6KoelIIfUAn9EBSceT6oX7gV+Zm6h4+nooou yi2Q+IDvvxP6JPgjCrbXKg8fcJe+cCJYLnc+OikdQpi0j8JkaTHSBys5bgR0vhdYXNro bsB6YuD9GRjsmk3spwAskN6bDLOrpizkNFuM3UB0Ot1OXccsIZZWHrfAKN081Ilenzlr t+pXl2MXKq0B7OTXu50gJyvJVgd7j2f9neh34qxNzSgFA8Mc3MXLagMv+MiQ7XK6+Pcu yameKxjkyzWz5EYcsfxv38fLowiTshFY6ygLdmd2gjryDxneH8xbDKEMe7Ss9EUgRVXO JZtA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=BN+qtvPSspseGb/uUMPDqoZhAWMErSRG57vJlzJzwzg=; fh=CcVuT31nJ38jr2RcWFIOn1V/87FYnY/fTtqjxO47ge4=; b=XZhVbKvm1X+AJvWZeNm0mUyZL7Jq7iBLaB1xLkxbAPrbJVoQA1SPXwpwq4TD4s7Qn8 cRLvKEwvEfqkFxifvjKCQyFinVSFv22+863qg4YlbhaKR39htmT8mq1iOCf+rZlTXFqg 78kkog3AbBekwQMuihQ/uJlUMn/HWMbS81rMrzEBlNei2Hyv/fhTGIJtFXKJfKlqBfdP Q+QElYPn7/AsxqXjnv3mPf/ToPymEA4jP6H2Sj0V65fGbGBsbjvnbZh0qwJvwoSod2Zv k7V1C2M92NPm4EyRK+ldrGLI7yWzKAZjiEi7NJHx4H7DnOVV2Wkq3hDe6wByCPwLaQ+B EBng== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from fry.vger.email (fry.vger.email. [2620:137:e000::3:8]) by mx.google.com with ESMTPS id w187-20020a817bc4000000b0059f7f367a71si14843501ywc.148.2023.10.26.06.59.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 26 Oct 2023 06:59:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) client-ip=2620:137:e000::3:8; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id ECB74837E986; Thu, 26 Oct 2023 06:59:18 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235027AbjJZN7C (ORCPT + 99 others); Thu, 26 Oct 2023 09:59:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55448 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235015AbjJZN7B (ORCPT ); Thu, 26 Oct 2023 09:59:01 -0400 Received: from mail-ot1-f50.google.com (mail-ot1-f50.google.com [209.85.210.50]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D33B11BD; Thu, 26 Oct 2023 06:58:58 -0700 (PDT) Received: by mail-ot1-f50.google.com with SMTP id 46e09a7af769-6ce37d0f1a9so559583a34.0; Thu, 26 Oct 2023 06:58:58 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698328738; x=1698933538; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=BN+qtvPSspseGb/uUMPDqoZhAWMErSRG57vJlzJzwzg=; b=S9HsYFi7h+ZLNIKQ/eNQbvrcI54Bh+ZMleswTWAGdbmQvKbXlc98QMvnTWLPwiumxp 2CcVCureP2oAWTH3z0M6tA83FdDniXEfZtBhJLR2SnCluMR3ookj4VrDwFnEbNvbyTJC WhmHwb5Yk89X+MKjEV0HOpm6B/zN/1s/h8mfEzOenbXmBAa3YY73L1d4M4CgfhiTinf1 dHgKEezNmcglnQGOlvK6NAJLtVj6SLTSAskYhydsEs509cBq/h9EwF0LJOCuUsUyYf4y BcKETX4Z3WBZ7V1eCwWTKYEWEFymrOF/Ag6G2LC3/GZXv/JiFkEHZm2uWrPYSpjNoZk6 2YKQ== X-Gm-Message-State: AOJu0YxX4uZAtzA9jp+AX6i4YJLHK2QBwm5r/K/bUkz+Q8EXUH3RFSEK AOTThrZhQKe9gDycUIbLlg== X-Received: by 2002:a9d:7ac6:0:b0:6bb:1071:ea72 with SMTP id m6-20020a9d7ac6000000b006bb1071ea72mr18729961otn.36.1698328738112; Thu, 26 Oct 2023 06:58:58 -0700 (PDT) Received: from herring.priv (66-90-144-107.dyn.grandenetworks.net. [66.90.144.107]) by smtp.gmail.com with ESMTPSA id l18-20020a056830269200b006b8e8884f2fsm2652604otu.51.2023.10.26.06.58.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 26 Oct 2023 06:58:57 -0700 (PDT) Received: (nullmailer pid 3570816 invoked by uid 1000); Thu, 26 Oct 2023 13:58:56 -0000 Date: Thu, 26 Oct 2023 08:58:56 -0500 From: Rob Herring To: Herve Codina Cc: Frank Rowand , Lizhi Hou , Max Zhen , Sonal Santan , Stefano Stabellini , Jonathan Cameron , Bjorn Helgaas , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Allan Nielsen , Horatiu Vultur , Steen Hegelund , Thomas Petazzoni Subject: Re: [PATCH v2 0/3] Fix DT based address translations Message-ID: <20231026135856.GA3567352-robh@kernel.org> References: <20231017110221.189299-1-herve.codina@bootlin.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20231017110221.189299-1-herve.codina@bootlin.com> X-Spam-Status: No, score=-1.0 required=5.0 tests=MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (fry.vger.email [0.0.0.0]); Thu, 26 Oct 2023 06:59:19 -0700 (PDT) On Tue, Oct 17, 2023 at 01:02:15PM +0200, Herve Codina wrote: > Hi, > > This patch series fixes a DT based address translation (translations > using the ranges property). > > The issue is present with a ranges property made of a 3 cells child > address, a 3 cells parent address and a 2 cells child size. > This can happen with the recent addition of of_pci_prop_ranges() in > commit 407d1a51921e ("PCI: Create device tree node for bridge") > > The issue description is fully described in the first patch commit log. > > In this series, > - The first patch fixes the issue. > - The second patch avoids duplicated code. > - The third patch adds unit tests related address translations. > > I previously sent the first patch alone: > https://lore.kernel.org/linux-kernel/20231003065236.121987-1-herve.codina@bootlin.com/ > This series v2 has to be considered as the next iteration based on the > review done on my previous patch sent alone. > > Best regards, > Herv? > > Changes v1 -> v2 > > - Patch 1 > Simplify of_bus_default_flags_map(). > Fix the commit log (pci-ep-bus ranges[0] size is 0x200_0000 instead > of 0x2000_0000). > > - Patch 2 (new in v2) > Remove duplicated code. > > - Patch 3 (new in v2) > Add unit tests. > > Herve Codina (3): > of: address: Fix address translation when address-size is greater than > 2 > of: address: Remove duplicated functions > of: unittest: Add tests for address translations > > drivers/of/address.c | 43 ++++++--- > drivers/of/unittest-data/tests-address.dtsi | 101 ++++++++++++++++++++ > drivers/of/unittest.c | 74 ++++++++++++++ > 3 files changed, 205 insertions(+), 13 deletions(-) I've applied this. I sent out this series[1] of clean-ups to apply on top. Rob [1] https://lore.kernel.org/all/20231026135358.3564307-2-robh@kernel.org/