diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-08-30 14:28:18 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-08-30 14:28:18 -0400 |
| commit | 9e79e3e9dd9672b37ac9412e9a926714306551fe (patch) | |
| tree | bf9a6f763f90b0df4f36aec65b4f1cc00d9bf33d | |
| parent | ebde8b0223020b0cdd18c284ab5c0bb67ebc787e (diff) | |
| parent | 1a8e0da5937a6c87807083baa318cf8f98dac9aa (diff) | |
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.
| -rw-r--r-- | arch/sparc/kernel/setup_64.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/arch/sparc/kernel/setup_64.c b/arch/sparc/kernel/setup_64.c index 3e9daea1653d..3c5bb784214f 100644 --- a/arch/sparc/kernel/setup_64.c +++ b/arch/sparc/kernel/setup_64.c | |||
| @@ -440,8 +440,14 @@ static void __init init_sparc64_elf_hwcap(void) | |||
| 440 | cap |= AV_SPARC_VIS; | 440 | cap |= AV_SPARC_VIS; |
| 441 | if (tlb_type == cheetah || tlb_type == cheetah_plus) | 441 | if (tlb_type == cheetah || tlb_type == cheetah_plus) |
| 442 | cap |= AV_SPARC_VIS | AV_SPARC_VIS2; | 442 | cap |= AV_SPARC_VIS | AV_SPARC_VIS2; |
| 443 | if (tlb_type == cheetah_plus) | 443 | if (tlb_type == cheetah_plus) { |
| 444 | cap |= AV_SPARC_POPC; | 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 | } | ||
| 445 | if (tlb_type == hypervisor) { | 451 | if (tlb_type == hypervisor) { |
| 446 | if (sun4v_chip_type == SUN4V_CHIP_NIAGARA1) | 452 | if (sun4v_chip_type == SUN4V_CHIP_NIAGARA1) |
| 447 | cap |= AV_SPARC_ASI_BLK_INIT; | 453 | cap |= AV_SPARC_ASI_BLK_INIT; |
