Ignore writes of perf reg (cp15 with crm == 12)

Submitted by Loïc Minier on July 25, 2010, 7:27 p.m.

Details

Message ID 1280086076-20649-1-git-send-email-loic.minier@linaro.org
State New
Headers show

Commit Message

Loïc Minier July 25, 2010, 7:27 p.m.
On ARMv7, ignore writes to cp15 with crm == 12; these are to setup perf
counters which we don't have.
---
 target-arm/helper.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

Comments

Arnd Bergmann July 28, 2010, 11:29 a.m.
On Sunday 25 July 2010, Loïc Minier wrote:
> On ARMv7, ignore writes to cp15 with crm == 12; these are to setup perf
> counters which we don't have.

Thanks Loïc, I have tested this and can confirm that I'm able to boot
a CONFIG_PERF_EVENTS kernel now.

	Arnd

Patch hide | download patch | download mbox

diff --git a/target-arm/helper.c b/target-arm/helper.c
index 2dd64d9..865829f 100644
--- a/target-arm/helper.c
+++ b/target-arm/helper.c
@@ -1457,6 +1457,8 @@  void HELPER(set_cp15)(CPUState *env, uint32_t insn, uint32_t val)
         }
         break;
     case 9:
+        if (arm_feature(env, ARM_FEATURE_V7) && crm == 12)
+            break; /* Perf counters. */
         if (arm_feature(env, ARM_FEATURE_OMAPCP))
             break;
         switch (crm) {