diff options
author | Michael Neuling <mikey@neuling.org> | 2008-06-17 20:47:26 -0400 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2008-06-30 08:31:11 -0400 |
commit | e952e6c4d6635b36c212c056a9427bd93460178c (patch) | |
tree | 1791007d187ffea2e66a0150977dc5f3cc3b8c53 /arch | |
parent | e2d755051129c61a9f67bf752d0b7cc82b115338 (diff) |
powerpc: Add cputable entry for POWER7
Add a cputable entry for the POWER7 processor.
Also tell firmware that we know about POWER7.
Signed-off-by: Michael Neuling <mikey@neuling.org>
Signed-off-by: Joel Schopp <jschopp@austin.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/powerpc/kernel/cputable.c | 25 | ||||
-rw-r--r-- | arch/powerpc/kernel/misc.S | 5 | ||||
-rw-r--r-- | arch/powerpc/kernel/prom_init.c | 1 |
3 files changed, 31 insertions, 0 deletions
diff --git a/arch/powerpc/kernel/cputable.c b/arch/powerpc/kernel/cputable.c index f247fc6ad12d..d8d669308403 100644 --- a/arch/powerpc/kernel/cputable.c +++ b/arch/powerpc/kernel/cputable.c | |||
@@ -53,6 +53,8 @@ extern void __setup_cpu_ppc970MP(unsigned long offset, struct cpu_spec* spec); | |||
53 | extern void __setup_cpu_pa6t(unsigned long offset, struct cpu_spec* spec); | 53 | extern void __setup_cpu_pa6t(unsigned long offset, struct cpu_spec* spec); |
54 | extern void __restore_cpu_pa6t(void); | 54 | extern void __restore_cpu_pa6t(void); |
55 | extern void __restore_cpu_ppc970(void); | 55 | extern void __restore_cpu_ppc970(void); |
56 | extern void __setup_cpu_power7(unsigned long offset, struct cpu_spec* spec); | ||
57 | extern void __restore_cpu_power7(void); | ||
56 | #endif /* CONFIG_PPC64 */ | 58 | #endif /* CONFIG_PPC64 */ |
57 | 59 | ||
58 | /* This table only contains "desktop" CPUs, it need to be filled with embedded | 60 | /* This table only contains "desktop" CPUs, it need to be filled with embedded |
@@ -69,6 +71,9 @@ extern void __restore_cpu_ppc970(void); | |||
69 | #define COMMON_USER_POWER6 (COMMON_USER_PPC64 | PPC_FEATURE_ARCH_2_05 |\ | 71 | #define COMMON_USER_POWER6 (COMMON_USER_PPC64 | PPC_FEATURE_ARCH_2_05 |\ |
70 | PPC_FEATURE_SMT | PPC_FEATURE_ICACHE_SNOOP | \ | 72 | PPC_FEATURE_SMT | PPC_FEATURE_ICACHE_SNOOP | \ |
71 | PPC_FEATURE_TRUE_LE) | 73 | PPC_FEATURE_TRUE_LE) |
74 | #define COMMON_USER_POWER7 (COMMON_USER_PPC64 | PPC_FEATURE_ARCH_2_06 |\ | ||
75 | PPC_FEATURE_SMT | PPC_FEATURE_ICACHE_SNOOP | \ | ||
76 | PPC_FEATURE_TRUE_LE) | ||
72 | #define COMMON_USER_PA6T (COMMON_USER_PPC64 | PPC_FEATURE_PA6T |\ | 77 | #define COMMON_USER_PA6T (COMMON_USER_PPC64 | PPC_FEATURE_PA6T |\ |
73 | PPC_FEATURE_TRUE_LE | \ | 78 | PPC_FEATURE_TRUE_LE | \ |
74 | PPC_FEATURE_HAS_ALTIVEC_COMP) | 79 | PPC_FEATURE_HAS_ALTIVEC_COMP) |
@@ -381,6 +386,26 @@ static struct cpu_spec __initdata cpu_specs[] = { | |||
381 | .machine_check = machine_check_generic, | 386 | .machine_check = machine_check_generic, |
382 | .platform = "power6", | 387 | .platform = "power6", |
383 | }, | 388 | }, |
389 | { /* Power7 */ | ||
390 | .pvr_mask = 0xffff0000, | ||
391 | .pvr_value = 0x003f0000, | ||
392 | .cpu_name = "POWER7", | ||
393 | .cpu_features = CPU_FTRS_POWER7, | ||
394 | .cpu_user_features = COMMON_USER_POWER7, | ||
395 | .icache_bsize = 128, | ||
396 | .dcache_bsize = 128, | ||
397 | .num_pmcs = 6, | ||
398 | .pmc_type = PPC_PMC_IBM, | ||
399 | .cpu_setup = __setup_cpu_power7, | ||
400 | .cpu_restore = __restore_cpu_power7, | ||
401 | .oprofile_cpu_type = "ppc64/power7", | ||
402 | .oprofile_type = PPC_OPROFILE_POWER4, | ||
403 | .oprofile_mmcra_sihv = POWER6_MMCRA_SIHV, | ||
404 | .oprofile_mmcra_sipr = POWER6_MMCRA_SIPR, | ||
405 | .oprofile_mmcra_clear = POWER6_MMCRA_THRM | | ||
406 | POWER6_MMCRA_OTHER, | ||
407 | .platform = "power7", | ||
408 | }, | ||
384 | { /* Cell Broadband Engine */ | 409 | { /* Cell Broadband Engine */ |
385 | .pvr_mask = 0xffff0000, | 410 | .pvr_mask = 0xffff0000, |
386 | .pvr_value = 0x00700000, | 411 | .pvr_value = 0x00700000, |
diff --git a/arch/powerpc/kernel/misc.S b/arch/powerpc/kernel/misc.S index 7b9160220698..85cb6f340846 100644 --- a/arch/powerpc/kernel/misc.S +++ b/arch/powerpc/kernel/misc.S | |||
@@ -116,3 +116,8 @@ _GLOBAL(longjmp) | |||
116 | mtlr r0 | 116 | mtlr r0 |
117 | mr r3,r4 | 117 | mr r3,r4 |
118 | blr | 118 | blr |
119 | |||
120 | _GLOBAL(__setup_cpu_power7) | ||
121 | _GLOBAL(__restore_cpu_power7) | ||
122 | /* place holder */ | ||
123 | blr | ||
diff --git a/arch/powerpc/kernel/prom_init.c b/arch/powerpc/kernel/prom_init.c index 6d6df1e60325..7585ed181ff8 100644 --- a/arch/powerpc/kernel/prom_init.c +++ b/arch/powerpc/kernel/prom_init.c | |||
@@ -650,6 +650,7 @@ static void __init early_cmdline_parse(void) | |||
650 | static unsigned char ibm_architecture_vec[] = { | 650 | static unsigned char ibm_architecture_vec[] = { |
651 | W(0xfffe0000), W(0x003a0000), /* POWER5/POWER5+ */ | 651 | W(0xfffe0000), W(0x003a0000), /* POWER5/POWER5+ */ |
652 | W(0xffff0000), W(0x003e0000), /* POWER6 */ | 652 | W(0xffff0000), W(0x003e0000), /* POWER6 */ |
653 | W(0xffff0000), W(0x003f0000), /* POWER7 */ | ||
653 | W(0xffffffff), W(0x0f000002), /* all 2.05-compliant */ | 654 | W(0xffffffff), W(0x0f000002), /* all 2.05-compliant */ |
654 | W(0xfffffffe), W(0x0f000001), /* all 2.04-compliant and earlier */ | 655 | W(0xfffffffe), W(0x0f000001), /* all 2.04-compliant and earlier */ |
655 | 5 - 1, /* 5 option vectors */ | 656 | 5 - 1, /* 5 option vectors */ |