LKML Archive mirror
 help / color / mirror / Atom feed
* [PATCH] sparc: move struct termio to asm/termios.h
@ 2024-03-06 17:11 Mike Gilbert
  2024-03-21 19:45 ` John Paul Adrian Glaubitz
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Mike Gilbert @ 2024-03-06 17:11 UTC (permalink / raw
  To: David S. Miller, Andreas Larsson, sparclinux, linux-kernel; +Cc: Mike Gilbert

Every other arch declares struct termio in asm/termios.h, so make sparc
match them.

Resolves a build failure in the PPP software package, which includes
both bits/ioctl-types.h via sys/ioctl.h (glibc) and asm/termbits.h.

Closes: https://bugs.gentoo.org/918992
Signed-off-by: Mike Gilbert <floppym@gentoo.org>
Cc: stable@vger.kernel.org
---
 arch/sparc/include/uapi/asm/termbits.h | 10 ----------
 arch/sparc/include/uapi/asm/termios.h  |  9 +++++++++
 2 files changed, 9 insertions(+), 10 deletions(-)

diff --git a/arch/sparc/include/uapi/asm/termbits.h b/arch/sparc/include/uapi/asm/termbits.h
index 4321322701fc..0da2b1adc0f5 100644
--- a/arch/sparc/include/uapi/asm/termbits.h
+++ b/arch/sparc/include/uapi/asm/termbits.h
@@ -10,16 +10,6 @@ typedef unsigned int	tcflag_t;
 typedef unsigned long	tcflag_t;
 #endif
 
-#define NCC 8
-struct termio {
-	unsigned short c_iflag;		/* input mode flags */
-	unsigned short c_oflag;		/* output mode flags */
-	unsigned short c_cflag;		/* control mode flags */
-	unsigned short c_lflag;		/* local mode flags */
-	unsigned char c_line;		/* line discipline */
-	unsigned char c_cc[NCC];	/* control characters */
-};
-
 #define NCCS 17
 struct termios {
 	tcflag_t c_iflag;		/* input mode flags */
diff --git a/arch/sparc/include/uapi/asm/termios.h b/arch/sparc/include/uapi/asm/termios.h
index ee86f4093d83..cceb32260881 100644
--- a/arch/sparc/include/uapi/asm/termios.h
+++ b/arch/sparc/include/uapi/asm/termios.h
@@ -40,5 +40,14 @@ struct winsize {
 	unsigned short ws_ypixel;
 };
 
+#define NCC 8
+struct termio {
+	unsigned short c_iflag;		/* input mode flags */
+	unsigned short c_oflag;		/* output mode flags */
+	unsigned short c_cflag;		/* control mode flags */
+	unsigned short c_lflag;		/* local mode flags */
+	unsigned char c_line;		/* line discipline */
+	unsigned char c_cc[NCC];	/* control characters */
+};
 
 #endif /* _UAPI_SPARC_TERMIOS_H */
-- 
2.44.0


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

* Re: [PATCH] sparc: move struct termio to asm/termios.h
  2024-03-06 17:11 [PATCH] sparc: move struct termio to asm/termios.h Mike Gilbert
@ 2024-03-21 19:45 ` John Paul Adrian Glaubitz
  2024-04-03 19:15 ` Mike Gilbert
  2024-04-22 12:05 ` Andreas Larsson
  2 siblings, 0 replies; 5+ messages in thread
