Skip to content

Commit 9e79e3e

Browse files
committed
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc: sparc64: Only Panther cheetah+ chips have POPC.
2 parents ebde8b0 + 1a8e0da commit 9e79e3e

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

arch/sparc/kernel/setup_64.c

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -440,8 +440,14 @@ static void __init init_sparc64_elf_hwcap(void)
440440
cap |= AV_SPARC_VIS;
441441
if (tlb_type == cheetah || tlb_type == cheetah_plus)
442442
cap |= AV_SPARC_VIS | AV_SPARC_VIS2;
443-
if (tlb_type == cheetah_plus)
444-
cap |= AV_SPARC_POPC;
443+
if (tlb_type == cheetah_plus) {
444+
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+
}
445451
if (tlb_type == hypervisor) {
446452
if (sun4v_chip_type == SUN4V_CHIP_NIAGARA1)
447453
cap |= AV_SPARC_ASI_BLK_INIT;

0 commit comments

Comments
 (0)