All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] habanalabs: Remove unused enum member DMA_SRAM_TO_SRAM
@ 2022-01-11 11:47 Cai Huoqing
  2022-01-23 14:43 ` Oded Gabbay
  0 siblings, 1 reply; 8+ messages in thread
From: Cai Huoqing @ 2022-01-11 11:47 UTC (permalink / raw)
  To: cai.huoqing; +Cc: Oded Gabbay, Arnd Bergmann, Greg Kroah-Hartman, linux-kernel

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@linux.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


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH] habanalabs: Remove unused enum member DMA_SRAM_TO_SRAM
  2022-01-11 11:47 [PATCH] habanalabs: Remove unused enum member DMA_SRAM_TO_SRAM Cai Huoqing
@ 2022-01-23 14:43 ` Oded Gabbay
  2022-01-23 15:04   ` Greg Kroah-Hartman
  0 siblings, 1 reply; 8+ messages in thread
From: Oded Gabbay @ 2022-01-23 14:43 UTC (permalink / raw)
  To: Cai Huoqing
  Cc: Arnd Bergmann, Greg Kroah-Hartman, Linux-Kernel@Vger. Kernel. Org

On Tue, Jan 11, 2022 at 1:47 PM Cai Huoqing <cai.huoqing@linux.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@linux.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.

In addition, I prefer to have this value present for completeness,
even if the driver doesn't refer to it.

Oded

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] habanalabs: Remove unused enum member DMA_SRAM_TO_SRAM
  2022-01-23 14:43 ` Oded Gabbay
@ 2022-01-23 15:04   ` Greg Kroah-Hartman
  2022-01-23 16:01     ` Oded Gabbay
  0 siblings, 1 reply; 8+ messages in thread
From: Greg Kroah-Hartman @ 2022-01-23 15:04 UTC (permalink / raw)
  To: Oded Gabbay; +Cc: Cai Huoqing, Arnd Bergmann, Linux-Kernel@Vger. Kernel. Org

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@linux.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@linux.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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] habanalabs: Remove unused enum member DMA_SRAM_TO_SRAM
  2022-01-23 15:04   ` Greg Kroah-Hartman
@ 2022-01-23 16:01     ` Oded Gabbay
  2022-01-23 16:08       ` Greg Kroah-Hartman
  0 siblings, 1 reply; 8+ messages in thread
From: Oded Gabbay @ 2022-01-23 16:01 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Cai Huoqing, Arnd Bergmann, Linux-Kernel@Vger. Kernel. Org

On Sun, Jan 23, 2022 at 5:04 PM Greg Kroah-Hartman
<gregkh@linuxfoundation.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@linux.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@linux.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.

wdyt ?

Oded

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] habanalabs: Remove unused enum member DMA_SRAM_TO_SRAM
  2022-01-23 16:01     ` Oded Gabbay
@ 2022-01-23 16:08       ` Greg Kroah-Hartman
  2022-01-23 16:11         ` Oded Gabbay
  0 siblings, 1 reply; 8+ messages in thread
From: Greg Kroah-Hartman @ 2022-01-23 16:08 UTC (permalink / raw)
  To: Oded Gabbay; +Cc: Cai Huoqing, Arnd Bergmann, Linux-Kernel@Vger. Kernel. Org

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@linuxfoundation.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@linux.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@linux.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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] habanalabs: Remove unused enum member DMA_SRAM_TO_SRAM
  2022-01-23 16:08       ` Greg Kroah-Hartman
@ 2022-01-23 16:11         ` Oded Gabbay
  2022-01-23 16:17           ` Greg Kroah-Hartman
  0 siblings, 1 reply; 8+ messages in thread
From: Oded Gabbay @ 2022-01-23 16:11 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Cai Huoqing, Arnd Bergmann, Linux-Kernel@Vger. Kernel. Org

On Sun, Jan 23, 2022 at 6:08 PM Greg Kroah-Hartman
<gregkh@linuxfoundation.org> wrote:
>
> 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@linuxfoundation.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@linux.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@linux.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?
On the kernel side there isn't any problem with moving it.
What I'm afraid of, is that the userspace will now have a duplicate
definition of this enum.
Both in the original file, which is included in the user space stack
from day 1, and from our uapi file.
In short, I'm afraid of breaking its compilation.
If you think that's acceptable, I don't have a problem moving it.

>
> Otherwise maintaining this is going to be hard as no one has a clue that
> this is a value that userspace uses.

I can document it with a BIG comment in the file.
And as I said, Goya s/w stack is pretty much fixed and I don't believe
is going to change anymore.

Oded

>
> thanks,
>
> greg k-h

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] habanalabs: Remove unused enum member DMA_SRAM_TO_SRAM
  2022-01-23 16:11         ` Oded Gabbay
