Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 104835
b: refs/heads/master
c: 79e25ba
h: refs/heads/master
i:
  104833: 20fe5f8
  104831: 02c34dc
v: v3
  • Loading branch information
Torez Smith authored and Benjamin Herrenschmidt committed Jul 22, 2008
1 parent dc37184 commit 4c12e37
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 542a3a3bc9d9c176f7cb332948df1cb8ff91fa64
refs/heads/master: 79e25bac124a7d1d7bf966f06dd9398a1b5f3d20
20 changes: 20 additions & 0 deletions trunk/arch/powerpc/kernel/cputable.c
Original file line number Diff line number Diff line change
Expand Up @@ -355,6 +355,7 @@ static struct cpu_spec __initdata cpu_specs[] = {
.icache_bsize = 128,
.dcache_bsize = 128,
.machine_check = machine_check_generic,
.oprofile_cpu_type = "ppc64/compat-power5+",
.platform = "power5+",
},
{ /* Power6 */
Expand Down Expand Up @@ -386,6 +387,7 @@ static struct cpu_spec __initdata cpu_specs[] = {
.icache_bsize = 128,
.dcache_bsize = 128,
.machine_check = machine_check_generic,
.oprofile_cpu_type = "ppc64/compat-power6",
.platform = "power6",
},
{ /* 2.06-compliant processor, i.e. Power7 "architected" mode */
Expand All @@ -397,6 +399,7 @@ static struct cpu_spec __initdata cpu_specs[] = {
.icache_bsize = 128,
.dcache_bsize = 128,
.machine_check = machine_check_generic,
.oprofile_cpu_type = "ppc64/compat-power7",
.platform = "power7",
},
{ /* Power7 */
Expand Down Expand Up @@ -1629,6 +1632,23 @@ struct cpu_spec * __init identify_cpu(unsigned long offset, unsigned int pvr)
t->cpu_setup = s->cpu_setup;
t->cpu_restore = s->cpu_restore;
t->platform = s->platform;
/*
* If we have passed through this logic once
* before and have pulled the default case
* because the real PVR was not found inside
* cpu_specs[], then we are possibly running in
* compatibility mode. In that case, let the
* oprofiler know which set of compatibility
* counters to pull from by making sure the
* oprofile_cpu_type string is set to that of
* compatibility mode. If the oprofile_cpu_type
* already has a value, then we are possibly
* overriding a real PVR with a logical one, and,
* in that case, keep the current value for
* oprofile_cpu_type.
*/
if (t->oprofile_cpu_type == NULL)
t->oprofile_cpu_type = s->oprofile_cpu_type;
} else
*t = *s;
*PTRRELOC(&cur_cpu_spec) = &the_cpu_spec;
Expand Down

0 comments on commit 4c12e37

Please sign in to comment.