Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[SPARC64]: Create a HWCAP_SPARC_N2 and report it to userspace on Niagara-2.

Signed-off-by: David S. Miller <davem@davemloft.net>

+8 -2
+8 -2
include/asm-sparc64/elf.h
··· 70 70 #define HWCAP_SPARC_V9 16 71 71 #define HWCAP_SPARC_ULTRA3 32 72 72 #define HWCAP_SPARC_BLKINIT 64 73 + #define HWCAP_SPARC_N2 128 73 74 74 75 /* 75 76 * These are used to set parameters in the core dumps. ··· 156 155 157 156 if (tlb_type == cheetah || tlb_type == cheetah_plus) 158 157 cap |= HWCAP_SPARC_ULTRA3; 159 - else if (tlb_type == hypervisor) 160 - cap |= HWCAP_SPARC_BLKINIT; 158 + else if (tlb_type == hypervisor) { 159 + if (sun4v_chip_type == SUN4V_CHIP_NIAGARA1 || 160 + sun4v_chip_type == SUN4V_CHIP_NIAGARA2) 161 + cap |= HWCAP_SPARC_BLKINIT; 162 + if (sun4v_chip_type == SUN4V_CHIP_NIAGARA2) 163 + cap |= HWCAP_SPARC_N2; 164 + } 161 165 162 166 return cap; 163 167 }