From 217d115cd5d7d2bef7db7839b93ce5dc2867c392 Mon Sep 17 00:00:00 2001 From: Roland Dreier Date: Mon, 15 Oct 2007 13:57:46 +0200 Subject: [PATCH] x86: merge some trivially mergeable headers Merge errno.h, resource.h, rtc.h, sections.h, serial.h and sockios.h, where i386 and x86_64 have no or only trivial comment/include guard differences. Build tested on both 32-bit and 64-bit, and booted on 64-bit. [tglx: fixup Kbuild as well] Signed-off-by: Roland Dreier Signed-off-by: Thomas Gleixner --- include/asm-x86/Kbuild | 2 -- include/asm-x86/serial.h | 30 +++++++++++++++++++++++++++--- include/asm-x86/serial_32.h | 29 ----------------------------- include/asm-x86/serial_64.h | 29 ----------------------------- include/asm-x86/sockios.h | 26 +++++++++++++------------- include/asm-x86/sockios_32.h | 13 ------------- include/asm-x86/sockios_64.h | 13 ------------- 7 files changed, 40 insertions(+), 102 deletions(-) delete mode 100644 include/asm-x86/serial_32.h delete mode 100644 include/asm-x86/serial_64.h delete mode 100644 include/asm-x86/sockios_32.h delete mode 100644 include/asm-x86/sockios_64.h diff --git a/include/asm-x86/Kbuild b/include/asm-x86/Kbuild index 0618ca386a..158deea39a 100644 --- a/include/asm-x86/Kbuild +++ b/include/asm-x86/Kbuild @@ -59,8 +59,6 @@ unifdef-y += siginfo_32.h unifdef-y += siginfo_64.h unifdef-y += signal_32.h unifdef-y += signal_64.h -unifdef-y += sockios_32.h -unifdef-y += sockios_64.h unifdef-y += stat_32.h unifdef-y += stat_64.h unifdef-y += statfs_32.h diff --git a/include/asm-x86/serial.h b/include/asm-x86/serial.h index cf1b05227b..628c801535 100644 --- a/include/asm-x86/serial.h +++ b/include/asm-x86/serial.h @@ -1,5 +1,29 @@ -#ifdef CONFIG_X86_32 -# include "serial_32.h" +#ifndef _ASM_X86_SERIAL_H +#define _ASM_X86_SERIAL_H + +/* + * This assumes you have a 1.8432 MHz clock for your UART. + * + * It'd be nice if someone built a serial card with a 24.576 MHz + * clock, since the 16550A is capable of handling a top speed of 1.5 + * megabits/second; but this requires the faster clock. + */ +#define BASE_BAUD ( 1843200 / 16 ) + +/* Standard COM flags (except for COM4, because of the 8514 problem) */ +#ifdef CONFIG_SERIAL_DETECT_IRQ +#define STD_COM_FLAGS (ASYNC_BOOT_AUTOCONF | ASYNC_SKIP_TEST | ASYNC_AUTO_IRQ) +#define STD_COM4_FLAGS (ASYNC_BOOT_AUTOCONF | ASYNC_AUTO_IRQ) #else -# include "serial_64.h" +#define STD_COM_FLAGS (ASYNC_BOOT_AUTOCONF | ASYNC_SKIP_TEST) +#define STD_COM4_FLAGS ASYNC_BOOT_AUTOCONF #endif + +#define SERIAL_PORT_DFNS \ + /* UART CLK PORT IRQ FLAGS */ \ + { 0, BASE_BAUD, 0x3F8, 4, STD_COM_FLAGS }, /* ttyS0 */ \ + { 0, BASE_BAUD, 0x2F8, 3, STD_COM_FLAGS }, /* ttyS1 */ \ + { 0, BASE_BAUD, 0x3E8, 4, STD_COM_FLAGS }, /* ttyS2 */ \ + { 0, BASE_BAUD, 0x2E8, 3, STD_COM4_FLAGS }, /* ttyS3 */ + +#endif /* _ASM_X86_SERIAL_H */ diff --git a/include/asm-x86/serial_32.h b/include/asm-x86/serial_32.h deleted file mode 100644 index bd67480ca1..0000000000 --- a/include/asm-x86/serial_32.h +++ /dev/null @@ -1,29 +0,0 @@ -/* - * include/asm-i386/serial.h - */ - - -/* - * This assumes you have a 1.8432 MHz clock for your UART. - * - * It'd be nice if someone built a serial card with a 24.576 MHz - * clock, since the 16550A is capable of handling a top speed of 1.5 - * megabits/second; but this requires the faster clock. - */ -#define BASE_BAUD ( 1843200 / 16 ) - -/* Standard COM flags (except for COM4, because of the 8514 problem) */ -#ifdef CONFIG_SERIAL_DETECT_IRQ -#define STD_COM_FLAGS (ASYNC_BOOT_AUTOCONF | ASYNC_SKIP_TEST | ASYNC_AUTO_IRQ) -#define STD_COM4_FLAGS (ASYNC_BOOT_AUTOCONF | ASYNC_AUTO_IRQ) -#else -#define STD_COM_FLAGS (ASYNC_BOOT_AUTOCONF | ASYNC_SKIP_TEST) -#define STD_COM4_FLAGS ASYNC_BOOT_AUTOCONF -#endif - -#define SERIAL_PORT_DFNS \ - /* UART CLK PORT IRQ FLAGS */ \ - { 0, BASE_BAUD, 0x3F8, 4, STD_COM_FLAGS }, /* ttyS0 */ \ - { 0, BASE_BAUD, 0x2F8, 3, STD_COM_FLAGS }, /* ttyS1 */ \ - { 0, BASE_BAUD, 0x3E8, 4, STD_COM_FLAGS }, /* ttyS2 */ \ - { 0, BASE_BAUD, 0x2E8, 3, STD_COM4_FLAGS }, /* ttyS3 */ diff --git a/include/asm-x86/serial_64.h b/include/asm-x86/serial_64.h deleted file mode 100644 index b0496e0d72..0000000000 --- a/include/asm-x86/serial_64.h +++ /dev/null @@ -1,29 +0,0 @@ -/* - * include/asm-x86_64/serial.h - */ - - -/* - * This assumes you have a 1.8432 MHz clock for your UART. - * - * It'd be nice if someone built a serial card with a 24.576 MHz - * clock, since the 16550A is capable of handling a top speed of 1.5 - * megabits/second; but this requires the faster clock. - */ -#define BASE_BAUD ( 1843200 / 16 ) - -/* Standard COM flags (except for COM4, because of the 8514 problem) */ -#ifdef CONFIG_SERIAL_DETECT_IRQ -#define STD_COM_FLAGS (ASYNC_BOOT_AUTOCONF | ASYNC_SKIP_TEST | ASYNC_AUTO_IRQ) -#define STD_COM4_FLAGS (ASYNC_BOOT_AUTOCONF | ASYNC_AUTO_IRQ) -#else -#define STD_COM_FLAGS (ASYNC_BOOT_AUTOCONF | ASYNC_SKIP_TEST) -#define STD_COM4_FLAGS ASYNC_BOOT_AUTOCONF -#endif - -#define SERIAL_PORT_DFNS \ - /* UART CLK PORT IRQ FLAGS */ \ - { 0, BASE_BAUD, 0x3F8, 4, STD_COM_FLAGS }, /* ttyS0 */ \ - { 0, BASE_BAUD, 0x2F8, 3, STD_COM_FLAGS }, /* ttyS1 */ \ - { 0, BASE_BAUD, 0x3E8, 4, STD_COM_FLAGS }, /* ttyS2 */ \ - { 0, BASE_BAUD, 0x2E8, 3, STD_COM4_FLAGS }, /* ttyS3 */ diff --git a/include/asm-x86/sockios.h b/include/asm-x86/sockios.h index 5a134fc70b..49cc72b5d3 100644 --- a/include/asm-x86/sockios.h +++ b/include/asm-x86/sockios.h @@ -1,13 +1,13 @@ -#ifdef __KERNEL__ -# ifdef CONFIG_X86_32 -# include "sockios_32.h" -# else -# include "sockios_64.h" -# endif -#else -# ifdef __i386__ -# include "sockios_32.h" -# else -# include "sockios_64.h" -# endif -#endif +#ifndef _ASM_X86_SOCKIOS_H +#define _ASM_X86_SOCKIOS_H + +/* Socket-level I/O control calls. */ +#define FIOSETOWN 0x8901 +#define SIOCSPGRP 0x8902 +#define FIOGETOWN 0x8903 +#define SIOCGPGRP 0x8904 +#define SIOCATMARK 0x8905 +#define SIOCGSTAMP 0x8906 /* Get stamp (timeval) */ +#define SIOCGSTAMPNS 0x8907 /* Get stamp (timespec) */ + +#endif /* _ASM_X86_SOCKIOS_H */ diff --git a/include/asm-x86/sockios_32.h b/include/asm-x86/sockios_32.h deleted file mode 100644 index ff528c7d25..0000000000 --- a/include/asm-x86/sockios_32.h +++ /dev/null @@ -1,13 +0,0 @@ -#ifndef __ARCH_I386_SOCKIOS__ -#define __ARCH_I386_SOCKIOS__ - -/* Socket-level I/O control calls. */ -#define FIOSETOWN 0x8901 -#define SIOCSPGRP 0x8902 -#define FIOGETOWN 0x8903 -#define SIOCGPGRP 0x8904 -#define SIOCATMARK 0x8905 -#define SIOCGSTAMP 0x8906 /* Get stamp (timeval) */ -#define SIOCGSTAMPNS 0x8907 /* Get stamp (timespec) */ - -#endif diff --git a/include/asm-x86/sockios_64.h b/include/asm-x86/sockios_64.h deleted file mode 100644 index d726ba2513..0000000000 --- a/include/asm-x86/sockios_64.h +++ /dev/null @@ -1,13 +0,0 @@ -#ifndef __ARCH_X8664_SOCKIOS__ -#define __ARCH_X8664_SOCKIOS__ - -/* Socket-level I/O control calls. */ -#define FIOSETOWN 0x8901 -#define SIOCSPGRP 0x8902 -#define FIOGETOWN 0x8903 -#define SIOCGPGRP 0x8904 -#define SIOCATMARK 0x8905 -#define SIOCGSTAMP 0x8906 /* Get stamp (timeval) */ -#define SIOCGSTAMPNS 0x8907 /* Get stamp (timespec) */ - -#endif -- 2.39.5