Commit dca88ad6 authored by Linus Torvalds's avatar Linus Torvalds

Merge branch 'for-next' of git://git.infradead.org/users/dhowells/linux-headers

* 'for-next' of git://git.infradead.org/users/dhowells/linux-headers:
  UAPI: Split trivial #if defined(__KERNEL__) && X conditionals
  UAPI: Don't have a #elif clause in a __KERNEL__ guard in linux/soundcard.h
  UAPI: Fix AHZ multiple inclusion when __KERNEL__ is removed
  UAPI: Make linux/patchkey.h easier to parse
  UAPI: Fix nested __KERNEL__ guards in video/edid.h
  UAPI: Alter the S390 asm include guards to be recognisable by the UAPI splitter
  UAPI: Guard linux/cuda.h
  UAPI: Guard linux/pmu.h
  UAPI: Guard linux/isdn_divertif.h
  UAPI: Guard linux/sound.h
  UAPI: Rearrange definition of HZ in asm-generic/param.h
  UAPI: Make FRV use asm-generic/param.h
  UAPI: Make M32R use asm-generic/param.h
  UAPI: Make MN10300 use asm-generic/param.h
  UAPI: elf_read_implies_exec() is a kernel-only feature - so hide from userspace
  UAPI: Don't include linux/compat.h in sparc's asm/siginfo.h
  UAPI: Fix arch/mips/include/asm/Kbuild to have separate header-y lines
