[v2,00/12] Linux termios refactor

Message ID 20181228011001.22260-1-adhemerval.zanella@linaro.org
Headers show
Series
  • Linux termios refactor
Related show

Message

Adhemerval Zanella Dec. 28, 2018, 1:09 a.m.
This patchset is an updated version of my previous version [1]. The main
changes are just the update commit message for third part (termios:
Consolidate termios c_cc symbolic constants) to add powerpc as affected
architecture and to mention BZ#23783 on sixth part (termios: Consolidate
Baud Rate Selection definitions).

I am resending the whole set mainly because Siddhesh has asked to easier
the review.

[1] https://sourceware.org/ml/libc-alpha/2018-10/msg00255.html

Adhemerval Zanella (12):
  termios: Define TIOCSER_TEMT with __USE_MISC (BZ#17783)
  termios: Consolidate struct termios
  termios: Consolidate termios c_cc symbolic constants
  termios: Consolidate Input Modes definitions.
  termios: Consolidate Output Modes definitions
  termios: Consolidate Baud Rate Selection definitions
  termios: Consolidate control mode definitions
  termios: Consolidate local mode definitions
  termios: Consolidate tcflow symbolic constants
  termios: Remove Linux _IOT_termios
  termios: Add powerpc termios-misc
  termios: Consolidate termios.h

 sysdeps/unix/sysv/linux/Makefile              |   7 +-
 .../unix/sysv/linux/alpha/bits/termios-baud.h |  46 +++
 .../unix/sysv/linux/alpha/bits/termios-c_cc.h |  40 +++
 .../sysv/linux/alpha/bits/termios-c_cflag.h   |  35 +++
 .../sysv/linux/alpha/bits/termios-c_iflag.h   |  38 +++
 .../sysv/linux/alpha/bits/termios-c_lflag.h   |  42 +++
 .../sysv/linux/alpha/bits/termios-c_oflag.h   |  66 +++++
 .../sysv/linux/alpha/bits/termios-struct.h    |  37 +++
 sysdeps/unix/sysv/linux/alpha/bits/termios.h  | 223 --------------
 sysdeps/unix/sysv/linux/bits/termios-baud.h   |  48 +++
 sysdeps/unix/sysv/linux/bits/termios-c_cc.h   |  40 +++
 .../unix/sysv/linux/bits/termios-c_cflag.h    |  34 +++
 .../unix/sysv/linux/bits/termios-c_iflag.h    |  40 +++
 .../unix/sysv/linux/bits/termios-c_lflag.h    |  58 ++++
 .../unix/sysv/linux/bits/termios-c_oflag.h    |  61 ++++
 sysdeps/unix/sysv/linux/bits/termios-misc.h   |  21 ++
 sysdeps/unix/sysv/linux/bits/termios-struct.h |  36 +++
 sysdeps/unix/sysv/linux/bits/termios-tcflow.h |  26 ++
 sysdeps/unix/sysv/linux/bits/termios.h        | 167 +----------
 sysdeps/unix/sysv/linux/kernel_termios.h      |   3 +
 .../unix/sysv/linux/mips/bits/termios-c_cc.h  |  43 +++
 .../sysv/linux/mips/bits/termios-c_lflag.h    |  46 +++
 .../sysv/linux/mips/bits/termios-struct.h     |  34 +++
 .../sysv/linux/mips/bits/termios-tcflow.h     |  26 ++
 sysdeps/unix/sysv/linux/mips/bits/termios.h   | 222 --------------
 sysdeps/unix/sysv/linux/mips/kernel_termios.h |   3 +
 .../sysv/linux/powerpc/bits/termios-baud.h    |  45 +++
 .../sysv/linux/powerpc/bits/termios-c_cc.h    |  41 +++
 .../sysv/linux/powerpc/bits/termios-c_cflag.h |  35 +++
 .../sysv/linux/powerpc/bits/termios-c_iflag.h |  38 +++
 .../sysv/linux/powerpc/bits/termios-c_lflag.h |  45 +++
 .../sysv/linux/powerpc/bits/termios-c_oflag.h |  65 ++++
 .../sysv/linux/powerpc/bits/termios-misc.h    |  72 +++++
 .../unix/sysv/linux/powerpc/bits/termios.h    | 279 ------------------
 .../unix/sysv/linux/sparc/bits/termios-c_cc.h |  43 +++
 .../sysv/linux/sparc/bits/termios-c_oflag.h   |  64 ++++
 .../sysv/linux/sparc/bits/termios-struct.h    |  34 +++
 sysdeps/unix/sysv/linux/sparc/bits/termios.h  | 225 --------------
 .../unix/sysv/linux/sparc/kernel_termios.h    |   3 +
 sysdeps/unix/sysv/linux/speed.c               |   4 +-
 sysdeps/unix/sysv/linux/tcgetattr.c           |   8 +-
 sysdeps/unix/sysv/linux/tcsetattr.c           |   4 +-
 42 files changed, 1334 insertions(+), 1113 deletions(-)
 create mode 100644 sysdeps/unix/sysv/linux/alpha/bits/termios-baud.h
 create mode 100644 sysdeps/unix/sysv/linux/alpha/bits/termios-c_cc.h
 create mode 100644 sysdeps/unix/sysv/linux/alpha/bits/termios-c_cflag.h
 create mode 100644 sysdeps/unix/sysv/linux/alpha/bits/termios-c_iflag.h
 create mode 100644 sysdeps/unix/sysv/linux/alpha/bits/termios-c_lflag.h
 create mode 100644 sysdeps/unix/sysv/linux/alpha/bits/termios-c_oflag.h
 create mode 100644 sysdeps/unix/sysv/linux/alpha/bits/termios-struct.h
 delete mode 100644 sysdeps/unix/sysv/linux/alpha/bits/termios.h
 create mode 100644 sysdeps/unix/sysv/linux/bits/termios-baud.h
 create mode 100644 sysdeps/unix/sysv/linux/bits/termios-c_cc.h
 create mode 100644 sysdeps/unix/sysv/linux/bits/termios-c_cflag.h
 create mode 100644 sysdeps/unix/sysv/linux/bits/termios-c_iflag.h
 create mode 100644 sysdeps/unix/sysv/linux/bits/termios-c_lflag.h
 create mode 100644 sysdeps/unix/sysv/linux/bits/termios-c_oflag.h
 create mode 100644 sysdeps/unix/sysv/linux/bits/termios-misc.h
 create mode 100644 sysdeps/unix/sysv/linux/bits/termios-struct.h
 create mode 100644 sysdeps/unix/sysv/linux/bits/termios-tcflow.h
 create mode 100644 sysdeps/unix/sysv/linux/mips/bits/termios-c_cc.h
 create mode 100644 sysdeps/unix/sysv/linux/mips/bits/termios-c_lflag.h
 create mode 100644 sysdeps/unix/sysv/linux/mips/bits/termios-struct.h
 create mode 100644 sysdeps/unix/sysv/linux/mips/bits/termios-tcflow.h
 delete mode 100644 sysdeps/unix/sysv/linux/mips/bits/termios.h
 create mode 100644 sysdeps/unix/sysv/linux/powerpc/bits/termios-baud.h
 create mode 100644 sysdeps/unix/sysv/linux/powerpc/bits/termios-c_cc.h
 create mode 100644 sysdeps/unix/sysv/linux/powerpc/bits/termios-c_cflag.h
 create mode 100644 sysdeps/unix/sysv/linux/powerpc/bits/termios-c_iflag.h
 create mode 100644 sysdeps/unix/sysv/linux/powerpc/bits/termios-c_lflag.h
 create mode 100644 sysdeps/unix/sysv/linux/powerpc/bits/termios-c_oflag.h
 create mode 100644 sysdeps/unix/sysv/linux/powerpc/bits/termios-misc.h
 delete mode 100644 sysdeps/unix/sysv/linux/powerpc/bits/termios.h
 create mode 100644 sysdeps/unix/sysv/linux/sparc/bits/termios-c_cc.h
 create mode 100644 sysdeps/unix/sysv/linux/sparc/bits/termios-c_oflag.h
 create mode 100644 sysdeps/unix/sysv/linux/sparc/bits/termios-struct.h
 delete mode 100644 sysdeps/unix/sysv/linux/sparc/bits/termios.h

-- 
2.17.1

Comments

Siddhesh Poyarekar Dec. 31, 2018, 3:57 p.m. | #1
On 28/12/18 6:39 AM, Adhemerval Zanella wrote:
> This patchset is an updated version of my previous version [1]. The main

> changes are just the update commit message for third part (termios:

> Consolidate termios c_cc symbolic constants) to add powerpc as affected

> architecture and to mention BZ#23783 on sixth part (termios: Consolidate

> Baud Rate Selection definitions).

