Skip to content

Commit 398477d

Browse files
author
Linus Torvalds
committed
Merge git://git.infradead.org/~dwmw2/khdrs-2.6
* git://git.infradead.org/~dwmw2/khdrs-2.6: New 'make headers_install_all' target. Use dependencies for 'make headers_install'. [S390] Unexport <asm/z90crypt.h>, export <asm/zcrypt.h> in its place. Remove dead netfilter_logging.h from include/linux/Kbuild Remove offsetof() from user-visible <linux/stddef.h> Clean up exported headers on CRIS Fix v850 exported headers Don't advertise (or allow) headers_{install,check} where inappropriate. Remove UML header export Remove ARM26 header export. Fix H8300 exported headers. Fix m68knommu exported headers Fix exported headers for SPARC, SPARC64 Fix 'make headers_check' on m32r Fix 'make headers_check' on sh64 Fix 'make headers_check' on sh [HEADERS] Fix ARM 'make headers_check' Initial pass of manual conflict resolution in top-level Makefile over conflicting build rule and headers_install changes.
2 parents 6e936d3 + 6d71627 commit 398477d

39 files changed

Lines changed: 171 additions & 142 deletions

File tree

‎Makefile‎

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -921,8 +921,20 @@ depend dep:
921921
INSTALL_HDR_PATH=$(objtree)/usr
922922
export INSTALL_HDR_PATH
923923

924+
HDRARCHES=$(filter-out generic,$(patsubst $(srctree)/include/asm-%/Kbuild,%,$(wildcard $(srctree)/include/asm-*/Kbuild)))
925+
926+
PHONY += headers_install_all
927+
headers_install_all: include/linux/version.h scripts_basic FORCE
928+
$(Q)$(MAKE) $(build)=scripts scripts/unifdef
929+
$(Q)for arch in $(HDRARCHES); do \
930+
$(MAKE) ARCH=$$arch -f $(srctree)/scripts/Makefile.headersinst obj=include BIASMDIR=-bi-$$arch ;\
931+
done
932+
924933
PHONY += headers_install
925934
headers_install: include/linux/version.h scripts_basic FORCE
935+
@if [ ! -r include/asm-$(ARCH)/Kbuild ]; then \
936+
echo '*** Error: Headers not exportable for this architecture ($(ARCH))'; \
937+
exit 1 ; fi
926938
$(Q)$(MAKE) $(build)=scripts scripts/unifdef
927939
$(Q)rm -rf $(INSTALL_HDR_PATH)/include
928940
$(Q)$(MAKE) -f $(srctree)/scripts/Makefile.headersinst obj=include
@@ -1107,13 +1119,17 @@ help:
11071119
@echo ' cscope - Generate cscope index'
11081120
@echo ' kernelrelease - Output the release version string'
11091121
@echo ' kernelversion - Output the version stored in Makefile'
1110-
@echo ' headers_install - Install sanitised kernel headers to INSTALL_HDR_PATH'
1122+
@if [ -r include/asm-$(ARCH)/Kbuild ]; then \
1123+
echo ' headers_install - Install sanitised kernel headers to INSTALL_HDR_PATH'; \
1124+
fi
11111125
@echo ' (default: $(INSTALL_HDR_PATH))'
11121126
@echo ''
11131127
@echo 'Static analysers'
11141128
@echo ' checkstack - Generate a list of stack hogs'
11151129
@echo ' namespacecheck - Name space analysis on compiled kernel'
1116-
@echo ' headers_check - Sanity check on exported headers'
1130+
@if [ -r include/asm-$(ARCH)/Kbuild ]; then \
1131+
echo ' headers_check - Sanity check on exported headers'; \
1132+
fi
11171133
@echo ''
11181134
@echo 'Kernel packaging:'
11191135
@$(MAKE) $(build)=$(package-dir) help

‎arch/sh/kernel/process.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
#include <asm/uaccess.h>
2727
#include <asm/mmu_context.h>
2828
#include <asm/elf.h>
29+
#include <asm/ubc.h>
2930

3031
static int hlt_counter=0;
3132

‎include/asm-arm/elf.h‎

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,6 @@
88

99
#include <asm/ptrace.h>
1010
#include <asm/user.h>
11-
#ifdef __KERNEL
12-
#include <asm/procinfo.h>
13-
#endif
1411

1512
typedef unsigned long elf_greg_t;
1613
typedef unsigned long elf_freg_t[3];
@@ -31,11 +28,6 @@ typedef elf_greg_t elf_gregset_t[ELF_NGREG];
3128