@ 2022-01-23 16:17           ` Greg Kroah-Hartman
  2022-01-23 16:24             ` Oded Gabbay
  0 siblings, 1 reply; 8+ messages in thread
From: Greg Kroah-Hartman @ 2022-01-23 16:17 UTC (permalink / raw)
  To: Oded Gabbay; +Cc: Cai Huoqing, Arnd Bergmann, Linux-Kernel@Vger. Kernel. Org

On Sun, Jan 23, 2022 at 06:11:54PM +0200, Oded Gabbay wrote:
> On Sun, Jan 23, 2022 at 6:08 PM Greg Kroah-Hartman
> <gregkh@linuxfoundation.org> wrote:
> >
> > 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@linuxfoundation.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@linux.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@linux.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?
> On the kernel side there isn't any problem with moving it.
> What I'm afraid of, is that the userspace will now have a duplicate
> definition of this enum.
> Both in the original file, which is included in the user space stack
> from day 1, and from our uapi file.
> In short, I'm afraid of breaking its compilation.
> If you think that's acceptable, I don't have a problem moving it.
> 
> >
> > Otherwise maintaining this is going to be hard as no one has a clue that
> > this is a value that userspace uses.
> 
> I can document it with a BIG comment in the file.
> And as I said, Goya s/w stack is pretty much fixed and I don't believe
> is going to change anymore.

The trick is long-term maintaince for the next 20+ years of this code in
the kernel.  A huge comment would help, but even better to move this
where it needs to go in a uapi file so that it makes it obvious we can
not change this.

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] habanalabs: Remove unused enum member DMA_SRAM_TO_SRAM
  2022-01-23 16:17           ` Greg Kroah-Hartman
@ 2022-01-23 16:24             ` Oded Gabbay
  0 siblings, 0 replies; 8+ messages in thread
From: Oded Gabbay @ 2022-01-23 16:24 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Cai Huoqing, Arnd Bergmann, Linux-Kernel@Vger. Kernel. Org

On Sun, Jan 23, 2022 at 6:17 PM Greg Kroah-Hartman
<gregkh@linuxfoundation.org> wrote:
>
> On Sun, Jan 23, 2022 at 06:11:54PM +0200, Oded Gabbay wrote:
> > On Sun, Jan 23, 2022 at 6:08 PM Greg Kroah-Hartman
> > <gregkh@linuxfoundation.org> wrote:
> > >
> > > 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@linuxfoundation.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@linux.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@linux.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?
> > On the kernel side there isn't any problem with moving it.
> > What I'm afraid of, is that the userspace will now have a duplicate
> > definition of this enum.
> > Both in the original file, which is included in the user space stack
> > from day 1, and from our uapi file.
> > In short, I'm afraid of breaking its compilation.
> > If you think that's acceptable, I don't have a problem moving it.
> >
> > >
> > > Otherwise maintaining this is going to be hard as no one has a clue that
> > > this is a value that userspace uses.
> >
> > I can document it with a BIG comment in the file.
> > And as I said, Goya s/w stack is pretty much fixed and I don't believe
> > is going to change anymore.
>
> The trick is long-term maintaince for the next 20+ years of this code in
> the kernel.  A huge comment would help, but even better to move this
> where it needs to go in a uapi file so that it makes it obvious we can
> not change this.
>
> thanks,
>
> greg k-h

ok, I'll try to do this internally and see what happens. I'll upstream
either the change or a comment, depending on my check.

Oded

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2022-01-23 16:25 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-11 11:47 [PATCH] habanalabs: Remove unused enum member DMA_SRAM_TO_SRAM Cai Huoqing
2022-01-23 14:43 ` Oded Gabbay
2022-01-23 15:04   ` Greg Kroah-Hartman
2022-01-23 16:01     ` Oded Gabbay
2022-01-23 16:08       ` Greg Kroah-Hartman
2022-01-23 16:11         ` Oded Gabbay
2022-01-23 16:17           ` Greg Kroah-Hartman
2022-01-23 16:24             ` Oded Gabbay

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.