Received: by 10.213.65.68 with SMTP id h4csp781651imn; Wed, 28 Mar 2018 12:38:35 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+YaTuz4vCNXsL0R36WS+cPgh2ZXqTmH8TQwta4qUddFYoikoQHbrAZXNGvlqt3USLBwHwK X-Received: by 2002:a17:902:2983:: with SMTP id h3-v6mr5096150plb.346.1522265915023; Wed, 28 Mar 2018 12:38:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522265914; cv=none; d=google.com; s=arc-20160816; b=TLp4NOaYO1Of7ImA9JTfWNGQVEFuQeiu9KTnQ/yDiekJW0pXOWAdphxh3MJGHKycUS CtsFt7TgOq4xqY7TmISP23ELmu/VG1nB3pU3c3Jszs+8NbuSzRrTABECGCEFozlY9P0Y gUNYy4Ytip/6sDyjQv85+A8qCIU6dXmdhn+0GkWQAEt4yvR0V4aH5aphFjRfyf0mK4PB Dj3nSFcTeRJxjjDO3lm1dOuNVXaWg+QqqzgH6SgnrQaSQPeTizH1bhxaLpN/kCs9OH2+ KMjIMbJgk7vtjq1VeB0zTBbqVlNAd5AQ0dmpdUG5+ITtziD4WFWgkjLEy6xBDHf5l3u6 XzLw== 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:dmarc-filter:arc-authentication-results; bh=hQPmUZ6AS9mT/FGCQ1O4aagCDLcyNjD4GUpTy4XVGeM=; b=HESsx8tgCh+YlSd/1OvpRkEdl5h0ayT8sYnYmLHcyJZ6VyAnjgIbaOdeGx+W+gWUeW RgIbVE5Id588IirUVenQuA02KxZG7L7tqPx+68EaxnmaicSegQsJxyP3dNGza/iyi2f/ QVTijKrW7vFge+LdIkPHeUM2xzyQBVWvgaOMe9oQ7aiU1z+n0r9ba0NLYYoMNXznoihJ b8P3Q9r0LDRNDXbX0IAo5M/xdarBL+5rx5Ndusng/LT6IeT82JXIwAylX5UmQbRaT8y2 fqOKBHfNsmS95ssyIVQz74Mn31qW98Y41jSX6xpp8J6ql+2J6K6njbW3Tb896oH87xN+ A+sA== 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 h22si3106922pfi.245.2018.03.28.12.38.20; Wed, 28 Mar 2018 12:38:34 -0700 (PDT) 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 S1753047AbeC1ThV (ORCPT + 99 others); Wed, 28 Mar 2018 15:37:21 -0400 Received: from mail.kernel.org ([198.145.29.99]:60120 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752416AbeC1ThT (ORCPT ); Wed, 28 Mar 2018 15:37:19 -0400 Received: from localhost (173-24-247-212.client.mchsi.com [173.24.247.212]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 4034F21773; Wed, 28 Mar 2018 19:37:19 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4034F21773 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=helgaas@kernel.org Date: Wed, 28 Mar 2018 14:37:17 -0500 From: Bjorn Helgaas To: Alan Douglas Cc: Niklas Cassel , "kishon@ti.com" , "cyrille.pitchen@free-electrons.com" , Bjorn Helgaas , Niklas Cassel , "linux-pci@vger.kernel.org" , "linux-kernel@vger.kernel.org" , Lorenzo Pieralisi Subject: Re: [PATCH v5 07/12] PCI: cadence: Set PCI_BASE_ADDRESS_MEM_TYPE_64 if a 64-bit BAR was set-up Message-ID: <20180328193717.GA97213@bhelgaas-glaptop.roam.corp.google.com> References: <20180328115018.31921-1-niklas.cassel@axis.com> <20180328115018.31921-8-niklas.cassel@axis.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.2 (2017-12-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org [+cc Lorenzo] On Wed, Mar 28, 2018 at 01:24:10PM +0000, Alan Douglas wrote: > > On 28/03/2018 12:51, Niklas Cassel wrote: > > cdns_pcie_ep_set_bar() does some round-up of the BAR size, which means that a 64-bit BAR can be set-up, even when the flag > > PCI_BASE_ADDRESS_MEM_TYPE_64 isn't set. > > > If a 64-bit BAR was set-up, set the flag PCI_BASE_ADDRESS_MEM_TYPE_64, so that the calling function can know what BAR width that was actually set-up. > > > I'm not sure why cdns_pcie_ep_set_bar() doesn't obey the flag PCI_BASE_ADDRESS_MEM_TYPE_64, but I leave this for the MAINTAINER to fix, since there might be a reason why > this flag is ignored. > Will investigate and fix this in future patch > > > Signed-off-by: Niklas Cassel > > --- > > drivers/pci/cadence/pcie-cadence-ep.c | 3 +++ > > 1 file changed, 3 insertions(+) > > > > diff --git a/drivers/pci/cadence/pcie-cadence-ep.c b/drivers/pci/cadence/pcie-cadence-ep.c > > index cef36cd6b710..2905e098678c 100644 > > --- a/drivers/pci/cadence/pcie-cadence-ep.c > > +++ b/drivers/pci/cadence/pcie-cadence-ep.c > > @@ -106,6 +106,9 @@ static int cdns_pcie_ep_set_bar(struct pci_epc *epc, u8 fn, > > if (is_64bits && (bar & 1)) > > return -EINVAL; > > > > + if (is_64bits && !(flags & PCI_BASE_ADDRESS_MEM_TYPE_64)) > > + epf_bar->flags |= PCI_BASE_ADDRESS_MEM_TYPE_64; > > + > > if (is_64bits && is_prefetch) > > ctrl = CDNS_PCIE_LM_BAR_CFG_CTRL_PREFETCH_MEM_64BITS; > > else if (is_prefetch) > > -- > > 2.14.2 > Change looks good to me. It will be helpful to Lorenzo if you spell this out, e.g., Acked-by: Alan Douglas Also, it looks like we need a MAINTAINERS update to add drivers/pci/cadence/ to the "PCI NATIVE HOST BRIDGE AND ENDPOINT DRIVERS" filename patterns.