aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sh/kernel/cpu/sh4
diff options
context:
space:
mode:
authorPaul Mundt <lethal@linux-sh.org>2010-10-12 14:46:25 -0400
committerPaul Mundt <lethal@linux-sh.org>2010-10-27 03:51:33 -0400
commit2e4f17d230d84579fef07836fb5f69bf1a0a47ad (patch)
tree552b861fccfd34c7664f097293ce10014cf6134d /arch/sh/kernel/cpu/sh4
parent667b279baa529a1b5bd120d4ce3df643a5749263 (diff)
sh: oprofile: Fix up and extend op_name_from_perf_id().
op_name_from_perf_id() currently returns a local variable, which isn't terribly productive. As we only handle a single PMU case for now, simply allocate and free the string from the arch init/exit context and have op_name_from_perf_id() hand back the cached string. This also takes UTS_MACHINE in to account, given that we build for multiple architectures. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh/kernel/cpu/sh4')
-rw-r--r--arch/sh/kernel/cpu/sh4/perf_event.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/sh/kernel/cpu/sh4/perf_event.c b/arch/sh/kernel/cpu/sh4/perf_event.c
index 7f9ecc9c2d02..dbf3b4bb71fe 100644
--- a/arch/sh/kernel/cpu/sh4/perf_event.c
+++ b/arch/sh/kernel/cpu/sh4/perf_event.c
@@ -225,7 +225,7 @@ static void sh7750_pmu_enable_all(void)
225} 225}
226 226
227static struct sh_pmu sh7750_pmu = { 227static struct sh_pmu sh7750_pmu = {
228 .name = "SH7750", 228 .name = "sh7750",
229 .num_events = 2, 229 .num_events = 2,
230 .event_map = sh7750_event_map, 230 .event_map = sh7750_event_map,
231 .max_events = ARRAY_SIZE(sh7750_general_events), 231 .max_events = ARRAY_SIZE(sh7750_general_events),