projects
/
GitHub
/
MotorolaMobilityLLC
/
kernel-slsi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0f43dd5
)
sparc64: Only Panther cheetah+ chips have POPC.
author
David S. Miller
<davem@davemloft.net>
Tue, 30 Aug 2011 04:14:29 +0000
(21:14 -0700)
committer
David S. Miller
<davem@davemloft.net>
Tue, 30 Aug 2011 04:14:29 +0000
(21:14 -0700)
Signed-off-by: David S. Miller <davem@davemloft.net>
arch/sparc/kernel/setup_64.c
patch
|
blob
|
blame
|
history
diff --git
a/arch/sparc/kernel/setup_64.c
b/arch/sparc/kernel/setup_64.c
index 3e9daea1653d38afcfee2f04d70d79af732c6c2d..3c5bb784214f5944e5fd838cca5836f2d968a699 100644
(file)
--- 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)
cap |= AV_SPARC_VIS;
if (tlb_type == cheetah || tlb_type == cheetah_plus)
cap |= AV_SPARC_VIS | AV_SPARC_VIS2;
- if (tlb_type == cheetah_plus)
- cap |= AV_SPARC_POPC;
+ if (tlb_type == cheetah_plus) {
+ unsigned long impl, ver;
+
+ __asm__ __volatile__("rdpr %%ver, %0" : "=r" (ver));
+ impl = ((ver >> 32) & 0xffff);
+ if (impl == PANTHER_IMPL)
+ cap |= AV_SPARC_POPC;
+ }
if (tlb_type == hypervisor) {
if (sun4v_chip_type == SUN4V_CHIP_NIAGARA1)
cap |= AV_SPARC_ASI_BLK_INIT;