Skip to content

Commit 8b224b8

Browse files
author
David S. Miller
committed
[SPARC64]: Create a HWCAP_SPARC_N2 and report it to userspace on Niagara-2.
Signed-off-by: David S. Miller <[email protected]>
1 parent 7dc4088 commit 8b224b8

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

include/asm-sparc64/elf.h

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@
7070
#define HWCAP_SPARC_V9 16
7171
#define HWCAP_SPARC_ULTRA3 32
7272
#define HWCAP_SPARC_BLKINIT 64
73+
#define HWCAP_SPARC_N2 128
7374

7475
/*
7576
* These are used to set parameters in the core dumps.
@@ -155,8 +156,13 @@ static inline unsigned int sparc64_elf_hwcap(void)
155156

156157
if (tlb_type == cheetah || tlb_type == cheetah_plus)
157158
cap |= HWCAP_SPARC_ULTRA3;
158-
else if (tlb_type == hypervisor)
159-
cap |= HWCAP_SPARC_BLKINIT;
159+
else if (tlb_type == hypervisor) {
160+
if (sun4v_chip_type == SUN4V_CHIP_NIAGARA1 ||
161+
sun4v_chip_type == SUN4V_CHIP_NIAGARA2)
162+
cap |= HWCAP_SPARC_BLKINIT;
163+
if (sun4v_chip_type == SUN4V_CHIP_NIAGARA2)
164+
cap |= HWCAP_SPARC_N2;
165+
}
160166

161167
return cap;
162168
}

0 commit comments

Comments
 (0)