Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp4196585imj; Tue, 12 Feb 2019 11:26:56 -0800 (PST) X-Google-Smtp-Source: AHgI3IannqeEolWuls3Z1+7xvX8O6Y3GaZsYEN9AkbwOV/dHv+9uUwviBBiZ4XOBm8Hw0hPRYsD/ X-Received: by 2002:a17:902:33c2:: with SMTP id b60mr5493338plc.211.1549999616219; Tue, 12 Feb 2019 11:26:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549999616; cv=none; d=google.com; s=arc-20160816; b=ZOpVfcbY1g1yTJphRPM2XE4Eb14DEr7fj7nNPfjnj5MEjcQR+D8OBFvdFmoQHYQCv1 URL3M0EzSZL6vlkVXJv51oL/9WS2bYF6q2DiOoip3dXLSAH22vTbja0TPSu5B0+r6ib5 kgIsKpACZk4AAIpd2IBsjiqPS0gaOecs3hnmIEoRcbhvB7I9ulCSmxEsVs5aQABFOksr 0lynfGjrC8JwVtrHLzBH9USKPmJr6TJiVgE0WSQYYl2fLkH8VZbNjc+k1B+YXiVF83zy L7z0aQgRFJbmlT0VnLh71U776J7Fv/q1xsATZb8W2KiHbBZQEPjMxUFujnDKsY4kQBKN hMIQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=J1qSboh/4dakzf0OHGCDuKog4OGFNTDKviaMmfz47Fo=; b=yZYt7h70DrV0feiTs5cDjCGAkHUhOCnKN9har7yIEnNCUkB5XYfLqpJnWugAjEzo5L meZJC4y/yj/FeQHLq2KMF7E13Y8PeO7ixKEmqbYmZkFgSdVvfDW0Mlw4SU/PUAWVs+Gt Rv3vK/nFu2DsdyABJfZ1V6/gFE0fSFVG27FIfL1h55OiPiE3XAIYctPL0jlOGntjalfM YrPOcIjryFwQmVH+H1P0JXl4wL+gHcN4EVthW9y3e3U6jms9FpdN/V134n1BWC44nYtl /SsWSjRYATRzxfZNtUWHAlQ4c2TFjEDDkRPvW5tly8BenYGzJRKAetwlT0isU2b+1+S0 puhQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u12si1462573pgh.450.2019.02.12.11.26.39; Tue, 12 Feb 2019 11:26:56 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731863AbfBLShp (ORCPT + 99 others); Tue, 12 Feb 2019 13:37:45 -0500 Received: from foss.arm.com ([217.140.101.70]:41984 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727469AbfBLSho (ORCPT ); Tue, 12 Feb 2019 13:37:44 -0500 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 4A345A78; Tue, 12 Feb 2019 10:37:44 -0800 (PST) Received: from e107981-ln.cambridge.arm.com (e107981-ln.cambridge.arm.com [10.1.197.40]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 7CB8F3F575; Tue, 12 Feb 2019 10:37:42 -0800 (PST) Date: Tue, 12 Feb 2019 18:37:39 +0000 From: Lorenzo Pieralisi To: Srinath Mannam Cc: Bjorn Helgaas , Ray Jui , Scott Branden , bcm-kernel-feedback-list@broadcom.com, linux-pci@vger.kernel.org, iommu@lists.linux-foundation.org, linux-kernel@vger.kernel.org, Abhishek Shah , Ray Jui Subject: Re: [PATCH v2 2/2] PCI: iproc: Add PCIe 32bit outbound memory configuration Message-ID: <20190212183739.GB918@e107981-ln.cambridge.arm.com> References: <1549342622-9929-1-git-send-email-srinath.mannam@broadcom.com> <1549342622-9929-3-git-send-email-srinath.mannam@broadcom.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1549342622-9929-3-git-send-email-srinath.mannam@broadcom.com> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Feb 05, 2019 at 10:27:01AM +0530, Srinath Mannam wrote: > Add configuration to support IPROC PCIe host controller outbound memory > window mapping with SOC address range inside 4GB boundary, which is 32 bit > AXI address. I do not understand what this means, explain it to me and rewrite the commit log accordingly. What does this solve ? Why do we need this patch or rephrased, what is missing in the current driver ? > Signed-off-by: Srinath Mannam > Signed-off-by: Abhishek Shah > Signed-off-by: Ray Jui > Reviewed-by: Scott Branden > Reviewed-by: Vikram Prakash Review tags should be given on public mailing lists, these ones seem to come from non-public review cycles in which case you must drop them. > drivers/pci/controller/pcie-iproc.c | 21 +++++++++++++++++++-- > 1 file changed, 19 insertions(+), 2 deletions(-) > > diff --git a/drivers/pci/controller/pcie-iproc.c b/drivers/pci/controller/pcie-iproc.c > index b882255..080f142 100644 > --- a/drivers/pci/controller/pcie-iproc.c > +++ b/drivers/pci/controller/pcie-iproc.c > @@ -955,8 +955,25 @@ static int iproc_pcie_setup_ob(struct iproc_pcie *pcie, u64 axi_addr, > resource_size_t window_size = > ob_map->window_sizes[size_idx] * SZ_1M; > > - if (size < window_size) > - continue; > + /* > + * Keep iterating until we reach the last window and > + * with the minimal window size at index zero. In this > + * case, we take a compromise by mapping it using the > + * minimum window size that can be supported See above, I do not understand clearly what this means. Lorenzo > + */ > + if (size < window_size) { > + if (size_idx > 0 || window_idx > 0) > + continue; > + > + /* > + * For the corner case of reaching the minimal > + * window size that can be supported on the > + * last window > + */ > + axi_addr = ALIGN_DOWN(axi_addr, window_size); > + pci_addr = ALIGN_DOWN(pci_addr, window_size); > + size = window_size; > + } > > if (!IS_ALIGNED(axi_addr, window_size) || > !IS_ALIGNED(pci_addr, window_size)) { > -- > 2.7.4 >