Patchwork [7/9] sparc64: move cpu_interrupts_enabled to cpu.h

login
register
mail settings
Submitter Igor V. Kovalenko
Date Jan. 7, 2010, 8:28 p.m.
Message ID <20100107202826.16653.73812.stgit@skyserv>
Download mbox | patch
Permalink /patch/42476/
State New
Headers show

Comments

Igor V. Kovalenko - Jan. 7, 2010, 8:28 p.m.
From: Igor V. Kovalenko <igor.v.kovalenko@gmail.com>

- to be used by cpu_check_irqs

Signed-off-by: Igor V. Kovalenko <igor.v.kovalenko@gmail.com>
---
 target-sparc/cpu.h  |   13 +++++++++++++
 target-sparc/exec.h |   13 -------------
 2 files changed, 13 insertions(+), 13 deletions(-)

Patch

diff --git a/target-sparc/cpu.h b/target-sparc/cpu.h
index 0f0e38c..e5b282d 100644
--- a/target-sparc/cpu.h
+++ b/target-sparc/cpu.h
@@ -564,6 +564,19 @@  static inline int cpu_mmu_index(CPUState *env1)
 #endif
 }
 
+static inline int cpu_interrupts_enabled(CPUState *env1)
+{
+#if !defined (TARGET_SPARC64)
+    if (env1->psret != 0)
+        return 1;
+#else
+    if (env1->pstate & PS_IE)
+        return 1;
+#endif
+
+    return 0;
+}
+
 static inline int cpu_fpu_enabled(CPUState *env1)
 {
 #if defined(CONFIG_USER_ONLY)
diff --git a/target-sparc/exec.h b/target-sparc/exec.h
index e120d6f..3e021e9 100644
--- a/target-sparc/exec.h
+++ b/target-sparc/exec.h
@@ -24,19 +24,6 @@  static inline void regs_to_env(void)
 /* op_helper.c */
 void do_interrupt(CPUState *env);
 
-static inline int cpu_interrupts_enabled(CPUState *env1)
-{
-#if !defined (TARGET_SPARC64)
-    if (env1->psret != 0)
-        return 1;
-#else
-    if (env1->pstate & PS_IE)
-        return 1;
-#endif
-
-    return 0;
-}
-
 static inline int cpu_has_work(CPUState *env1)
 {
     return (env1->interrupt_request & CPU_INTERRUPT_HARD) &&