From: John Paul Adrian Glaubitz @ 2024-03-21 19:45 UTC (permalink / raw
  To: Mike Gilbert; +Cc: David S. Miller, Andreas Larsson, sparclinux, linux-kernel

Hi Mike,

On Wed, 2024-03-06 at 12:11 -0500, Mike Gilbert wrote:
> Every other arch declares struct termio in asm/termios.h, so make sparc
> match them.
> 
> Resolves a build failure in the PPP software package, which includes
> both bits/ioctl-types.h via sys/ioctl.h (glibc) and asm/termbits.h.
> 
> Closes: https://bugs.gentoo.org/918992
> Signed-off-by: Mike Gilbert <floppym@gentoo.org>
> Cc: stable@vger.kernel.org
> ---
>  arch/sparc/include/uapi/asm/termbits.h | 10 ----------
>  arch/sparc/include/uapi/asm/termios.h  |  9 +++++++++
>  2 files changed, 9 insertions(+), 10 deletions(-)
> 
> diff --git a/arch/sparc/include/uapi/asm/termbits.h b/arch/sparc/include/uapi/asm/termbits.h
> index 4321322701fc..0da2b1adc0f5 100644
> --- a/arch/sparc/include/uapi/asm/termbits.h
> +++ b/arch/sparc/include/uapi/asm/termbits.h
> @@ -10,16 +10,6 @@ typedef unsigned int	tcflag_t;
>  typedef unsigned long	tcflag_t;
>  #endif
>  
> -#define NCC 8
> -struct termio {
> -	unsigned short c_iflag;		/* input mode flags */
> -	unsigned short c_oflag;		/* output mode flags */
> -	unsigned short c_cflag;		/* control mode flags */
> -	unsigned short c_lflag;		/* local mode flags */
> -	unsigned char c_line;		/* line discipline */
> -	unsigned char c_cc[NCC];	/* control characters */
> -};
> -
>  #define NCCS 17
>  struct termios {
>  	tcflag_t c_iflag;		/* input mode flags */
> diff --git a/arch/sparc/include/uapi/asm/termios.h b/arch/sparc/include/uapi/asm/termios.h
> index ee86f4093d83..cceb32260881 100644
> --- a/arch/sparc/include/uapi/asm/termios.h
> +++ b/arch/sparc/include/uapi/asm/termios.h
> @@ -40,5 +40,14 @@ struct winsize {
>  	unsigned short ws_ypixel;
>  };
>  
> +#define NCC 8
> +struct termio {
> +	unsigned short c_iflag;		/* input mode flags */
> +	unsigned short c_oflag;		/* output mode flags */
> +	unsigned short c_cflag;		/* control mode flags */
> +	unsigned short c_lflag;		/* local mode flags */
> +	unsigned char c_line;		/* line discipline */
> +	unsigned char c_cc[NCC];	/* control characters */
> +};
>  
>  #endif /* _UAPI_SPARC_TERMIOS_H */

This should also fix the build of u-boot on sparc64 which fails due to 'struct termio'
being redefined [1]:

In file included from /<<PKGBUILDDIR>>/tools/termios_linux.h:33,
                 from /<<PKGBUILDDIR>>/tools/kwboot.c:153:
/usr/lib/linux/uapi/sparc/asm/termbits.h:14:8: error: redefinition of 'struct termio'
   14 | struct termio {
      |        ^~~~~~
In file included from /usr/include/sparc64-linux-gnu/sys/ioctl.h:29,
                 from /<<PKGBUILDDIR>>/tools/termios_linux.h:30:
/usr/include/sparc64-linux-gnu/bits/ioctl-types.h:36:8: note: originally defined here
   36 | struct termio
      |        ^~~~~~

Adrian

> [1] https://buildd.debian.org/status/fetch.php?pkg=u-boot&arch=sparc64&ver=2024.01%2Bdfsg-3&stamp=1711031586&raw=0

-- 
 .''`.  John Paul Adrian Glaubitz
: :' :  Debian Developer
`. `'   Physicist
  `-    GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913

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

* Re: [PATCH] sparc: move struct termio to asm/termios.h
  2024-03-06 17:11 [PATCH] sparc: move struct termio to asm/termios.h Mike Gilbert
  2024-03-21 19:45 ` John Paul Adrian Glaubitz
@ 2024-04-03 19:15 ` Mike Gilbert
  2024-04-19 16:28   ` Mike Gilbert
  2024-04-22 12:05 ` Andreas Larsson
  2 siblings, 1 reply; 5+ messages in thread
From: Mike Gilbert @ 2024-04-03 19:15 UTC (permalink / raw
  To: David S. Miller, Andreas Larsson, sparclinux, linux-kernel

On Wed, Mar 6, 2024 at 12:11 PM Mike Gilbert <floppym@gentoo.org> wrote:
>
> Every other arch declares struct termio in asm/termios.h, so make sparc
> match them.
>
> Resolves a build failure in the PPP software package, which includes
> both bits/ioctl-types.h via sys/ioctl.h (glibc) and asm/termbits.h.
>
> Closes: https://bugs.gentoo.org/918992
> Signed-off-by: Mike Gilbert <floppym@gentoo.org>
> Cc: stable@vger.kernel.org
> ---
>  arch/sparc/include/uapi/asm/termbits.h | 10 ----------
>  arch/sparc/include/uapi/asm/termios.h  |  9 +++++++++
>  2 files changed, 9 insertions(+), 10 deletions(-)
>
> diff --git a/arch/sparc/include/uapi/asm/termbits.h b/arch/sparc/include/uapi/asm/termbits.h
> index 4321322701fc..0da2b1adc0f5 100644
> --- a/arch/sparc/include/uapi/asm/termbits.h
> +++ b/arch/sparc/include/uapi/asm/termbits.h
> @@ -10,16 +10,6 @@ typedef unsigned int tcflag_t;
>  typedef unsigned long  tcflag_t;
>  #endif
>
> -#define NCC 8
> -struct termio {
> -       unsigned short c_iflag;         /* input mode flags */
> -       unsigned short c_oflag;         /* output mode flags */
> -       unsigned short c_cflag;         /* control mode flags */
> -       unsigned short c_lflag;         /* local mode flags */
> -       unsigned char c_line;           /* line discipline */
> -       unsigned char c_cc[NCC];        /* control characters */
> -};
> -
>  #define NCCS 17
>  struct termios {
>         tcflag_t c_iflag;               /* input mode flags */
> diff --git a/arch/sparc/include/uapi/asm/termios.h b/arch/sparc/include/uapi/asm/termios.h
> index ee86f4093d83..cceb32260881 100644
> --- a/arch/sparc/include/uapi/asm/termios.h
> +++ b/arch/sparc/include/uapi/asm/termios.h
> @@ -40,5 +40,14 @@ struct winsize {
>         unsigned short ws_ypixel;
>  };
>
> +#define NCC 8
> +struct termio {
> +       unsigned short c_iflag;         /* input mode flags */
> +       unsigned short c_oflag;         /* output mode flags */
> +       unsigned short c_cflag;         /* control mode flags */
> +       unsigned short c_lflag;         /* local mode flags */
> +       unsigned char c_line;           /* line discipline */
> +       unsigned char c_cc[NCC];        /* control characters */
> +};
>
>  #endif /* _UAPI_SPARC_TERMIOS_H */
> --
> 2.44.0
>

Ping. Could we get this merged please?

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

* Re: [PATCH] sparc: move struct termio to asm/termios.h
  2024-04-03 19:15 ` Mike Gilbert
@ 2024-04-19 16:28   ` Mike Gilbert
  0 siblings, 0 replies; 5+ messages in thread
From: Mike Gilbert @ 2024-04-19 16:28 UTC (permalink / raw
  To: David S. Miller, Andreas Larsson, sparclinux; +Cc: linux-kernel

On Wed, Apr 3, 2024 at 3:15 PM Mike Gilbert <floppym@gentoo.org> wrote:
>
> On Wed, Mar 6, 2024 at 12:11 PM Mike Gilbert <floppym@gentoo.org> wrote:
> >
> > Every other arch declares struct termio in asm/termios.h, so make sparc
> > match them.
> >
> > Resolves a build failure in the PPP software package, which includes
> > both bits/ioctl-types.h via sys/ioctl.h (glibc) and asm/termbits.h.
> >
> > Closes: https://bugs.gentoo.org/918992
> > Signed-off-by: Mike Gilbert <floppym@gentoo.org>
> > Cc: stable@vger.kernel.org
> > ---
> >  arch/sparc/include/uapi/asm/termbits.h | 10 ----------
> >  arch/sparc/include/uapi/asm/termios.h  |  9 +++++++++
> >  2 files changed, 9 insertions(+), 10 deletions(-)
> >
> > diff --git a/arch/sparc/include/uapi/asm/termbits.h b/arch/sparc/include/uapi/asm/termbits.h
> > index 4321322701fc..0da2b1adc0f5 100644
> > --- a/arch/sparc/include/uapi/asm/termbits.h
> > +++ b/arch/sparc/include/uapi/asm/termbits.h
> > @@ -10,16 +10,6 @@ typedef unsigned int tcflag_t;
> >  typedef unsigned long  tcflag_t;
> >  #endif
> >
> > -#define NCC 8
> > -struct termio {
> > -       unsigned short c_iflag;         /* input mode flags */
> > -       unsigned short c_oflag;         /* output mode flags */
> > -       unsigned short c_cflag;         /* control mode flags */
> > -       unsigned short c_lflag;         /* local mode flags */
> > -       unsigned char c_line;           /* line discipline */
> > -       unsigned char c_cc[NCC];        /* control characters */
> > -};
> > -
> >  #define NCCS 17
> >  struct termios {
> >         tcflag_t c_iflag;               /* input mode flags */
> > diff --git a/arch/sparc/include/uapi/asm/termios.h b/arch/sparc/include/uapi/asm/termios.h
> > index ee86f4093d83..cceb32260881 100644
> > --- a/arch/sparc/include/uapi/asm/termios.h
> > +++ b/arch/sparc/include/uapi/asm/termios.h
> > @@ -40,5 +40,14 @@ struct winsize {
> >         unsigned short ws_ypixel;
> >  };
> >
> > +#define NCC 8
> > +struct termio {
> > +       unsigned short c_iflag;         /* input mode flags */
> > +       unsigned short c_oflag;         /* output mode flags */
> > +       unsigned short c_cflag;         /* control mode flags */
> > +       unsigned short c_lflag;         /* local mode flags */
> > +       unsigned char c_line;           /* line discipline */
> > +       unsigned char c_cc[NCC];        /* control characters */
> > +};
> >
> >  #endif /* _UAPI_SPARC_TERMIOS_H */
> > --
> > 2.44.0
> >
>
> Ping. Could we get this merged please?

Ping again. Any response from a SPARC maintainer would be appreciated.

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

* Re: [PATCH] sparc: move struct termio to asm/termios.h
  2024-03-06 17:11 [PATCH] sparc: move struct termio to asm/termios.h Mike Gilbert
  2024-03-21 19:45 ` John Paul Adrian Glaubitz
  2024-04-03 19:15 ` Mike Gilbert
@ 2024-04-22 12:05 ` Andreas Larsson
  2 siblings, 0 replies; 5+ messages in thread
From: Andreas Larsson @ 2024-04-22 12:05 UTC (permalink / raw
  To: Mike Gilbert, David S. Miller, sparclinux, linux-kernel

On 2024-03-06 18:11, Mike Gilbert wrote:
> Every other arch declares struct termio in asm/termios.h, so make sparc
> match them.
> 
> Resolves a build failure in the PPP software package, which includes
> both bits/ioctl-types.h via sys/ioctl.h (glibc) and asm/termbits.h.
> 
> Closes: https://bugs.gentoo.org/918992
> Signed-off-by: Mike Gilbert <floppym@gentoo.org>
> Cc: stable@vger.kernel.org
> ---
>  arch/sparc/include/uapi/asm/termbits.h | 10 ----------
>  arch/sparc/include/uapi/asm/termios.h  |  9 +++++++++
>  2 files changed, 9 insertions(+), 10 deletions(-)
> 
> diff --git a/arch/sparc/include/uapi/asm/termbits.h b/arch/sparc/include/uapi/asm/termbits.h
> index 4321322701fc..0da2b1adc0f5 100644
> --- a/arch/sparc/include/uapi/asm/termbits.h
> +++ b/arch/sparc/include/uapi/asm/termbits.h
> @@ -10,16 +10,6 @@ typedef unsigned int	tcflag_t;
>  typedef unsigned long	tcflag_t;
>  #endif
>  
> -#define NCC 8
> -struct termio {
> -	unsigned short c_iflag;		/* input mode flags */
> -	unsigned short c_oflag;		/* output mode flags */
> -	unsigned short c_cflag;		/* control mode flags */
> -	unsigned short c_lflag;		/* local mode flags */
> -	unsigned char c_line;		/* line discipline */
> -	unsigned char c_cc[NCC];	/* control characters */
> -};
> -
>  #define NCCS 17
>  struct termios {
>  	tcflag_t c_iflag;		/* input mode flags */
> diff --git a/arch/sparc/include/uapi/asm/termios.h b/arch/sparc/include/uapi/asm/termios.h
> index ee86f4093d83..cceb32260881 100644
> --- a/arch/sparc/include/uapi/asm/termios.h
> +++ b/arch/sparc/include/uapi/asm/termios.h
> @@ -40,5 +40,14 @@ struct winsize {
>  	unsigned short ws_ypixel;
>  };
>  
> +#define NCC 8
> +struct termio {
> +	unsigned short c_iflag;		/* input mode flags */
> +	unsigned short c_oflag;		/* output mode flags */
> +	unsigned short c_cflag;		/* control mode flags */
> +	unsigned short c_lflag;		/* local mode flags */
> +	unsigned char c_line;		/* line discipline */
> +	unsigned char c_cc[NCC];	/* control characters */
> +};
>  
>  #endif /* _UAPI_SPARC_TERMIOS_H */

Reviewed-by: Andreas Larsson <andreas@gaisler.com>
Tested-by: Andreas Larsson <andreas@gaisler.com>

Picking this up to my for-next.

Sorry for the wait. I did not have time to vet it enough for the last
cycle.

Thanks,
Andreas

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

end of thread, other threads:[~2024-04-22 12:11 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-03-06 17:11 [PATCH] sparc: move struct termio to asm/termios.h Mike Gilbert
2024-03-21 19:45 ` John Paul Adrian Glaubitz
2024-04-03 19:15 ` Mike Gilbert
2024-04-19 16:28   ` Mike Gilbert
2024-04-22 12:05 ` Andreas Larsson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).