> 

> I am resending the whole set mainly because Siddhesh has asked to easier

> the review.

> 

> [1] https://sourceware.org/ml/libc-alpha/2018-10/msg00255.html

> 

> Adhemerval Zanella (12):

>    termios: Define TIOCSER_TEMT with __USE_MISC (BZ#17783)

>    termios: Consolidate struct termios

>    termios: Consolidate termios c_cc symbolic constants

>    termios: Consolidate Input Modes definitions.

>    termios: Consolidate Output Modes definitions

>    termios: Consolidate Baud Rate Selection definitions

>    termios: Consolidate control mode definitions

>    termios: Consolidate local mode definitions

>    termios: Consolidate tcflow symbolic constants

>    termios: Remove Linux _IOT_termios

>    termios: Add powerpc termios-misc

>    termios: Consolidate termios.h

> 


I've reviewed this patchset and it looks good to me overall.  This set 
should not result in any codegen changes so if you haven't already done 
that, please verify that there are no changes.  DWARF will change of 
course and you could work around it by comparing 'objdump -d' outputs of 
the binaries (all DSOs and test binaries) instead of their shasums.

Also, you may need to update the copyright line depending on whether you 
commit before the script to update the year runs or after.

Siddhesh
Adhemerval Zanella Jan. 3, 2019, 1:39 p.m. | #2
On 31/12/2018 13:57, Siddhesh Poyarekar wrote:
> On 28/12/18 6:39 AM, Adhemerval Zanella wrote:

>> This patchset is an updated version of my previous version [1]. The main

>> changes are just the update commit message for third part (termios:

>> Consolidate termios c_cc symbolic constants) to add powerpc as affected

>> architecture and to mention BZ#23783 on sixth part (termios: Consolidate

>> Baud Rate Selection definitions).

