Linux PCI subsystem development
 help / color / mirror / Atom feed
From: Yurii Monakov <monakov.y@gmail.com>
To: Bjorn Helgaas <helgaas@kernel.org>
Cc: linux-pci@vger.kernel.org, m-karicheri2@ti.com,
	Kishon Vijay Abraham I <kishon@ti.com>
Subject: Re: [PATCH] PCI: keystone: Fix outbound region mapping
Date: Tue, 17 Dec 2019 19:31:31 +0300	[thread overview]
Message-ID: <20191217193131.2dc1c53c@monakov-y.xu> (raw)
In-Reply-To: <20191217143113.GA157932@google.com>

On Tue, 17 Dec 2019 08:31:13 -0600, Bjorn Helgaas <helgaas@kernel.org> wrote:

> [+cc Kishon]
> 
> On Fri, Oct 04, 2019 at 06:48:11PM +0300, Yurii Monakov wrote:
> > PCIe window memory start address should be incremented by OB_WIN_SIZE
> > megabytes (8 MB) instead of plain OB_WIN_SIZE (8).
> > 
> > Signed-off-by: Yurii Monakov <monakov.y@gmail.com>  
> 
> I added:
> 
>   Fixes: e75043ad9792 ("PCI: keystone: Cleanup outbound window configuration")
>   Acked-by: Andrew Murray <andrew.murray@arm.com>
>   Cc: stable@vger.kernel.org      # v4.20+
> 
> and cc'd Kishon (author of  e75043ad9792) and put this on my
> pci/host-keystone branch for v5.6.  Lorenzo may pick this up when he
> returns.
> 
> I'd like the commit message to say what this fixes.  Currently it just
> restates the code change, which I can see from the diff.
This was my first patch sent to LKML, I'm sorry for inconvenience.
Should I take any actions to fix this?

> My *guess* is that previously, we could only access 8MB of MMIO space
> and this patch increases that to 8MB * num_viewport.
Technically you are right. It seems that without this patch all outbound
regions were mapped to first 8 MB. But this is obviously a bug, because
comment above the loop states that the intent was to map num_ob_windows
to linear MMIO space. And prior to e75043ad9792 'start' variable was
incremented by 'tr_size = (1 << 3) * SZ_1M'.

Best Regards,
Yurii Monakov

> > ---
> >  drivers/pci/controller/dwc/pci-keystone.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/drivers/pci/controller/dwc/pci-keystone.c b/drivers/pci/controller/dwc/pci-keystone.c
> > index af677254a072..f19de60ac991 100644
> > --- a/drivers/pci/controller/dwc/pci-keystone.c
> > +++ b/drivers/pci/controller/dwc/pci-keystone.c
> > @@ -422,7 +422,7 @@ static void ks_pcie_setup_rc_app_regs(struct keystone_pcie *ks_pcie)
> >  				   lower_32_bits(start) | OB_ENABLEN);
> >  		ks_pcie_app_writel(ks_pcie, OB_OFFSET_HI(i),
> >  				   upper_32_bits(start));
> > -		start += OB_WIN_SIZE;
> > +		start += OB_WIN_SIZE * SZ_1M;
> >  	}
> >  
> >  	val = ks_pcie_app_readl(ks_pcie, CMD_STATUS);
> > -- 
> > 2.17.1
> >   


  reply	other threads:[~2019-12-17 16:31 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-04 15:48 [PATCH] PCI: keystone: Fix outbound region mapping Yurii Monakov
2019-10-04 16:05 ` Andrew Murray
2019-10-04 16:37   ` Yurii Monakov
2019-12-16 12:03     ` Andrew Murray
2019-12-17 14:31 ` Bjorn Helgaas
2019-12-17 16:31   ` Yurii Monakov [this message]
2019-12-17 21:54     ` Bjorn Helgaas
2019-12-18 13:31       ` Yurii Monakov
2019-12-19 11:21         ` Kishon Vijay Abraham I
2020-01-10 17:33       ` Lorenzo Pieralisi
  -- strict thread matches above, loose matches on Subject: below --
2019-10-04 15:16 Yurii Monakov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191217193131.2dc1c53c@monakov-y.xu \
    --to=monakov.y@gmail.com \
    --cc=helgaas@kernel.org \
    --cc=kishon@ti.com \
    --cc=linux-pci@vger.kernel.org \
    --cc=m-karicheri2@ti.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox