Skip to content

Commit

Permalink
Add HWCAP_NEON to the ARM hwcap.h file
Browse files Browse the repository at this point in the history
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
  • Loading branch information
Catalin Marinas committed Nov 6, 2008
1 parent 4369ae1 commit 2bedbdf
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 0 deletions.
1 change: 1 addition & 0 deletions arch/arm/include/asm/hwcap.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
#define HWCAP_IWMMXT 512
#define HWCAP_CRUNCH 1024
#define HWCAP_THUMBEE 2048
#define HWCAP_NEON 4096

#if defined(__KERNEL__) && !defined(__ASSEMBLY__)
/*
Expand Down
1 change: 1 addition & 0 deletions arch/arm/kernel/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -773,6 +773,7 @@ static const char *hwcap_str[] = {
"iwmmxt",
"crunch",
"thumbee",
"neon",
NULL
};

Expand Down
9 changes: 9 additions & 0 deletions arch/arm/vfp/vfpmodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -371,6 +371,15 @@ static int __init vfp_init(void)
* in place; report VFP support to userspace.
*/
elf_hwcap |= HWCAP_VFP;
#ifdef CONFIG_NEON
/*
* Check for the presence of the Advanced SIMD
* load/store instructions, integer and single
* precision floating point operations.
*/
if ((fmrx(MVFR1) & 0x000fff00) == 0x00011100)
elf_hwcap |= HWCAP_NEON;
#endif
}
return 0;
}
Expand Down

0 comments on commit 2bedbdf

Please sign in to comment.