From 6ff6340abeaaf1a15587c87dac3e56754778cc7a Mon Sep 17 00:00:00 2001 From: David Woodhouse Date: Thu, 21 Sep 2006 08:34:39 +0100 Subject: [HEADERS] Fix ARM 'make headers_check' Sanitise the ARM headers exported to userspace. Signed-off-by: David Woodhouse --- include/asm-arm/elf.h | 18 ++++++++---------- include/asm-arm/page.h | 4 ++-- 2 files changed, 10 insertions(+), 12 deletions(-) diff --git a/include/asm-arm/elf.h b/include/asm-arm/elf.h index ae7baa6c73f..17f0c656d27 100644 --- a/include/asm-arm/elf.h +++ b/include/asm-arm/elf.h @@ -8,9 +8,6 @@ #include #include -#ifdef __KERNEL -#include -#endif typedef unsigned long elf_greg_t; typedef unsigned long elf_freg_t[3]; @@ -31,11 +28,6 @@ typedef elf_greg_t elf_gregset_t[ELF_NGREG]; typedef struct user_fp elf_fpregset_t; -/* - * This is used to ensure we don't load something for the wrong architecture. - */ -#define elf_check_arch(x) ( ((x)->e_machine == EM_ARM) && (ELF_PROC_OK((x))) ) - /* * These are used to set parameters in the core dumps. */ @@ -47,6 +39,14 @@ typedef struct user_fp elf_fpregset_t; #endif #define ELF_ARCH EM_ARM +#ifdef __KERNEL__ +#include + +/* + * This is used to ensure we don't load something for the wrong architecture. + */ +#define elf_check_arch(x) ( ((x)->e_machine == EM_ARM) && (ELF_PROC_OK((x))) ) + #define USE_ELF_CORE_DUMP #define ELF_EXEC_PAGESIZE 4096 @@ -83,8 +83,6 @@ typedef struct user_fp elf_fpregset_t; extern char elf_platform[]; #define ELF_PLATFORM (elf_platform) -#ifdef __KERNEL__ - /* * 32-bit code is always OK. Some cpus can do 26-bit, some can't. */ diff --git a/include/asm-arm/page.h b/include/asm-arm/page.h index b721270b998..02bd3ee935b 100644 --- a/include/asm-arm/page.h +++ b/include/asm-arm/page.h @@ -11,13 +11,13 @@ #define _ASMARM_PAGE_H +#ifdef __KERNEL__ + /* PAGE_SHIFT determines the page size */ #define PAGE_SHIFT 12 #define PAGE_SIZE (1UL << PAGE_SHIFT) #define PAGE_MASK (~(PAGE_SIZE-1)) -#ifdef __KERNEL__ - /* to align the pointer to the (next) page boundary */ #define PAGE_ALIGN(addr) (((addr)+PAGE_SIZE-1)&PAGE_MASK) -- cgit v1.2.3-70-g09d2 From b5233d0704c9a6147ebbfabc576d1638b3ac5274 Mon Sep 17 00:00:00 2001 From: Paul Mundt Date: Wed, 20 Sep 2006 03:25:34 +0900 Subject: Fix 'make headers_check' on sh Cleanup for user headers, as noted: asm-sh/page.h requires asm-generic/memory_model.h, which does not exist in exported headers asm-sh/ptrace.h requires asm/ubc.h, which does not exist in exported headers Signed-off-by: Paul Mundt Signed-off-by: David Woodhouse --- arch/sh/kernel/process.c | 1 + include/asm-sh/page.h | 3 +-- include/asm-sh/ptrace.h | 2 -- 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/arch/sh/kernel/process.c b/arch/sh/kernel/process.c index 22dc9c21201..f2031314cb2 100644 --- a/arch/sh/kernel/process.c +++ b/arch/sh/kernel/process.c @@ -26,6 +26,7 @@ #include #include #include +#include static int hlt_counter=0; diff --git a/include/asm-sh/page.h b/include/asm-sh/page.h index 5a057b00f19..6f7eb8a3aba 100644 --- a/include/asm-sh/page.h +++ b/include/asm-sh/page.h @@ -112,9 +112,8 @@ typedef struct { unsigned long pgprot; } pgprot_t; #define VM_DATA_DEFAULT_FLAGS (VM_READ | VM_WRITE | VM_EXEC | \ VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC) -#endif /* __KERNEL__ */ - #include #include +#endif /* __KERNEL__ */ #endif /* __ASM_SH_PAGE_H */ diff --git a/include/asm-sh/ptrace.h b/include/asm-sh/ptrace.h index 792fc35bd62..ed358a376e6 100644 --- a/include/asm-sh/ptrace.h +++ b/include/asm-sh/ptrace.h @@ -1,8 +1,6 @@ #ifndef __ASM_SH_PTRACE_H #define __ASM_SH_PTRACE_H -#include - /* * Copyright (C) 1999, 2000 Niibe Yutaka * -- cgit v1.2.3-70-g09d2 From 029669da25efa18ee4b8911e694fdcf4a11c8cbe Mon Sep 17 00:00:00 2001 From: Paul Mundt Date: Wed, 20 Sep 2006 03:27:17 +0900 Subject: Fix 'make headers_check' on sh64 Cleanup for user headers, as noted: asm-sh64/page.h requires asm-generic/memory_model.h, which does not exist in exported headers asm-sh64/shmparam.h requires asm/cache.h, which does not exist in exported headers asm-sh64/signal.h requires asm/processor.h, which does not exist in exported headers asm-sh64/user.h requires asm/processor.h, which does not exist in exported headers Signed-off-by: Paul Mundt Signed-off-by: David Woodhouse --- include/asm-sh64/page.h | 3 +-- include/asm-sh64/shmparam.h | 16 ++++------------ include/asm-sh64/signal.h | 1 - include/asm-sh64/user.h | 1 - 4 files changed, 5 insertions(+), 16 deletions(-) diff --git a/include/asm-sh64/page.h b/include/asm-sh64/page.h index 34fb34754ae..472089aefc6 100644 --- a/include/asm-sh64/page.h +++ b/include/asm-sh64/page.h @@ -112,9 +112,8 @@ typedef struct { unsigned long pgprot; } pgprot_t; #define VM_DATA_DEFAULT_FLAGS (VM_READ | VM_WRITE | VM_EXEC | \ VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC) -#endif /* __KERNEL__ */ - #include #include +#endif /* __KERNEL__ */ #endif /* __ASM_SH64_PAGE_H */ diff --git a/include/asm-sh64/shmparam.h b/include/asm-sh64/shmparam.h index d3a99a4dc0e..1bb820c833e 100644 --- a/include/asm-sh64/shmparam.h +++ b/include/asm-sh64/shmparam.h @@ -2,19 +2,11 @@ #define __ASM_SH64_SHMPARAM_H /* - * This file is subject to the terms and conditions of the GNU General Public - * License. See the file "COPYING" in the main directory of this archive - * for more details. - * - * include/asm-sh64/shmparam.h - * - * Copyright (C) 2000, 2001 Paolo Alberelli - * + * Set this to a sensible safe default, we'll work out the specifics for the + * align mask from the cache descriptor at run-time. */ +#define SHMLBA 0x4000 -#include - -/* attach addr a multiple of this */ -#define SHMLBA (cpu_data->dcache.sets * L1_CACHE_BYTES) +#define __ARCH_FORCE_SHMLBA #endif /* __ASM_SH64_SHMPARAM_H */ diff --git a/include/asm-sh64/signal.h b/include/asm-sh64/signal.h index a5a28203cb3..244e134730d 100644 --- a/include/asm-sh64/signal.h +++ b/include/asm-sh64/signal.h @@ -13,7 +13,6 @@ */ #include -#include /* Avoid too many header ordering problems. */ struct siginfo; diff --git a/include/asm-sh64/user.h b/include/asm-sh64/user.h index 8f32f39a8ca..eb3b33edd73 100644 --- a/include/asm-sh64/user.h +++ b/include/asm-sh64/user.h @@ -13,7 +13,6 @@ */ #include -#include #include #include -- cgit v1.2.3-70-g09d2 From 47dbec79d1b9ce9e80bed932f345adc92049f05d Mon Sep 17 00:00:00 2001 From: David Woodhouse Date: Sun, 17 Sep 2006 08:39:39 +0100 Subject: Fix 'make headers_check' on m32r > asm-m32r/page.h requires asm-generic/memory_model.h, which does not exist > asm-m32r/ptrace.h requires asm/m32r.h, which does not exist > asm-m32r/signal.h requires linux/linkage.h, which does not exist > asm-m32r/unistd.h requires asm/syscall.h, which does not exist > asm-m32r/user.h requires asm/processor.h, which does not exist Signed-off-by: Hirokazu Takata Signed-off-by: David Woodhouse --- include/asm-m32r/page.h | 3 +-- include/asm-m32r/ptrace.h | 4 ++-- include/asm-m32r/signal.h | 1 - include/asm-m32r/unistd.h | 4 ++-- include/asm-m32r/user.h | 1 - 5 files changed, 5 insertions(+), 8 deletions(-) diff --git a/include/asm-m32r/page.h b/include/asm-m32r/page.h index 9688be00362..404a4c24007 100644 --- a/include/asm-m32r/page.h +++ b/include/asm-m32r/page.h @@ -87,10 +87,9 @@ typedef struct { unsigned long pgprot; } pgprot_t; #define devmem_is_allowed(x) 1 -#endif /* __KERNEL__ */ - #include #include +#endif /* __KERNEL__ */ #endif /* _ASM_M32R_PAGE_H */ diff --git a/include/asm-m32r/ptrace.h b/include/asm-m32r/ptrace.h index a07fa90314d..2d2a6c97331 100644 --- a/include/asm-m32r/ptrace.h +++ b/include/asm-m32r/ptrace.h @@ -12,8 +12,6 @@ * Copyright (C) 2001-2002, 2004 Hirokazu Takata */ -#include /* M32R_PSW_BSM, M32R_PSW_BPM */ - /* 0 - 13 are integer registers (general purpose registers). */ #define PT_R4 0 #define PT_R5 1 @@ -140,6 +138,8 @@ struct pt_regs { #ifdef __KERNEL__ +#include /* M32R_PSW_BSM, M32R_PSW_BPM */ + #define __ARCH_SYS_PTRACE 1 #if defined(CONFIG_ISA_M32R2) || defined(CONFIG_CHIP_VDEC2) diff --git a/include/asm-m32r/signal.h b/include/asm-m32r/signal.h index e750045164d..65423bed32b 100644 --- a/include/asm-m32r/signal.h +++ b/include/asm-m32r/signal.h @@ -6,7 +6,6 @@ /* orig : i386 2.4.18 */ #include -#include #include #include diff --git a/include/asm-m32r/unistd.h b/include/asm-m32r/unistd.h index cc31790d807..89f376e6229 100644 --- a/include/asm-m32r/unistd.h +++ b/include/asm-m32r/unistd.h @@ -3,8 +3,6 @@ /* $Id$ */ -#include /* SYSCALL_* */ - /* * This file contains the system call numbers. */ @@ -303,6 +301,8 @@ * */ +#include /* SYSCALL_* */ + #define __syscall_return(type, res) \ do { \ if ((unsigned long)(res) >= (unsigned long)(-(124 + 1))) { \ diff --git a/include/asm-m32r/user.h b/include/asm-m32r/user.h index 2ffd0c65a78..1ad4ded8483 100644 --- a/include/asm-m32r/user.h +++ b/include/asm-m32r/user.h @@ -8,7 +8,6 @@ */ #include -#include #include #include -- cgit v1.2.3-70-g09d2 From 09087a1a8722fac30b1969a4a542cde064af13f8 Mon Sep 17 00:00:00 2001 From: David Woodhouse Date: Thu, 21 Sep 2006 08:48:27 +0100 Subject: Fix exported headers for SPARC, SPARC64 Mostly removing files which have no business being used in userspace. Signed-off-by: David Woodhouse Signed-off-by: David S. Miller --- include/asm-sparc/Kbuild | 7 ------- include/asm-sparc/page.h | 8 ++++---- include/asm-sparc64/Kbuild | 5 +---- include/asm-sparc64/page.h | 9 ++++----- include/asm-sparc64/shmparam.h | 2 ++ 5 files changed, 11 insertions(+), 20 deletions(-) diff --git a/include/asm-sparc/Kbuild b/include/asm-sparc/Kbuild index b22b67a64ec..c6a55cf0d33 100644 --- a/include/asm-sparc/Kbuild +++ b/include/asm-sparc/Kbuild @@ -2,20 +2,13 @@ include include/asm-generic/Kbuild.asm header-y += apc.h header-y += asi.h -header-y += auxio.h header-y += bpp.h -header-y += head.h -header-y += ipc.h header-y += jsflash.h header-y += openpromio.h -header-y += pbm.h header-y += pconf.h -header-y += pgtsun4.h header-y += reg.h header-y += traps.h -header-y += turbosparc.h header-y += vfc_ioctls.h -header-y += winmacro.h unifdef-y += fbio.h unifdef-y += perfctr.h diff --git a/include/asm-sparc/page.h b/include/asm-sparc/page.h index 5bab8a7c25c..ff57648eb8f 100644 --- a/include/asm-sparc/page.h +++ b/include/asm-sparc/page.h @@ -8,6 +8,8 @@ #ifndef _SPARC_PAGE_H #define _SPARC_PAGE_H +#ifdef __KERNEL__ + #ifdef CONFIG_SUN4 #define PAGE_SHIFT 13 #else @@ -21,8 +23,6 @@ #endif #define PAGE_MASK (~(PAGE_SIZE-1)) -#ifdef __KERNEL__ - #include #ifndef __ASSEMBLY__ @@ -160,9 +160,9 @@ extern unsigned long pfn_base; #define VM_DATA_DEFAULT_FLAGS (VM_READ | VM_WRITE | VM_EXEC | \ VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC) -#endif /* __KERNEL__ */ - #include #include +#endif /* __KERNEL__ */ + #endif /* _SPARC_PAGE_H */ diff --git a/include/asm-sparc64/Kbuild b/include/asm-sparc64/Kbuild index 4b59ce46cc2..a7f44408c93 100644 --- a/include/asm-sparc64/Kbuild +++ b/include/asm-sparc64/Kbuild @@ -8,15 +8,12 @@ header-y += apb.h header-y += asi.h header-y += bbc.h header-y += bpp.h +header-y += const.h header-y += display7seg.h header-y += envctrl.h -header-y += floppy.h header-y += ipc.h -header-y += kdebug.h -header-y += mostek.h header-y += openprom.h header-y += openpromio.h -header-y += parport.h header-y += pconf.h header-y += psrcompat.h header-y += pstate.h diff --git a/include/asm-sparc64/page.h b/include/asm-sparc64/page.h index fdf0ceb7602..ff736eafa64 100644 --- a/include/asm-sparc64/page.h +++ b/include/asm-sparc64/page.h @@ -3,6 +3,8 @@ #ifndef _SPARC64_PAGE_H #define _SPARC64_PAGE_H +#ifdef __KERNEL__ + #include #if defined(CONFIG_SPARC64_PAGE_SIZE_8KB) @@ -27,8 +29,6 @@ #define DCACHE_ALIASING_POSSIBLE #endif -#ifdef __KERNEL__ - #if defined(CONFIG_HUGETLB_PAGE_SIZE_4MB) #define HPAGE_SHIFT 22 #elif defined(CONFIG_HUGETLB_PAGE_SIZE_512K) @@ -141,8 +141,7 @@ typedef unsigned long pgprot_t; #define VM_DATA_DEFAULT_FLAGS (VM_READ | VM_WRITE | VM_EXEC | \ VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC) -#endif /* !(__KERNEL__) */ - #include -#endif /* !(_SPARC64_PAGE_H) */ +#endif /* __KERNEL__ */ +#endif /* _SPARC64_PAGE_H */ diff --git a/include/asm-sparc64/shmparam.h b/include/asm-sparc64/shmparam.h index 8c66fded8a3..911d0427de6 100644 --- a/include/asm-sparc64/shmparam.h +++ b/include/asm-sparc64/shmparam.h @@ -1,6 +1,7 @@ /* $Id: shmparam.h,v 1.5 2001/09/24 21:17:57 kanoj Exp $ */ #ifndef _ASMSPARC64_SHMPARAM_H #define _ASMSPARC64_SHMPARAM_H +#ifdef __KERNEL__ #include @@ -8,4 +9,5 @@ /* attach addr a multiple of this */ #define SHMLBA ((PAGE_SIZE > L1DCACHE_SIZE) ? PAGE_SIZE : L1DCACHE_SIZE) +#endif /* __KERNEL__ */ #endif /* _ASMSPARC64_SHMPARAM_H */ -- cgit v1.2.3-70-g09d2 From 5daf3033aa4fc5ec0535816d8a8e94874160482e Mon Sep 17 00:00:00 2001 From: David Woodhouse Date: Thu, 21 Sep 2006 08:50:36 +0100 Subject: Fix m68knommu exported headers Just clean up asm/page.h Signed-off-by: David Woodhouse --- include/asm-m68knommu/page.h | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/include/asm-m68knommu/page.h b/include/asm-m68knommu/page.h index a22bf5a8816..2a1b8bdcb29 100644 --- a/include/asm-m68knommu/page.h +++ b/include/asm-m68knommu/page.h @@ -1,6 +1,7 @@ #ifndef _M68KNOMMU_PAGE_H #define _M68KNOMMU_PAGE_H +#ifdef __KERNEL__ /* PAGE_SHIFT determines the page size */ @@ -8,8 +9,6 @@ #define PAGE_SIZE (1UL << PAGE_SHIFT) #define PAGE_MASK (~(PAGE_SIZE-1)) -#ifdef __KERNEL__ - #include #ifndef __ASSEMBLY__ @@ -76,8 +75,8 @@ extern unsigned long memory_end; #endif /* __ASSEMBLY__ */ -#endif /* __KERNEL__ */ - #include +#endif /* __KERNEL__ */ + #endif /* _M68KNOMMU_PAGE_H */ -- cgit v1.2.3-70-g09d2 From 0000f0b1bc9aa340356a8dcdb9e8b1dbbaf0afcb Mon Sep 17 00:00:00 2001 From: David Woodhouse Date: Thu, 21 Sep 2006 08:51:43 +0100 Subject: Fix H8300 exported headers. Just clean up asm/page.h Signed-off-by: David Woodhouse --- include/asm-h8300/page.h | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/include/asm-h8300/page.h b/include/asm-h8300/page.h index d673077d2fd..3b4f2903f91 100644 --- a/include/asm-h8300/page.h +++ b/include/asm-h8300/page.h @@ -1,6 +1,7 @@ #ifndef _H8300_PAGE_H #define _H8300_PAGE_H +#ifdef __KERNEL__ /* PAGE_SHIFT determines the page size */ @@ -8,8 +9,6 @@ #define PAGE_SIZE (1UL << PAGE_SHIFT) #define PAGE_MASK (~(PAGE_SIZE-1)) -#ifdef __KERNEL__ - #include #ifndef __ASSEMBLY__ @@ -76,9 +75,9 @@ extern unsigned long memory_end; #endif /* __ASSEMBLY__ */ -#endif /* __KERNEL__ */ - #include #include +#endif /* __KERNEL__ */ + #endif /* _H8300_PAGE_H */ -- cgit v1.2.3-70-g09d2 From cb16da6a71924772dc4580c16541dece2b9a8472 Mon Sep 17 00:00:00 2001 From: David Woodhouse Date: Thu, 21 Sep 2006 08:54:44 +0100 Subject: Remove ARM26 header export. We ought to be able to use ARM headers; no need for special ARM26 version. Signed-off-by: David Woodhouse --- include/asm-arm26/Kbuild | 1 - 1 file changed, 1 deletion(-) delete mode 100644 include/asm-arm26/Kbuild diff --git a/include/asm-arm26/Kbuild b/include/asm-arm26/Kbuild deleted file mode 100644 index c68e1680da0..00000000000 --- a/include/asm-arm26/Kbuild +++ /dev/null @@ -1 +0,0 @@ -include include/asm-generic/Kbuild.asm -- cgit v1.2.3-70-g09d2 From d28d1f10f99f8ab2fe2bd06c3d22397d0ba08687 Mon Sep 17 00:00:00 2001 From: David Woodhouse Date: Thu, 21 Sep 2006 08:55:28 +0100 Subject: Remove UML header export No need for UML to export headers for userspace to build against. Signed-off-by: David Woodhouse --- include/asm-um/Kbuild | 1 - 1 file changed, 1 deletion(-) delete mode 100644 include/asm-um/Kbuild diff --git a/include/asm-um/Kbuild b/include/asm-um/Kbuild deleted file mode 100644 index c68e1680da0..00000000000 --- a/include/asm-um/Kbuild +++ /dev/null @@ -1 +0,0 @@ -include include/asm-generic/Kbuild.asm -- cgit v1.2.3-70-g09d2 From f17b7bad396c8f748620f54a88754a1f5af02c8a Mon Sep 17 00:00:00 2001 From: David Woodhouse Date: Thu, 21 Sep 2006 09:01:45 +0100 Subject: Don't advertise (or allow) headers_{install,check} where inappropriate. For architectures which don't have the include/asm-$(ARCH)/Kbuild file, like ARM26, UM, etc. Signed-off-by: David Woodhouse --- Makefile | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index edfc2fdf76c..33074e834e9 100644 --- a/Makefile +++ b/Makefile @@ -894,6 +894,9 @@ export INSTALL_HDR_PATH PHONY += headers_install headers_install: include/linux/version.h + @if [ ! -r include/asm-$(ARCH)/Kbuild ]; then \ + echo '*** Error: Headers not exportable for this architecture ($(ARCH))'; \ + exit 1 ; fi $(Q)unifdef -Ux /dev/null $(Q)rm -rf $(INSTALL_HDR_PATH)/include $(Q)$(MAKE) -rR -f $(srctree)/scripts/Makefile.headersinst obj=include @@ -1076,13 +1079,17 @@ help: @echo ' cscope - Generate cscope index' @echo ' kernelrelease - Output the release version string' @echo ' kernelversion - Output the version stored in Makefile' - @echo ' headers_install - Install sanitised kernel headers to INSTALL_HDR_PATH' + @if [ -r include/asm-$(ARCH)/Kbuild ]; then \ + echo ' headers_install - Install sanitised kernel headers to INSTALL_HDR_PATH'; \ + fi @echo ' (default: $(INSTALL_HDR_PATH))' @echo '' @echo 'Static analysers' @echo ' checkstack - Generate a list of stack hogs' @echo ' namespacecheck - Name space analysis on compiled kernel' - @echo ' headers_check - Sanity check on exported headers' + @if [ -r include/asm-$(ARCH)/Kbuild ]; then \ + echo ' headers_check - Sanity check on exported headers'; \ + fi @echo '' @echo 'Kernel packaging:' @$(MAKE) $(build)=$(package-dir) help -- cgit v1.2.3-70-g09d2 From 2a1b181eff32f497f285fcfc1e771ec469205908 Mon Sep 17 00:00:00 2001 From: David Woodhouse Date: Thu, 21 Sep 2006 09:05:25 +0100 Subject: Fix v850 exported headers Signed-off-by: David Woodhouse --- include/asm-v850/page.h | 7 ++++--- include/asm-v850/param.h | 4 ++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/include/asm-v850/page.h b/include/asm-v850/page.h index ad03c46a1f9..d693ffb1364 100644 --- a/include/asm-v850/page.h +++ b/include/asm-v850/page.h @@ -14,6 +14,8 @@ #ifndef __V850_PAGE_H__ #define __V850_PAGE_H__ +#ifdef __KERNEL__ + #include @@ -32,7 +34,6 @@ #endif -#ifdef __KERNEL__ #ifndef __ASSEMBLY__ #define STRICT_MM_TYPECHECKS @@ -122,9 +123,9 @@ typedef unsigned long pgprot_t; #define __va(x) ((void *)__phys_to_virt ((unsigned long)(x))) -#endif /* KERNEL */ - #include #include +#endif /* KERNEL */ + #endif /* __V850_PAGE_H__ */ diff --git a/include/asm-v850/param.h b/include/asm-v850/param.h index 8d796e4bff5..3c65bd57378 100644 --- a/include/asm-v850/param.h +++ b/include/asm-v850/param.h @@ -14,8 +14,6 @@ #ifndef __V850_PARAM_H__ #define __V850_PARAM_H__ -#include /* For HZ */ - #define EXEC_PAGESIZE 4096 #ifndef NOGROUP @@ -25,6 +23,8 @@ #define MAXHOSTNAMELEN 64 /* max length of hostname */ #ifdef __KERNEL__ +#include /* For HZ */ + # define USER_HZ 100 # define CLOCKS_PER_SEC USER_HZ #endif -- cgit v1.2.3-70-g09d2 From ed9526b0d342a1c08a19f880c3f0c1d0fec4e8db Mon Sep 17 00:00:00 2001 From: David Woodhouse Date: Thu, 21 Sep 2006 09:33:55 +0100 Subject: Clean up exported headers on CRIS This fixes most of the issues with exported headers on CRIS, although we do still need to deal with the asm/arch symlink. Signed-off-by: David Woodhouse --- include/asm-cris/Kbuild | 4 ++++ include/asm-cris/arch-v10/Kbuild | 2 ++ include/asm-cris/arch-v32/Kbuild | 2 ++ include/asm-cris/byteorder.h | 3 ++- include/asm-cris/elf.h | 8 +++++--- include/asm-cris/page.h | 8 ++++---- include/asm-cris/posix_types.h | 9 +++------ include/asm-cris/unistd.h | 4 +--- 8 files changed, 23 insertions(+), 17 deletions(-) create mode 100644 include/asm-cris/arch-v10/Kbuild create mode 100644 include/asm-cris/arch-v32/Kbuild diff --git a/include/asm-cris/Kbuild b/include/asm-cris/Kbuild index c68e1680da0..14498d5a2f6 100644 --- a/include/asm-cris/Kbuild +++ b/include/asm-cris/Kbuild @@ -1 +1,5 @@ include include/asm-generic/Kbuild.asm + +header-y += arch-v10/ arch-v32/ + +unifdef-y += rs485.h diff --git a/include/asm-cris/arch-v10/Kbuild b/include/asm-cris/arch-v10/Kbuild new file mode 100644 index 00000000000..d7f27dc0941 --- /dev/null +++ b/include/asm-cris/arch-v10/Kbuild @@ -0,0 +1,2 @@ +header-y += ptrace.h +header-y += user.h diff --git a/include/asm-cris/arch-v32/Kbuild b/include/asm-cris/arch-v32/Kbuild new file mode 100644 index 00000000000..d7f27dc0941 --- /dev/null +++ b/include/asm-cris/arch-v32/Kbuild @@ -0,0 +1,2 @@ +header-y += ptrace.h +header-y += user.h diff --git a/include/asm-cris/byteorder.h b/include/asm-cris/byteorder.h index a1a222adaa9..0cd9db1cc88 100644 --- a/include/asm-cris/byteorder.h +++ b/include/asm-cris/byteorder.h @@ -3,14 +3,15 @@ #ifdef __GNUC__ +#ifdef __KERNEL__ #include /* defines are necessary because the other files detect the presence * of a defined __arch_swab32, not an inline */ - #define __arch__swab32(x) ___arch__swab32(x) #define __arch__swab16(x) ___arch__swab16(x) +#endif /* __KERNEL__ */ #if !defined(__STRICT_ANSI__) || defined(__KERNEL__) # define __BYTEORDER_HAS_U64__ diff --git a/include/asm-cris/elf.h b/include/asm-cris/elf.h index 87a60bd8e66..96a40c1de57 100644 --- a/include/asm-cris/elf.h +++ b/include/asm-cris/elf.h @@ -5,7 +5,6 @@ * ELF register definitions.. */ -#include #include #define R_CRIS_NONE 0 @@ -46,6 +45,9 @@ typedef unsigned long elf_fpregset_t; #define ELF_DATA ELFDATA2LSB #define ELF_ARCH EM_CRIS +#ifdef __KERNEL__ +#include + /* The master for these definitions is {binutils}/include/elf/cris.h: */ /* User symbols in this file have a leading underscore. */ #define EF_CRIS_UNDERSCORE 0x00000001 @@ -87,8 +89,8 @@ typedef unsigned long elf_fpregset_t; #define ELF_PLATFORM (NULL) -#ifdef __KERNEL__ #define SET_PERSONALITY(ex, ibcs2) set_personality((ibcs2)?PER_SVR4:PER_LINUX) -#endif + +#endif /* __KERNEL__ */ #endif diff --git a/include/asm-cris/page.h b/include/asm-cris/page.h index 81832e9e157..9f13c32552b 100644 --- a/include/asm-cris/page.h +++ b/include/asm-cris/page.h @@ -1,6 +1,8 @@ #ifndef _CRIS_PAGE_H #define _CRIS_PAGE_H +#ifdef __KERNEL__ + #include /* PAGE_SHIFT determines the page size */ @@ -12,8 +14,6 @@ #endif #define PAGE_MASK (~(PAGE_SIZE-1)) -#ifdef __KERNEL__ - #define clear_page(page) memset((void *)(page), 0, PAGE_SIZE) #define copy_page(to,from) memcpy((void *)(to), (void *)(from), PAGE_SIZE) @@ -73,10 +73,10 @@ typedef struct { unsigned long pgprot; } pgprot_t; #define VM_DATA_DEFAULT_FLAGS (VM_READ | VM_WRITE | VM_EXEC | \ VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC) -#endif /* __KERNEL__ */ - #include #include +#endif /* __KERNEL__ */ + #endif /* _CRIS_PAGE_H */ diff --git a/include/asm-cris/posix_types.h b/include/asm-cris/posix_types.h index 6d26fee4a61..7b9ed22ab5d 100644 --- a/include/asm-cris/posix_types.h +++ b/include/asm-cris/posix_types.h @@ -6,8 +6,6 @@ #ifndef __ARCH_CRIS_POSIX_TYPES_H #define __ARCH_CRIS_POSIX_TYPES_H -#include - /* * This file is generally used by user-level software, so you need to * be a little careful about namespace pollution etc. Also, we cannot @@ -53,9 +51,8 @@ typedef struct { #endif /* !defined(__KERNEL__) && !defined(__USE_ALL) */ } __kernel_fsid_t; -/* should this ifdef be here ? */ - -#if defined(__KERNEL__) || !defined(__GLIBC__) || (__GLIBC__ < 2) +#ifdef __KERNEL__ +#include #undef __FD_SET #define __FD_SET(fd,fdsetp) set_bit(fd, (void *)(fdsetp)) @@ -69,6 +66,6 @@ typedef struct { #undef __FD_ZERO #define __FD_ZERO(fdsetp) memset((void *)(fdsetp), 0, __FDSET_LONGS << 2) -#endif /* defined(__KERNEL__) || !defined(__GLIBC__) || (__GLIBC__ < 2) */ +#endif /* __KERNEL__ */ #endif /* __ARCH_CRIS_POSIX_TYPES_H */ diff --git a/include/asm-cris/unistd.h b/include/asm-cris/unistd.h index c2954e90aa2..7372efae051 100644 --- a/include/asm-cris/unistd.h +++ b/include/asm-cris/unistd.h @@ -1,8 +1,6 @@ #ifndef _ASM_CRIS_UNISTD_H_ #define _ASM_CRIS_UNISTD_H_ -#include - /* * This file contains the system call numbers, and stub macros for libc. */ @@ -299,6 +297,7 @@ #define NR_syscalls 289 +#include #define __ARCH_WANT_IPC_PARSE_VERSION #define __ARCH_WANT_OLD_READDIR @@ -322,7 +321,6 @@ #define __ARCH_WANT_SYS_SIGPENDING #define __ARCH_WANT_SYS_SIGPROCMASK #define __ARCH_WANT_SYS_RT_SIGACTION -#endif #ifdef __KERNEL_SYSCALLS__ -- cgit v1.2.3-70-g09d2 From 1694176a210189312e31b083bac1e1688981219a Mon Sep 17 00:00:00 2001 From: David Woodhouse Date: Fri, 22 Sep 2006 08:00:42 +0100 Subject: Remove offsetof() from user-visible It's not used by anything user-visible, and it make g++ unhappy. Signed-off-by: David Woodhouse --- include/linux/Kbuild | 2 +- include/linux/stddef.h | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/include/linux/Kbuild b/include/linux/Kbuild index 7d076d97b2f..10d2ca07562 100644 --- a/include/linux/Kbuild +++ b/include/linux/Kbuild @@ -143,7 +143,6 @@ header-y += snmp.h header-y += sockios.h header-y += som.h header-y += sound.h -header-y += stddef.h header-y += synclink.h header-y += telephony.h header-y += termios.h @@ -318,6 +317,7 @@ unifdef-y += sonet.h unifdef-y += sonypi.h unifdef-y += soundcard.h unifdef-y += stat.h +unifdef-y += stddef.h unifdef-y += sysctl.h unifdef-y += tcp.h unifdef-y += time.h diff --git a/include/linux/stddef.h b/include/linux/stddef.h index b3a2cadf90f..ea65dfb60cd 100644 --- a/include/linux/stddef.h +++ b/include/linux/stddef.h @@ -10,11 +10,13 @@ #define NULL ((void *)0) #endif +#ifdef __KERNEL__ #undef offsetof #ifdef __compiler_offsetof #define offsetof(TYPE,MEMBER) __compiler_offsetof(TYPE,MEMBER) #else #define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER) #endif +#endif /* __KERNEL__ */ #endif -- cgit v1.2.3-70-g09d2 From 9e72cbf353e259bd30ab472d72d7bdb9be23fb12 Mon Sep 17 00:00:00 2001 From: David Woodhouse Date: Sun, 24 Sep 2006 22:06:48 +0100 Subject: Remove dead netfilter_logging.h from include/linux/Kbuild Signed-off-by: David Woodhouse --- include/linux/Kbuild | 1 - 1 file changed, 1 deletion(-) diff --git a/include/linux/Kbuild b/include/linux/Kbuild index 19a3664f1df..1df2ac30a4d 100644 --- a/include/linux/Kbuild +++ b/include/linux/Kbuild @@ -266,7 +266,6 @@ unifdef-y += netfilter_decnet.h unifdef-y += netfilter.h unifdef-y += netfilter_ipv4.h unifdef-y += netfilter_ipv6.h -unifdef-y += netfilter_logging.h unifdef-y += net.h unifdef-y += netlink.h unifdef-y += nfs3.h -- cgit v1.2.3-70-g09d2 From b4daf69722c49670d355d66439abda5ab5d4c5db Mon Sep 17 00:00:00 2001 From: David Woodhouse Date: Sun, 24 Sep 2006 22:07:25 +0100 Subject: [S390] Unexport , export in its place. Signed-off-by: David Woodhouse --- include/asm-s390/Kbuild | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/asm-s390/Kbuild b/include/asm-s390/Kbuild index 088969d55e7..e92b429d2be 100644 --- a/include/asm-s390/Kbuild +++ b/include/asm-s390/Kbuild @@ -6,7 +6,7 @@ header-y += qeth.h header-y += tape390.h header-y += ucontext.h header-y += vtoc.h -header-y += z90crypt.h +header-y += zcrypt.h unifdef-y += cmb.h unifdef-y += debug.h -- cgit v1.2.3-70-g09d2 From de78912582bc1f95733d53e0d40779c0cd7b0686 Mon Sep 17 00:00:00 2001 From: David Woodhouse Date: Sun, 24 Sep 2006 22:15:14 +0100 Subject: Use dependencies for 'make headers_install'. Re-export header files only if either they or their controlling Kbuild file has actually changed. Also allow for similar dependencies with 'headers_check', once we properly create the dependencies for those. Signed-off-by: David Woodhouse --- Makefile | 1 - scripts/Makefile.headersinst | 124 +++++++++++++++++++++++++++---------------- scripts/hdrcheck.sh | 2 + 3 files changed, 81 insertions(+), 46 deletions(-) diff --git a/Makefile b/Makefile index 33074e834e9..13448d755bb 100644 --- a/Makefile +++ b/Makefile @@ -898,7 +898,6 @@ headers_install: include/linux/version.h echo '*** Error: Headers not exportable for this architecture ($(ARCH))'; \ exit 1 ; fi $(Q)unifdef -Ux /dev/null - $(Q)rm -rf $(INSTALL_HDR_PATH)/include $(Q)$(MAKE) -rR -f $(srctree)/scripts/Makefile.headersinst obj=include PHONY += headers_check diff --git a/scripts/Makefile.headersinst b/scripts/Makefile.headersinst index 12e1daf875c..07004c41e30 100644 --- a/scripts/Makefile.headersinst +++ b/scripts/Makefile.headersinst @@ -23,30 +23,30 @@ HDRSED := sed -e "s/ inline / __inline__ /g" \ _dst := $(if $(dst),$(dst),$(obj)) -.PHONY: __headersinst -__headersinst: - - ifeq (,$(patsubst include/asm/%,,$(obj)/)) # For producing the generated stuff in include/asm for biarch builds, include # both sets of Kbuild files; we'll generate anything which is mentioned in # _either_ arch, and recurse into subdirectories which are mentioned in either # arch. Since some directories may exist in one but not the other, we must -# use '-include'. +# use $(wildcard...). GENASM := 1 archasm := $(subst include/asm,asm-$(ARCH),$(obj)) altarchasm := $(subst include/asm,asm-$(ALTARCH),$(obj)) --include $(srctree)/include/$(archasm)/Kbuild --include $(srctree)/include/$(altarchasm)/Kbuild +KBUILDFILES := $(wildcard $(srctree)/include/$(archasm)/Kbuild $(srctree)/include/$(altarchasm)/Kbuild) else -include $(srctree)/$(obj)/Kbuild +KBUILDFILES := $(srctree)/$(obj)/Kbuild endif -include scripts/Kbuild.include +include $(KBUILDFILES) + +include scripts/Kbuild.include # If this is include/asm-$(ARCH) and there's no $(ALTARCH), then # override $(_dst) so that we install to include/asm directly. -ifeq ($(obj)$(ALTARCH),include/asm-$(ARCH)) +# Unless $(BIASMDIR) is set, in which case we're probably doing +# a 'headers_install_all' build and we should keep the -$(ARCH) +# in the directory name. +ifeq ($(obj)$(ALTARCH),include/asm-$(ARCH)$(BIASMDIR)) _dst := include/asm endif @@ -56,6 +56,23 @@ subdir-y := $(patsubst %/,%,$(filter %/, $(header-y))) header-y := $(filter-out %/, $(header-y)) header-y := $(filter-out $(unifdef-y),$(header-y)) +# stamp files for header checks +check-y := $(patsubst %,.check.%,$(header-y) $(unifdef-y) $(objhdr-y)) + +# Work out what needs to be removed +oldheaders := $(patsubst $(INSTALL_HDR_PATH)/$(_dst)/%,%,$(wildcard $(INSTALL_HDR_PATH)/$(_dst)/*.h)) +unwanted := $(filter-out $(header-y) $(unifdef-y) $(objhdr-y),$(oldheaders)) + +oldcheckstamps := $(patsubst $(INSTALL_HDR_PATH)/$(_dst)/%,%,$(wildcard $(INSTALL_HDR_PATH)/$(_dst)/.check.*.h)) +unwanted += $(filter-out $(check-y),$(oldcheckstamps)) + +# Prefix them all with full paths to $(INSTALL_HDR_PATH) +header-y := $(patsubst %,$(INSTALL_HDR_PATH)/$(_dst)/%,$(header-y)) +unifdef-y := $(patsubst %,$(INSTALL_HDR_PATH)/$(_dst)/%,$(unifdef-y)) +objhdr-y := $(patsubst %,$(INSTALL_HDR_PATH)/$(_dst)/%,$(objhdr-y)) +check-y := $(patsubst %,$(INSTALL_HDR_PATH)/$(_dst)/%,$(check-y)) + + ifdef ALTARCH ifeq ($(obj),include/asm-$(ARCH)) altarch-y := altarch-dir @@ -67,43 +84,47 @@ export ALTARCH export ARCHDEF export ALTARCHDEF -quiet_cmd_o_hdr_install = INSTALL $(_dst)/$@ - cmd_o_hdr_install = cp $(objtree)/$(obj)/$@ $(INSTALL_HDR_PATH)/$(_dst) +quiet_cmd_o_hdr_install = INSTALL $(patsubst $(INSTALL_HDR_PATH)/%,%,$@) + cmd_o_hdr_install = cp $(patsubst $(INSTALL_HDR_PATH)/$(_dst)/%,$(objtree)/$(obj)/%,$@) \ + $(INSTALL_HDR_PATH)/$(_dst) -quiet_cmd_headers_install = INSTALL $(_dst)/$@ - cmd_headers_install = $(HDRSED) $(srctree)/$(obj)/$@ \ - > $(INSTALL_HDR_PATH)/$(_dst)/$@ +quiet_cmd_headers_install = INSTALL $(patsubst $(INSTALL_HDR_PATH)/%,%,$@) + cmd_headers_install = $(HDRSED) $(patsubst $(INSTALL_HDR_PATH)/$(_dst)/%,$(srctree)/$(obj)/%,$@) \ + > $@ -quiet_cmd_unifdef = UNIFDEF $(_dst)/$@ - cmd_unifdef = $(UNIFDEF) $(srctree)/$(obj)/$@ | $(HDRSED) \ - > $(INSTALL_HDR_PATH)/$(_dst)/$@ || : +quiet_cmd_unifdef = UNIFDEF $(patsubst $(INSTALL_HDR_PATH)/%,%,$@) + cmd_unifdef = $(UNIFDEF) $(patsubst $(INSTALL_HDR_PATH)/$(_dst)/%,$(srctree)/$(obj)/%,$@) \ + | $(HDRSED) > $@ || : -quiet_cmd_check = CHECK $(_dst)/$@ +quiet_cmd_check = CHECK $(patsubst $(INSTALL_HDR_PATH)/$(_dst)/.check.%,$(_dst)/%,$@) cmd_check = $(srctree)/scripts/hdrcheck.sh \ - $(INSTALL_HDR_PATH)/include \ - $(INSTALL_HDR_PATH)/$(_dst)/$@ + $(INSTALL_HDR_PATH)/include $(subst /.check.,/,$@) $@ + +quiet_cmd_remove = REMOVE $(_dst)/$@ + cmd_remove = rm -f $(INSTALL_HDR_PATH)/$(_dst)/$@ -quiet_cmd_mkdir = MKDIR $@ - cmd_mkdir = mkdir -p $(INSTALL_HDR_PATH)/$@ +quiet_cmd_mkdir = MKDIR $(patsubst $(INSTALL_HDR_PATH)/%,%,$@) + cmd_mkdir = mkdir -p $@ -quiet_cmd_gen = GEN $(_dst)/$@ +quiet_cmd_gen = GEN $(patsubst $(INSTALL_HDR_PATH)/%,%,$@) cmd_gen = \ -STUBDEF=__ASM_STUB_`echo $@ | tr a-z. A-Z_`; \ +FNAME=$(patsubst $(INSTALL_HDR_PATH)/$(_dst)/%,%,$@) \ +STUBDEF=__ASM_STUB_`echo $$FNAME | tr a-z. A-Z_`; \ (echo "/* File autogenerated by 'make headers_install' */" ; \ echo "\#ifndef $$STUBDEF" ; \ echo "\#define $$STUBDEF" ; \ echo "\# if $(ARCHDEF)" ; \ -if [ -r $(INSTALL_HDR_PATH)/include/$(archasm)/$@ ]; then \ - echo "\# include <$(archasm)/$@>" ; \ +if [ -r $(subst /$(_dst)/,/include/$(archasm)/,$@) ]; then \ + echo "\# include <$(archasm)/$$FNAME>" ; \ else \ - echo "\# error $(archasm)/$@ does not exist in" \ + echo "\# error $(archasm)/$$FNAME does not exist in" \ "the $(ARCH) architecture" ; \ fi ; \ echo "\# elif $(ALTARCHDEF)" ; \ -if [ -r $(INSTALL_HDR_PATH)/include/$(altarchasm)/$@ ]; then \ - echo "\# include <$(altarchasm)/$@>" ; \ +if [ -r $(subst /$(_dst)/,/include/$(altarchasm)/,$@) ]; then \ + echo "\# include <$(altarchasm)/$$FNAME>" ; \ else \ - echo "\# error $(altarchasm)/$@ does not exist in" \ + echo "\# error $(altarchasm)/$$FNAME does not exist in" \ "the $(ALTARCH) architecture" ; \ fi ; \ echo "\# else" ; \ @@ -111,37 +132,49 @@ echo "\# warning This machine appears to be" \ "neither $(ARCH) nor $(ALTARCH)." ; \ echo "\# endif" ; \ echo "\#endif /* $$STUBDEF */" ; \ -) > $(INSTALL_HDR_PATH)/$(_dst)/$@ +) > $@ -__headersinst: $(subdir-y) $(header-y) $(unifdef-y) $(altarch-y) $(objhdr-y) - -.PHONY: $(header-y) $(unifdef-y) $(subdir-y) +.PHONY: __headersinst __headerscheck ifdef HDRCHECK -# Rules for checking headers -$(objhdr-y) $(header-y) $(unifdef-y): +__headerscheck: $(subdir-y) $(check-y) + @true + +$(check-y) : $(INSTALL_HDR_PATH)/$(_dst)/.check.%.h : $(INSTALL_HDR_PATH)/$(_dst)/%.h $(call cmd,check) + +# Other dependencies for $(check-y) +-include /dev/null $(check-y) + +# ... but leave $(check-y) as .PHONY for now until those deps are actually correct. +.PHONY: $(check-y) + else # Rules for installing headers +__headersinst: $(subdir-y) $(header-y) $(unifdef-y) $(altarch-y) $(objhdr-y) + @true -$(objhdr-y) $(subdir-y) $(header-y) $(unifdef-y): $(_dst) +$(objhdr-y) $(subdir-y) $(header-y) $(unifdef-y): | $(INSTALL_HDR_PATH)/$(_dst) $(unwanted) -.PHONY: $(_dst) -$(_dst): +$(INSTALL_HDR_PATH)/$(_dst): $(call cmd,mkdir) +.PHONY: $(unwanted) +$(unwanted): + $(call cmd,remove) + ifdef GENASM -$(objhdr-y) $(header-y) $(unifdef-y): +$(objhdr-y) $(header-y) $(unifdef-y): $(KBUILDFILES) $(call cmd,gen) else -$(objhdr-y): +$(objhdr-y) : $(INSTALL_HDR_PATH)/$(_dst)/%.h: $(srctree)/$(obj)/%.h $(KBUILDFILES) $(call cmd,o_hdr_install) -$(header-y): +$(header-y) : $(INSTALL_HDR_PATH)/$(_dst)/%.h: $(srctree)/$(obj)/%.h $(KBUILDFILES) $(call cmd,headers_install) -$(unifdef-y): +$(unifdef-y) : $(INSTALL_HDR_PATH)/$(_dst)/%.h: $(srctree)/$(obj)/%.h $(KBUILDFILES) $(call cmd,unifdef) endif endif @@ -153,8 +186,9 @@ hdrinst := -rR -f $(srctree)/scripts/Makefile.headersinst obj # for their existence. altarch-dir: $(subdir-y) $(header-y) $(unifdef-y) $(objhdr-y) $(Q)$(MAKE) $(hdrinst)=include/asm-$(ALTARCH) dst=include/asm-$(ALTARCH) - $(Q)$(MAKE) $(hdrinst)=include/asm dst=include/asm + $(Q)$(MAKE) $(hdrinst)=include/asm dst=include/asm$(BIASMDIR) # Recursion +.PHONY: $(subdir-y) $(subdir-y): $(Q)$(MAKE) $(hdrinst)=$(obj)/$@ dst=$(_dst)/$@ rel=../$(rel) diff --git a/scripts/hdrcheck.sh b/scripts/hdrcheck.sh index b5ca35aa174..31598584f87 100755 --- a/scripts/hdrcheck.sh +++ b/scripts/hdrcheck.sh @@ -6,3 +6,5 @@ for FILE in `grep '^[ \t]*#[ \t]*include[ \t]*<' $2 | cut -f2 -d\< | cut -f1 -d\ exit 1 fi done +# FIXME: List dependencies into $3 +touch $3 -- cgit v1.2.3-70-g09d2 From 6d71627581e96efb3717960b79fc2167a4617977 Mon Sep 17 00:00:00 2001 From: David Woodhouse Date: Sun, 24 Sep 2006 22:16:03 +0100 Subject: New 'make headers_install_all' target. Install headers for _all_ architectures, suitable for making a tarball release or extracting them for use in a separate package. Signed-off-by: David Woodhouse --- Makefile | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Makefile b/Makefile index 13448d755bb..b78c88d1f1a 100644 --- a/Makefile +++ b/Makefile @@ -892,6 +892,15 @@ depend dep: INSTALL_HDR_PATH=$(objtree)/usr export INSTALL_HDR_PATH +HDRARCHES=$(filter-out generic,$(patsubst $(srctree)/include/asm-%/Kbuild,%,$(wildcard $(srctree)/include/asm-*/Kbuild))) + +PHONY += headers_install_all +headers_install_all: include/linux/version.h + $(Q)unifdef -Ux /dev/null + $(Q)for arch in $(HDRARCHES); do \ + $(MAKE) ARCH=$$arch -rR -f $(srctree)/scripts/Makefile.headersinst obj=include BIASMDIR=-bi-$$arch ;\ + done + PHONY += headers_install headers_install: include/linux/version.h @if [ ! -r include/asm-$(ARCH)/Kbuild ]; then \ -- cgit v1.2.3-70-g09d2