You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
[PATCH] auxiliary vector cleanups
The size of auxiliary vector is fixed at 42 in linux/sched.h. But it isn't very obvious when looking at linux/elf.h. This patch adds AT_VECTOR_SIZE so that we can change it if necessary when a new vector is added. Because of include file ordering problems, doing this necessitated the extraction of the AT_* symbols into a standalone header file. Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
#ifndef __ASM_ALPHA_AUXVEC_H
|
||||
#define __ASM_ALPHA_AUXVEC_H
|
||||
|
||||
/* Reserve these numbers for any future use of a VDSO. */
|
||||
#if 0
|
||||
#define AT_SYSINFO 32
|
||||
#define AT_SYSINFO_EHDR 33
|
||||
#endif
|
||||
|
||||
/* More complete cache descriptions than AT_[DIU]CACHEBSIZE. If the
|
||||
value is -1, then the cache doesn't exist. Otherwise:
|
||||
|
||||
bit 0-3: Cache set-associativity; 0 means fully associative.
|
||||
bit 4-7: Log2 of cacheline size.
|
||||
bit 8-31: Size of the entire cache >> 8.
|
||||
bit 32-63: Reserved.
|
||||
*/
|
||||
|
||||
#define AT_L1I_CACHESHAPE 34
|
||||
#define AT_L1D_CACHESHAPE 35
|
||||
#define AT_L2_CACHESHAPE 36
|
||||
#define AT_L3_CACHESHAPE 37
|
||||
|
||||
#endif /* __ASM_ALPHA_AUXVEC_H */
|
||||
+2
-20
@@ -1,6 +1,8 @@
|
||||
#ifndef __ASM_ALPHA_ELF_H
|
||||
#define __ASM_ALPHA_ELF_H
|
||||
|
||||
#include <asm/auxvec.h>
|
||||
|
||||
/* Special values for the st_other field in the symbol table. */
|
||||
|
||||
#define STO_ALPHA_NOPV 0x80
|
||||
@@ -142,26 +144,6 @@ extern int dump_elf_task_fp(elf_fpreg_t *dest, struct task_struct *task);
|
||||
: amask (AMASK_CIX) ? "ev6" : "ev67"); \
|
||||
})
|
||||
|
||||
/* Reserve these numbers for any future use of a VDSO. */
|
||||
#if 0
|
||||
#define AT_SYSINFO 32
|
||||
#define AT_SYSINFO_EHDR 33
|
||||
#endif
|
||||
|
||||
/* More complete cache descriptions than AT_[DIU]CACHEBSIZE. If the
|
||||
value is -1, then the cache doesn't exist. Otherwise:
|
||||
|
||||
bit 0-3: Cache set-associativity; 0 means fully associative.
|
||||
bit 4-7: Log2 of cacheline size.
|
||||
bit 8-31: Size of the entire cache >> 8.
|
||||
bit 32-63: Reserved.
|
||||
*/
|
||||
|
||||
#define AT_L1I_CACHESHAPE 34
|
||||
#define AT_L1D_CACHESHAPE 35
|
||||
#define AT_L2_CACHESHAPE 36
|
||||
#define AT_L3_CACHESHAPE 37
|
||||
|
||||
#ifdef __KERNEL__
|
||||
|
||||
#define SET_PERSONALITY(EX, IBCS2) \
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
#ifndef __ASMARM_AUXVEC_H
|
||||
#define __ASMARM_AUXVEC_H
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,4 @@
|
||||
#ifndef __ASMARM_AUXVEC_H
|
||||
#define __ASMARM_AUXVEC_H
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,4 @@
|
||||
#ifndef __ASMCRIS_AUXVEC_H
|
||||
#define __ASMCRIS_AUXVEC_H
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,4 @@
|
||||
#ifndef __FRV_AUXVEC_H
|
||||
#define __FRV_AUXVEC_H
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,4 @@
|
||||
#ifndef __ASMH8300_AUXVEC_H
|
||||
#define __ASMH8300_AUXVEC_H
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,11 @@
|
||||
#ifndef __ASMi386_AUXVEC_H
|
||||
#define __ASMi386_AUXVEC_H
|
||||
|
||||
/*
|
||||
* Architecture-neutral AT_ values in 0-17, leave some room
|
||||
* for more of them, start the x86-specific ones at 32.
|
||||
*/
|
||||
#define AT_SYSINFO 32
|
||||
#define AT_SYSINFO_EHDR 33
|
||||
|
||||
#endif
|
||||
@@ -9,6 +9,7 @@
|
||||
#include <asm/user.h>
|
||||
#include <asm/processor.h>
|
||||
#include <asm/system.h> /* for savesegment */
|
||||
#include <asm/auxvec.h>
|
||||
|
||||
#include <linux/utsname.h>
|
||||
|
||||
@@ -109,13 +110,6 @@ typedef struct user_fxsr_struct elf_fpxregset_t;
|
||||
|
||||
#define ELF_PLATFORM (system_utsname.machine)
|
||||
|
||||
/*
|
||||
* Architecture-neutral AT_ values in 0-17, leave some room
|
||||
* for more of them, start the x86-specific ones at 32.
|
||||
*/
|
||||
#define AT_SYSINFO 32
|
||||
#define AT_SYSINFO_EHDR 33
|
||||
|
||||
#ifdef __KERNEL__
|
||||
#define SET_PERSONALITY(ex, ibcs2) do { } while (0)
|
||||
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
#ifndef _ASM_IA64_AUXVEC_H
|
||||
#define _ASM_IA64_AUXVEC_H
|
||||
|
||||
/*
|
||||
* Architecture-neutral AT_ values are in the range 0-17. Leave some room for more of
|
||||
* them, start the architecture-specific ones at 32.
|
||||
*/
|
||||
#define AT_SYSINFO 32
|
||||
#define AT_SYSINFO_EHDR 33
|
||||
|
||||
#endif /* _ASM_IA64_AUXVEC_H */
|
||||
@@ -12,6 +12,7 @@
|
||||
|
||||
#include <asm/fpu.h>
|
||||
#include <asm/page.h>
|
||||
#include <asm/auxvec.h>
|
||||
|
||||
/*
|
||||
* This is used to ensure we don't load something for the wrong architecture.
|
||||
@@ -177,13 +178,6 @@ extern void ia64_elf_core_copy_regs (struct pt_regs *src, elf_gregset_t dst);
|
||||
relevant until we have real hardware to play with... */
|
||||
#define ELF_PLATFORM NULL
|
||||
|
||||
/*
|
||||
* Architecture-neutral AT_ values are in the range 0-17. Leave some room for more of
|
||||
* them, start the architecture-specific ones at 32.
|
||||
*/
|
||||
#define AT_SYSINFO 32
|
||||
#define AT_SYSINFO_EHDR 33
|
||||
|
||||
#ifdef __KERNEL__
|
||||
#define SET_PERSONALITY(ex, ibcs2) set_personality(PER_LINUX)
|
||||
#define elf_read_implies_exec(ex, executable_stack) \
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
#ifndef _ASM_M32R__AUXVEC_H
|
||||
#define _ASM_M32R__AUXVEC_H
|
||||
|
||||
#endif /* _ASM_M32R__AUXVEC_H */
|
||||
@@ -0,0 +1,4 @@
|
||||
#ifndef __ASMm68k_AUXVEC_H
|
||||
#define __ASMm68k_AUXVEC_H
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,4 @@
|
||||
#ifndef __ASMm68k_AUXVEC_H
|
||||
#define __ASMm68k_AUXVEC_H
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,4 @@
|
||||
#ifndef _ASM_AUXVEC_H
|
||||
#define _ASM_AUXVEC_H
|
||||
|
||||
#endif /* _ASM_AUXVEC_H */
|
||||
@@ -0,0 +1,4 @@
|
||||
#ifndef __ASMPARISC_AUXVEC_H
|
||||
#define __ASMPARISC_AUXVEC_H
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,14 @@
|
||||
#ifndef __PPC_AUXVEC_H
|
||||
#define __PPC_AUXVEC_H
|
||||
|
||||
/*
|
||||
* We need to put in some extra aux table entries to tell glibc what
|
||||
* the cache block size is, so it can use the dcbz instruction safely.
|
||||
*/
|
||||
#define AT_DCACHEBSIZE 19
|
||||
#define AT_ICACHEBSIZE 20
|
||||
#define AT_UCACHEBSIZE 21
|
||||
/* A special ignored type value for PPC, for glibc compatibility. */
|
||||
#define AT_IGNOREPPC 22
|
||||
|
||||
#endif
|
||||
+1
-10
@@ -7,6 +7,7 @@
|
||||
#include <asm/types.h>
|
||||
#include <asm/ptrace.h>
|
||||
#include <asm/cputable.h>
|
||||
#include <asm/auxvec.h>
|
||||
|
||||
/* PowerPC relocations defined by the ABIs */
|
||||
#define R_PPC_NONE 0
|
||||
@@ -122,16 +123,6 @@ extern int dump_task_fpu(struct task_struct *t, elf_fpregset_t *fpu);
|
||||
|
||||
#define SET_PERSONALITY(ex, ibcs2) set_personality((ibcs2)?PER_SVR4:PER_LINUX)
|
||||
|
||||
/*
|
||||
* We need to put in some extra aux table entries to tell glibc what
|
||||
* the cache block size is, so it can use the dcbz instruction safely.
|
||||
*/
|
||||
#define AT_DCACHEBSIZE 19
|
||||
#define AT_ICACHEBSIZE 20
|
||||
#define AT_UCACHEBSIZE 21
|
||||
/* A special ignored type value for PPC, for glibc compatibility. */
|
||||
#define AT_IGNOREPPC 22
|
||||
|
||||
extern int dcache_bsize;
|
||||
extern int icache_bsize;
|
||||
extern int ucache_bsize;
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
#ifndef __PPC64_AUXVEC_H
|
||||
#define __PPC64_AUXVEC_H
|
||||
|
||||
/*
|
||||
* We need to put in some extra aux table entries to tell glibc what
|
||||
* the cache block size is, so it can use the dcbz instruction safely.
|
||||
*/
|
||||
#define AT_DCACHEBSIZE 19
|
||||
#define AT_ICACHEBSIZE 20
|
||||
#define AT_UCACHEBSIZE 21
|
||||
/* A special ignored type value for PPC, for glibc compatibility. */
|
||||
#define AT_IGNOREPPC 22
|
||||
|
||||
/* The vDSO location. We have to use the same value as x86 for glibc's
|
||||
* sake :-)
|
||||
*/
|
||||
#define AT_SYSINFO_EHDR 33
|
||||
|
||||
#endif /* __PPC64_AUXVEC_H */
|
||||
+1
-15
@@ -4,6 +4,7 @@
|
||||
#include <asm/types.h>
|
||||
#include <asm/ptrace.h>
|
||||
#include <asm/cputable.h>
|
||||
#include <asm/auxvec.h>
|
||||
|
||||
/* PowerPC relocations defined by the ABIs */
|
||||
#define R_PPC_NONE 0
|
||||
@@ -237,21 +238,6 @@ do { \
|
||||
|
||||
#endif
|
||||
|
||||
/*
|
||||
* We need to put in some extra aux table entries to tell glibc what
|
||||
* the cache block size is, so it can use the dcbz instruction safely.
|
||||
*/
|
||||
#define AT_DCACHEBSIZE 19
|
||||
#define AT_ICACHEBSIZE 20
|
||||
#define AT_UCACHEBSIZE 21
|
||||
/* A special ignored type value for PPC, for glibc compatibility. */
|
||||
#define AT_IGNOREPPC 22
|
||||
|
||||
/* The vDSO location. We have to use the same value as x86 for glibc's
|
||||
* sake :-)
|
||||
*/
|
||||
#define AT_SYSINFO_EHDR 33
|
||||
|
||||
extern int dcache_bsize;
|
||||
extern int icache_bsize;
|
||||
extern int ucache_bsize;
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user