ioctls: Convert ten architectures to asm-generic/ioctls.h
Subsystems (4)
cover ioctls: Convert ten architectures to asm-generic/ioctls.h
Around the time of the 32-/64-bit x86 merge, asm-generic/ioctls.h was created. It was modeled after the x86 version and new architectures are encouraged to use it.
It turns out that ten other architectures have done essentially the same thing, but by copying it instead. This series of patches updates those architectures to use the generic version.
There were a few differences between the arch-specific versions and the generic one, but none problematic enough to preclude this merge.
Specifically:
- 5 architectures define their own FIOQSIZE. asm-generic/ioctls.h already contains an ifndef for exactly this case.
- cris defines two new rs-485 ioctls and redefines another one. The two new ones are kept private and an ifndef line is added to the generic list.
- frv and h8300 provide TIOCTTYGSTRUCT, which is completely unused. I've kept it private to those architectures but it should probably be removed.
- The generic list contains the termiox ioctl set. This seems to have been added to x86 with the expectation that other arch maintainers would add it to their own. New architectures have inherited this automatically via asm-generic/ioctls.h and there isn't anything inherently architecture specific about it. It's safe to just add it to the affected architectures. If there is resistance to this, I can submit a separate patchset to enable it on those architectures and THEN apply this patchet, but it seems like a waste of time.
- The generic list provides TIOCGRS485 and TIOCSRS485, but they are still only used by two drivers, which are only available on arm, avr32, and cris. Again, there is nothing inherently architecture specific about it and new architectures have inherited it already.
All this can be verified with the following script. It strips whitespace, comments, and the leading ifndef/define header, sorts the output, and compares it without whitespace. It doesn't do any value processing, strictly 1:1 text.
I plan to audit the remaining architectures when I get a chance. Those are parisc, powerpc, sh, and xtensa.
-Jeff
---->8----
#!/bin/sh
process_include() {
sed -ne 's/^#[[:space:]]*define/#define/p' < $1 | \
sed -e 's#/\*.*##'| sed -e 's/[[:space:]]*$//' | \
egrep -v '#define _*(ASM|ARCH)'|grep -v ^$ | sort -k 2
}process_include include/asm-generic/ioctls.h > generic_ioctls
for arch in arm avr32 cris frv h8300 ia64 m32r m68k mn10300 s390; do
process_include arch/$arch/include/asm/ioctls.h > $arch-ioctls echo [$arch]
diff -wu $arch-ioctls generic_ioctls #|grep '^+#' rm -f $arch-ioctls
done
rm generic_ioctls
----8<----
PATCH 1/10 ioctl: Use asm-generic/ioctls.h on arm (enables termiox)
This patch converts arm to use asm-generic/ioctls.h instead of its own version.
The differences between the arch-specific version and the generic version are as follows:
- ARM defines its own value for FIOQSIZE, asm-generic/ioctls.h keeps it
- The generic version adds support for termiox
---
arch/arm/include/asm/ioctls.h | 83 ------------------------------------------ 1 file changed, 1 insertion(+), 82 deletions(-)
arch/arm/include/asm/ioctls.h +1 -82
@@ -1,89 +1,8 @@#ifndef __ASM_ARM_IOCTLS_H#define __ASM_ARM_IOCTLS_H -#include <asm/ioctl.h> - -/* 0x54 is just a magic number to make these relatively unique ('T') */ - -#define TCGETS 0x5401 -#define TCSETS 0x5402 -#define TCSETSW 0x5403 -#define TCSETSF 0x5404 -#define TCGETA 0x5405 -#define TCSETA 0x5406 -#define TCSETAW 0x5407 -#define TCSETAF 0x5408 -#define TCSBRK 0x5409 -#define TCXONC 0x540A -#define TCFLSH 0x540B -#define TIOCEXCL 0x540C -#define TIOCNXCL 0x540D -#define TIOCSCTTY 0x540E -#define TIOCGPGRP 0x540F -#define TIOCSPGRP 0x5410 -#define TIOCOUTQ 0x5411 -#define TIOCSTI 0x5412 -#define TIOCGWINSZ 0x5413 -#define TIOCSWINSZ 0x5414 -#define TIOCMGET 0x5415 -#define TIOCMBIS 0x5416 -#define TIOCMBIC 0x5417 -#define TIOCMSET 0x5418 -#define TIOCGSOFTCAR 0x5419 -#define TIOCSSOFTCAR 0x541A -#define FIONREAD 0x541B -#define TIOCINQ FIONREAD -#define TIOCLINUX 0x541C -#define TIOCCONS 0x541D -#define TIOCGSERIAL 0x541E -#define TIOCSSERIAL 0x541F -#define TIOCPKT 0x5420 -#define FIONBIO 0x5421 -#define TIOCNOTTY 0x5422 -#define TIOCSETD 0x5423 -#define TIOCGETD 0x5424 -#define TCSBRKP 0x5425/* Needed for POSIX tcsendbreak() */ -#define TIOCSBRK 0x5427/* BSD compatibility */ -#define TIOCCBRK 0x5428/* BSD compatibility */ -#define TIOCGSID 0x5429/* Return the session ID of FD */ -#define TCGETS2 _IOR('T',0x2A, struct termios2) -#define TCSETS2 _IOW('T',0x2B, struct termios2) -#define TCSETSW2 _IOW('T',0x2C, struct termios2) -#define TCSETSF2 _IOW('T',0x2D, struct termios2) -#define TIOCGPTN _IOR('T',0x30, unsigned int)/* Get Pty Number (of pty-mux device) */ -#define TIOCSPTLCK _IOW('T',0x31, int)/* Lock/unlock Pty */ -#define TIOCSIG _IOW('T',0x36, int)/* Generate signal on Pty slave */ - -#define TIOCGRS485 0x542E -#define TIOCSRS485 0x542F - -#define FIONCLEX 0x5450/* these numbers need to be adjusted. */ -#define FIOCLEX 0x5451 -#define FIOASYNC 0x5452 -#define TIOCSERCONFIG 0x5453 -#define TIOCSERGWILD 0x5454 -#define TIOCSERSWILD 0x5455 -#define TIOCGLCKTRMIOS 0x5456 -#define TIOCSLCKTRMIOS 0x5457 -#define TIOCSERGSTRUCT 0x5458/* For debugging only */ -#define TIOCSERGETLSR 0x5459/* Get line status register */ -#define TIOCSERGETMULTI 0x545A/* Get multiport config */ -#define TIOCSERSETMULTI 0x545B/* Set multiport config */ - -#define TIOCMIWAIT 0x545C/* wait for a change on serial input line(s) */ -#define TIOCGICOUNT 0x545D/* read serial port inline interrupt counts */ #define FIOQSIZE 0x545E -/* Used for packet mode */ -#define TIOCPKT_DATA 0 -#define TIOCPKT_FLUSHREAD 1 -#define TIOCPKT_FLUSHWRITE 2 -#define TIOCPKT_STOP 4 -#define TIOCPKT_START 8 -#define TIOCPKT_NOSTOP 16 -#define TIOCPKT_DOSTOP 32 -#define TIOCPKT_IOCTL 64 - -#define TIOCSER_TEMT 0x01/* Transmitter physically empty */ +#include <asm-generic/ioctls.h> #endif
Re: [patch 01/10] ioctl: Use asm-generic/ioctls.h on arm (enables termiox)
Please ensure that you Cc the ARM kernel mailing list.
Patch looks good in any case. Who's going to handle this?
Quoted 10 lines · Jeff Mahoney
This patch converts arm to use
asm-generic/ioctls.hinstead of its own version.The differences between the arch-specific version and the generic version are as follows:
- ARM defines its own value for FIOQSIZE,
asm-generic/ioctls.hkeeps it
- The generic version adds support for termioxCc Russell King <[email protected]>
Quoted 102 lines
Cc Greg Kroah-Hartman <[email protected]>Signed-off-by Jeff Mahoney <[email protected]>---
arch/arm/include/asm/ioctls.h | 83 ------------------------------------------ 1 file changed, 1 insertion(+), 82 deletions(-)arch/arm/include/asm/ioctls.h +1
-82@@ -1,89 +1,8 @@#ifndef __ASM_ARM_IOCTLS_H#define __ASM_ARM_IOCTLS_H -#include <asm/ioctl.h> - -/* 0x54 is just a magic number to make these relatively unique ('T') */ - -#define TCGETS 0x5401 -#define TCSETS 0x5402 -#define TCSETSW 0x5403 -#define TCSETSF 0x5404 -#define TCGETA 0x5405 -#define TCSETA 0x5406 -#define TCSETAW 0x5407 -#define TCSETAF 0x5408 -#define TCSBRK 0x5409 -#define TCXONC 0x540A -#define TCFLSH 0x540B -#define TIOCEXCL 0x540C -#define TIOCNXCL 0x540D -#define TIOCSCTTY 0x540E -#define TIOCGPGRP 0x540F -#define TIOCSPGRP 0x5410 -#define TIOCOUTQ 0x5411 -#define TIOCSTI 0x5412 -#define TIOCGWINSZ 0x5413 -#define TIOCSWINSZ 0x5414 -#define TIOCMGET 0x5415 -#define TIOCMBIS 0x5416 -#define TIOCMBIC 0x5417 -#define TIOCMSET 0x5418 -#define TIOCGSOFTCAR 0x5419 -#define TIOCSSOFTCAR 0x541A -#define FIONREAD 0x541B -#define TIOCINQ FIONREAD -#define TIOCLINUX 0x541C -#define TIOCCONS 0x541D -#define TIOCGSERIAL 0x541E -#define TIOCSSERIAL 0x541F -#define TIOCPKT 0x5420 -#define FIONBIO 0x5421 -#define TIOCNOTTY 0x5422 -#define TIOCSETD 0x5423 -#define TIOCGETD 0x5424 -#define TCSBRKP 0x5425/* Needed for POSIX tcsendbreak() */ -#define TIOCSBRK 0x5427/* BSD compatibility */ -#define TIOCCBRK 0x5428/* BSD compatibility */ -#define TIOCGSID 0x5429/* Return the session ID of FD */ -#define TCGETS2 _IOR('T',0x2A, struct termios2) -#define TCSETS2 _IOW('T',0x2B, struct termios2) -#define TCSETSW2 _IOW('T',0x2C, struct termios2) -#define TCSETSF2 _IOW('T',0x2D, struct termios2) -#define TIOCGPTN _IOR('T',0x30, unsigned int)/* Get Pty Number (of pty-mux device) */ -#define TIOCSPTLCK _IOW('T',0x31, int)/* Lock/unlock Pty */ -#define TIOCSIG _IOW('T',0x36, int)/* Generate signal on Pty slave */ - -#define TIOCGRS485 0x542E -#define TIOCSRS485 0x542F - -#define FIONCLEX 0x5450/* these numbers need to be adjusted. */ -#define FIOCLEX 0x5451 -#define FIOASYNC 0x5452 -#define TIOCSERCONFIG 0x5453 -#define TIOCSERGWILD 0x5454 -#define TIOCSERSWILD 0x5455 -#define TIOCGLCKTRMIOS 0x5456 -#define TIOCSLCKTRMIOS 0x5457 -#define TIOCSERGSTRUCT 0x5458/* For debugging only */ -#define TIOCSERGETLSR 0x5459/* Get line status register */ -#define TIOCSERGETMULTI 0x545A/* Get multiport config */ -#define TIOCSERSETMULTI 0x545B/* Set multiport config */ - -#define TIOCMIWAIT 0x545C/* wait for a change on serial input line(s) */ -#define TIOCGICOUNT 0x545D/* read serial port inline interrupt counts */ #define FIOQSIZE 0x545E -/* Used for packet mode */ -#define TIOCPKT_DATA 0 -#define TIOCPKT_FLUSHREAD 1 -#define TIOCPKT_FLUSHWRITE 2 -#define TIOCPKT_STOP 4 -#define TIOCPKT_START 8 -#define TIOCPKT_NOSTOP 16 -#define TIOCPKT_DOSTOP 32 -#define TIOCPKT_IOCTL 64 - -#define TIOCSER_TEMT 0x01/* Transmitter physically empty */ +#include <asm-generic/ioctls.h> #endif
Re: [patch 01/10] ioctl: Use asm-generic/ioctls.h on arm (enables termiox)
Quoted 3 lines · Russell King - ARM Linux
Please ensure that you Cc the ARM kernel mailing list.
Patch looks good in any case. Who's going to handle this?
I'll take it.
thanks,
greg k-h
PATCH 2/10 ioctl: Use asm-generic/ioctls.h on avr32 (enables termiox)
In reply to Jeff MahoneyThis patch converts avr32 to use asm-generic/ioctls.h instead of its own version.
The differences between the arch-specific version and the generic version are as follows:
- The generic version adds support for termiox
---
arch/avr32/include/asm/ioctls.h | 86 ---------------------------------------- 1 file changed, 1 insertion(+), 85 deletions(-)
arch/avr32/include/asm/ioctls.h +1 -85
@@ -1,90 +1,6 @@#ifndef __ASM_AVR32_IOCTLS_H#define __ASM_AVR32_IOCTLS_H -#include <asm/ioctl.h> - -/* 0x54 is just a magic number to make these relatively unique ('T') */ - -#define TCGETS 0x5401 -#define TCSETS 0x5402/* Clashes with SNDCTL_TMR_START sound ioctl */ -#define TCSETSW 0x5403 -#define TCSETSF 0x5404 -#define TCGETA 0x5405 -#define TCSETA 0x5406 -#define TCSETAW 0x5407 -#define TCSETAF 0x5408 -#define TCSBRK 0x5409 -#define TCXONC 0x540A -#define TCFLSH 0x540B -#define TIOCEXCL 0x540C -#define TIOCNXCL 0x540D -#define TIOCSCTTY 0x540E -#define TIOCGPGRP 0x540F -#define TIOCSPGRP 0x5410 -#define TIOCOUTQ 0x5411 -#define TIOCSTI 0x5412 -#define TIOCGWINSZ 0x5413 -#define TIOCSWINSZ 0x5414 -#define TIOCMGET 0x5415 -#define TIOCMBIS 0x5416 -#define TIOCMBIC 0x5417 -#define TIOCMSET 0x5418 -#define TIOCGSOFTCAR 0x5419 -#define TIOCSSOFTCAR 0x541A -#define FIONREAD 0x541B -#define TIOCINQ FIONREAD -#define TIOCLINUX 0x541C -#define TIOCCONS 0x541D -#define TIOCGSERIAL 0x541E -#define TIOCSSERIAL 0x541F -#define TIOCPKT 0x5420 -#define FIONBIO 0x5421 -#define TIOCNOTTY 0x5422 -#define TIOCSETD 0x5423 -#define TIOCGETD 0x5424 -#define TCSBRKP 0x5425/* Needed for POSIX tcsendbreak() */ -/* #define TIOCTTYGSTRUCT 0x5426 - Former debugging-only ioctl */ -#define TIOCSBRK 0x5427/* BSD compatibility */ -#define TIOCCBRK 0x5428/* BSD compatibility */ -#define TIOCGSID 0x5429/* Return the session ID of FD */ -#define TCGETS2 _IOR('T',0x2A, struct termios2) -#define TCSETS2 _IOW('T',0x2B, struct termios2) -#define TCSETSW2 _IOW('T',0x2C, struct termios2) -#define TCSETSF2 _IOW('T',0x2D, struct termios2) -#define TIOCGPTN _IOR('T',0x30, unsigned int)/* Get Pty Number (of pty-mux device) */ -#define TIOCSPTLCK _IOW('T',0x31, int)/* Lock/unlock Pty */ -#define TIOCSIG _IOW('T',0x36, int)/* Generate signal on Pty slave */ - -#define TIOCGRS485 0x542E -#define TIOCSRS485 0x542F - -#define FIONCLEX 0x5450 -#define FIOCLEX 0x5451 -#define FIOASYNC 0x5452 -#define TIOCSERCONFIG 0x5453 -#define TIOCSERGWILD 0x5454 -#define TIOCSERSWILD 0x5455 -#define TIOCGLCKTRMIOS 0x5456 -#define TIOCSLCKTRMIOS 0x5457 -#define TIOCSERGSTRUCT 0x5458/* For debugging only */ -#define TIOCSERGETLSR 0x5459/* Get line status register */ -#define TIOCSERGETMULTI 0x545A/* Get multiport config */ -#define TIOCSERSETMULTI 0x545B/* Set multiport config */ - -#define TIOCMIWAIT 0x545C/* wait for a change on serial input line(s) */ -#define TIOCGICOUNT 0x545D/* read serial port inline interrupt counts */ -#define FIOQSIZE 0x5460 - -/* Used for packet mode */ -#define TIOCPKT_DATA 0 -#define TIOCPKT_FLUSHREAD 1 -#define TIOCPKT_FLUSHWRITE 2 -#define TIOCPKT_STOP 4 -#define TIOCPKT_START 8 -#define TIOCPKT_NOSTOP 16 -#define TIOCPKT_DOSTOP 32 -#define TIOCPKT_IOCTL 64 - -#define TIOCSER_TEMT 0x01/* Transmitter physically empty */ +#include <asm-generic/ioctls.h> #endif /* __ASM_AVR32_IOCTLS_H */
Re: [patch 02/10] ioctl: Use asm-generic/ioctls.h on avr32 (enables termiox)
Quoted 11 lines · Jeff Mahoney
This patch converts avr32 to use
asm-generic/ioctls.hinstead of its own version.The differences between the arch-specific version and the generic version are as follows:
- The generic version adds support for termiox
Cc Haavard Skinnemoen <[email protected]>Cc Greg Kroah-Hartman <[email protected]>Signed-off-by Jeff Mahoney <[email protected]>
Makes sense to me. Perhaps not so good that it adds extra code for termiox, but then again, I guess it might be useful some day, as the USART hardware has a lot of extra modes that the current atmel_serial driver doesn't support.
PATCH 3/10 ioctl: Use asm-generic/ioctls.h on cris (enables termiox)
In reply to Jeff MahoneyThis patch converts cris to use asm-generic/ioctls.h instead of its own version.
The differences between the arch-specific version and the generic version are as follows:
- CRIS defines two ioctls: TIOCSERSETRS485 and TIOCSERWRRS485, kept in arch-specific portion
- CRIS defines a different value for TIOCSRS485, kept via ifndef in generic
- The generic version adds support for termiox
---
arch/cris/include/asm/ioctls.h | 84 ----------------------------------------- include/asm-generic/ioctls.h | 2 2 files changed, 3 insertions(+), 83 deletions(-)
arch/cris/include/asm/ioctls.h +1 -83
@@ -1,93 +1,11 @@#ifndef __ARCH_CRIS_IOCTLS_H__#define __ARCH_CRIS_IOCTLS_H__ -/* verbatim copy of asm-i386/ioctls.h */ - -#include <asm/ioctl.h> - -/* 0x54 is just a magic number to make these relatively unique ('T') */ - -#define TCGETS 0x5401 -#define TCSETS 0x5402 -#define TCSETSW 0x5403 -#define TCSETSF 0x5404 -#define TCGETA 0x5405 -#define TCSETA 0x5406 -#define TCSETAW 0x5407 -#define TCSETAF 0x5408 -#define TCSBRK 0x5409 -#define TCXONC 0x540A -#define TCFLSH 0x540B -#define TIOCEXCL 0x540C -#define TIOCNXCL 0x540D -#define TIOCSCTTY 0x540E -#define TIOCGPGRP 0x540F -#define TIOCSPGRP 0x5410 -#define TIOCOUTQ 0x5411 -#define TIOCSTI 0x5412 -#define TIOCGWINSZ 0x5413 -#define TIOCSWINSZ 0x5414 -#define TIOCMGET 0x5415 -#define TIOCMBIS 0x5416 -#define TIOCMBIC 0x5417 -#define TIOCMSET 0x5418 -#define TIOCGSOFTCAR 0x5419 -#define TIOCSSOFTCAR 0x541A -#define FIONREAD 0x541B -#define TIOCINQ FIONREAD -#define TIOCLINUX 0x541C -#define TIOCCONS 0x541D -#define TIOCGSERIAL 0x541E -#define TIOCSSERIAL 0x541F -#define TIOCPKT 0x5420 -#define FIONBIO 0x5421 -#define TIOCNOTTY 0x5422 -#define TIOCSETD 0x5423 -#define TIOCGETD 0x5424 -#define TCSBRKP 0x5425/* Needed for POSIX tcsendbreak() */ -#define TIOCSBRK 0x5427/* BSD compatibility */ -#define TIOCCBRK 0x5428/* BSD compatibility */ -#define TIOCGSID 0x5429/* Return the session ID of FD */ -#define TCGETS2 _IOR('T',0x2A, struct termios2) -#define TCSETS2 _IOW('T',0x2B, struct termios2) -#define TCSETSW2 _IOW('T',0x2C, struct termios2) -#define TCSETSF2 _IOW('T',0x2D, struct termios2) -#define TIOCGPTN _IOR('T',0x30, unsigned int)/* Get Pty Number (of pty-mux device) */ -#define TIOCSPTLCK _IOW('T',0x31, int)/* Lock/unlock Pty */ -#define TIOCSIG _IOW('T',0x36, int)/* Generate signal on Pty slave */ - -#define FIONCLEX 0x5450/* these numbers need to be adjusted. */ -#define FIOCLEX 0x5451 -#define FIOASYNC 0x5452 -#define TIOCSERCONFIG 0x5453 -#define TIOCSERGWILD 0x5454 -#define TIOCSERSWILD 0x5455 -#define TIOCGLCKTRMIOS 0x5456 -#define TIOCSLCKTRMIOS 0x5457#define TIOCSERGSTRUCT 0x5458/* For debugging only */ -#define TIOCSERGETLSR 0x5459/* Get line status register */ -#define TIOCSERGETMULTI 0x545A/* Get multiport config */ -#define TIOCSERSETMULTI 0x545B/* Set multiport config */ - -#define TIOCMIWAIT 0x545C/* wait for a change on serial input line(s) */ -#define TIOCGICOUNT 0x545D/* read serial port inline interrupt counts */ -#define FIOQSIZE 0x5460 -#define TIOCSERSETRS485 0x5461/* enable rs-485 (deprecated) */ #define TIOCSERWRRS485 0x5462/* write rs-485 */ #define TIOCSRS485 0x5463/* enable rs-485 */ -#define TIOCGRS485 0x542E/* get rs-485 */ - -/* Used for packet mode */ -#define TIOCPKT_DATA 0 -#define TIOCPKT_FLUSHREAD 1 -#define TIOCPKT_FLUSHWRITE 2 -#define TIOCPKT_STOP 4 -#define TIOCPKT_START 8 -#define TIOCPKT_NOSTOP 16 -#define TIOCPKT_DOSTOP 32 -#define TIOCPKT_IOCTL 64 -#define TIOCSER_TEMT 0x01/* Transmitter physically empty */ +#include <asm-generic/ioctls.h> #endif
include/asm-generic/ioctls.h +2 -0
@@ -62,7 +62,9 @@#define TCSETSW2 _IOW('T', 0x2C, struct termios2)#define TCSETSF2 _IOW('T', 0x2D, struct termios2)#define TIOCGRS485 0x542E +#ifndef TIOCSRS485 #define TIOCSRS485 0x542F +#endif #define TIOCGPTN _IOR('T', 0x30, unsigned int)/* Get Pty Number (of pty-mux device) */ #define TIOCSPTLCK _IOW('T', 0x31, int)/* Lock/unlock Pty */ #define TCGETX 0x5432/* SYS5 TCGETX compatibility */
PATCH 4/10 ioctl: Use asm-generic/ioctls.h on frv (enables termiox)
In reply to Jeff MahoneyThis patch converts frv to use asm-generic/ioctls.h instead of its own version.
The differences between the arch-specific version and the generic version are as follows:
- FRV defines its own value for FIOQSIZE, asm-generic/ioctls.h keeps it
- FRV defines TIOCTTYGSTRUCT, kept in arch-specific version
- The generic version provides TIOCGRS485 and TIOCSRS485 but they are unused by any driver available for this architecture.
- The generic version adds support for termiox
---
arch/frv/include/asm/ioctls.h | 80 ------------------------------------------ 1 file changed, 1 insertion(+), 79 deletions(-)
arch/frv/include/asm/ioctls.h +1 -79
@@ -1,88 +1,10 @@#ifndef __ASM_IOCTLS_H__#define __ASM_IOCTLS_H__ -#include <asm/ioctl.h> - -/* 0x54 is just a magic number to make these relatively unique ('T') */ - -#define TCGETS 0x5401 -#define TCSETS 0x5402 -#define TCSETSW 0x5403 -#define TCSETSF 0x5404 -#define TCGETA 0x5405 -#define TCSETA 0x5406 -#define TCSETAW 0x5407 -#define TCSETAF 0x5408 -#define TCSBRK 0x5409 -#define TCXONC 0x540A -#define TCFLSH 0x540B -#define TIOCEXCL 0x540C -#define TIOCNXCL 0x540D -#define TIOCSCTTY 0x540E -#define TIOCGPGRP 0x540F -#define TIOCSPGRP 0x5410 -#define TIOCOUTQ 0x5411 -#define TIOCSTI 0x5412 -#define TIOCGWINSZ 0x5413 -#define TIOCSWINSZ 0x5414 -#define TIOCMGET 0x5415 -#define TIOCMBIS 0x5416 -#define TIOCMBIC 0x5417 -#define TIOCMSET 0x5418 -#define TIOCGSOFTCAR 0x5419 -#define TIOCSSOFTCAR 0x541A -#define FIONREAD 0x541B -#define TIOCINQ FIONREAD -#define TIOCLINUX 0x541C -#define TIOCCONS 0x541D -#define TIOCGSERIAL 0x541E -#define TIOCSSERIAL 0x541F -#define TIOCPKT 0x5420 -#define FIONBIO 0x5421 -#define TIOCNOTTY 0x5422 -#define TIOCSETD 0x5423 -#define TIOCGETD 0x5424 -#define TCSBRKP 0x5425/* Needed for POSIX tcsendbreak() */ #define TIOCTTYGSTRUCT 0x5426/* For debugging only */ -#define TIOCSBRK 0x5427/* BSD compatibility */ -#define TIOCCBRK 0x5428/* BSD compatibility */ -#define TIOCGSID 0x5429/* Return the session ID of FD */ -#define TCGETS2 _IOR('T',0x2A, struct termios2) -#define TCSETS2 _IOW('T',0x2B, struct termios2) -#define TCSETSW2 _IOW('T',0x2C, struct termios2) -#define TCSETSF2 _IOW('T',0x2D, struct termios2) -#define TIOCGPTN _IOR('T',0x30, unsigned int)/* Get Pty Number (of pty-mux device) */ -#define TIOCSPTLCK _IOW('T',0x31, int)/* Lock/unlock Pty */ -#define TIOCSIG _IOW('T',0x36, int)/* Generate signal on Pty slave */ - -#define FIONCLEX 0x5450/* these numbers need to be adjusted. */ -#define FIOCLEX 0x5451 -#define FIOASYNC 0x5452 -#define TIOCSERCONFIG 0x5453 -#define TIOCSERGWILD 0x5454 -#define TIOCSERSWILD 0x5455 -#define TIOCGLCKTRMIOS 0x5456 -#define TIOCSLCKTRMIOS 0x5457 -#define TIOCSERGSTRUCT 0x5458/* For debugging only */ -#define TIOCSERGETLSR 0x5459/* Get line status register */ -#define TIOCSERGETMULTI 0x545A/* Get multiport config */ -#define TIOCSERSETMULTI 0x545B/* Set multiport config */ - -#define TIOCMIWAIT 0x545C/* wait for a change on serial input line(s) */ -#define TIOCGICOUNT 0x545D/* read serial port inline interrupt counts */ #define FIOQSIZE 0x545E -/* Used for packet mode */ -#define TIOCPKT_DATA 0 -#define TIOCPKT_FLUSHREAD 1 -#define TIOCPKT_FLUSHWRITE 2 -#define TIOCPKT_STOP 4 -#define TIOCPKT_START 8 -#define TIOCPKT_NOSTOP 16 -#define TIOCPKT_DOSTOP 32 -#define TIOCPKT_IOCTL 64 - -#define TIOCSER_TEMT 0x01/* Transmitter physically empty */ +#include <asm-generic/ioctls.h> #endif /* __ASM_IOCTLS_H__ */
Arnd Bergmann
maintainerRe: [patch 04/10] ioctl: Use asm-generic/ioctls.h on frv (enables termiox)
Quoted 1 line · On Friday 20 August 2010 23:14:05 Jeff Mahoney wrote:
- FRV defines TIOCTTYGSTRUCT, kept in arch-specific version
Pointless, this was removed by the other architecture, and the same change should be done here, possibly in a separate patch.
Arnd
Re: [patch 04/10] ioctl: Use asm-generic/ioctls.h on frv (enables termiox)
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Quoted 5 lines · Arnd Bergmann
Quoted 1 line · On Friday 20 August 2010 23:14:05 Jeff Mahoney wrote:
- FRV defines TIOCTTYGSTRUCT, kept in arch-specific version
Pointless, this was removed by the other architecture, and the same change should be done here, possibly in a separate patch.
Agreed.
- -Jeff
- --
Jeff Mahoney
SUSE Labs
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.15 (GNU/Linux)
Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org/
iEYEARECAAYFAkxvBZYACgkQLPWxlyuTD7I6DwCeP4N3tAiD1VB3S215KzyckOO6 0NAAoI2qtv6aKz6yDl4dQdBatOLENEwh
=Cnn1
-----END PGP SIGNATURE-----
Re: [patch 04/10] ioctl: Use asm-generic/ioctls.h on frv (enables termiox)
In reply to Jeff MahoneyQuoted 8 lines · Jeff Mahoney
This patch converts frv to use
asm-generic/ioctls.hinstead of its own version.The differences between the arch-specific version and the generic version are as follows:
- FRV defines its own value for FIOQSIZE,
asm-generic/ioctls.hkeeps it
- FRV defines TIOCTTYGSTRUCT, kept in arch-specific version
This is an ioctl that used be implemented in generic code and then was removed. I looks like a couple of ports added after the removal kept the defintion anyway. Just kill it from all of them.
PATCH 5/10 ioctl: Use asm-generic/ioctls.h on h8300 (enables termiox)
In reply to Jeff MahoneyThis patch converts h8300 to use asm-generic/ioctls.h instead of its own version.
The differences between the arch-specific version and the generic version are as follows:
- H8300 defines its own value for FIOQSIZE, asm-generic/ioctls.h keeps it
- The generic version adds TIOCSRS485 and TIOGSRS485, but are unused by any driver available on this architecture.
- The generic version adds support for termiox
---
arch/h8300/include/asm/ioctls.h | 81 ---------------------------------------- 1 file changed, 1 insertion(+), 80 deletions(-)
arch/h8300/include/asm/ioctls.h +1 -80
@@ -1,87 +1,8 @@#ifndef __ARCH_H8300_IOCTLS_H__#define __ARCH_H8300_IOCTLS_H__ -#include <asm/ioctl.h> - -/* 0x54 is just a magic number to make these relatively unique ('T') */ - -#define TCGETS 0x5401 -#define TCSETS 0x5402 -#define TCSETSW 0x5403 -#define TCSETSF 0x5404 -#define TCGETA 0x5405 -#define TCSETA 0x5406 -#define TCSETAW 0x5407 -#define TCSETAF 0x5408 -#define TCSBRK 0x5409 -#define TCXONC 0x540A -#define TCFLSH 0x540B -#define TIOCEXCL 0x540C -#define TIOCNXCL 0x540D -#define TIOCSCTTY 0x540E -#define TIOCGPGRP 0x540F -#define TIOCSPGRP 0x5410 -#define TIOCOUTQ 0x5411 -#define TIOCSTI 0x5412 -#define TIOCGWINSZ 0x5413 -#define TIOCSWINSZ 0x5414 -#define TIOCMGET 0x5415 -#define TIOCMBIS 0x5416 -#define TIOCMBIC 0x5417 -#define TIOCMSET 0x5418 -#define TIOCGSOFTCAR 0x5419 -#define TIOCSSOFTCAR 0x541A -#define FIONREAD 0x541B -#define TIOCINQ FIONREAD -#define TIOCLINUX 0x541C -#define TIOCCONS 0x541D -#define TIOCGSERIAL 0x541E -#define TIOCSSERIAL 0x541F -#define TIOCPKT 0x5420 -#define FIONBIO 0x5421 -#define TIOCNOTTY 0x5422 -#define TIOCSETD 0x5423 -#define TIOCGETD 0x5424 -#define TCSBRKP 0x5425/* Needed for POSIX tcsendbreak() */ -#define TIOCTTYGSTRUCT 0x5426/* For debugging only */ -#define TIOCSBRK 0x5427/* BSD compatibility */ -#define TIOCCBRK 0x5428/* BSD compatibility */ -#define TIOCGSID 0x5429/* Return the session ID of FD */ -#define TCGETS2 _IOR('T',0x2A, struct termios2) -#define TCSETS2 _IOW('T',0x2B, struct termios2) -#define TCSETSW2 _IOW('T',0x2C, struct termios2) -#define TCSETSF2 _IOW('T',0x2D, struct termios2) -#define TIOCGPTN _IOR('T',0x30, unsigned int)/* Get Pty Number (of pty-mux device) */ -#define TIOCSPTLCK _IOW('T',0x31, int)/* Lock/unlock Pty */ -#define TIOCSIG _IOW('T',0x36, int)/* Generate signal on Pty slave */ - -#define FIONCLEX 0x5450/* these numbers need to be adjusted. */ -#define FIOCLEX 0x5451 -#define FIOASYNC 0x5452 -#define TIOCSERCONFIG 0x5453 -#define TIOCSERGWILD 0x5454 -#define TIOCSERSWILD 0x5455 -#define TIOCGLCKTRMIOS 0x5456 -#define TIOCSLCKTRMIOS 0x5457 -#define TIOCSERGSTRUCT 0x5458/* For debugging only */ -#define TIOCSERGETLSR 0x5459/* Get line status register */ -#define TIOCSERGETMULTI 0x545A/* Get multiport config */ -#define TIOCSERSETMULTI 0x545B/* Set multiport config */ - -#define TIOCMIWAIT 0x545C/* wait for a change on serial input line(s) */ -#define TIOCGICOUNT 0x545D/* read serial port inline interrupt counts */ #define FIOQSIZE 0x545E -/* Used for packet mode */ -#define TIOCPKT_DATA 0 -#define TIOCPKT_FLUSHREAD 1 -#define TIOCPKT_FLUSHWRITE 2 -#define TIOCPKT_STOP 4 -#define TIOCPKT_START 8 -#define TIOCPKT_NOSTOP 16 -#define TIOCPKT_DOSTOP 32 -#define TIOCPKT_IOCTL 64 - -#define TIOCSER_TEMT 0x01/* Transmitter physically empty */ +#include <asm-generic/ioctls.h> #endif /* __ARCH_H8300_IOCTLS_H__ */
PATCH 6/10 ioctl: Use asm-generic/ioctls.h on ia64 (enables termiox)
In reply to Jeff MahoneyThis patch converts ia64 to use asm-generic/ioctls.h instead of its own version.
The differences between the arch-specific version and the generic version are as follows:
- The generic version adds TIOCSRS485 and TIOCGRS485, which are unused by any driver available on this architecture.
- The generic version adds support for termiox
---
arch/ia64/include/asm/ioctls.h | 89 ----------------------------------------- 1 file changed, 1 insertion(+), 88 deletions(-)
arch/ia64/include/asm/ioctls.h +1 -88
@@ -1,93 +1,6 @@#ifndef _ASM_IA64_IOCTLS_H#define _ASM_IA64_IOCTLS_H -/* -* Based on <asm-i386/ioctls.h> -* -* Modified 1998, 1999, 2002 -* David Mosberger-Tang <[email protected]>, Hewlett-Packard Co -*/ - -#include <asm/ioctl.h> - -/* 0x54 is just a magic number to make these relatively unique ('T') */ - -#define TCGETS 0x5401 -#define TCSETS 0x5402/* Clashes with SNDCTL_TMR_START sound ioctl */ -#define TCSETSW 0x5403 -#define TCSETSF 0x5404 -#define TCGETA 0x5405 -#define TCSETA 0x5406 -#define TCSETAW 0x5407 -#define TCSETAF 0x5408 -#define TCSBRK 0x5409 -#define TCXONC 0x540A -#define TCFLSH 0x540B -#define TIOCEXCL 0x540C -#define TIOCNXCL 0x540D -#define TIOCSCTTY 0x540E -#define TIOCGPGRP 0x540F -#define TIOCSPGRP 0x5410 -#define TIOCOUTQ 0x5411 -#define TIOCSTI 0x5412 -#define TIOCGWINSZ 0x5413 -#define TIOCSWINSZ 0x5414 -#define TIOCMGET 0x5415 -#define TIOCMBIS 0x5416 -#define TIOCMBIC 0x5417 -#define TIOCMSET 0x5418 -#define TIOCGSOFTCAR 0x5419 -#define TIOCSSOFTCAR 0x541A -#define FIONREAD 0x541B -#define TIOCINQ FIONREAD -#define TIOCLINUX 0x541C -#define TIOCCONS 0x541D -#define TIOCGSERIAL 0x541E -#define TIOCSSERIAL 0x541F -#define TIOCPKT 0x5420 -#define FIONBIO 0x5421 -#define TIOCNOTTY 0x5422 -#define TIOCSETD 0x5423 -#define TIOCGETD 0x5424 -#define TCSBRKP 0x5425/* Needed for POSIX tcsendbreak() */ -#define TIOCSBRK 0x5427/* BSD compatibility */ -#define TIOCCBRK 0x5428/* BSD compatibility */ -#define TIOCGSID 0x5429/* Return the session ID of FD */ -#define TCGETS2 _IOR('T',0x2A, struct termios2) -#define TCSETS2 _IOW('T',0x2B, struct termios2) -#define TCSETSW2 _IOW('T',0x2C, struct termios2) -#define TCSETSF2 _IOW('T',0x2D, struct termios2) -#define TIOCGPTN _IOR('T',0x30, unsigned int)/* Get Pty Number (of pty-mux device) */ -#define TIOCSPTLCK _IOW('T',0x31, int)/* Lock/unlock Pty */ -#define TIOCSIG _IOW('T',0x36, int)/* Generate signal on Pty slave */ - -#define FIONCLEX 0x5450/* these numbers need to be adjusted. */ -#define FIOCLEX 0x5451 -#define FIOASYNC 0x5452 -#define TIOCSERCONFIG 0x5453 -#define TIOCSERGWILD 0x5454 -#define TIOCSERSWILD 0x5455 -#define TIOCGLCKTRMIOS 0x5456 -#define TIOCSLCKTRMIOS 0x5457 -#define TIOCSERGSTRUCT 0x5458/* For debugging only */ -#define TIOCSERGETLSR 0x5459/* Get line status register */ -#define TIOCSERGETMULTI 0x545A/* Get multiport config */ -#define TIOCSERSETMULTI 0x545B/* Set multiport config */ - -#define TIOCMIWAIT 0x545C/* wait for a change on serial input line(s) */ -#define TIOCGICOUNT 0x545D/* read serial port inline interrupt counts */ -#define FIOQSIZE 0x5460 - -/* Used for packet mode */ -#define TIOCPKT_DATA 0 -#define TIOCPKT_FLUSHREAD 1 -#define TIOCPKT_FLUSHWRITE 2 -#define TIOCPKT_STOP 4 -#define TIOCPKT_START 8 -#define TIOCPKT_NOSTOP 16 -#define TIOCPKT_DOSTOP 32 -#define TIOCPKT_IOCTL 64 - -#define TIOCSER_TEMT 0x01/* Transmitter physically empty */ +#include <asm-generic/ioctls.h> #endif /* _ASM_IA64_IOCTLS_H */
PATCH 7/10 ioctl: Use asm-generic/ioctls.h on m32r (enables termiox)
In reply to Jeff MahoneyThis patch converts m32r to use asm-generic/ioctls.h instead of its own version.
The differences between the arch-specific version and the generic version are as follows:
- The generic version adds TIOCGRS485 and TIOCGRS485, which are unused by any driver available on this architecture.
- The generic version adds support for termiox
---
arch/m32r/include/asm/ioctls.h | 83 ----------------------------------------- 1 file changed, 1 insertion(+), 82 deletions(-)
arch/m32r/include/asm/ioctls.h +1 -82
@@ -1,87 +1,6 @@#ifndef __ARCH_M32R_IOCTLS_H__#define __ARCH_M32R_IOCTLS_H__ -#include <asm/ioctl.h> - -/* 0x54 is just a magic number to make these relatively unique ('T') */ - -#define TCGETS 0x5401 -#define TCSETS 0x5402/* Clashes with SNDCTL_TMR_START sound ioctl */ -#define TCSETSW 0x5403 -#define TCSETSF 0x5404 -#define TCGETA 0x5405 -#define TCSETA 0x5406 -#define TCSETAW 0x5407 -#define TCSETAF 0x5408 -#define TCSBRK 0x5409 -#define TCXONC 0x540A -#define TCFLSH 0x540B -#define TIOCEXCL 0x540C -#define TIOCNXCL 0x540D -#define TIOCSCTTY 0x540E -#define TIOCGPGRP 0x540F -#define TIOCSPGRP 0x5410 -#define TIOCOUTQ 0x5411 -#define TIOCSTI 0x5412 -#define TIOCGWINSZ 0x5413 -#define TIOCSWINSZ 0x5414 -#define TIOCMGET 0x5415 -#define TIOCMBIS 0x5416 -#define TIOCMBIC 0x5417 -#define TIOCMSET 0x5418 -#define TIOCGSOFTCAR 0x5419 -#define TIOCSSOFTCAR 0x541A -#define FIONREAD 0x541B -#define TIOCINQ FIONREAD -#define TIOCLINUX 0x541C -#define TIOCCONS 0x541D -#define TIOCGSERIAL 0x541E -#define TIOCSSERIAL 0x541F -#define TIOCPKT 0x5420 -#define FIONBIO 0x5421 -#define TIOCNOTTY 0x5422 -#define TIOCSETD 0x5423 -#define TIOCGETD 0x5424 -#define TCSBRKP 0x5425/* Needed for POSIX tcsendbreak() */ -/* #define TIOCTTYGSTRUCT 0x5426 - Former debugging-only ioctl */ -#define TIOCSBRK 0x5427/* BSD compatibility */ -#define TIOCCBRK 0x5428/* BSD compatibility */ -#define TIOCGSID 0x5429/* Return the session ID of FD */ -#define TCGETS2 _IOR('T',0x2A, struct termios2) -#define TCSETS2 _IOW('T',0x2B, struct termios2) -#define TCSETSW2 _IOW('T',0x2C, struct termios2) -#define TCSETSF2 _IOW('T',0x2D, struct termios2) -#define TIOCGPTN _IOR('T',0x30, unsigned int)/* Get Pty Number (of pty-mux device) */ -#define TIOCSPTLCK _IOW('T',0x31, int)/* Lock/unlock Pty */ -#define TIOCSIG _IOW('T',0x36, int)/* Generate signal on Pty slave */ - -#define FIONCLEX 0x5450 -#define FIOCLEX 0x5451 -#define FIOASYNC 0x5452 -#define TIOCSERCONFIG 0x5453 -#define TIOCSERGWILD 0x5454 -#define TIOCSERSWILD 0x5455 -#define TIOCGLCKTRMIOS 0x5456 -#define TIOCSLCKTRMIOS 0x5457 -#define TIOCSERGSTRUCT 0x5458/* For debugging only */ -#define TIOCSERGETLSR 0x5459/* Get line status register */ -#define TIOCSERGETMULTI 0x545A/* Get multiport config */ -#define TIOCSERSETMULTI 0x545B/* Set multiport config */ - -#define TIOCMIWAIT 0x545C/* wait for a change on serial input line(s) */ -#define TIOCGICOUNT 0x545D/* read serial port inline interrupt counts */ -#define FIOQSIZE 0x5460 - -/* Used for packet mode */ -#define TIOCPKT_DATA 0 -#define TIOCPKT_FLUSHREAD 1 -#define TIOCPKT_FLUSHWRITE 2 -#define TIOCPKT_STOP 4 -#define TIOCPKT_START 8 -#define TIOCPKT_NOSTOP 16 -#define TIOCPKT_DOSTOP 32 -#define TIOCPKT_IOCTL 64 - -#define TIOCSER_TEMT 0x01/* Transmitter physically empty */ +#include <asm-generic/ioctls.h> #endif /* __ARCH_M32R_IOCTLS_H__ */
PATCH 8/10 ioctl: Use asm-generic/ioctls.h on m68k (enables termiox)
In reply to Jeff MahoneyThis patch converts m68k to use asm-generic/ioctls.h instead of its own version.
The differences between the arch-specific version and the generic version are as follows:
- m68k defines its own value for FIOQSIZE, asm-generic/ioctls.h keeps it
- The generic version adds TIOCSRS485 and TIOCGRS485m which are unused by any driver available on this architecture.
- The generic version adds support for termiox
---
arch/m68k/include/asm/ioctls.h | 80 ----------------------------------------- 1 file changed, 1 insertion(+), 79 deletions(-)
arch/m68k/include/asm/ioctls.h +1 -79
@@ -1,86 +1,8 @@#ifndef __ARCH_M68K_IOCTLS_H__#define __ARCH_M68K_IOCTLS_H__ -#include <asm/ioctl.h> - -/* 0x54 is just a magic number to make these relatively unique ('T') */ - -#define TCGETS 0x5401 -#define TCSETS 0x5402 -#define TCSETSW 0x5403 -#define TCSETSF 0x5404 -#define TCGETA 0x5405 -#define TCSETA 0x5406 -#define TCSETAW 0x5407 -#define TCSETAF 0x5408 -#define TCSBRK 0x5409 -#define TCXONC 0x540A -#define TCFLSH 0x540B -#define TIOCEXCL 0x540C -#define TIOCNXCL 0x540D -#define TIOCSCTTY 0x540E -#define TIOCGPGRP 0x540F -#define TIOCSPGRP 0x5410 -#define TIOCOUTQ 0x5411 -#define TIOCSTI 0x5412 -#define TIOCGWINSZ 0x5413 -#define TIOCSWINSZ 0x5414 -#define TIOCMGET 0x5415 -#define TIOCMBIS 0x5416 -#define TIOCMBIC 0x5417 -#define TIOCMSET 0x5418 -#define TIOCGSOFTCAR 0x5419 -#define TIOCSSOFTCAR 0x541A -#define FIONREAD 0x541B -#define TIOCINQ FIONREAD -#define TIOCLINUX 0x541C -#define TIOCCONS 0x541D -#define TIOCGSERIAL 0x541E -#define TIOCSSERIAL 0x541F -#define TIOCPKT 0x5420 -#define FIONBIO 0x5421 -#define TIOCNOTTY 0x5422 -#define TIOCSETD 0x5423 -#define TIOCGETD 0x5424 -#define TCSBRKP 0x5425/* Needed for POSIX tcsendbreak() */ -#define TIOCSBRK 0x5427/* BSD compatibility */ -#define TIOCCBRK 0x5428/* BSD compatibility */ -#define TIOCGSID 0x5429/* Return the session ID of FD */ -#define TCGETS2 _IOR('T',0x2A, struct termios2) -#define TCSETS2 _IOW('T',0x2B, struct termios2) -#define TCSETSW2 _IOW('T',0x2C, struct termios2) -#define TCSETSF2 _IOW('T',0x2D, struct termios2) -#define TIOCGPTN _IOR('T',0x30, unsigned int)/* Get Pty Number (of pty-mux device) */ -#define TIOCSPTLCK _IOW('T',0x31, int)/* Lock/unlock Pty */ -#define TIOCSIG _IOW('T',0x36, int)/* Generate signal on Pty slave */ - -#define FIONCLEX 0x5450/* these numbers need to be adjusted. */ -#define FIOCLEX 0x5451 -#define FIOASYNC 0x5452 -#define TIOCSERCONFIG 0x5453 -#define TIOCSERGWILD 0x5454 -#define TIOCSERSWILD 0x5455 -#define TIOCGLCKTRMIOS 0x5456 -#define TIOCSLCKTRMIOS 0x5457 -#define TIOCSERGSTRUCT 0x5458/* For debugging only */ -#define TIOCSERGETLSR 0x5459/* Get line status register */ -#define TIOCSERGETMULTI 0x545A/* Get multiport config */ -#define TIOCSERSETMULTI 0x545B/* Set multiport config */ - -#define TIOCMIWAIT 0x545C/* wait for a change on serial input line(s) */ -#define TIOCGICOUNT 0x545D/* read serial port inline interrupt counts */ #define FIOQSIZE 0x545E -/* Used for packet mode */ -#define TIOCPKT_DATA 0 -#define TIOCPKT_FLUSHREAD 1 -#define TIOCPKT_FLUSHWRITE 2 -#define TIOCPKT_STOP 4 -#define TIOCPKT_START 8 -#define TIOCPKT_NOSTOP 16 -#define TIOCPKT_DOSTOP 32 -#define TIOCPKT_IOCTL 64 - -#define TIOCSER_TEMT 0x01/* Transmitter physically empty */ +#include <asm-generic/ioctls.h> #endif /* __ARCH_M68K_IOCTLS_H__ */
Re: [patch 08/10] ioctl: Use asm-generic/ioctls.h on m68k (enables termiox)
Quoted 11 lines · Jeff Mahoney
This patch converts m68k to use
asm-generic/ioctls.hinstead of its own version.The differences between the arch-specific version and the generic version are as follows:
- m68k defines its own value for FIOQSIZE,
asm-generic/ioctls.hkeeps it
- The generic version adds TIOCSRS485 and TIOCGRS485m which are unused by any driver available on this architecture.
- The generic version adds support for termiox
Quoted 4 lines
Cc Geert Uytterhoeven <[email protected]>Cc Roman Zippel <[email protected]>Cc Greg Kroah-Hartman <[email protected]>Signed-off-by Jeff Mahoney <[email protected]>
Applied
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]
In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds
PATCH 9/10 ioctl: Use asm-generic/ioctls.h on mn10300 (enables termiox)
In reply to Jeff MahoneyThis patch converts mn10300 to use asm-generic/ioctls.h instead of its own version.
The differences between the arch-specific version and the generic version are as follows:
- The generic version provides TIOCGRS485 and TIOCSRS485 but they are unused by any driver available for this architecture.
- The generic version adds support for termiox
---
arch/mn10300/include/asm/ioctls.h | 84 -------------------------------------- 1 file changed, 1 insertion(+), 83 deletions(-)
arch/mn10300/include/asm/ioctls.h +1 -83
@@ -1,88 +1,6 @@#ifndef _ASM_IOCTLS_H#define _ASM_IOCTLS_H -#include <asm/ioctl.h> - -/* 0x54 is just a magic number to make these relatively unique ('T') */ - -#define TCGETS 0x5401 -#define TCSETS 0x5402 -#define TCSETSW 0x5403 -#define TCSETSF 0x5404 -#define TCGETA 0x5405 -#define TCSETA 0x5406 -#define TCSETAW 0x5407 -#define TCSETAF 0x5408 -#define TCSBRK 0x5409 -#define TCXONC 0x540A -#define TCFLSH 0x540B -#define TIOCEXCL 0x540C -#define TIOCNXCL 0x540D -#define TIOCSCTTY 0x540E -#define TIOCGPGRP 0x540F -#define TIOCSPGRP 0x5410 -#define TIOCOUTQ 0x5411 -#define TIOCSTI 0x5412 -#define TIOCGWINSZ 0x5413 -#define TIOCSWINSZ 0x5414 -#define TIOCMGET 0x5415 -#define TIOCMBIS 0x5416 -#define TIOCMBIC 0x5417 -#define TIOCMSET 0x5418 -#define TIOCGSOFTCAR 0x5419 -#define TIOCSSOFTCAR 0x541A -#define FIONREAD 0x541B -#define TIOCINQ FIONREAD -#define TIOCLINUX 0x541C -#define TIOCCONS 0x541D -#define TIOCGSERIAL 0x541E -#define TIOCSSERIAL 0x541F -#define TIOCPKT 0x5420 -#define FIONBIO 0x5421 -#define TIOCNOTTY 0x5422 -#define TIOCSETD 0x5423 -#define TIOCGETD 0x5424 -#define TCSBRKP 0x5425/* Needed for POSIX tcsendbreak() */ -/* #define TIOCTTYGSTRUCT 0x5426 - Former debugging-only ioctl */ -#define TIOCSBRK 0x5427/* BSD compatibility */ -#define TIOCCBRK 0x5428/* BSD compatibility */ -#define TIOCGSID 0x5429/* Return the session ID of FD */ -#define TCGETS2 _IOR('T', 0x2A, struct termios2) -#define TCSETS2 _IOW('T', 0x2B, struct termios2) -#define TCSETSW2 _IOW('T', 0x2C, struct termios2) -#define TCSETSF2 _IOW('T', 0x2D, struct termios2) -#define TIOCGPTN _IOR('T', 0x30, unsigned int)/* Get Pty Number -* (of pty-mux device) */ -#define TIOCSPTLCK _IOW('T', 0x31, int)/* Lock/unlock Pty */ -#define TIOCSIG _IOW('T', 0x36, int)/* Generate signal on Pty slave */ - -#define FIONCLEX 0x5450 -#define FIOCLEX 0x5451 -#define FIOASYNC 0x5452 -#define TIOCSERCONFIG 0x5453 -#define TIOCSERGWILD 0x5454 -#define TIOCSERSWILD 0x5455 -#define TIOCGLCKTRMIOS 0x5456 -#define TIOCSLCKTRMIOS 0x5457 -#define TIOCSERGSTRUCT 0x5458/* For debugging only */ -#define TIOCSERGETLSR 0x5459/* Get line status register */ -#define TIOCSERGETMULTI 0x545A/* Get multiport config */ -#define TIOCSERSETMULTI 0x545B/* Set multiport config */ - -#define TIOCMIWAIT 0x545C/* wait for a change on serial input line(s) */ -#define TIOCGICOUNT 0x545D/* read serial port inline interrupt counts */ -#define FIOQSIZE 0x5460 - -/* Used for packet mode */ -#define TIOCPKT_DATA 0 -#define TIOCPKT_FLUSHREAD 1 -#define TIOCPKT_FLUSHWRITE 2 -#define TIOCPKT_STOP 4 -#define TIOCPKT_START 8 -#define TIOCPKT_NOSTOP 16 -#define TIOCPKT_DOSTOP 32 -#define TIOCPKT_IOCTL 64 - -#define TIOCSER_TEMT 0x01/* Transmitter physically empty */ +#include <asm-generic/ioctls.h> #endif /* _ASM_IOCTLS_H */
PATCH 10/10 ioctl: Use asm-generic/ioctls.h on s390 (enables termiox)
In reply to Jeff MahoneyThis patch converts s390 to use asm-generic/ioctls.h instead of its own version.
The differences between the arch-specific version and the generic version are as follows:
- S390 defines its own value for FIOQSIZE, asm-generic/ioctls.h keeps it
- The generic version adds TIOCGRS485 and TIOCGRS485, which are unused by any driver available on this architecture
- The generic version adds support for termiox
---
arch/s390/include/asm/ioctls.h | 88 ----------------------------------------- 1 file changed, 1 insertion(+), 87 deletions(-)
arch/s390/include/asm/ioctls.h +1 -87
@@ -1,94 +1,8 @@ -/* -* include/asm-s390/ioctls.h -* -* S390 version -* -* Derived from "include/asm-i386/ioctls.h" -*/ -#ifndef __ARCH_S390_IOCTLS_H__#define __ARCH_S390_IOCTLS_H__ -#include <asm/ioctl.h> - -/* 0x54 is just a magic number to make these relatively unique ('T') */ - -#define TCGETS 0x5401 -#define TCSETS 0x5402 -#define TCSETSW 0x5403 -#define TCSETSF 0x5404 -#define TCGETA 0x5405 -#define TCSETA 0x5406 -#define TCSETAW 0x5407 -#define TCSETAF 0x5408 -#define TCSBRK 0x5409 -#define TCXONC 0x540A -#define TCFLSH 0x540B -#define TIOCEXCL 0x540C -#define TIOCNXCL 0x540D -#define TIOCSCTTY 0x540E -#define TIOCGPGRP 0x540F -#define TIOCSPGRP 0x5410 -#define TIOCOUTQ 0x5411 -#define TIOCSTI 0x5412 -#define TIOCGWINSZ 0x5413 -#define TIOCSWINSZ 0x5414 -#define TIOCMGET 0x5415 -#define TIOCMBIS 0x5416 -#define TIOCMBIC 0x5417 -#define TIOCMSET 0x5418 -#define TIOCGSOFTCAR 0x5419 -#define TIOCSSOFTCAR 0x541A -#define FIONREAD 0x541B -#define TIOCINQ FIONREAD -#define TIOCLINUX 0x541C -#define TIOCCONS 0x541D -#define TIOCGSERIAL 0x541E -#define TIOCSSERIAL 0x541F -#define TIOCPKT 0x5420 -#define FIONBIO 0x5421 -#define TIOCNOTTY 0x5422 -#define TIOCSETD 0x5423 -#define TIOCGETD 0x5424 -#define TCSBRKP 0x5425/* Needed for POSIX tcsendbreak() */ -#define TIOCSBRK 0x5427/* BSD compatibility */ -#define TIOCCBRK 0x5428/* BSD compatibility */ -#define TIOCGSID 0x5429/* Return the session ID of FD */ -#define TCGETS2 _IOR('T',0x2A, struct termios2) -#define TCSETS2 _IOW('T',0x2B, struct termios2) -#define TCSETSW2 _IOW('T',0x2C, struct termios2) -#define TCSETSF2 _IOW('T',0x2D, struct termios2) -#define TIOCGPTN _IOR('T',0x30, unsigned int)/* Get Pty Number (of pty-mux device) */ -#define TIOCSPTLCK _IOW('T',0x31, int)/* Lock/unlock Pty */ -#define TIOCSIG _IOW('T',0x36, int)/* Generate signal on Pty slave */ - -#define FIONCLEX 0x5450/* these numbers need to be adjusted. */ -#define FIOCLEX 0x5451 -#define FIOASYNC 0x5452 -#define TIOCSERCONFIG 0x5453 -#define TIOCSERGWILD 0x5454 -#define TIOCSERSWILD 0x5455 -#define TIOCGLCKTRMIOS 0x5456 -#define TIOCSLCKTRMIOS 0x5457 -#define TIOCSERGSTRUCT 0x5458/* For debugging only */ -#define TIOCSERGETLSR 0x5459/* Get line status register */ -#define TIOCSERGETMULTI 0x545A/* Get multiport config */ -#define TIOCSERSETMULTI 0x545B/* Set multiport config */ - -#define TIOCMIWAIT 0x545C/* wait for a change on serial input line(s) */ -#define TIOCGICOUNT 0x545D/* read serial port inline interrupt counts */ #define FIOQSIZE 0x545E -/* Used for packet mode */ -#define TIOCPKT_DATA 0 -#define TIOCPKT_FLUSHREAD 1 -#define TIOCPKT_FLUSHWRITE 2 -#define TIOCPKT_STOP 4 -#define TIOCPKT_START 8 -#define TIOCPKT_NOSTOP 16 -#define TIOCPKT_DOSTOP 32 -#define TIOCPKT_IOCTL 64 - -#define TIOCSER_TEMT 0x01/* Transmitter physically empty */ +#include <asm-generic/ioctls.h> #endif
Arnd Bergmann
maintainerQuoted 9 lines · On Friday 20 August 2010 23:14:01 Jeff Mahoney wrote:
- The generic list contains the termiox ioctl set. This seems to have been added to x86 with the expectation that other arch maintainers would add it to their own. New architectures have inherited this automatically via
asm-generic/ioctls.hand there isn't anything inherently architecture specific about it. It's safe to just add it to the affected architectures. If there is resistance to this, I can submit a separate patchset to enable it on those architectures and THEN apply this patchet, but it seems like a waste of time.
Note that AFAICT there is not a single device driver that implements the {set,get}_termiox functions, but enablign it does add extra code.
Alan added the infrastructure two years ago (see below), but it seems we never adopted the use, or all the drivers using it were already phased out again in the meantime.
I very much welcome making all architectures use the asm-generic/ioctls.h file, that's why I added it in the first place. Whether or not we actually want to have termiox support enabled without any drivers using it is a separate question, but this would be a good time to answer it.
Arnd
---
commit 1d65b4a088de407e99714fdc27862449db04fb5c
Author: Alan Cox <[email protected]> Date: Mon Oct 13 10:38:18 2008 +0100
tty: Add termiox
We need a way to describe the various additional modes and flow control features that random weird hardware shows up and software such as wine wants to emulate as Windows supports them.
TCGETX/TCSETX and the termiox ioctl are a SYS5 extension that we might as well adopt. This patches adds the structures and the basic ioctl interfaces when the TCGETX etc defines are added for an architecture. Drivers wishing to use this stuff need to add new methods.