]> git.karo-electronics.de Git - linux-beck.git/commitdiff
ARM: hwcaps: add new HWCAP defines for ARMv7-A
authorWill Deacon <will.deacon@arm.com>
Fri, 3 Jun 2011 13:15:22 +0000 (14:15 +0100)
committerWill Deacon <will.deacon@arm.com>
Thu, 7 Jul 2011 18:20:51 +0000 (19:20 +0100)
Modern ARMv7-A cores can optionally implement these new hardware
features:

- VFPv4:
    The latest version of the ARMv7 vector floating-point extensions,
    including hardware support for fused multiple accumulate. D16 or D32
    variants may be implemented.

- Integer divide:
    The SDIV and UDIV instructions provide signed and unsigned integer
    division in hardware. When implemented, these instructions may be
    available in either both Thumb and ARM, or Thumb only.

This patch adds new HWCAP defines to describe these new features. The
integer divide capabilities are split into two bits for ARM and Thumb
respectively. Whilst HWCAP_IDIVA should never be set if HWCAP_IDIVT is
clear, separating the bits makes it easier to interpret from userspace.

Signed-off-by: Will Deacon <will.deacon@arm.com>
arch/arm/include/asm/hwcap.h
arch/arm/kernel/setup.c

index 81512db2b628b9542fd4c55f7b4ccca205ea51cf..c93a22a8b924737730edaf17ef3e5ceb7b94afc5 100644 (file)
 #define HWCAP_VFPv3    (1 << 13)
 #define HWCAP_VFPv3D16 (1 << 14)
 #define HWCAP_TLS      (1 << 15)
+#define HWCAP_VFPv4    (1 << 16)
+#define HWCAP_IDIVA    (1 << 17)
+#define HWCAP_IDIVT    (1 << 18)
+#define HWCAP_IDIV     (HWCAP_IDIVA | HWCAP_IDIVT)
 
 #if defined(__KERNEL__) && !defined(__ASSEMBLY__)
 /*
index ed11fb08b05a5b2d3fd022d981970c01c9fdc088..699df68fc840aafe2de12acf584193b40049d831 100644 (file)
@@ -977,6 +977,10 @@ static const char *hwcap_str[] = {
        "neon",
        "vfpv3",
        "vfpv3d16",
+       "tls",
+       "vfpv4",
+       "idiva",
+       "idivt",
        NULL
 };