3229
typedef struct user_fp elf_fpregset_t;
3330

34-
/*
35-
* This is used to ensure we don't load something for the wrong architecture.
36-
*/
37-
#define elf_check_arch(x) ( ((x)->e_machine == EM_ARM) && (ELF_PROC_OK((x))) )
38-
3931
/*
4032
* These are used to set parameters in the core dumps.
4133
*/
@@ -47,6 +39,14 @@ typedef struct user_fp elf_fpregset_t;
4739
#endif
4840
#define ELF_ARCH EM_ARM
4941

42+
#ifdef __KERNEL__
43+
#include <asm/procinfo.h>
44+
45+
/*
46+
* This is used to ensure we don't load something for the wrong architecture.
47+
*/
48+
#define elf_check_arch(x) ( ((x)->e_machine == EM_ARM) && (ELF_PROC_OK((x))) )
49+
5050
#define USE_ELF_CORE_DUMP
5151
#define ELF_EXEC_PAGESIZE 4096
5252

@@ -83,8 +83,6 @@ typedef struct user_fp elf_fpregset_t;
8383
extern char elf_platform[];
8484
#define ELF_PLATFORM (elf_platform)
8585

86-
#ifdef __KERNEL__
87-
8886
/*
8987
* 32-bit code is always OK. Some cpus can do 26-bit, some can't.
9088
*/

‎include/asm-arm/page.h‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,13 @@
1111
#define _ASMARM_PAGE_H
1212

1313

14+
#ifdef __KERNEL__
15+
1416
/* PAGE_SHIFT determines the page size */
1517
#define PAGE_SHIFT 12
1618
#define PAGE_SIZE (1UL << PAGE_SHIFT)
1719
#define PAGE_MASK (~(PAGE_SIZE-1))
1820

19-
#ifdef __KERNEL__
20-
2121
/* to align the pointer to the (next) page boundary */
2222
#define PAGE_ALIGN(addr) (((addr)+PAGE_SIZE-1)&PAGE_MASK)
2323

‎include/asm-arm26/Kbuild‎

Lines changed: 0 additions & 1 deletion
This file was deleted.

‎include/asm-cris/Kbuild‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,5 @@
11
include include/asm-generic/Kbuild.asm
2+
3+
header-y += arch-v10/ arch-v32/
4+
5+
unifdef-y += rs485.h

‎include/asm-cris/arch-v10/Kbuild‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
header-y += ptrace.h
2+
header-y += user.h

‎include/asm-cris/arch-v32/Kbuild‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
header-y += ptrace.h
2+
header-y += user.h

‎include/asm-cris/byteorder.h‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,15 @@
33

44
#ifdef __GNUC__
55

6+
#ifdef __KERNEL__
67
#include <asm/arch/byteorder.h>
78

89
/* defines are necessary because the other files detect the presence
910
* of a defined __arch_swab32, not an inline
1011
*/
11-
1212
#define __arch__swab32(x) ___arch__swab32(x)
1313
#define __arch__swab16(x) ___arch__swab16(x)
14+
#endif /* __KERNEL__ */
1415

1516
#if !defined(__STRICT_ANSI__) || defined(__KERNEL__)
1617
# define __BYTEORDER_HAS_U64__

‎include/asm-cris/elf.h‎

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
* ELF register definitions..
66
*/
77

8-
#include <asm/arch/elf.h>
98
#include <asm/user.h>
109

1110
#define R_CRIS_NONE 0
@@ -46,6 +45,9 @@ typedef unsigned long elf_fpregset_t;
4645
#define ELF_DATA ELFDATA2LSB
4746
#define ELF_ARCH EM_CRIS
4847

48+
#ifdef __KERNEL__
49+
#include <asm/arch/elf.h>
50+
4951
/* The master for these definitions is {binutils}/include/elf/cris.h: */
5052
/* User symbols in this file have a leading underscore. */
5153
#define EF_CRIS_UNDERSCORE 0x00000001
@@ -87,8 +89,8 @@ typedef unsigned long elf_fpregset_t;
8789

8890
#define ELF_PLATFORM (NULL)
8991

90-
#ifdef __KERNEL__
9192
#define SET_PERSONALITY(ex, ibcs2) set_personality((ibcs2)?PER_SVR4:PER_LINUX)
92-
#endif
93+
94+
#endif /* __KERNEL__ */
9395

9496
#endif

0 commit comments

Comments
 (0)