[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAFCwf11ef=DaB3bD_xzvTbrPYUS-C7KujX8jRW5WhzSTpt2LYA@mail.gmail.com>
Date: Tue, 11 Jun 2019 14:47:43 +0300
From: Oded Gabbay <oded.gabbay@...il.com>
To: Greg KH <gregkh@...uxfoundation.org>
Cc: "Linux-Kernel@...r. Kernel. Org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v2 8/8] habanalabs: enable 64-bit DMA mask in POWER9
On Tue, Jun 11, 2019 at 12:59 PM Greg KH <gregkh@...uxfoundation.org> wrote:
>
> On Tue, Jun 11, 2019 at 12:21:44PM +0300, Oded Gabbay wrote:
> > +bool hl_pci_parent_is_phb4(struct hl_device *hdev)
> > +{
> > + struct pci_dev *parent_port = hdev->pdev->bus->self;
> > +
> > + if ((parent_port->vendor == PCI_VENDOR_ID_IBM) &&
> > + (parent_port->device == PCI_DEVICE_ID_IBM_PHB4)) {
> > + hdev->power9_64bit_dma_enable = 1;
> > + return true;
> > + }
> > +
> > + hdev->power9_64bit_dma_enable = 0;
> > + return false;
> > +}
>
> That feels like a big hack.
I agree but so far I found no other way.
>> ppc doesn't have any "what arch am I
> running on?" runtime call? Did you ask on the ppc64 mailing list? I'm
> ok to take this for now, but odds are you need a better fix for this
> sometime...
I talked to a couple of people and they didn't know about such a thing.
I'll also dug in the code and didn't find anything.
I'll post a "formal" question to the ppc64 mailing list and dig again
and I will update if I find anything.
Thanks,
Oded
>
> thanks,
>
> greg k-h
Powered by blists - more mailing lists