Skip to content
Snippets Groups Projects
Commit 81316c5b authored by Anna Lyons's avatar Anna Lyons
Browse files

cortex-a8: fix check_export_pmu

- read PMUSERENR_ENABLE first before updating. On the cortex-a8
(specifically omap3) not doing this would result in the kernel aborting.
- do not read DBGDSCR_ext on cortex-a8, read DBGDSCR_int. This is only
implemented in armv7.1, not armv7, and also causes the kernel to abort.
parent 664ac228
No related branches found
No related tags found
No related merge requests found
......@@ -25,8 +25,11 @@
static inline word_t readDscrCp(void)
{
word_t v;
#ifdef CONFIG_ARM_CORTEX_A8
MRC(DBGDSCR_int, v);
#else
MRC(DBGDSCR_ext, v);
#endif
return v;
}
......
......@@ -31,7 +31,8 @@ static void check_export_pmu(void)
#if defined CONFIG_EXPORT_PMU_USER || defined CONFIG_ENABLE_BENCHMARKS
/* Export performance counters */
uint32_t v;
v = PMUSERENR_ENABLE;
MRC(PMUSERENR, v);
v |= PMUSERENR_ENABLE;
MCR(PMUSERENR, v);
/* enable user-level pmu event counter if we're in secure mode */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment