Patchwork [2/2] target-ppc: Add read and write of PPR SPR

login
register
mail settings
Submitter Anton Blanchard
Date May 1, 2013, 10:44 a.m.
Message ID <20130501204451.5689483e@kryten>
Download mbox | patch
Permalink /patch/240761/
State New
Headers show

Comments

Anton Blanchard - May 1, 2013, 10:44 a.m.
Recent Linux kernels save and restore the PPR across exceptions
so we need to handle it.

Signed-off-by: Anton Blanchard <anton@au1.ibm.com>
---

Patch

Index: b/target-ppc/translate_init.c
===================================================================
--- a/target-ppc/translate_init.c
+++ b/target-ppc/translate_init.c
@@ -7010,6 +7010,10 @@  static void init_proc_POWER7 (CPUPPCStat
                  &spr_read_generic, &spr_write_generic,
                  &spr_read_generic, &spr_write_generic,
                  0x00000000);
+    spr_register(env, SPR_PPR, "PPR",
+                 &spr_read_generic, &spr_write_generic,
+                 &spr_read_generic, &spr_write_generic,
+                 0x00000000);
 #if !defined(CONFIG_USER_ONLY)
     env->slb_nr = 32;
 #endif