Catalin Marinas | f668cd1 | 2012-03-05 11:49:30 +0000 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2012 ARM Ltd. |
| 3 | * |
| 4 | * This program is free software; you can redistribute it and/or modify |
| 5 | * it under the terms of the GNU General Public License version 2 as |
| 6 | * published by the Free Software Foundation. |
| 7 | * |
| 8 | * This program is distributed in the hope that it will be useful, |
| 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 11 | * GNU General Public License for more details. |
| 12 | * |
| 13 | * You should have received a copy of the GNU General Public License |
| 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. |
| 15 | */ |
| 16 | #ifndef __ASM_HWCAP_H |
| 17 | #define __ASM_HWCAP_H |
| 18 | |
David Howells | 4262a72 | 2012-10-11 11:05:13 +0100 | [diff] [blame] | 19 | #include <uapi/asm/hwcap.h> |
Catalin Marinas | f668cd1 | 2012-03-05 11:49:30 +0000 | [diff] [blame] | 20 | |
| 21 | #define COMPAT_HWCAP_HALF (1 << 1) |
| 22 | #define COMPAT_HWCAP_THUMB (1 << 2) |
| 23 | #define COMPAT_HWCAP_FAST_MULT (1 << 4) |
| 24 | #define COMPAT_HWCAP_VFP (1 << 6) |
| 25 | #define COMPAT_HWCAP_EDSP (1 << 7) |
| 26 | #define COMPAT_HWCAP_NEON (1 << 12) |
| 27 | #define COMPAT_HWCAP_VFPv3 (1 << 13) |
| 28 | #define COMPAT_HWCAP_TLS (1 << 15) |
| 29 | #define COMPAT_HWCAP_VFPv4 (1 << 16) |
| 30 | #define COMPAT_HWCAP_IDIVA (1 << 17) |
| 31 | #define COMPAT_HWCAP_IDIVT (1 << 18) |
| 32 | #define COMPAT_HWCAP_IDIV (COMPAT_HWCAP_IDIVA|COMPAT_HWCAP_IDIVT) |
Sudeep KarkadaNagesha | a8d3b80 | 2013-08-13 15:57:53 +0100 | [diff] [blame] | 33 | #define COMPAT_HWCAP_EVTSTRM (1 << 21) |
Catalin Marinas | f668cd1 | 2012-03-05 11:49:30 +0000 | [diff] [blame] | 34 | |
Ard Biesheuvel | fa98162 | 2014-03-03 07:34:46 +0000 | [diff] [blame] | 35 | #define COMPAT_HWCAP2_AES (1 << 0) |
| 36 | #define COMPAT_HWCAP2_PMULL (1 << 1) |
| 37 | #define COMPAT_HWCAP2_SHA1 (1 << 2) |
| 38 | #define COMPAT_HWCAP2_SHA2 (1 << 3) |
| 39 | #define COMPAT_HWCAP2_CRC32 (1 << 4) |
| 40 | |
David Howells | 1c1e436 | 2012-10-04 12:10:18 +0100 | [diff] [blame] | 41 | #ifndef __ASSEMBLY__ |
Catalin Marinas | f668cd1 | 2012-03-05 11:49:30 +0000 | [diff] [blame] | 42 | /* |
| 43 | * This yields a mask that user programs can use to figure out what |
| 44 | * instruction set this cpu supports. |
| 45 | */ |
| 46 | #define ELF_HWCAP (elf_hwcap) |
Sudeep KarkadaNagesha | a8d3b80 | 2013-08-13 15:57:53 +0100 | [diff] [blame] | 47 | |
| 48 | #ifdef CONFIG_COMPAT |
| 49 | #define COMPAT_ELF_HWCAP (compat_elf_hwcap) |
Ard Biesheuvel | 0e985d1 | 2014-03-03 07:34:45 +0000 | [diff] [blame] | 50 | #define COMPAT_ELF_HWCAP2 (compat_elf_hwcap2) |
| 51 | extern unsigned int compat_elf_hwcap, compat_elf_hwcap2; |
Sudeep KarkadaNagesha | a8d3b80 | 2013-08-13 15:57:53 +0100 | [diff] [blame] | 52 | #endif |
Catalin Marinas | f668cd1 | 2012-03-05 11:49:30 +0000 | [diff] [blame] | 53 | |
Steve Capper | 9d6eaf2 | 2013-09-18 16:14:28 +0100 | [diff] [blame] | 54 | extern unsigned long elf_hwcap; |
Catalin Marinas | f668cd1 | 2012-03-05 11:49:30 +0000 | [diff] [blame] | 55 | #endif |
David Howells | 1c1e436 | 2012-10-04 12:10:18 +0100 | [diff] [blame] | 56 | #endif |