summaryrefslogtreecommitdiff
path: root/include/asm-sparc64/elf.h
diff options
context:
space:
mode:
authorDavid S. Miller <davem@sunset.davemloft.net>2007-08-16 13:56:39 -0700
committerDavid S. Miller <davem@sunset.davemloft.net>2007-08-16 13:56:39 -0700
commit8b224b813aad0231af62dc75d056aae83c9d4d12 (patch)
tree1151d86134cf4a02eb586f2de70bfda82287a3b3 /include/asm-sparc64/elf.h
parent7dc408808ad40b9a5d031966035713ed5d5153b8 (diff)
[SPARC64]: Create a HWCAP_SPARC_N2 and report it to userspace on Niagara-2.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/asm-sparc64/elf.h')
-rw-r--r--include/asm-sparc64/elf.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/include/asm-sparc64/elf.h b/include/asm-sparc64/elf.h
index 303d85e2f82e..8653e8665009 100644
--- a/include/asm-sparc64/elf.h
+++ b/include/asm-sparc64/elf.h
@@ -70,6 +70,7 @@
#define HWCAP_SPARC_V9 16
#define HWCAP_SPARC_ULTRA3 32
#define HWCAP_SPARC_BLKINIT 64
+#define HWCAP_SPARC_N2 128
/*
* These are used to set parameters in the core dumps.
@@ -155,8 +156,13 @@ static inline unsigned int sparc64_elf_hwcap(void)
if (tlb_type == cheetah || tlb_type == cheetah_plus)
cap |= HWCAP_SPARC_ULTRA3;
- else if (tlb_type == hypervisor)
- cap |= HWCAP_SPARC_BLKINIT;
+ else if (tlb_type == hypervisor) {
+ if (sun4v_chip_type == SUN4V_CHIP_NIAGARA1 ||
+ sun4v_chip_type == SUN4V_CHIP_NIAGARA2)
+ cap |= HWCAP_SPARC_BLKINIT;
+ if (sun4v_chip_type == SUN4V_CHIP_NIAGARA2)
+ cap |= HWCAP_SPARC_N2;
+ }
return cap;
}