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.
---
Not sure who's merging this type of stuff so I just picked a grab bag of people to put on the To: line.
Also I'm not sure if someone else is already working on this, so I'm just sending out about 15 minutes of work. If this is helpful I'll do more of the easy ones...
include/asm-x86/errno.h | 19 ++++++++----------- include/asm-x86/errno_32.h | 6 ------ include/asm-x86/errno_64.h | 6 ------ include/asm-x86/resource.h | 19 ++++++++----------- include/asm-x86/resource_32.h | 6 ------ include/asm-x86/resource_64.h | 6 ------ include/asm-x86/rtc.h | 15 ++++++++++----- include/asm-x86/rtc_32.h | 10 ---------- include/asm-x86/rtc_64.h | 10 ---------- include/asm-x86/sections.h | 9 +++++---- include/asm-x86/sections_32.h | 7 ------- include/asm-x86/sections_64.h | 7 ------- 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 ------------- 18 files changed, 73 insertions(+), 187 deletions(-) delete mode 100644 include/asm-x86/errno_32.h delete mode 100644 include/asm-x86/errno_64.h delete mode 100644 include/asm-x86/resource_32.h delete mode 100644 include/asm-x86/resource_64.h delete mode 100644 include/asm-x86/rtc_32.h delete mode 100644 include/asm-x86/rtc_64.h delete mode 100644 include/asm-x86/sections_32.h delete mode 100644 include/asm-x86/sections_64.h 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
include/asm-x86/errno.h +8 -11
@@ -1,13 +1,10 @@#ifdef __KERNEL__ -# ifdef CONFIG_X86_32 -# include "errno_32.h" -# else -# include "errno_64.h" -# endif -#else -# ifdef __i386__ -# include "errno_32.h" -# else -# include "errno_64.h" -# endif + +#ifndef _ASM_X86_ERRNO_H +#define _ASM_X86_ERRNO_H + +#include <asm-generic/errno.h> + +#endif /* _ASM_X86_ERRNO_H */ +#endif
include/asm-x86/errno_32.h deleted +0 -6
@@ -1,6 +0,0 @@ -#ifndef _I386_ERRNO_H -#define _I386_ERRNO_H - -#include <asm-generic/errno.h> - -#endif
include/asm-x86/errno_64.h deleted +0 -6
@@ -1,6 +0,0 @@ -#ifndef _X8664_ERRNO_H -#define _X8664_ERRNO_H - -#include <asm-generic/errno.h> - -#endif
include/asm-x86/resource.h +8 -11
@@ -1,13 +1,10 @@#ifdef __KERNEL__ -# ifdef CONFIG_X86_32 -# include "resource_32.h" -# else -# include "resource_64.h" -# endif -#else -# ifdef __i386__ -# include "resource_32.h" -# else -# include "resource_64.h" -# endif + +#ifndef _ASM_X86_RESOURCE_H +#define _ASM_X86_RESOURCE_H + +#include <asm-generic/resource.h> + +#endif /* _ASM_X86_RESOURCE_H */ +#endif
include/asm-x86/resource_32.h deleted +0 -6
@@ -1,6 +0,0 @@ -#ifndef _I386_RESOURCE_H -#define _I386_RESOURCE_H - -#include <asm-generic/resource.h> - -#endif
include/asm-x86/resource_64.h deleted +0 -6
@@ -1,6 +0,0 @@ -#ifndef _X8664_RESOURCE_H -#define _X8664_RESOURCE_H - -#include <asm-generic/resource.h> - -#endif
include/asm-x86/rtc.h +10 -5
@@ -1,5 +1,10 @@ -#ifdef CONFIG_X86_32 -# include "rtc_32.h" -#else -# include "rtc_64.h" -#endif +#ifndef _ASM_X86_RTC_H +#define _ASM_X86_RTC_H + +/* +* x86 uses the default access methods for the RTC. +*/ + +#include <asm-generic/rtc.h> + +#endif /* _ASM_X86_RTC_H */
include/asm-x86/rtc_32.h deleted +0 -10
@@ -1,10 +0,0 @@ -#ifndef _I386_RTC_H -#define _I386_RTC_H - -/* -* x86 uses the default access methods for the RTC. -*/ - -#include <asm-generic/rtc.h> - -#endif
include/asm-x86/rtc_64.h deleted +0 -10
@@ -1,10 +0,0 @@ -#ifndef _X86_64_RTC_H -#define _X86_64_RTC_H - -/* -* x86 uses the default access methods for the RTC. -*/ - -#include <asm-generic/rtc.h> - -#endif
include/asm-x86/sections.h +5 -4
@@ -1,5 +1,6 @@ -#ifdef CONFIG_X86_32 -# include "sections_32.h" -#else -# include "sections_64.h" +#ifndef _ASM_X86_SECTIONS_H +#define _ASM_X86_SECTIONS_H + +#include <asm-generic/sections.h> +#endif
include/asm-x86/sections_32.h deleted +0 -7
@@ -1,7 +0,0 @@ -#ifndef _I386_SECTIONS_H -#define _I386_SECTIONS_H - -/* nothing to see, move along */ -#include <asm-generic/sections.h> - -#endif
include/asm-x86/sections_64.h deleted +0 -7
@@ -1,7 +0,0 @@ -#ifndef _X8664_SECTIONS_H -#define _X8664_SECTIONS_H - -/* nothing to see, move along */ -#include <asm-generic/sections.h> - -#endif
include/asm-x86/serial.h +27 -3
@@ -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 */
include/asm-x86/serial_32.h deleted +0 -29
@@ -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 */
include/asm-x86/serial_64.h deleted +0 -29
@@ -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 */
include/asm-x86/sockios.h +15 -11
@@ -1,13 +1,17 @@#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 + +#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 */ +#endif
include/asm-x86/sockios_32.h deleted +0 -13
@@ -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
include/asm-x86/sockios_64.h deleted +0 -13
@@ -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
Signature · 1 line
1.5.3.2
Quoted 6 lines · Roland Dreier
Merge
errno.h,resource.h,rtc.h,sections.h,serial.handsockios.h, where i386 andx86_64have no or only trivial comment/include guard differences.Build tested on both 32-bit and 64-bit, and booted on 64-bit.
Quoted 8 lines
Signed-off-by Roland Dreier <[email protected]>---
Not sure who's merging this type of stuff so I just picked a grab bag of people to put on the To: line.Also I'm not sure if someone else is already working on this, so I'm just sending out about 15 minutes of work. If this is helpful I'll do more of the easy ones...
Roland, thanks for providing this. I have some of those already, but I really appreciate the help. I take yours and the previously posted and push them out into a cleanup branch on my x86 git tree.
I guess it will be unavoidable that there will be some overlap on the low hanging fruit merges, but anyone who is tackling a more complex one should make this public upfront so we can avoid the redundant work.
Thanks,
tglx
Quoted 3 lines
Roland, thanks for providing this. I have some of those already, but I really appreciate the help. I take yours and the previously posted and push them out into a cleanup branch on my x86 git tree.
No problem, this merging work is the perfect thing when I need a break-- mindless enough to be relaxing, but useful enough that I don't feel guilty...
Anyway, I assume you meant to write "I [will] take yours", since I don't see anything at all in tglx/linux-2.6-x86.git right now. I'll check again on Monday and base my work on your tree.
- R.
Roland,
Quoted 11 lines · Roland Dreier
Quoted 3 lines
Roland, thanks for providing this. I have some of those already, but I really appreciate the help. I take yours and the previously posted and push them out into a cleanup branch on my x86 git tree.
No problem, this merging work is the perfect thing when I need a break-- mindless enough to be relaxing, but useful enough that I don't feel guilty...
Anyway, I assume you meant to write "I [will] take yours", since I don't see anything at all in tglx/linux-2.6-x86.git right now. I'll check again on Monday and base my work on your tree.
I meant the patch, which was posted by Brian earlier, which had some overlap with yours.
I applied both and fixed the Kbuild entries as well. On top of those I run my "find-duplicates-harder" script and fixed another bunch.
You can find the current state of affairs in the "cleanup" branch of my x86 git tree.
Thanks,
tglx