From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Oded Gabbay <oded.gabbay@gmail.com>
Cc: Greg KH <gregkh@linuxfoundation.org>,
linuxppc-dev@ozlabs.org, Christoph Hellwig <hch@infradead.org>,
"Linux-Kernel@Vger. Kernel. Org" <linux-kernel@vger.kernel.org>,
Oliver OHalloran <oliveroh@au1.ibm.com>,
Russell Currey <ruscur@au1.ibm.com>
Subject: Re: [PATCH v2 8/8] habanalabs: enable 64-bit DMA mask in POWER9
Date: Wed, 12 Jun 2019 18:18:52 +1000 [thread overview]
Message-ID: <8fa52f5f1455b9f3d81c71517ed499b93b357044.camel@kernel.crashing.org> (raw)
In-Reply-To: <CAFCwf11naDCqotNx2mrr18WpJ80T=9=jfsJWMSBu7KPrF5paJw@mail.gmail.com>
On Wed, 2019-06-12 at 09:25 +0300, Oded Gabbay wrote:
>
> > You can't. Your device is broken. Devices that don't support DMAing to
> > the full 64-bit deserve to be added to the trash pile.
> >
>
> Hmm... right know they are added to customers data-centers but what do I know ;)
Well, some customers don't know they are being sold a lemon :)
> > As a result, getting it to work will require hacks. Some GPUs have
> > similar issues and require similar hacks, it's unfortunate.
> >
> > Added a couple of guys on CC who might be able to help get those hacks
> > right.
>
> Thanks :)
> >
> > It's still very fishy .. the idea is to detect the case where setting a
> > 64-bit mask will give your system memory mapped at a fixed high address
> > (1 << 59 in our case) and program that in your chip in the "Fixed high
> > bits" register that you seem to have (also make sure it doesn't affect
> > MSIs or it will break them).
>
> MSI-X are working. The set of bit 59 doesn't apply to MSI-X
> transactions (AFAICS from the PCIe controller spec we have).
Ok.
> > This will only work as long as all of the system memory can be
> > addressed at an offset from that fixed address that itself fits your
> > device addressing capabilities (50 bits in this case). It may or may
> > not be the case but there's no way to check since the DMA mask logic
> > won't really apply.
>
> Understood. In the specific system we are integrated to, that is the
> case - we have less then 48 bits. But, as you pointed out, it is not a
> generic solution but with my H/W I can't give a generic fit-all
> solution for POWER9. I'll settle for the best that I can do.
>
> >
> > You might want to consider fixing your HW in the next iteration... This
> > is going to bite you when x86 increases the max physical memory for
> > example, or on other architectures.
>
> Understood and taken care of.
Cheers,
Ben.
> >
> > Cheers,
> > Ben.
> >
> >
> >
> >
next prev parent reply other threads:[~2019-06-12 8:19 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-11 9:21 Oded Gabbay
2019-06-11 9:58 ` Greg KH
2019-06-11 11:47 ` Oded Gabbay
2019-06-11 15:17 ` Christoph Hellwig
2019-06-11 15:26 ` Greg KH
2019-06-11 17:03 ` Oded Gabbay
2019-06-11 17:22 ` Oded Gabbay
2019-06-11 22:53 ` Benjamin Herrenschmidt
2019-06-12 5:45 ` Oliver O'Halloran
2019-06-12 8:17 ` Benjamin Herrenschmidt
2019-06-12 6:25 ` Oded Gabbay
2019-06-12 8:18 ` Benjamin Herrenschmidt [this message]
2019-06-12 6:35 ` Oliver O'Halloran
2019-06-12 6:53 ` Christoph Hellwig
2019-06-12 11:48 ` Oliver O'Halloran
2019-06-15 12:12 ` Oded Gabbay
2019-06-16 9:55 ` Christoph Hellwig
2019-06-16 11:24 ` Oded Gabbay
2019-06-17 8:19 ` Christoph Hellwig
2019-06-17 8:35 ` Oded Gabbay
2019-06-24 6:53 ` Oded Gabbay
2019-06-24 6:58 ` Christoph Hellwig
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=8fa52f5f1455b9f3d81c71517ed499b93b357044.camel@kernel.crashing.org \
--to=benh@kernel.crashing.org \
--cc=gregkh@linuxfoundation.org \
--cc=hch@infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@ozlabs.org \
--cc=oded.gabbay@gmail.com \
--cc=oliveroh@au1.ibm.com \
--cc=ruscur@au1.ibm.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
all inboxes | Powered by JetHome®