We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0f43dd5 commit 1a8e0daCopy full SHA for 1a8e0da
arch/sparc/kernel/setup_64.c
@@ -440,8 +440,14 @@ static void __init init_sparc64_elf_hwcap(void)
440
cap |= AV_SPARC_VIS;
441
if (tlb_type == cheetah || tlb_type == cheetah_plus)
442
cap |= AV_SPARC_VIS | AV_SPARC_VIS2;
443
- if (tlb_type == cheetah_plus)
444
- cap |= AV_SPARC_POPC;
+ if (tlb_type == cheetah_plus) {
+ unsigned long impl, ver;
445
+
446
+ __asm__ __volatile__("rdpr %%ver, %0" : "=r" (ver));
447
+ impl = ((ver >> 32) & 0xffff);
448
+ if (impl == PANTHER_IMPL)
449
+ cap |= AV_SPARC_POPC;
450
+ }
451
if (tlb_type == hypervisor) {
452
if (sun4v_chip_type == SUN4V_CHIP_NIAGARA1)
453
cap |= AV_SPARC_ASI_BLK_INIT;
0 commit comments