Skip to content

Commit

Permalink
Merge git://git.infradead.org/~dwmw2/khdrs-2.6
Browse files Browse the repository at this point in the history
* 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.
  • Loading branch information
Linus Torvalds committed Sep 24, 2006
2 parents 6e936d3 + 6d71627 commit 398477d
Show file tree
Hide file tree
Showing 39 changed files with 171 additions and 142 deletions.
20 changes: 18 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -921,8 +921,20 @@ 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 scripts_basic FORCE
$(Q)$(MAKE) $(build)=scripts scripts/unifdef
$(Q)for arch in $(HDRARCHES); do \
$(MAKE) ARCH=$$arch -f $(srctree)/scripts/Makefile.headersinst obj=include BIASMDIR=-bi-$$arch ;\
done

PHONY += headers_install
headers_install: include/linux/version.h scripts_basic FORCE
@if [ ! -r include/asm-$(ARCH)/Kbuild ]; then \
echo '*** Error: Headers not exportable for this architecture ($(ARCH))'; \
exit 1 ; fi
$(Q)$(MAKE) $(build)=scripts scripts/unifdef
$(Q)rm -rf $(INSTALL_HDR_PATH)/include
$(Q)$(MAKE) -f $(srctree)/scripts/Makefile.headersinst obj=include
Expand Down Expand Up @@ -1107,13 +1119,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
Expand Down
1 change: 1 addition & 0 deletions arch/sh/kernel/process.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
#include <asm/uaccess.h>
#include <asm/mmu_context.h>
#include <asm/elf.h>
#include <asm/ubc.h>

static int hlt_counter=0;

Expand Down
18 changes: 8 additions & 10 deletions include/asm-arm/elf.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,6 @@

#include <asm/ptrace.h>
#include <asm/user.h>
#ifdef __KERNEL
#include <asm/procinfo.h>
#endif

typedef unsigned long elf_greg_t;
typedef unsigned long elf_freg_t[3];
Expand All @@ -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.
*/
Expand All @@ -47,6 +39,14 @@ typedef struct user_fp elf_fpregset_t;
#endif
#define ELF_ARCH EM_ARM

#ifdef __KERNEL__
#include <asm/procinfo.h>

/*
* 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

Expand Down Expand Up @@ -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.
*/
Expand Down
4 changes: 2 additions & 2 deletions include/asm-arm/page.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
1 change: 0 additions & 1 deletion include/asm-arm26/Kbuild

This file was deleted.

4 changes: 4 additions & 0 deletions include/asm-cris/Kbuild
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
include include/asm-generic/Kbuild.asm

header-y += arch-v10/ arch-v32/

unifdef-y += rs485.h
2 changes: 2 additions & 0 deletions include/asm-cris/arch-v10/Kbuild
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
header-y += ptrace.h
header-y += user.h
2 changes: 2 additions & 0 deletions include/asm-cris/arch-v32/Kbuild
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
header-y += ptrace.h
header-y += user.h
3 changes: 2 additions & 1 deletion include/asm-cris/byteorder.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,15 @@

#ifdef __GNUC__

#ifdef __KERNEL__
#include <asm/arch/byteorder.h>

/* 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__
Expand Down
8 changes: 5 additions & 3 deletions include/asm-cris/elf.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
* ELF register definitions..
*/

#include <asm/arch/elf.h>
#include <asm/user.h>

#define R_CRIS_NONE 0
Expand Down Expand Up @@ -46,6 +45,9 @@ typedef unsigned long elf_fpregset_t;
#define ELF_DATA ELFDATA2LSB
#define ELF_ARCH EM_CRIS

#ifdef __KERNEL__
#include <asm/arch/elf.h>

/* 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
Expand Down Expand Up @@ -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
8 changes: 4 additions & 4 deletions include/asm-cris/page.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#ifndef _CRIS_PAGE_H
#define _CRIS_PAGE_H

#ifdef __KERNEL__

#include <asm/arch/page.h>

/* PAGE_SHIFT determines the page size */
Expand All @@ -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)

Expand Down Expand Up @@ -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 <asm-generic/memory_model.h>
#include <asm-generic/page.h>

#endif /* __KERNEL__ */

#endif /* _CRIS_PAGE_H */

9 changes: 3 additions & 6 deletions include/asm-cris/posix_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@
#ifndef __ARCH_CRIS_POSIX_TYPES_H
#define __ARCH_CRIS_POSIX_TYPES_H

#include <asm/bitops.h>

/*
* This file is generally used by user-level software, so you need to
* be a little careful about namespace pollution etc. Also, we cannot
Expand Down Expand Up @@ -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 <asm/bitops.h>

#undef __FD_SET
#define __FD_SET(fd,fdsetp) set_bit(fd, (void *)(fdsetp))
Expand All @@ -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 */
4 changes: 1 addition & 3 deletions include/asm-cris/unistd.h
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
#ifndef _ASM_CRIS_UNISTD_H_
#define _ASM_CRIS_UNISTD_H_