parents fed47485 1632b9e2
...@@ -25,7 +25,8 @@ ...@@ -25,7 +25,8 @@
#define HWCAP_IDIVT (1 << 18) #define HWCAP_IDIVT (1 << 18)
#define HWCAP_IDIV (HWCAP_IDIVA | HWCAP_IDIVT) #define HWCAP_IDIV (HWCAP_IDIVA | HWCAP_IDIVT)
#if defined(__KERNEL__) && !defined(__ASSEMBLY__) #if defined(__KERNEL__)
#if !defined(__ASSEMBLY__)
/* /*
* This yields a mask that user programs can use to figure out what * This yields a mask that user programs can use to figure out what
* instruction set this cpu supports. * instruction set this cpu supports.
...@@ -33,5 +34,6 @@ ...@@ -33,5 +34,6 @@
#define ELF_HWCAP (elf_hwcap) #define ELF_HWCAP (elf_hwcap)
extern unsigned int elf_hwcap; extern unsigned int elf_hwcap;
#endif #endif
#endif
#endif #endif
...@@ -22,7 +22,8 @@ ...@@ -22,7 +22,8 @@
# define __SWAB_64_THRU_32__ # define __SWAB_64_THRU_32__
#endif #endif
#if defined(__KERNEL__) && __LINUX_ARM_ARCH__ >= 6 #if defined(__KERNEL__)
#if __LINUX_ARM_ARCH__ >= 6
static inline __attribute_const__ __u32 __arch_swahb32(__u32 x) static inline __attribute_const__ __u32 __arch_swahb32(__u32 x)
{ {
...@@ -39,8 +40,10 @@ static inline __attribute_const__ __u32 __arch_swab32(__u32 x) ...@@ -39,8 +40,10 @@ static inline __attribute_const__ __u32 __arch_swab32(__u32 x)
} }
#define __arch_swab32 __arch_swab32 #define __arch_swab32 __arch_swab32
#else #endif
#endif
#if !defined(__KERNEL__) || __LINUX_ARM_ARCH__ < 6
static inline __attribute_const__ __u32 __arch_swab32(__u32 x) static inline __attribute_const__ __u32 __arch_swab32(__u32 x)
{ {
__u32 t; __u32 t;
......
...@@ -427,7 +427,8 @@ ...@@ -427,7 +427,8 @@
/* /*
* The following syscalls are obsolete and no longer available for EABI. * The following syscalls are obsolete and no longer available for EABI.
*/ */
#if defined(__ARM_EABI__) && !defined(__KERNEL__) #if !defined(__KERNEL__)
#if defined(__ARM_EABI__)
#undef __NR_time #undef __NR_time
#undef __NR_umount #undef __NR_umount
#undef __NR_stime #undef __NR_stime
...@@ -441,6 +442,7 @@ ...@@ -441,6 +442,7 @@
#undef __NR_syscall #undef __NR_syscall
#undef __NR_ipc #undef __NR_ipc
#endif #endif
#endif
#ifdef __KERNEL__ #ifdef __KERNEL__
......
#ifndef _ASM_PARAM_H #ifndef _ASM_PARAM_H
#define _ASM_PARAM_H #define _ASM_PARAM_H
#ifdef __KERNEL__
#define HZ CONFIG_HZ /* Internal kernel timer frequency */
#define USER_HZ 100 /* .. some user interfaces are in "ticks" */
#define CLOCKS_PER_SEC (USER_HZ) /* like times() */
#endif
#ifndef HZ
#define HZ 100
#endif
#define EXEC_PAGESIZE 16384 #define EXEC_PAGESIZE 16384
#ifndef NOGROUP #include <asm-generic/param.h>
#define NOGROUP (-1)
#endif
#define MAXHOSTNAMELEN 64 /* max length of hostname */
#endif /* _ASM_PARAM_H */ #endif /* _ASM_PARAM_H */
...@@ -201,16 +201,21 @@ extern long ia64_cmpxchg_called_with_bad_pointer (void); ...@@ -201,16 +201,21 @@ extern long ia64_cmpxchg_called_with_bad_pointer (void);
#endif #endif
#ifndef __ASSEMBLY__ #ifndef __ASSEMBLY__
#if defined(CONFIG_PARAVIRT) && defined(__KERNEL__)
#ifdef ASM_SUPPORTED
# define IA64_INTRINSIC_API(name) paravirt_ ## name
#else
# define IA64_INTRINSIC_API(name) pv_cpu_ops.name
#endif
#define IA64_INTRINSIC_MACRO(name) paravirt_ ## name
#else
#define IA64_INTRINSIC_API(name) ia64_native_ ## name #define IA64_INTRINSIC_API(name) ia64_native_ ## name
#define IA64_INTRINSIC_MACRO(name) ia64_native_ ## name #define IA64_INTRINSIC_MACRO(name) ia64_native_ ## name
#if defined(__KERNEL__)
#if defined(CONFIG_PARAVIRT)
# undef IA64_INTRINSIC_API
# undef IA64_INTRINSIC_MACRO
# ifdef ASM_SUPPORTED
# define IA64_INTRINSIC_API(name) paravirt_ ## name
# else
# define IA64_INTRINSIC_API(name) pv_cpu_ops.name
# endif
#define IA64_INTRINSIC_MACRO(name) paravirt_ ## name
#endif
#endif #endif
/************************************************/ /************************************************/
......
#ifndef _ASM_M32R_PARAM_H #ifndef _ASM_M32R_PARAM_H
#define _ASM_M32R_PARAM_H #define _ASM_M32R_PARAM_H
#ifdef __KERNEL__ #include <asm-generic/param.h>
# define HZ CONFIG_HZ /* Internal kernel timer frequency */
# define USER_HZ 100 /* .. some user interfaces are in "ticks" */
# define CLOCKS_PER_SEC (USER_HZ) /* like times() */
#endif
#ifndef HZ
#define HZ 100
#endif
#define EXEC_PAGESIZE 4096
#ifndef NOGROUP
#define NOGROUP (-1)
#endif
#define MAXHOSTNAMELEN 64 /* max length of hostname */
#endif /* _ASM_M32R_PARAM_H */ #endif /* _ASM_M32R_PARAM_H */
include include/asm-generic/Kbuild.asm include include/asm-generic/Kbuild.asm
header-y += cachectl.h sgidefs.h sysmips.h header-y += cachectl.h
header-y += sgidefs.h
header-y += sysmips.h
...@@ -15,10 +15,14 @@ ...@@ -15,10 +15,14 @@
* We don't use int-l64.h for the kernel anymore but still use it for * We don't use int-l64.h for the kernel anymore but still use it for
* userspace to avoid code changes. * userspace to avoid code changes.
*/ */
#if (_MIPS_SZLONG == 64) && !defined(__KERNEL__) #ifdef __KERNEL__
# include <asm-generic/int-l64.h>
#else
# include <asm-generic/int-ll64.h> # include <asm-generic/int-ll64.h>
#else
# if _MIPS_SZLONG == 64
# include <asm-generic/int-l64.h>
# else
# include <asm-generic/int-ll64.h>
# endif
#endif #endif
/* /*
......
...@@ -11,24 +11,8 @@ ...@@ -11,24 +11,8 @@
#ifndef _ASM_PARAM_H #ifndef _ASM_PARAM_H
#define _ASM_PARAM_H #define _ASM_PARAM_H
#ifdef __KERNEL__ #include <asm-generic/param.h>
#define HZ CONFIG_HZ /* Internal kernel timer frequency */
#define USER_HZ 100 /* .. some user interfaces are in
* "ticks" */
#define CLOCKS_PER_SEC (USER_HZ) /* like times() */
#endif
#ifndef HZ
#define HZ 100
#endif
#define EXEC_PAGESIZE 4096
#ifndef NOGROUP
#define NOGROUP (-1)
#endif
#define MAXHOSTNAMELEN 64 /* max length of hostname */
#define COMMAND_LINE_SIZE 256 #define COMMAND_LINE_SIZE 256
#endif /* _ASM_PARAM_H */ #endif /* _ASM_PARAM_H */
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
*/ */
#ifndef _ASM_S390_CHPID_H #ifndef _ASM_S390_CHPID_H
#define _ASM_S390_CHPID_H _ASM_S390_CHPID_H #define _ASM_S390_CHPID_H
#include <linux/string.h> #include <linux/string.h>
#include <linux/types.h> #include <linux/types.h>
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
*/ */
#ifndef _ASM_S390_ITCW_H #ifndef _ASM_S390_ITCW_H
#define _ASM_S390_ITCW_H _ASM_S390_ITCW_H #define _ASM_S390_ITCW_H
#include <linux/types.h> #include <linux/types.h>
#include <asm/fcx.h> #include <asm/fcx.h>
......
...@@ -11,9 +11,11 @@ ...@@ -11,9 +11,11 @@
#include <asm-generic/mman.h> #include <asm-generic/mman.h>
#if defined(__KERNEL__) && !defined(__ASSEMBLY__) && defined(CONFIG_64BIT) #if defined(__KERNEL__)
#if !defined(__ASSEMBLY__) && defined(CONFIG_64BIT)
int s390_mmap_check(unsigned long addr, unsigned long len); int s390_mmap_check(unsigned long addr, unsigned long len);
#define arch_mmap_check(addr,len,flags) s390_mmap_check(addr,len) #define arch_mmap_check(addr,len,flags) s390_mmap_check(addr,len)
#endif #endif
#endif
#endif /* __S390_MMAN_H__ */ #endif /* __S390_MMAN_H__ */
...@@ -16,8 +16,6 @@ ...@@ -16,8 +16,6 @@
#ifdef __KERNEL__ #ifdef __KERNEL__
#include <linux/compat.h>
#ifdef CONFIG_COMPAT #ifdef CONFIG_COMPAT
struct compat_siginfo; struct compat_siginfo;
......
...@@ -23,7 +23,8 @@ ...@@ -23,7 +23,8 @@
#include <asm-generic/signal.h> #include <asm-generic/signal.h>
#if defined(__KERNEL__) && !defined(__ASSEMBLY__) #if defined(__KERNEL__)
#if !defined(__ASSEMBLY__)
struct pt_regs; struct pt_regs;
int restore_sigcontext(struct pt_regs *, struct sigcontext __user *); int restore_sigcontext(struct pt_regs *, struct sigcontext __user *);
int setup_sigcontext(struct sigcontext __user *, struct pt_regs *); int setup_sigcontext(struct sigcontext __user *, struct pt_regs *);
...@@ -33,5 +34,6 @@ void signal_fault(const char *type, struct pt_regs *, ...@@ -33,5 +34,6 @@ void signal_fault(const char *type, struct pt_regs *,
void trace_unhandled_signal(const char *type, struct pt_regs *regs, void trace_unhandled_signal(const char *type, struct pt_regs *regs,
unsigned long address, int signo); unsigned long address, int signo);
#endif #endif
#endif
#endif /* _ASM_TILE_SIGNAL_H */ #endif /* _ASM_TILE_SIGNAL_H */
#ifndef __ASM_GENERIC_PARAM_H #ifndef __ASM_GENERIC_PARAM_H
#define __ASM_GENERIC_PARAM_H #define __ASM_GENERIC_PARAM_H
#ifdef __KERNEL__
# define HZ CONFIG_HZ /* Internal kernel timer frequency */
# define USER_HZ 100 /* some user interfaces are */
# define CLOCKS_PER_SEC (USER_HZ) /* in "ticks" like times() */
#endif
#ifndef HZ #ifndef HZ
#define HZ 100 #define HZ 100
#endif #endif
...@@ -21,4 +15,11 @@ ...@@ -21,4 +15,11 @@
#define MAXHOSTNAMELEN 64 /* max length of hostname */ #define MAXHOSTNAMELEN 64 /* max length of hostname */
#ifdef __KERNEL__
# undef HZ
# define HZ CONFIG_HZ /* Internal kernel timer frequency */
# define USER_HZ 100 /* some user interfaces are */
# define CLOCKS_PER_SEC (USER_HZ) /* in "ticks" like times() */
#endif
#endif /* __ASM_GENERIC_PARAM_H */ #endif /* __ASM_GENERIC_PARAM_H */
...@@ -146,6 +146,9 @@ extern void acct_exit_ns(struct pid_namespace *); ...@@ -146,6 +146,9 @@ extern void acct_exit_ns(struct pid_namespace *);
* *
*/ */
#undef ACCT_VERSION
#undef AHZ
#ifdef CONFIG_BSD_PROCESS_ACCT_V3 #ifdef CONFIG_BSD_PROCESS_ACCT_V3
#define ACCT_VERSION 3 #define ACCT_VERSION 3
#define AHZ 100 #define AHZ 100
......
...@@ -5,6 +5,9 @@ ...@@ -5,6 +5,9 @@
* Copyright (C) 1996 Paul Mackerras. * Copyright (C) 1996 Paul Mackerras.
*/ */
#ifndef _LINUX_CUDA_H
#define _LINUX_CUDA_H
/* CUDA commands (2nd byte) */ /* CUDA commands (2nd byte) */
#define CUDA_WARM_START 0 #define CUDA_WARM_START 0
#define CUDA_AUTOPOLL 1 #define CUDA_AUTOPOLL 1
...@@ -34,3 +37,5 @@ extern int cuda_request(struct adb_request *req, ...@@ -34,3 +37,5 @@ extern int cuda_request(struct adb_request *req,
extern void cuda_poll(void); extern void cuda_poll(void);
#endif /* __KERNEL */ #endif /* __KERNEL */
#endif /* _LINUX_CUDA_H */
...@@ -7,15 +7,6 @@ ...@@ -7,15 +7,6 @@
#include <asm/elf.h> #include <asm/elf.h>
#endif #endif
struct file;
#ifndef elf_read_implies_exec
/* Executables for which elf_read_implies_exec() returns TRUE will
have the READ_IMPLIES_EXEC personality flag set automatically.
Override in asm/elf.h as needed. */
# define elf_read_implies_exec(ex, have_pt_gnu_stack) 0
#endif
/* 32-bit ELF base types. */ /* 32-bit ELF base types. */
typedef __u32 Elf32_Addr; typedef __u32 Elf32_Addr;
typedef __u16 Elf32_Half; typedef __u16 Elf32_Half;
...@@ -414,6 +405,13 @@ typedef struct elf64_note { ...@@ -414,6 +405,13 @@ typedef struct elf64_note {
} Elf64_Nhdr; } Elf64_Nhdr;
#ifdef __KERNEL__ #ifdef __KERNEL__
#ifndef elf_read_implies_exec
/* Executables for which elf_read_implies_exec() returns TRUE will
have the READ_IMPLIES_EXEC personality flag set automatically.
Override in asm/elf.h as needed. */
# define elf_read_implies_exec(ex, have_pt_gnu_stack) 0
#endif
#if ELF_CLASS == ELFCLASS32 #if ELF_CLASS == ELFCLASS32
extern Elf32_Dyn _DYNAMIC []; extern Elf32_Dyn _DYNAMIC [];
...@@ -437,6 +435,8 @@ extern Elf64_Dyn _DYNAMIC []; ...@@ -437,6 +435,8 @@ extern Elf64_Dyn _DYNAMIC [];
#endif #endif
/* Optional callbacks to write extra ELF notes. */ /* Optional callbacks to write extra ELF notes. */
struct file;
#ifndef ARCH_HAVE_EXTRA_ELF_NOTES #ifndef ARCH_HAVE_EXTRA_ELF_NOTES
static inline int elf_coredump_extra_notes_size(void) { return 0; } static inline int elf_coredump_extra_notes_size(void) { return 0; }
static inline int elf_coredump_extra_notes_write(struct file *file, static inline int elf_coredump_extra_notes_write(struct file *file,
......
...@@ -10,6 +10,8 @@ ...@@ -10,6 +10,8 @@
* *
*/ */
#ifndef _LINUX_ISDN_DIVERTIF_H
#define _LINUX_ISDN_DIVERTIF_H
/***********************************************************/ /***********************************************************/
/* magic value is also used to control version information */ /* magic value is also used to control version information */
...@@ -45,3 +47,5 @@ typedef struct ...@@ -45,3 +47,5 @@ typedef struct
/*********************/ /*********************/
extern int DIVERT_REG_NAME(isdn_divert_if *); extern int DIVERT_REG_NAME(isdn_divert_if *);
#endif #endif
#endif /* _LINUX_ISDN_DIVERTIF_H */
...@@ -43,9 +43,11 @@ typedef unsigned short mifi_t; ...@@ -43,9 +43,11 @@ typedef unsigned short mifi_t;
typedef __u32 if_mask; typedef __u32 if_mask;
#define NIFBITS (sizeof(if_mask) * 8) /* bits per mask */ #define NIFBITS (sizeof(if_mask) * 8) /* bits per mask */
#if !defined(__KERNEL__) && !defined(DIV_ROUND_UP) #if !defined(__KERNEL__)
#if !defined(DIV_ROUND_UP)
#define DIV_ROUND_UP(x,y) (((x) + ((y) - 1)) / (y)) #define DIV_ROUND_UP(x,y) (((x) + ((y) - 1)) / (y))
#endif #endif
#endif
typedef struct if_set { typedef struct if_set {
if_mask ifs_bits[DIV_ROUND_UP(IF_SETSIZE, NIFBITS)]; if_mask ifs_bits[DIV_ROUND_UP(IF_SETSIZE, NIFBITS)];
......
...@@ -32,7 +32,8 @@ ...@@ -32,7 +32,8 @@
# else # else
# error "could not determine byte order" # error "could not determine byte order"
# endif # endif
#elif defined(__BYTE_ORDER) #else
#if defined(__BYTE_ORDER)
# if __BYTE_ORDER == __BIG_ENDIAN # if __BYTE_ORDER == __BIG_ENDIAN
# define _PATCHKEY(id) (0xfd00|id) # define _PATCHKEY(id) (0xfd00|id)
# elif __BYTE_ORDER == __LITTLE_ENDIAN # elif __BYTE_ORDER == __LITTLE_ENDIAN
...@@ -41,5 +42,6 @@ ...@@ -41,5 +42,6 @@
# error "could not determine byte order" # error "could not determine byte order"
# endif # endif
#endif #endif
#endif
#endif /* _LINUX_PATCHKEY_H */ #endif /* _LINUX_PATCHKEY_H */
...@@ -6,6 +6,8 @@ ...@@ -6,6 +6,8 @@
* Copyright (C) 1998 Paul Mackerras. * Copyright (C) 1998 Paul Mackerras.
*/ */
#ifndef _LINUX_PMU_H
#define _LINUX_PMU_H
#define PMU_DRIVER_VERSION 2 #define PMU_DRIVER_VERSION 2
...@@ -207,3 +209,5 @@ extern int pmu_sys_suspended; ...@@ -207,3 +209,5 @@ extern int pmu_sys_suspended;
#endif #endif
#endif /* __KERNEL__ */ #endif /* __KERNEL__ */
#endif /* _LINUX_PMU_H */
#ifndef _LINUX_SOUND_H
#define _LINUX_SOUND_H
/* /*
* Minor numbers for the sound driver. * Minor numbers for the sound driver.
...@@ -42,3 +44,5 @@ extern void unregister_sound_mixer(int unit); ...@@ -42,3 +44,5 @@ extern void unregister_sound_mixer(int unit);
extern void unregister_sound_midi(int unit); extern void unregister_sound_midi(int unit);
extern void unregister_sound_dsp(int unit); extern void unregister_sound_dsp(int unit);
#endif /* __KERNEL__ */ #endif /* __KERNEL__ */
#endif /* _LINUX_SOUND_H */
...@@ -198,7 +198,8 @@ typedef struct seq_event_rec { ...@@ -198,7 +198,8 @@ typedef struct seq_event_rec {
# else # else
# error "could not determine byte order" # error "could not determine byte order"
# endif # endif
#elif defined(__BYTE_ORDER) #else
# if defined(__BYTE_ORDER)
# if __BYTE_ORDER == __BIG_ENDIAN # if __BYTE_ORDER == __BIG_ENDIAN
# define AFMT_S16_NE AFMT_S16_BE # define AFMT_S16_NE AFMT_S16_BE
# elif __BYTE_ORDER == __LITTLE_ENDIAN # elif __BYTE_ORDER == __LITTLE_ENDIAN
...@@ -206,6 +207,7 @@ typedef struct seq_event_rec { ...@@ -206,6 +207,7 @@ typedef struct seq_event_rec {
# else # else
# error "could not determine byte order" # error "could not determine byte order"
# endif # endif
# endif
#endif #endif
/* /*
......
#ifndef __linux_video_edid_h__ #ifndef __linux_video_edid_h__
#define __linux_video_edid_h__ #define __linux_video_edid_h__
#if !defined(__KERNEL__) || defined(CONFIG_X86)
struct edid_info { struct edid_info {
unsigned char dummy[128]; unsigned char dummy[128];
}; };
#ifdef __KERNEL__ #ifdef __KERNEL__
#ifdef CONFIG_X86
extern struct edid_info edid_info; extern struct edid_info edid_info;
#endif /* __KERNEL__ */ #endif
#endif #endif
#endif /* __linux_video_edid_h__ */ #endif /* __linux_video_edid_h__ */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment