[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Ye19hz9r0poT5wUe@kroah.com>
Date: Sun, 23 Jan 2022 17:08:39 +0100
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: Oded Gabbay <ogabbay@...nel.org>
Cc: Cai Huoqing <cai.huoqing@...ux.dev>, Arnd Bergmann <arnd@...db.de>,
"Linux-Kernel@...r. Kernel. Org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] habanalabs: Remove unused enum member DMA_SRAM_TO_SRAM
On Sun, Jan 23, 2022 at 06:01:53PM +0200, Oded Gabbay wrote:
> On Sun, Jan 23, 2022 at 5:04 PM Greg Kroah-Hartman
> <gregkh@...uxfoundation.org> wrote:
> >
> > On Sun, Jan 23, 2022 at 04:43:15PM +0200, Oded Gabbay wrote:
> > > On Tue, Jan 11, 2022 at 1:47 PM Cai Huoqing <cai.huoqing@...ux.dev> wrote:
> > > >
> > > > The driver don't support the SRAM-to-SRAM translation of DMA,
> > > > so remove 'DMA_SRAM_TO_SRAM'.
> > > >
> > > > Signed-off-by: Cai Huoqing <cai.huoqing@...ux.dev>
> > > > ---
> > > > drivers/misc/habanalabs/include/goya/goya_packets.h | 1 -
> > > > 1 file changed, 1 deletion(-)
> > > >
> > > > diff --git a/drivers/misc/habanalabs/include/goya/goya_packets.h b/drivers/misc/habanalabs/include/goya/goya_packets.h
> > > > index ef54bad20509..25fbebdc6143 100644
> > > > --- a/drivers/misc/habanalabs/include/goya/goya_packets.h
> > > > +++ b/drivers/misc/habanalabs/include/goya/goya_packets.h
> > > > @@ -36,7 +36,6 @@ enum goya_dma_direction {
> > > > DMA_SRAM_TO_HOST,
> > > > DMA_DRAM_TO_HOST,
> > > > DMA_DRAM_TO_DRAM,
> > > > - DMA_SRAM_TO_SRAM,
> > > > DMA_ENUM_MAX
> > > > };
> > > >
> > > > --
> > > > 2.25.1
> > > >
> > >
> > > This is a general spec file in our s/w stack, and therefore a change
> > > in it in the driver will cause our driver to be out of sync with our
> > > user-space stack. i.e. the value of DMA_ENUM_MAX will be different in
> > > the driver and in the user-space stack. I don't know if there will be
> > > any consequences but I prefer not to risk it.
> >
> > If this is synced to userspace, shouldn't it be in a uapi file with a
> > specific value associated with it?
> >
> > thanks,
> >
> > greg k-h
>
> Yes, it was a mistake from day 1. A mistake we didn't repeat in future ASICs.
> I take great care of putting anything that is synced between driver
> and userspace in our uapi file.
>
> Having said that, after almost 3 years of having this mistake, I feel
> it is not too disastrous to leave it as is.
> Our Goya s/w stack is pretty much stable and I don't want to make
> changes without good reason.
You should just move this to a uapi file to show that it is something
that can't be changed. Can't you do that without breaking anything on
the kernel side?
Otherwise maintaining this is going to be hard as no one has a clue that
this is a value that userspace uses.
thanks,
greg k-h
Powered by blists - more mailing lists