#include <asm/arch/unistd.h>

/*
* This file contains the system call numbers, and stub macros for libc.
*/
Expand Down Expand Up @@ -299,6 +297,7 @@

#define NR_syscalls 289

#include <asm/arch/unistd.h>

#define __ARCH_WANT_IPC_PARSE_VERSION
#define __ARCH_WANT_OLD_READDIR
Expand All @@ -322,7 +321,6 @@
#define __ARCH_WANT_SYS_SIGPENDING
#define __ARCH_WANT_SYS_SIGPROCMASK
#define __ARCH_WANT_SYS_RT_SIGACTION
#endif

#ifdef __KERNEL_SYSCALLS__

Expand Down
7 changes: 3 additions & 4 deletions include/asm-h8300/page.h
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
#ifndef _H8300_PAGE_H
#define _H8300_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__

#include <asm/setup.h>

#ifndef __ASSEMBLY__
Expand Down Expand Up @@ -76,9 +75,9 @@ extern unsigned long memory_end;

#endif /* __ASSEMBLY__ */

#endif /* __KERNEL__ */

#include <asm-generic/memory_model.h>
#include <asm-generic/page.h>

#endif /* __KERNEL__ */

#endif /* _H8300_PAGE_H */
3 changes: 1 addition & 2 deletions include/asm-m32r/page.h
Original file line number Diff line number Diff line change
Expand Up @@ -87,10 +87,9 @@ typedef struct { unsigned long pgprot; } pgprot_t;

#define devmem_is_allowed(x) 1

#endif /* __KERNEL__ */

#include <asm-generic/memory_model.h>
#include <asm-generic/page.h>

#endif /* __KERNEL__ */
#endif /* _ASM_M32R_PAGE_H */

4 changes: 2 additions & 2 deletions include/asm-m32r/ptrace.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@
* Copyright (C) 2001-2002, 2004 Hirokazu Takata <takata at linux-m32r.org>
*/

#include <asm/m32r.h> /* M32R_PSW_BSM, M32R_PSW_BPM */

/* 0 - 13 are integer registers (general purpose registers). */
#define PT_R4 0
#define PT_R5 1
Expand Down Expand Up @@ -140,6 +138,8 @@ struct pt_regs {

#ifdef __KERNEL__

#include <asm/m32r.h> /* M32R_PSW_BSM, M32R_PSW_BPM */

#define __ARCH_SYS_PTRACE 1

#if defined(CONFIG_ISA_M32R2) || defined(CONFIG_CHIP_VDEC2)
Expand Down
1 change: 0 additions & 1 deletion include/asm-m32r/signal.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
/* orig : i386 2.4.18 */

#include <linux/types.h>
#include <linux/linkage.h>
#include <linux/time.h>
#include <linux/compiler.h>

Expand Down
4 changes: 2 additions & 2 deletions include/asm-m32r/unistd.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@

/* $Id$ */

#include <asm/syscall.h> /* SYSCALL_* */

/*
* This file contains the system call numbers.
*/
Expand Down Expand Up @@ -303,6 +301,8 @@
* <asm-m32r/errno.h>
*/

#include <asm/syscall.h> /* SYSCALL_* */

#define __syscall_return(type, res) \
do { \
if ((unsigned long)(res) >= (unsigned long)(-(124 + 1))) { \
Expand Down
1 change: 0 additions & 1 deletion include/asm-m32r/user.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
*/

#include <linux/types.h>
#include <asm/processor.h>
#include <asm/ptrace.h>
#include <asm/page.h>

Expand Down
7 changes: 3 additions & 4 deletions include/asm-m68knommu/page.h
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
#ifndef _M68KNOMMU_PAGE_H
#define _M68KNOMMU_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__

#include <asm/setup.h>

#ifndef __ASSEMBLY__
Expand Down Expand Up @@ -76,8 +75,8 @@ extern unsigned long memory_end;

#endif /* __ASSEMBLY__ */

#endif /* __KERNEL__ */

#include <asm-generic/page.h>

#endif /* __KERNEL__ */

#endif /* _M68KNOMMU_PAGE_H */
2 changes: 1 addition & 1 deletion include/asm-s390/Kbuild
Original file line number Diff line number Diff line change
Expand Up @@ -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
3 changes: 1 addition & 2 deletions include/asm-sh/page.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 <asm-generic/memory_model.h>
#include <asm-generic/page.h>

#endif /* __KERNEL__ */
#endif /* __ASM_SH_PAGE_H */
Loading

0 comments on commit 398477d

Please sign in to comment.