Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

x86: remove all now-duplicate header files

All files that have been made identical to the asm-generic
version in the previous patches can now be removed,
guaranteeing that this does not introduce semantic changes.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
LKML-Reference: <cover.1245354003.git.arnd@arndb.de>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>

authored by

Arnd Bergmann and committed by
H. Peter Anvin
73a2d096 69d5ffda

+14 -840
-18
arch/x86/include/asm/generic-mman.h
··· 1 - #ifndef __ASM_GENERIC_MMAN_H 2 - #define __ASM_GENERIC_MMAN_H 3 - 4 - #include <asm-generic/mman-common.h> 5 - 6 - #define MAP_GROWSDOWN 0x0100 /* stack-like segment */ 7 - #define MAP_DENYWRITE 0x0800 /* ETXTBSY */ 8 - #define MAP_EXECUTABLE 0x1000 /* mark it as an executable */ 9 - #define MAP_LOCKED 0x2000 /* pages are locked */ 10 - #define MAP_NORESERVE 0x4000 /* don't check for reservations */ 11 - #define MAP_POPULATE 0x8000 /* populate (prefault) pagetables */ 12 - #define MAP_NONBLOCK 0x10000 /* do not block on IO */ 13 - #define MAP_STACK 0x20000 /* give out an address that is best suited for process/thread stacks */ 14 - 15 - #define MCL_CURRENT 1 /* lock all current mappings */ 16 - #define MCL_FUTURE 2 /* lock all future mappings */ 17 - 18 - #endif /* __ASM_GENERIC_MMAN_H */
-22
arch/x86/include/asm/generic-module.h
··· 1 - #ifndef __ASM_GENERIC_MODULE_H 2 - #define __ASM_GENERIC_MODULE_H 3 - 4 - /* 5 - * Many architectures just need a simple module 6 - * loader without arch specific data. 7 - */ 8 - struct mod_arch_specific 9 - { 10 - }; 11 - 12 - #ifdef CONFIG_64BIT 13 - #define Elf_Shdr Elf64_Shdr 14 - #define Elf_Sym Elf64_Sym 15 - #define Elf_Ehdr Elf64_Ehdr 16 - #else 17 - #define Elf_Shdr Elf32_Shdr 18 - #define Elf_Sym Elf32_Sym 19 - #define Elf_Ehdr Elf32_Ehdr 20 - #endif 21 - 22 - #endif /* __ASM_GENERIC_MODULE_H */
-43
arch/x86/include/asm/generic-scatterlist.h
··· 1 - #ifndef __ASM_GENERIC_SCATTERLIST_H 2 - #define __ASM_GENERIC_SCATTERLIST_H 3 - 4 - #include <linux/types.h> 5 - 6 - struct scatterlist { 7 - #ifdef CONFIG_DEBUG_SG 8 - unsigned long sg_magic; 9 - #endif 10 - unsigned long page_link; 11 - unsigned int offset; 12 - unsigned int length; 13 - dma_addr_t dma_address; 14 - unsigned int dma_length; 15 - }; 16 - 17 - /* 18 - * These macros should be used after a dma_map_sg call has been done 19 - * to get bus addresses of each of the SG entries and their lengths. 20 - * You should only work with the number of sg entries pci_map_sg 21 - * returns, or alternatively stop on the first sg_dma_len(sg) which 22 - * is 0. 23 - */ 24 - #define sg_dma_address(sg) ((sg)->dma_address) 25 - #ifndef sg_dma_len 26 - /* 27 - * Normally, you have an iommu on 64 bit machines, but not on 32 bit 28 - * machines. Architectures that are differnt should override this. 29 - */ 30 - #if __BITS_PER_LONG == 64 31 - #define sg_dma_len(sg) ((sg)->dma_length) 32 - #else 33 - #define sg_dma_len(sg) ((sg)->length) 34 - #endif /* 64 bit */ 35 - #endif /* sg_dma_len */ 36 - 37 - #ifndef ISA_DMA_THRESHOLD 38 - #define ISA_DMA_THRESHOLD (~0UL) 39 - #endif 40 - 41 - #define ARCH_HAS_SG_CHAIN 42 - 43 - #endif /* __ASM_GENERIC_SCATTERLIST_H */
-42
arch/x86/include/asm/generic-types.h
··· 1 - #ifndef _ASM_GENERIC_TYPES_H 2 - #define _ASM_GENERIC_TYPES_H 3 - /* 4 - * int-ll64 is used practically everywhere now, 5 - * so use it as a reasonable default. 6 - */ 7 - #include <asm-generic/int-ll64.h> 8 - 9 - #ifndef __ASSEMBLY__ 10 - 11 - typedef unsigned short umode_t; 12 - 13 - #endif /* __ASSEMBLY__ */ 14 - 15 - /* 16 - * These aren't exported outside the kernel to avoid name space clashes 17 - */ 18 - #ifdef __KERNEL__ 19 - #ifndef __ASSEMBLY__ 20 - /* 21 - * DMA addresses may be very different from physical addresses 22 - * and pointers. i386 and powerpc may have 64 bit DMA on 32 bit 23 - * systems, while sparc64 uses 32 bit DMA addresses for 64 bit 24 - * physical addresses. 25 - * This default defines dma_addr_t to have the same size as 26 - * phys_addr_t, which is the most common way. 27 - * Do not define the dma64_addr_t type, which never really 28 - * worked. 29 - */ 30 - #ifndef dma_addr_t 31 - #ifdef CONFIG_PHYS_ADDR_T_64BIT 32 - typedef u64 dma_addr_t; 33 - #else 34 - typedef u32 dma_addr_t; 35 - #endif /* CONFIG_PHYS_ADDR_T_64BIT */ 36 - #endif /* dma_addr_t */ 37 - 38 - #endif /* __ASSEMBLY__ */ 39 - 40 - #endif /* __KERNEL__ */ 41 - 42 - #endif /* _ASM_GENERIC_TYPES_H */
-12
arch/x86/include/asm/generic-ucontext.h
··· 1 - #ifndef __ASM_GENERIC_UCONTEXT_H 2 - #define __ASM_GENERIC_UCONTEXT_H 3 - 4 - struct ucontext { 5 - unsigned long uc_flags; 6 - struct ucontext *uc_link; 7 - stack_t uc_stack; 8 - struct sigcontext uc_mcontext; 9 - sigset_t uc_sigmask; /* mask last for extensibility */ 10 - }; 11 - 12 - #endif /* __ASM_GENERIC_UCONTEXT_H */
+1 -110
arch/x86/include/asm/ioctls.h
··· 1 - #ifndef __ASM_GENERIC_IOCTLS_H 2 - #define __ASM_GENERIC_IOCTLS_H 3 - 4 - #include <linux/ioctl.h> 5 - 6 - /* 7 - * These are the most common definitions for tty ioctl numbers. 8 - * Most of them do not use the recommended _IOC(), but there is 9 - * probably some source code out there hardcoding the number, 10 - * so we might as well use them for all new platforms. 11 - * 12 - * The architectures that use different values here typically 13 - * try to be compatible with some Unix variants for the same 14 - * architecture. 15 - */ 16 - 17 - /* 0x54 is just a magic number to make these relatively unique ('T') */ 18 - 19 - #define TCGETS 0x5401 20 - #define TCSETS 0x5402 21 - #define TCSETSW 0x5403 22 - #define TCSETSF 0x5404 23 - #define TCGETA 0x5405 24 - #define TCSETA 0x5406 25 - #define TCSETAW 0x5407 26 - #define TCSETAF 0x5408 27 - #define TCSBRK 0x5409 28 - #define TCXONC 0x540A 29 - #define TCFLSH 0x540B 30 - #define TIOCEXCL 0x540C 31 - #define TIOCNXCL 0x540D 32 - #define TIOCSCTTY 0x540E 33 - #define TIOCGPGRP 0x540F 34 - #define TIOCSPGRP 0x5410 35 - #define TIOCOUTQ 0x5411 36 - #define TIOCSTI 0x5412 37 - #define TIOCGWINSZ 0x5413 38 - #define TIOCSWINSZ 0x5414 39 - #define TIOCMGET 0x5415 40 - #define TIOCMBIS 0x5416 41 - #define TIOCMBIC 0x5417 42 - #define TIOCMSET 0x5418 43 - #define TIOCGSOFTCAR 0x5419 44 - #define TIOCSSOFTCAR 0x541A 45 - #define FIONREAD 0x541B 46 - #define TIOCINQ FIONREAD 47 - #define TIOCLINUX 0x541C 48 - #define TIOCCONS 0x541D 49 - #define TIOCGSERIAL 0x541E 50 - #define TIOCSSERIAL 0x541F 51 - #define TIOCPKT 0x5420 52 - #define FIONBIO 0x5421 53 - #define TIOCNOTTY 0x5422 54 - #define TIOCSETD 0x5423 55 - #define TIOCGETD 0x5424 56 - #define TCSBRKP 0x5425 /* Needed for POSIX tcsendbreak() */ 57 - #define TIOCSBRK 0x5427 /* BSD compatibility */ 58 - #define TIOCCBRK 0x5428 /* BSD compatibility */ 59 - #define TIOCGSID 0x5429 /* Return the session ID of FD */ 60 - #define TCGETS2 _IOR('T', 0x2A, struct termios2) 61 - #define TCSETS2 _IOW('T', 0x2B, struct termios2) 62 - #define TCSETSW2 _IOW('T', 0x2C, struct termios2) 63 - #define TCSETSF2 _IOW('T', 0x2D, struct termios2) 64 - #define TIOCGRS485 0x542E 65 - #define TIOCSRS485 0x542F 66 - #define TIOCGPTN _IOR('T', 0x30, unsigned int) /* Get Pty Number (of pty-mux device) */ 67 - #define TIOCSPTLCK _IOW('T', 0x31, int) /* Lock/unlock Pty */ 68 - #define TCGETX 0x5432 /* SYS5 TCGETX compatibility */ 69 - #define TCSETX 0x5433 70 - #define TCSETXF 0x5434 71 - #define TCSETXW 0x5435 72 - 73 - #define FIONCLEX 0x5450 74 - #define FIOCLEX 0x5451 75 - #define FIOASYNC 0x5452 76 - #define TIOCSERCONFIG 0x5453 77 - #define TIOCSERGWILD 0x5454 78 - #define TIOCSERSWILD 0x5455 79 - #define TIOCGLCKTRMIOS 0x5456 80 - #define TIOCSLCKTRMIOS 0x5457 81 - #define TIOCSERGSTRUCT 0x5458 /* For debugging only */ 82 - #define TIOCSERGETLSR 0x5459 /* Get line status register */ 83 - #define TIOCSERGETMULTI 0x545A /* Get multiport config */ 84 - #define TIOCSERSETMULTI 0x545B /* Set multiport config */ 85 - 86 - #define TIOCMIWAIT 0x545C /* wait for a change on serial input line(s) */ 87 - #define TIOCGICOUNT 0x545D /* read serial port inline interrupt counts */ 88 - 89 - /* 90 - * some architectures define FIOQSIZE as 0x545E, which is used for 91 - * TIOCGHAYESESP on others 92 - */ 93 - #ifndef FIOQSIZE 94 - # define TIOCGHAYESESP 0x545E /* Get Hayes ESP configuration */ 95 - # define TIOCSHAYESESP 0x545F /* Set Hayes ESP configuration */ 96 - # define FIOQSIZE 0x5460 97 - #endif 98 - 99 - /* Used for packet mode */ 100 - #define TIOCPKT_DATA 0 101 - #define TIOCPKT_FLUSHREAD 1 102 - #define TIOCPKT_FLUSHWRITE 2 103 - #define TIOCPKT_STOP 4 104 - #define TIOCPKT_START 8 105 - #define TIOCPKT_NOSTOP 16 106 - #define TIOCPKT_DOSTOP 32 107 - 108 - #define TIOCSER_TEMT 0x01 /* Transmitter physically empty */ 109 - 110 - #endif /* __ASM_GENERIC_IOCTLS_H */ 1 + #include <asm-generic/ioctls.h>
+1 -33
arch/x86/include/asm/ipcbuf.h
··· 1 - #ifndef __ASM_GENERIC_IPCBUF_H 2 - #define __ASM_GENERIC_IPCBUF_H 3 - 4 - /* 5 - * The generic ipc64_perm structure: 6 - * Note extra padding because this structure is passed back and forth 7 - * between kernel and user space. 8 - * 9 - * ipc64_perm was originally meant to be architecture specific, but 10 - * everyone just ended up making identical copies without specific 11 - * optimizations, so we may just as well all use the same one. 12 - * 13 - * Pad space is left for: 14 - * - 32-bit mode_t on architectures that only had 16 bit 15 - * - 32-bit seq 16 - * - 2 miscellaneous 32-bit values 17 - */ 18 - 19 - struct ipc64_perm { 20 - __kernel_key_t key; 21 - __kernel_uid32_t uid; 22 - __kernel_gid32_t gid; 23 - __kernel_uid32_t cuid; 24 - __kernel_gid32_t cgid; 25 - __kernel_mode_t mode; 26 - unsigned short __pad1; 27 - unsigned short seq; 28 - unsigned short __pad2; 29 - unsigned long __unused1; 30 - unsigned long __unused2; 31 - }; 32 - 33 - #endif /* __ASM_GENERIC_IPCBUF_H */ 1 + #include <asm-generic/ipcbuf.h>
+1 -1
arch/x86/include/asm/mman.h
··· 3 3 4 4 #define MAP_32BIT 0x40 /* only give out 32bit addresses */ 5 5 6 - #include <asm/generic-mman.h> 6 + #include <asm-generic/mman.h> 7 7 8 8 #endif /* _ASM_X86_MMAN_H */
+1 -1
arch/x86/include/asm/module.h
··· 1 1 #ifndef _ASM_X86_MODULE_H 2 2 #define _ASM_X86_MODULE_H 3 3 4 - #include <asm/generic-module.h> 4 + #include <asm-generic/module.h> 5 5 6 6 #ifdef CONFIG_X86_64 7 7 /* X86_64 does not define MODULE_PROC_FAMILY */
+1 -47
arch/x86/include/asm/msgbuf.h
··· 1 - #ifndef __ASM_GENERIC_MSGBUF_H 2 - #define __ASM_GENERIC_MSGBUF_H 3 - 4 - #include <asm/bitsperlong.h> 5 - /* 6 - * generic msqid64_ds structure. 7 - * 8 - * Note extra padding because this structure is passed back and forth 9 - * between kernel and user space. 10 - * 11 - * msqid64_ds was originally meant to be architecture specific, but 12 - * everyone just ended up making identical copies without specific 13 - * optimizations, so we may just as well all use the same one. 14 - * 15 - * 64 bit architectures typically define a 64 bit __kernel_time_t, 16 - * so they do not need the first three padding words. 17 - * On big-endian systems, the padding is in the wrong place. 18 - * 19 - * Pad space is left for: 20 - * - 64-bit time_t to solve y2038 problem 21 - * - 2 miscellaneous 32-bit values 22 - */ 23 - 24 - struct msqid64_ds { 25 - struct ipc64_perm msg_perm; 26 - __kernel_time_t msg_stime; /* last msgsnd time */ 27 - #if __BITS_PER_LONG != 64 28 - unsigned long __unused1; 29 - #endif 30 - __kernel_time_t msg_rtime; /* last msgrcv time */ 31 - #if __BITS_PER_LONG != 64 32 - unsigned long __unused2; 33 - #endif 34 - __kernel_time_t msg_ctime; /* last change time */ 35 - #if __BITS_PER_LONG != 64 36 - unsigned long __unused3; 37 - #endif 38 - unsigned long msg_cbytes; /* current number of bytes on queue */ 39 - unsigned long msg_qnum; /* number of messages in queue */ 40 - unsigned long msg_qbytes; /* max number of bytes on queue */ 41 - __kernel_pid_t msg_lspid; /* pid of last msgsnd */ 42 - __kernel_pid_t msg_lrpid; /* last receive pid */ 43 - unsigned long __unused4; 44 - unsigned long __unused5; 45 - }; 46 - 47 - #endif /* __ASM_GENERIC_MSGBUF_H */ 1 + #include <asm-generic/msgbuf.h>
+1 -24
arch/x86/include/asm/param.h
··· 1 - #ifndef __ASM_GENERIC_PARAM_H 2 - #define __ASM_GENERIC_PARAM_H 3 - 4 - #ifdef __KERNEL__ 5 - # define HZ CONFIG_HZ /* Internal kernel timer frequency */ 6 - # define USER_HZ 100 /* some user interfaces are */ 7 - # define CLOCKS_PER_SEC (USER_HZ) /* in "ticks" like times() */ 8 - #endif 9 - 10 - #ifndef HZ 11 - #define HZ 100 12 - #endif 13 - 14 - #ifndef EXEC_PAGESIZE 15 - #define EXEC_PAGESIZE 4096 16 - #endif 17 - 18 - #ifndef NOGROUP 19 - #define NOGROUP (-1) 20 - #endif 21 - 22 - #define MAXHOSTNAMELEN 64 /* max length of hostname */ 23 - 24 - #endif /* __ASM_GENERIC_PARAM_H */ 1 + #include <asm-generic/param.h>
+1 -1
arch/x86/include/asm/scatterlist.h
··· 3 3 4 4 #define ISA_DMA_THRESHOLD (0x00ffffff) 5 5 6 - #include <asm/generic-scatterlist.h> 6 + #include <asm-generic/scatterlist.h> 7 7 8 8 #endif /* _ASM_X86_SCATTERLIST_H */
+1 -59
arch/x86/include/asm/shmbuf.h
··· 1 - #ifndef __ASM_GENERIC_SHMBUF_H 2 - #define __ASM_GENERIC_SHMBUF_H 3 - 4 - #include <asm/bitsperlong.h> 5 - 6 - /* 7 - * The shmid64_ds structure for x86 architecture. 8 - * Note extra padding because this structure is passed back and forth 9 - * between kernel and user space. 10 - * 11 - * shmid64_ds was originally meant to be architecture specific, but 12 - * everyone just ended up making identical copies without specific 13 - * optimizations, so we may just as well all use the same one. 14 - * 15 - * 64 bit architectures typically define a 64 bit __kernel_time_t, 16 - * so they do not need the first two padding words. 17 - * On big-endian systems, the padding is in the wrong place. 18 - * 19 - * 20 - * Pad space is left for: 21 - * - 64-bit time_t to solve y2038 problem 22 - * - 2 miscellaneous 32-bit values 23 - */ 24 - 25 - struct shmid64_ds { 26 - struct ipc64_perm shm_perm; /* operation perms */ 27 - size_t shm_segsz; /* size of segment (bytes) */ 28 - __kernel_time_t shm_atime; /* last attach time */ 29 - #if __BITS_PER_LONG != 64 30 - unsigned long __unused1; 31 - #endif 32 - __kernel_time_t shm_dtime; /* last detach time */ 33 - #if __BITS_PER_LONG != 64 34 - unsigned long __unused2; 35 - #endif 36 - __kernel_time_t shm_ctime; /* last change time */ 37 - #if __BITS_PER_LONG != 64 38 - unsigned long __unused3; 39 - #endif 40 - __kernel_pid_t shm_cpid; /* pid of creator */ 41 - __kernel_pid_t shm_lpid; /* pid of last operator */ 42 - unsigned long shm_nattch; /* no. of current attaches */ 43 - unsigned long __unused4; 44 - unsigned long __unused5; 45 - }; 46 - 47 - struct shminfo64 { 48 - unsigned long shmmax; 49 - unsigned long shmmin; 50 - unsigned long shmmni; 51 - unsigned long shmseg; 52 - unsigned long shmall; 53 - unsigned long __unused1; 54 - unsigned long __unused2; 55 - unsigned long __unused3; 56 - unsigned long __unused4; 57 - }; 58 - 59 - #endif /* __ASM_GENERIC_SHMBUF_H */ 1 + #include <asm-generic/shmbuf.h>
+1 -60
arch/x86/include/asm/socket.h
··· 1 - #ifndef __ASM_GENERIC_SOCKET_H 2 - #define __ASM_GENERIC_SOCKET_H 3 - 4 - #include <asm/sockios.h> 5 - 6 - /* For setsockopt(2) */ 7 - #define SOL_SOCKET 1 8 - 9 - #define SO_DEBUG 1 10 - #define SO_REUSEADDR 2 11 - #define SO_TYPE 3 12 - #define SO_ERROR 4 13 - #define SO_DONTROUTE 5 14 - #define SO_BROADCAST 6 15 - #define SO_SNDBUF 7 16 - #define SO_RCVBUF 8 17 - #define SO_SNDBUFFORCE 32 18 - #define SO_RCVBUFFORCE 33 19 - #define SO_KEEPALIVE 9 20 - #define SO_OOBINLINE 10 21 - #define SO_NO_CHECK 11 22 - #define SO_PRIORITY 12 23 - #define SO_LINGER 13 24 - #define SO_BSDCOMPAT 14 25 - /* To add :#define SO_REUSEPORT 15 */ 26 - #define SO_PASSCRED 16 27 - #define SO_PEERCRED 17 28 - #define SO_RCVLOWAT 18 29 - #define SO_SNDLOWAT 19 30 - #define SO_RCVTIMEO 20 31 - #define SO_SNDTIMEO 21 32 - 33 - /* Security levels - as per NRL IPv6 - don't actually do anything */ 34 - #define SO_SECURITY_AUTHENTICATION 22 35 - #define SO_SECURITY_ENCRYPTION_TRANSPORT 23 36 - #define SO_SECURITY_ENCRYPTION_NETWORK 24 37 - 38 - #define SO_BINDTODEVICE 25 39 - 40 - /* Socket filtering */ 41 - #define SO_ATTACH_FILTER 26 42 - #define SO_DETACH_FILTER 27 43 - 44 - #define SO_PEERNAME 28 45 - #define SO_TIMESTAMP 29 46 - #define SCM_TIMESTAMP SO_TIMESTAMP 47 - 48 - #define SO_ACCEPTCONN 30 49 - 50 - #define SO_PEERSEC 31 51 - #define SO_PASSSEC 34 52 - #define SO_TIMESTAMPNS 35 53 - #define SCM_TIMESTAMPNS SO_TIMESTAMPNS 54 - 55 - #define SO_MARK 36 56 - 57 - #define SO_TIMESTAMPING 37 58 - #define SCM_TIMESTAMPING SO_TIMESTAMPING 59 - 60 - #endif /* __ASM_GENERIC_SOCKET_H */ 1 + #include <asm-generic/socket.h>
+1 -13
arch/x86/include/asm/sockios.h
··· 1 - #ifndef __ASM_GENERIC_SOCKIOS_H 2 - #define __ASM_GENERIC_SOCKIOS_H 3 - 4 - /* Socket-level I/O control calls. */ 5 - #define FIOSETOWN 0x8901 6 - #define SIOCSPGRP 0x8902 7 - #define FIOGETOWN 0x8903 8 - #define SIOCGPGRP 0x8904 9 - #define SIOCATMARK 0x8905 10 - #define SIOCGSTAMP 0x8906 /* Get stamp (timeval) */ 11 - #define SIOCGSTAMPNS 0x8907 /* Get stamp (timespec) */ 12 - 13 - #endif /* __ASM_GENERIC_SOCKIOS_H */ 1 + #include <asm-generic/sockios.h>
+1 -198
arch/x86/include/asm/termbits.h
··· 1 - #ifndef __ASM_GENERIC_TERMBITS_H 2 - #define __ASM_GENERIC_TERMBITS_H 3 - 4 - #include <linux/posix_types.h> 5 - 6 - typedef unsigned char cc_t; 7 - typedef unsigned int speed_t; 8 - typedef unsigned int tcflag_t; 9 - 10 - #define NCCS 19 11 - struct termios { 12 - tcflag_t c_iflag; /* input mode flags */ 13 - tcflag_t c_oflag; /* output mode flags */ 14 - tcflag_t c_cflag; /* control mode flags */ 15 - tcflag_t c_lflag; /* local mode flags */ 16 - cc_t c_line; /* line discipline */ 17 - cc_t c_cc[NCCS]; /* control characters */ 18 - }; 19 - 20 - struct termios2 { 21 - tcflag_t c_iflag; /* input mode flags */ 22 - tcflag_t c_oflag; /* output mode flags */ 23 - tcflag_t c_cflag; /* control mode flags */ 24 - tcflag_t c_lflag; /* local mode flags */ 25 - cc_t c_line; /* line discipline */ 26 - cc_t c_cc[NCCS]; /* control characters */ 27 - speed_t c_ispeed; /* input speed */ 28 - speed_t c_ospeed; /* output speed */ 29 - }; 30 - 31 - struct ktermios { 32 - tcflag_t c_iflag; /* input mode flags */ 33 - tcflag_t c_oflag; /* output mode flags */ 34 - tcflag_t c_cflag; /* control mode flags */ 35 - tcflag_t c_lflag; /* local mode flags */ 36 - cc_t c_line; /* line discipline */ 37 - cc_t c_cc[NCCS]; /* control characters */ 38 - speed_t c_ispeed; /* input speed */ 39 - speed_t c_ospeed; /* output speed */ 40 - }; 41 - 42 - /* c_cc characters */ 43 - #define VINTR 0 44 - #define VQUIT 1 45 - #define VERASE 2 46 - #define VKILL 3 47 - #define VEOF 4 48 - #define VTIME 5 49 - #define VMIN 6 50 - #define VSWTC 7 51 - #define VSTART 8 52 - #define VSTOP 9 53 - #define VSUSP 10 54 - #define VEOL 11 55 - #define VREPRINT 12 56 - #define VDISCARD 13 57 - #define VWERASE 14 58 - #define VLNEXT 15 59 - #define VEOL2 16 60 - 61 - /* c_iflag bits */ 62 - #define IGNBRK 0000001 63 - #define BRKINT 0000002 64 - #define IGNPAR 0000004 65 - #define PARMRK 0000010 66 - #define INPCK 0000020 67 - #define ISTRIP 0000040 68 - #define INLCR 0000100 69 - #define IGNCR 0000200 70 - #define ICRNL 0000400 71 - #define IUCLC 0001000 72 - #define IXON 0002000 73 - #define IXANY 0004000 74 - #define IXOFF 0010000 75 - #define IMAXBEL 0020000 76 - #define IUTF8 0040000 77 - 78 - /* c_oflag bits */ 79 - #define OPOST 0000001 80 - #define OLCUC 0000002 81 - #define ONLCR 0000004 82 - #define OCRNL 0000010 83 - #define ONOCR 0000020 84 - #define ONLRET 0000040 85 - #define OFILL 0000100 86 - #define OFDEL 0000200 87 - #define NLDLY 0000400 88 - #define NL0 0000000 89 - #define NL1 0000400 90 - #define CRDLY 0003000 91 - #define CR0 0000000 92 - #define CR1 0001000 93 - #define CR2 0002000 94 - #define CR3 0003000 95 - #define TABDLY 0014000 96 - #define TAB0 0000000 97 - #define TAB1 0004000 98 - #define TAB2 0010000 99 - #define TAB3 0014000 100 - #define XTABS 0014000 101 - #define BSDLY 0020000 102 - #define BS0 0000000 103 - #define BS1 0020000 104 - #define VTDLY 0040000 105 - #define VT0 0000000 106 - #define VT1 0040000 107 - #define FFDLY 0100000 108 - #define FF0 0000000 109 - #define FF1 0100000 110 - 111 - /* c_cflag bit meaning */ 112 - #define CBAUD 0010017 113 - #define B0 0000000 /* hang up */ 114 - #define B50 0000001 115 - #define B75 0000002 116 - #define B110 0000003 117 - #define B134 0000004 118 - #define B150 0000005 119 - #define B200 0000006 120 - #define B300 0000007 121 - #define B600 0000010 122 - #define B1200 0000011 123 - #define B1800 0000012 124 - #define B2400 0000013 125 - #define B4800 0000014 126 - #define B9600 0000015 127 - #define B19200 0000016 128 - #define B38400 0000017 129 - #define EXTA B19200 130 - #define EXTB B38400 131 - #define CSIZE 0000060 132 - #define CS5 0000000 133 - #define CS6 0000020 134 - #define CS7 0000040 135 - #define CS8 0000060 136 - #define CSTOPB 0000100 137 - #define CREAD 0000200 138 - #define PARENB 0000400 139 - #define PARODD 0001000 140 - #define HUPCL 0002000 141 - #define CLOCAL 0004000 142 - #define CBAUDEX 0010000 143 - #define BOTHER 0010000 144 - #define B57600 0010001 145 - #define B115200 0010002 146 - #define B230400 0010003 147 - #define B460800 0010004 148 - #define B500000 0010005 149 - #define B576000 0010006 150 - #define B921600 0010007 151 - #define B1000000 0010010 152 - #define B1152000 0010011 153 - #define B1500000 0010012 154 - #define B2000000 0010013 155 - #define B2500000 0010014 156 - #define B3000000 0010015 157 - #define B3500000 0010016 158 - #define B4000000 0010017 159 - #define CIBAUD 002003600000 /* input baud rate */ 160 - #define CMSPAR 010000000000 /* mark or space (stick) parity */ 161 - #define CRTSCTS 020000000000 /* flow control */ 162 - 163 - #define IBSHIFT 16 /* Shift from CBAUD to CIBAUD */ 164 - 165 - /* c_lflag bits */ 166 - #define ISIG 0000001 167 - #define ICANON 0000002 168 - #define XCASE 0000004 169 - #define ECHO 0000010 170 - #define ECHOE 0000020 171 - #define ECHOK 0000040 172 - #define ECHONL 0000100 173 - #define NOFLSH 0000200 174 - #define TOSTOP 0000400 175 - #define ECHOCTL 0001000 176 - #define ECHOPRT 0002000 177 - #define ECHOKE 0004000 178 - #define FLUSHO 0010000 179 - #define PENDIN 0040000 180 - #define IEXTEN 0100000 181 - 182 - /* tcflow() and TCXONC use these */ 183 - #define TCOOFF 0 184 - #define TCOON 1 185 - #define TCIOFF 2 186 - #define TCION 3 187 - 188 - /* tcflush() and TCFLSH use these */ 189 - #define TCIFLUSH 0 190 - #define TCOFLUSH 1 191 - #define TCIOFLUSH 2 192 - 193 - /* tcsetattr uses these */ 194 - #define TCSANOW 0 195 - #define TCSADRAIN 1 196 - #define TCSAFLUSH 2 197 - 198 - #endif /* __ASM_GENERIC_TERMBITS_H */ 1 + #include <asm-generic/termbits.h>
+1 -154
arch/x86/include/asm/termios.h
··· 1 - #ifndef _ASM_GENERIC_TERMIOS_H 2 - #define _ASM_GENERIC_TERMIOS_H 3 - /* 4 - * Most architectures have straight copies of the x86 code, with 5 - * varying levels of bug fixes on top. Usually it's a good idea 6 - * to use this generic version instead, but be careful to avoid 7 - * ABI changes. 8 - * New architectures should not provide their own version. 9 - */ 10 - 11 - #include <asm/termbits.h> 12 - #include <asm/ioctls.h> 13 - 14 - struct winsize { 15 - unsigned short ws_row; 16 - unsigned short ws_col; 17 - unsigned short ws_xpixel; 18 - unsigned short ws_ypixel; 19 - }; 20 - 21 - #define NCC 8 22 - struct termio { 23 - unsigned short c_iflag; /* input mode flags */ 24 - unsigned short c_oflag; /* output mode flags */ 25 - unsigned short c_cflag; /* control mode flags */ 26 - unsigned short c_lflag; /* local mode flags */ 27 - unsigned char c_line; /* line discipline */ 28 - unsigned char c_cc[NCC]; /* control characters */ 29 - }; 30 - 31 - /* modem lines */ 32 - #define TIOCM_LE 0x001 33 - #define TIOCM_DTR 0x002 34 - #define TIOCM_RTS 0x004 35 - #define TIOCM_ST 0x008 36 - #define TIOCM_SR 0x010 37 - #define TIOCM_CTS 0x020 38 - #define TIOCM_CAR 0x040 39 - #define TIOCM_RNG 0x080 40 - #define TIOCM_DSR 0x100 41 - #define TIOCM_CD TIOCM_CAR 42 - #define TIOCM_RI TIOCM_RNG 43 - #define TIOCM_OUT1 0x2000 44 - #define TIOCM_OUT2 0x4000 45 - #define TIOCM_LOOP 0x8000 46 - 47 - /* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */ 48 - 49 - #ifdef __KERNEL__ 50 - 51 - #include <asm/uaccess.h> 52 - 53 - /* intr=^C quit=^\ erase=del kill=^U 54 - eof=^D vtime=\0 vmin=\1 sxtc=\0 55 - start=^Q stop=^S susp=^Z eol=\0 56 - reprint=^R discard=^U werase=^W lnext=^V 57 - eol2=\0 58 - */ 59 - #define INIT_C_CC "\003\034\177\025\004\0\1\0\021\023\032\0\022\017\027\026\0" 60 - 61 - /* 62 - * Translate a "termio" structure into a "termios". Ugh. 63 - */ 64 - static inline int user_termio_to_kernel_termios(struct ktermios *termios, 65 - const struct termio __user *termio) 66 - { 67 - unsigned short tmp; 68 - 69 - if (get_user(tmp, &termio->c_iflag) < 0) 70 - goto fault; 71 - termios->c_iflag = (0xffff0000 & termios->c_iflag) | tmp; 72 - 73 - if (get_user(tmp, &termio->c_oflag) < 0) 74 - goto fault; 75 - termios->c_oflag = (0xffff0000 & termios->c_oflag) | tmp; 76 - 77 - if (get_user(tmp, &termio->c_cflag) < 0) 78 - goto fault; 79 - termios->c_cflag = (0xffff0000 & termios->c_cflag) | tmp; 80 - 81 - if (get_user(tmp, &termio->c_lflag) < 0) 82 - goto fault; 83 - termios->c_lflag = (0xffff0000 & termios->c_lflag) | tmp; 84 - 85 - if (get_user(termios->c_line, &termio->c_line) < 0) 86 - goto fault; 87 - 88 - if (copy_from_user(termios->c_cc, termio->c_cc, NCC) != 0) 89 - goto fault; 90 - 91 - return 0; 92 - 93 - fault: 94 - return -EFAULT; 95 - } 96 - 97 - /* 98 - * Translate a "termios" structure into a "termio". Ugh. 99 - */ 100 - static inline int kernel_termios_to_user_termio(struct termio __user *termio, 101 - struct ktermios *termios) 102 - { 103 - if (put_user(termios->c_iflag, &termio->c_iflag) < 0 || 104 - put_user(termios->c_oflag, &termio->c_oflag) < 0 || 105 - put_user(termios->c_cflag, &termio->c_cflag) < 0 || 106 - put_user(termios->c_lflag, &termio->c_lflag) < 0 || 107 - put_user(termios->c_line, &termio->c_line) < 0 || 108 - copy_to_user(termio->c_cc, termios->c_cc, NCC) != 0) 109 - return -EFAULT; 110 - 111 - return 0; 112 - } 113 - 114 - #ifdef TCGETS2 115 - static inline int user_termios_to_kernel_termios(struct ktermios *k, 116 - struct termios2 __user *u) 117 - { 118 - return copy_from_user(k, u, sizeof(struct termios2)); 119 - } 120 - 121 - static inline int kernel_termios_to_user_termios(struct termios2 __user *u, 122 - struct ktermios *k) 123 - { 124 - return copy_to_user(u, k, sizeof(struct termios2)); 125 - } 126 - 127 - static inline int user_termios_to_kernel_termios_1(struct ktermios *k, 128 - struct termios __user *u) 129 - { 130 - return copy_from_user(k, u, sizeof(struct termios)); 131 - } 132 - 133 - static inline int kernel_termios_to_user_termios_1(struct termios __user *u, 134 - struct ktermios *k) 135 - { 136 - return copy_to_user(u, k, sizeof(struct termios)); 137 - } 138 - #else /* TCGETS2 */ 139 - static inline int user_termios_to_kernel_termios(struct ktermios *k, 140 - struct termios __user *u) 141 - { 142 - return copy_from_user(k, u, sizeof(struct termios)); 143 - } 144 - 145 - static inline int kernel_termios_to_user_termios(struct termios __user *u, 146 - struct ktermios *k) 147 - { 148 - return copy_to_user(u, k, sizeof(struct termios)); 149 - } 150 - #endif /* TCGETS2 */ 151 - 152 - #endif /* __KERNEL__ */ 153 - 154 - #endif /* _ASM_GENERIC_TERMIOS_H */ 1 + #include <asm-generic/termios.h>
+1 -1
arch/x86/include/asm/types.h
··· 3 3 4 4 #define dma_addr_t dma_addr_t 5 5 6 - #include <asm/generic-types.h> 6 + #include <asm-generic/types.h> 7 7 8 8 #ifdef __KERNEL__ 9 9 #ifndef __ASSEMBLY__
+1 -1
arch/x86/include/asm/ucontext.h
··· 7 7 * sigcontext struct (uc_mcontext). 8 8 */ 9 9 10 - #include <asm/generic-ucontext.h> 10 + #include <asm-generic/ucontext.h> 11 11 12 12 #endif /* _ASM_X86_UCONTEXT_H */