>>

>> I am resending the whole set mainly because Siddhesh has asked to easier

>> the review.

>>

>> [1] https://sourceware.org/ml/libc-alpha/2018-10/msg00255.html

>>

>> Adhemerval Zanella (12):

>>    termios: Define TIOCSER_TEMT with __USE_MISC (BZ#17783)

>>    termios: Consolidate struct termios

>>    termios: Consolidate termios c_cc symbolic constants

>>    termios: Consolidate Input Modes definitions.

>>    termios: Consolidate Output Modes definitions

>>    termios: Consolidate Baud Rate Selection definitions

>>    termios: Consolidate control mode definitions

>>    termios: Consolidate local mode definitions

>>    termios: Consolidate tcflow symbolic constants

>>    termios: Remove Linux _IOT_termios

>>    termios: Add powerpc termios-misc

>>    termios: Consolidate termios.h

>>

> 

> I've reviewed this patchset and it looks good to me overall.  This set should not result in any codegen changes so if you haven't already done that, please verify that there are no changes.  DWARF will change of course and you could work around it by comparing 'objdump -d' outputs of the binaries (all DSOs and test binaries) instead of their shasums.

> 

> Also, you may need to update the copyright line depending on whether you commit before the script to update the year runs or after.

> 

> Siddhesh


I spent some time yesterday checking the resulting toolchain built with 
build-many-glibcs.py ended up with same termios constant values and also
with same set of defined constants.

I also checked the resulting binary with disassembled output, which
resulted in a sparc fix for the 'Consolidate Baud Rate Selection 
definitions patch' (the original version did move the sparc specific
constants to sparc own header).
Siddhesh Poyarekar Jan. 3, 2019, 1:42 p.m. | #3
On 03/01/19 7:09 PM, Adhemerval Zanella wrote:
> I spent some time yesterday checking the resulting toolchain built with

> build-many-glibcs.py ended up with same termios constant values and also

> with same set of defined constants.

> 

> I also checked the resulting binary with disassembled output, which

> resulted in a sparc fix for the 'Consolidate Baud Rate Selection

> definitions patch' (the original version did move the sparc specific

> constants to sparc own header).


Thanks for verifying.

Siddhesh