mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-03 23:58:05 +00:00
[ARM] Move HWCAP_* definitions to asm/elf.h
Move HWCAP_* definitions into asm/elf.h, where they should belong. Since userspace wants to get at these definitions by including asm/procinfo.h, include asm/elf.h from this file if __KERNEL__ is not defined, and issue a warning suggesting to fix the program up to use asm/elf.h instead. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
This commit is contained in:
parent
ee90dabcad
commit
5974eaaede
2 changed files with 19 additions and 18 deletions
|
@ -39,9 +39,21 @@ typedef struct user_fp elf_fpregset_t;
|
||||||
#endif
|
#endif
|
||||||
#define ELF_ARCH EM_ARM
|
#define ELF_ARCH EM_ARM
|
||||||
|
|
||||||
#ifdef __KERNEL__
|
/*
|
||||||
#include <asm/procinfo.h>
|
* HWCAP flags - for elf_hwcap (in kernel) and AT_HWCAP
|
||||||
|
*/
|
||||||
|
#define HWCAP_SWP 1
|
||||||
|
#define HWCAP_HALF 2
|
||||||
|
#define HWCAP_THUMB 4
|
||||||
|
#define HWCAP_26BIT 8 /* Play it safe */
|
||||||
|
#define HWCAP_FAST_MULT 16
|
||||||
|
#define HWCAP_FPA 32
|
||||||
|
#define HWCAP_VFP 64
|
||||||
|
#define HWCAP_EDSP 128
|
||||||
|
#define HWCAP_JAVA 256
|
||||||
|
#define HWCAP_IWMMXT 512
|
||||||
|
|
||||||
|
#ifdef __KERNEL__
|
||||||
#ifndef __ASSEMBLY__
|
#ifndef __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
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
#ifndef __ASM_PROCINFO_H
|
#ifndef __ASM_PROCINFO_H
|
||||||
#define __ASM_PROCINFO_H
|
#define __ASM_PROCINFO_H
|
||||||
|
|
||||||
#ifndef __ASSEMBLY__
|
#ifdef __KERNEL__
|
||||||
|
|
||||||
struct cpu_tlb_fns;
|
struct cpu_tlb_fns;
|
||||||
struct cpu_user_fns;
|
struct cpu_user_fns;
|
||||||
|
@ -42,19 +42,8 @@ struct proc_info_list {
|
||||||
struct cpu_cache_fns *cache;
|
struct cpu_cache_fns *cache;
|
||||||
};
|
};
|
||||||
|
|
||||||
extern unsigned int elf_hwcap;
|
#else /* __KERNEL__ */
|
||||||
|
#include <asm/elf.h>
|
||||||
#endif /* __ASSEMBLY__ */
|
#warning "Please include asm/elf.h instead"
|
||||||
|
#endif /* __KERNEL__ */
|
||||||
#define HWCAP_SWP 1
|
|
||||||
#define HWCAP_HALF 2
|
|
||||||
#define HWCAP_THUMB 4
|
|
||||||
#define HWCAP_26BIT 8 /* Play it safe */
|
|
||||||
#define HWCAP_FAST_MULT 16
|
|
||||||
#define HWCAP_FPA 32
|
|
||||||
#define HWCAP_VFP 64
|
|
||||||
#define HWCAP_EDSP 128
|
|
||||||
#define HWCAP_JAVA 256
|
|
||||||
#define HWCAP_IWMMXT 512
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in a new issue