On Tue, Jul 2, 2024 at 8:25 AM Arnd Bergmann <a...@arndb.de> wrote: > > On Fri, Jun 28, 2024, at 02:32, Mina Almasry wrote: > > --- a/arch/alpha/include/uapi/asm/socket.h > > +++ b/arch/alpha/include/uapi/asm/socket.h > > @@ -140,6 +140,11 @@ > > #define SO_PASSPIDFD 76 > > #define SO_PEERPIDFD 77 > > > > +#define SO_DEVMEM_LINEAR 78 > > +#define SCM_DEVMEM_LINEAR SO_DEVMEM_LINEAR > > +#define SO_DEVMEM_DMABUF 79 > > +#define SCM_DEVMEM_DMABUF SO_DEVMEM_DMABUF > > Something is still wrong with the number assignment: > > > --- a/arch/mips/include/uapi/asm/socket.h > > +++ b/arch/mips/include/uapi/asm/socket.h > > @@ -151,6 +151,11 @@ > > #define SO_PASSPIDFD 76 > > #define SO_PEERPIDFD 77 > > > > +#define SO_DEVMEM_LINEAR 78 > > +#define SCM_DEVMEM_LINEAR SO_DEVMEM_LINEAR > > +#define SO_DEVMEM_DMABUF 79 > > +#define SCM_DEVMEM_DMABUF SO_DEVMEM_DMABUF > > + > > #if !defined(__KERNEL__) > > > > #if __BITS_PER_LONG == 64 > > so alpha and mips use the same numbering system as > the generic version for existing numbers > > > diff --git a/arch/parisc/include/uapi/asm/socket.h > > b/arch/parisc/include/uapi/asm/socket.h > > index be264c2b1a117..2b817efd45444 100644 > > --- a/arch/parisc/include/uapi/asm/socket.h > > +++ b/arch/parisc/include/uapi/asm/socket.h > > @@ -132,6 +132,11 @@ > > #define SO_PASSPIDFD 0x404A > > #define SO_PEERPIDFD 0x404B > > > > +#define SO_DEVMEM_LINEAR 78 > > +#define SCM_DEVMEM_LINEAR SO_DEVMEM_LINEAR > > +#define SO_DEVMEM_DMABUF 79 > > +#define SCM_DEVMEM_DMABUF SO_DEVMEM_DMABUF > > parisc uses a different number, but you start using the > generic version here. This is probably fine but needs > a comment. > > > index 8ce8a39a1e5f0..25a2f5255f523 100644 > > --- a/include/uapi/asm-generic/socket.h > > +++ b/include/uapi/asm-generic/socket.h > > @@ -135,6 +135,11 @@ > > #define SO_PASSPIDFD 76 > > #define SO_PEERPIDFD 77 > > > > +#define SO_DEVMEM_LINEAR 98 > > +#define SCM_DEVMEM_LINEAR SO_DEVMEM_LINEAR > > +#define SO_DEVMEM_DMABUF 99 > > +#define SCM_DEVMEM_DMABUF SO_DEVMEM_DMABUF > > These on the other hand look like a typo: did you > mean number 78 and 79 instead of 98 and 99? >
Ooops, I think this is a typo or error indeed. I will fix. > Alternatively, you could continue with number 87, > which is the next unused number on sparc, and have > the same numbers on all architectures? > I don't know enough about the tradeoffs of either approach to be honest, so I'll do what you prefer. I think I'll just fix the ones in asm-generic/socket.h since that is what we aligned on from previous iterations I believe, unless you tell me to do differently. -- Thanks, Mina