qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Glauber Costa <gcosta@redhat.com>
To: qemu-devel@nongnu.org
Cc: kvm@vger.kernel.org
Subject: [Qemu-devel] [PATCH 2/6] Push common interrupt variables to cpu-defs.h
Date: Tue, 27 May 2008 12:18:21 -0300	[thread overview]
Message-ID: <1211901505-30519-3-git-send-email-gcosta@redhat.com> (raw)
In-Reply-To: <1211901505-30519-2-git-send-email-gcosta@redhat.com>

Some interrupt-related attributes, which includes the jmp_buf,
are present in all, or almost all, architectures. So move them
to common code in cpu-defs.h instead of replicating them everywhere

Signed-off-by: Glauber Costa <gcosta@redhat.com>
---
 cpu-defs.h         |    5 +++++
 target-alpha/cpu.h |    3 ---
 target-arm/cpu.h   |    2 --
 target-cris/cpu.h  |    2 --
 target-i386/cpu.h  |    3 ---
 target-m68k/cpu.h  |    2 --
 target-mips/cpu.h  |    3 ---
 target-ppc/cpu.h   |    3 ---
 target-sh4/cpu.h   |    2 --
 target-sparc/cpu.h |    2 --
 10 files changed, 5 insertions(+), 22 deletions(-)

