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 81512db..c93a22a 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 ed11fb0..699df68 100644 (file)
@@ -977,6 +977,10 @@ static const char *hwcap_str[] = {
        "neon",
        "vfpv3",
        "vfpv3d16",
+       "tls",
+       "vfpv4",
+       "idiva",
+       "idivt",
        NULL
 };