From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Alexey Kardashevskiy <aik@ozlabs.ru>
Cc: linuxppc-dev@lists.ozlabs.org,
Alistair Popple <alistair@popple.id.au>,
Russell Currey <ruscur@russell.cc>
Subject: Re: [PATCH kernel 2/2] powerpc/powernv: Define PHB4 type and enable sketchy bypass on POWER9
Date: Mon, 18 Jun 2018 14:44:56 +1000 [thread overview]
Message-ID: <82ebaedf4279dce05a7cd6bdb0d9b84bdf232a02.camel@kernel.crashing.org> (raw)
In-Reply-To: <20180618121307.199cd998@aik.ozlabs.ibm.com>
On Mon, 2018-06-18 at 12:13 +1000, Alexey Kardashevskiy wrote:
> On Sat, 16 Jun 2018 11:05:19 +1000
> Benjamin Herrenschmidt <benh@kernel.crashing.org> wrote:
>
> > On Fri, 2018-06-01 at 18:10 +1000, Alexey Kardashevskiy wrote:
> > > These are found in POWER9 chips. Right now these PHBs have unknown type
> > > so changing it to PHB4 won't make much of a difference except enabling
> > > sketchy bypass for POWER9 as this does below.
> >
> > And that will break on multi-chip systems since P9 doesn't have the
> > memory contiguous (it has the chip ID in the top bits).
>
>
> This did not break mine and it is hard to see why it would break at all
> if we use 1G pages and the maximum we need to cover is 48 bits (this
> is what we are trying to support here - all these gpus, right?), or is
> it more now? If so, I have posted v2 of tce multilevel dynamic
> allocation which helps with enormous tce tables.
The whole point of sketchy bypass is to deal with devices with small
amount of DMA bits... most Radeon's have 40 for example. So that won't
work terribly well.
Cheers,
Ben.
>
>
> >
> > Russell is working on a different implementation that should be much
> > more imune to the system physical memory layout.
> >
> > > Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
> > > ---
> > > arch/powerpc/platforms/powernv/pci.h | 1 +
> > > arch/powerpc/platforms/powernv/pci-ioda.c | 5 ++++-
> > > 2 files changed, 5 insertions(+), 1 deletion(-)
> > >
> > > diff --git a/arch/powerpc/platforms/powernv/pci.h b/arch/powerpc/platforms/powernv/pci.h
> > > index eada4b6..1408247 100644
> > > --- a/arch/powerpc/platforms/powernv/pci.h
> > > +++ b/arch/powerpc/platforms/powernv/pci.h
> > > @@ -23,6 +23,7 @@ enum pnv_phb_model {
> > > PNV_PHB_MODEL_UNKNOWN,
> > > PNV_PHB_MODEL_P7IOC,
> > > PNV_PHB_MODEL_PHB3,
> > > + PNV_PHB_MODEL_PHB4,
> > > PNV_PHB_MODEL_NPU,
> > > PNV_PHB_MODEL_NPU2,
> > > };
> > > diff --git a/arch/powerpc/platforms/powernv/pci-ioda.c b/arch/powerpc/platforms/powernv/pci-ioda.c
> > > index 9239142..66c2804 100644
> > > --- a/arch/powerpc/platforms/powernv/pci-ioda.c
> > > +++ b/arch/powerpc/platforms/powernv/pci-ioda.c
> > > @@ -1882,7 +1882,8 @@ static int pnv_pci_ioda_dma_set_mask(struct pci_dev *pdev, u64 dma_mask)
> > > if (dma_mask >> 32 &&
> > > dma_mask > (memory_hotplug_max() + (1ULL << 32)) &&
> > > pnv_pci_ioda_pe_single_vendor(pe) &&
> > > - phb->model == PNV_PHB_MODEL_PHB3) {
> > > + (phb->model == PNV_PHB_MODEL_PHB3 ||
> > > + phb->model == PNV_PHB_MODEL_PHB4)) {
> > > /* Configure the bypass mode */
> > > rc = pnv_pci_ioda_dma_64bit_bypass(pe);
> > > if (rc)
> > > @@ -3930,6 +3931,8 @@ static void __init pnv_pci_init_ioda_phb(struct device_node *np,
> > > phb->model = PNV_PHB_MODEL_P7IOC;
> > > else if (of_device_is_compatible(np, "ibm,power8-pciex"))
> > > phb->model = PNV_PHB_MODEL_PHB3;
> > > + else if (of_device_is_compatible(np, "ibm,power9-pciex"))
> > > + phb->model = PNV_PHB_MODEL_PHB4;
> > > else if (of_device_is_compatible(np, "ibm,power8-npu-pciex"))
> > > phb->model = PNV_PHB_MODEL_NPU;
> > > else if (of_device_is_compatible(np, "ibm,power9-npu-pciex"))
>
>
>
> --
> Alexey
next prev parent reply other threads:[~2018-06-18 4:45 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-01 8:10 [PATCH kernel 0/2] powerpc/powernv: Rework sketchy bypass Alexey Kardashevskiy
2018-06-01 8:10 ` [PATCH kernel 1/2] powerpc/powernv: Reuse existing TCE code for " Alexey Kardashevskiy
2018-06-16 1:04 ` Benjamin Herrenschmidt
2018-07-02 8:50 ` Alexey Kardashevskiy
2018-06-01 8:10 ` [PATCH kernel 2/2] powerpc/powernv: Define PHB4 type and enable sketchy bypass on POWER9 Alexey Kardashevskiy
2018-06-16 1:05 ` Benjamin Herrenschmidt
2018-06-18 2:13 ` Alexey Kardashevskiy
2018-06-18 4:44 ` Benjamin Herrenschmidt [this message]
2018-06-18 7:20 ` Alexey Kardashevskiy
2018-06-15 9:01 ` [PATCH kernel 0/2] powerpc/powernv: Rework sketchy bypass Alexey Kardashevskiy
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=82ebaedf4279dce05a7cd6bdb0d9b84bdf232a02.camel@kernel.crashing.org \
--to=benh@kernel.crashing.org \
--cc=aik@ozlabs.ru \
--cc=alistair@popple.id.au \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=ruscur@russell.cc \
/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;
as well as URLs for NNTP newsgroup(s).