diff --git a/cpu-defs.h b/cpu-defs.h
index c4389ed..bb00c80 100644
--- a/cpu-defs.h
+++ b/cpu-defs.h
@@ -159,6 +159,11 @@ typedef struct CPUTLBEntry {
     int nb_watchpoints;                                                 \
     int watchpoint_hit;                                                 \
                                                                         \
+    /* Core interrupt code */                                           \
+    jmp_buf jmp_env;                                                    \
+    int exception_index;                                                \
+    int error_code;                                                     \
+                                                                        \
     void *next_cpu; /* next CPU sharing TB cache */                     \
     int cpu_index; /* CPU index (informative) */                        \
     /* user data */                                                     \
diff --git a/target-alpha/cpu.h b/target-alpha/cpu.h
index f8bbc70..b3c10d7 100644
--- a/target-alpha/cpu.h
+++ b/target-alpha/cpu.h
@@ -282,13 +282,10 @@ struct CPUAlphaState {
     /* Those resources are used only in Qemu core */
     CPU_COMMON
 
-    jmp_buf jmp_env;
     int user_mode_only; /* user mode only simulation */
     uint32_t hflags;
     int halted;
 
-    int exception_index;
-    int error_code;
     int interrupt_request;
 
     uint32_t features;
diff --git a/target-arm/cpu.h b/target-arm/cpu.h
index 2ff25a5..60a7a64 100644
--- a/target-arm/cpu.h
+++ b/target-arm/cpu.h
@@ -156,8 +156,6 @@ typedef struct CPUARMState {
     void *irq_opaque;
 
     /* exception/interrupt handling */
-    jmp_buf jmp_env;
-    int exception_index;
     int interrupt_request;
     int user_mode_only;
     int halted;
diff --git a/target-cris/cpu.h b/target-cris/cpu.h
index a26dd80..d45abea 100644
--- a/target-cris/cpu.h
+++ b/target-cris/cpu.h
@@ -124,7 +124,6 @@ typedef struct CPUCRISState {
 	int cc_x_live;
 	int cc_x;
 
-	int exception_index;
 	int interrupt_request;
 	int interrupt_vector;
 	int fault_vector;
@@ -164,7 +163,6 @@ typedef struct CPUCRISState {
 	int user_mode_only;
 	int halted;
 
-	jmp_buf jmp_env;
 	CPU_COMMON
 } CPUCRISState;
 
diff --git a/target-i386/cpu.h b/target-i386/cpu.h
index eb784b4..c8a4559 100644
--- a/target-i386/cpu.h
+++ b/target-i386/cpu.h
@@ -553,9 +553,6 @@ typedef struct CPUX86State {
     uint64_t pat;
 
     /* exception/interrupt handling */
-    jmp_buf jmp_env;
-    int exception_index;
-    int error_code;
     int exception_is_int;
     target_ulong exception_next_eip;
     target_ulong dr[8]; /* debug registers */
diff --git a/target-m68k/cpu.h b/target-m68k/cpu.h
index 732929b..ba36387 100644
--- a/target-m68k/cpu.h
+++ b/target-m68k/cpu.h
@@ -104,8 +104,6 @@ typedef struct CPUM68KState {
     uint32_t t1;
 
     /* exception/interrupt handling */
-    jmp_buf jmp_env;
-    int exception_index;
     int interrupt_request;
     int user_mode_only;
     int halted;
diff --git a/target-mips/cpu.h b/target-mips/cpu.h
index 49b7e63..08aad3e 100644
--- a/target-mips/cpu.h
+++ b/target-mips/cpu.h
@@ -411,9 +411,6 @@ struct CPUMIPSState {
     int32_t CP0_DESAVE;
     /* Qemu */
     int interrupt_request;
-    jmp_buf jmp_env;
-    int exception_index;
-    int error_code;
     int user_mode_only; /* user mode only simulation */
     uint32_t hflags;    /* CPU State */
     /* TMASK defines different execution modes */
diff --git a/target-ppc/cpu.h b/target-ppc/cpu.h
index 7f7916f..e9f9287 100644
--- a/target-ppc/cpu.h
+++ b/target-ppc/cpu.h
@@ -648,8 +648,6 @@ struct CPUPPCState {
     int bfd_mach;
     uint32_t flags;
 
-    int exception_index;
-    int error_code;
     int interrupt_request;
     uint32_t pending_interrupts;
 #if !defined(CONFIG_USER_ONLY)
@@ -674,7 +672,6 @@ struct CPUPPCState {
     opc_handler_t *opcodes[0x40];
 
     /* Those resources are used only in Qemu core */
-    jmp_buf jmp_env;
     int user_mode_only; /* user mode only simulation */
     target_ulong hflags;      /* hflags is a MSR & HFLAGS_MASK         */
     target_ulong hflags_nmsr; /* specific hflags, not comming from MSR */
diff --git a/target-sh4/cpu.h b/target-sh4/cpu.h
index 72ac82f..534ada3 100644
--- a/target-sh4/cpu.h
+++ b/target-sh4/cpu.h
@@ -114,11 +114,9 @@ typedef struct CPUSH4State {
     uint32_t expevt;		/* exception event register */
     uint32_t intevt;		/* interrupt event register */
 
-    jmp_buf jmp_env;
     int user_mode_only;
     int interrupt_request;
     int halted;
-    int exception_index;
      CPU_COMMON tlb_t utlb[UTLB_SIZE];	/* unified translation table */
     tlb_t itlb[ITLB_SIZE];	/* instruction translation table */
     void *intc_handle;
diff --git a/target-sparc/cpu.h b/target-sparc/cpu.h
index af0ebd1..b663fe2 100644
--- a/target-sparc/cpu.h
+++ b/target-sparc/cpu.h
@@ -214,9 +214,7 @@ typedef struct CPUSPARCState {
     uint32_t pil_in;   /* incoming interrupt level bitmap */
     int      psref;    /* enable fpu */
     target_ulong version;
-    jmp_buf  jmp_env;
     int user_mode_only;
-    int exception_index;
     int interrupt_index;
     int interrupt_request;
     int halted;
-- 
1.5.4.5

  reply	other threads:[~2008-05-27 15:18 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-27 15:18 [Qemu-devel] [PATCH 0/6] simplify cpu-exec new spin Glauber Costa
2008-05-27 15:18 ` [Qemu-devel] [PATCH 1/6] simplify cpu_exec Glauber Costa
2008-05-27 15:18   ` Glauber Costa [this message]
2008-05-27 15:18     ` [Qemu-devel] [PATCH 3/6] use halted attribute for i386 too Glauber Costa
2008-05-27 15:18       ` [Qemu-devel] [PATCH 4/6] simply cpu_exec further Glauber Costa
2008-05-27 15:18         ` [Qemu-devel] [PATCH 5/6] isolate mmu code in arch-specific function Glauber Costa
2008-05-27 15:18           ` [Qemu-devel] [PATCH 6/6] cpu-exec-dump Glauber Costa
2008-05-27 15:38             ` Paul Brook
2008-05-27 15:30           ` [Qemu-devel] [PATCH 5/6] isolate mmu code in arch-specific function Fabrice Bellard
2008-05-27 15:42             ` Glauber Costa
2008-05-27 15:36           ` Paul Brook
2008-05-27 16:18         ` [Qemu-devel] [PATCH 4/6] simply cpu_exec further Blue Swirl
2008-05-27 16:27           ` Glauber Costa
2008-05-27 15:34       ` [Qemu-devel] [PATCH 3/6] use halted attribute for i386 too Fabrice Bellard
2008-05-27 16:10         ` Blue Swirl
2008-05-27 21:49           ` Glauber Costa
2008-05-27 16:25         ` Glauber Costa
2008-05-27 21:21           ` Fabrice Bellard
2008-05-27 15:39     ` [Qemu-devel] [PATCH 2/6] Push common interrupt variables to cpu-defs.h Fabrice Bellard
2008-05-27 15:33   ` [Qemu-devel] [PATCH 1/6] simplify cpu_exec Paul Brook
2008-05-27 16:05     ` Blue Swirl
2008-05-27 15:37   ` Fabrice Bellard

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1211901505-30519-3-git-send-email-gcosta@redhat.com \
    --to=gcosta@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).