aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sparc
diff options
context:
space:
mode:
authorAllen Pais <allen.pais@oracle.com>2014-09-08 02:18:53 -0400
committerDavid S. Miller <davem@davemloft.net>2014-09-09 18:24:10 -0400
commitcadbb58039f7cab1def9c931012ab04c953a6997 (patch)
treed7c4802f418c0f88effde87764bd7d8533ee8998 /arch/sparc
parent619df5d2870b80696fd32521376560e0a4223e44 (diff)
sparc64: correctly recognise M6 and M7 cpu type
The following patch adds support for correctly recognising M6 and M7 cpu type. Signed-off-by: Allen Pais <allen.pais@oracle.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc')
-rw-r--r--arch/sparc/include/asm/spitfire.h2
-rw-r--r--arch/sparc/kernel/cpu.c12
-rw-r--r--arch/sparc/kernel/head_64.S12
3 files changed, 26 insertions, 0 deletions
diff --git a/arch/sparc/include/asm/spitfire.h b/arch/sparc/include/asm/spitfire.h
index 3fc58691dbd0..56f933816144 100644
--- a/arch/sparc/include/asm/spitfire.h
+++ b/arch/sparc/include/asm/spitfire.h
@@ -45,6 +45,8 @@
45#define SUN4V_CHIP_NIAGARA3 0x03 45#define SUN4V_CHIP_NIAGARA3 0x03
46#define SUN4V_CHIP_NIAGARA4 0x04 46#define SUN4V_CHIP_NIAGARA4 0x04
47#define SUN4V_CHIP_NIAGARA5 0x05 47#define SUN4V_CHIP_NIAGARA5 0x05
48#define SUN4V_CHIP_SPARC_M6 0x06
49#define SUN4V_CHIP_SPARC_M7 0x07
48#define SUN4V_CHIP_SPARC64X 0x8a 50#define SUN4V_CHIP_SPARC64X 0x8a
49#define SUN4V_CHIP_UNKNOWN 0xff 51#define SUN4V_CHIP_UNKNOWN 0xff
50 52
diff --git a/arch/sparc/kernel/cpu.c b/arch/sparc/kernel/cpu.c
index 82a3a71c451e..dfad8b1aea9f 100644
--- a/arch/sparc/kernel/cpu.c
+++ b/arch/sparc/kernel/cpu.c
@@ -494,6 +494,18 @@ static void __init sun4v_cpu_probe(void)
494 sparc_pmu_type = "niagara5"; 494 sparc_pmu_type = "niagara5";
495 break; 495 break;
496 496
497 case SUN4V_CHIP_SPARC_M6:
498 sparc_cpu_type = "SPARC-M6";
499 sparc_fpu_type = "SPARC-M6 integrated FPU";
500 sparc_pmu_type = "sparc-m6";
501 break;
502
503 case SUN4V_CHIP_SPARC_M7:
504 sparc_cpu_type = "SPARC-M7";
505 sparc_fpu_type = "SPARC-M7 integrated FPU";
506 sparc_pmu_type = "sparc-m7";
507 break;
508
497 case SUN4V_CHIP_SPARC64X: 509 case SUN4V_CHIP_SPARC64X:
498 sparc_cpu_type = "SPARC64-X"; 510 sparc_cpu_type = "SPARC64-X";
499 sparc_fpu_type = "SPARC64-X integrated FPU"; 511 sparc_fpu_type = "SPARC64-X integrated FPU";
diff --git a/arch/sparc/kernel/head_64.S b/arch/sparc/kernel/head_64.S
index 452f04fe8da6..4fdeb8040d4d 100644
--- a/arch/sparc/kernel/head_64.S
+++ b/arch/sparc/kernel/head_64.S
@@ -427,6 +427,12 @@ sun4v_chip_type:
427 cmp %g2, '5' 427 cmp %g2, '5'
428 be,pt %xcc, 5f 428 be,pt %xcc, 5f
429 mov SUN4V_CHIP_NIAGARA5, %g4 429 mov SUN4V_CHIP_NIAGARA5, %g4
430 cmp %g2, '6'
431 be,pt %xcc, 5f
432 mov SUN4V_CHIP_SPARC_M6, %g4
433 cmp %g2, '7'
434 be,pt %xcc, 5f
435 mov SUN4V_CHIP_SPARC_M7, %g4
430 ba,pt %xcc, 49f 436 ba,pt %xcc, 49f
431 nop 437 nop
432 438
@@ -585,6 +591,12 @@ niagara_tlb_fixup:
585 cmp %g1, SUN4V_CHIP_NIAGARA5 591 cmp %g1, SUN4V_CHIP_NIAGARA5
586 be,pt %xcc, niagara4_patch 592 be,pt %xcc, niagara4_patch
587 nop 593 nop
594 cmp %g1, SUN4V_CHIP_SPARC_M6
595 be,pt %xcc, niagara4_patch
596 nop
597 cmp %g1, SUN4V_CHIP_SPARC_M7
598 be,pt %xcc, niagara4_patch
599 nop
588 600
589 call generic_patch_copyops 601 call generic_patch_copyops
590 nop 602 nop