Skip to contentSkip to conversation

Change macro definition

PATCH In review Zhang Wei 1 participant 1 message Jan 25, 2008

Subsystems (2)
lore
Share & tools
lore

Zhang Wei

author
#0 lore raw

PATCH 2/5 Change macro definition

The PPC44x_INTERRUPT_ definition is compatible with BookE interrupts. Thus we change them.

---
 arch/powerpc/kvm/booke_interrupts.S |   18 ++++++------
 arch/powerpc/kvm/emulate.c          |    2 +-
 arch/powerpc/kvm/powerpc.c          |   54 +++++++++++++++++-----------------
 include/asm-powerpc/kvm_asm.h       |   32 ++++++++++----------
 4 files changed, 53 insertions(+), 53 deletions(-)
arch/powerpc/kvm/booke_interrupts.S +9 -9
index ec5f071..be6970d 100644
@@ -53,15 +53,15 @@ _GLOBAL(kvm_trampoline_handler)
 _GLOBAL(kvm_trampoline_handler_len)
 	.long	. - kvm_trampoline_handler
 
-#define NEED_INST_MASK ((1<<PPC44x_INTERRUPT_PROGRAM) | \
-                        (1<<PPC44x_INTERRUPT_DTLB_MISS))
+#define NEED_INST_MASK ((1<<BOOKE_INTERRUPT_PROGRAM) | \
+                        (1<<BOOKE_INTERRUPT_DTLB_MISS))
 
-#define NEED_DEAR_MASK ((1<<PPC44x_INTERRUPT_DATA_STORAGE) | \
-                        (1<<PPC44x_INTERRUPT_DTLB_MISS))
+#define NEED_DEAR_MASK ((1<<BOOKE_INTERRUPT_DATA_STORAGE) | \
+                        (1<<BOOKE_INTERRUPT_DTLB_MISS))
 
-#define NEED_ESR_MASK ((1<<PPC44x_INTERRUPT_DATA_STORAGE) | \
-		       (1<<PPC44x_INTERRUPT_INST_STORAGE) | \
-		       (1<<PPC44x_INTERRUPT_DTLB_MISS))
+#define NEED_ESR_MASK ((1<<BOOKE_INTERRUPT_DATA_STORAGE) | \
+		       (1<<BOOKE_INTERRUPT_INST_STORAGE) | \
+		       (1<<BOOKE_INTERRUPT_DTLB_MISS))
 
 /* Registers:
  *  SPRG0: guest r4
@@ -238,8 +238,8 @@ resume_host_continued:
 
 	/* Program and DTLB interrupts save the complete GPR state for
 	 * emulation. */
-	cmpwi	cr0, r5, PPC44x_INTERRUPT_PROGRAM
-	cmpwi	cr1, r5, PPC44x_INTERRUPT_DTLB_MISS
+	cmpwi	cr0, r5, BOOKE_INTERRUPT_PROGRAM
+	cmpwi	cr1, r5, BOOKE_INTERRUPT_DTLB_MISS
 	cror	4*cr0+eq, 4*cr0+eq, 4*cr1+eq
 	bne	..skip_nv_store
 	stw	r14, VCPU_GPR(r14)(r4)
arch/powerpc/kvm/emulate.c +1 -1
index 4b6e463..b4b1442 100644
@@ -234,7 +234,7 @@ int kvmppc_emulate_instruction(struct kvm_run *run, struct kvm_vcpu *vcpu)
 	switch (get_op(inst)) {
 	case 3:                                                 /* trap */
 		printk("trap!\n");
-		kvmppc_sync_interrupt(vcpu, PPC44x_INTERRUPT_PROGRAM);
+		kvmppc_sync_interrupt(vcpu, BOOKE_INTERRUPT_PROGRAM);
 		advance = 0;
 		break;
 
arch/powerpc/kvm/powerpc.c +27 -27

119 lines not on this page · raw message

include/asm-powerpc/kvm_asm.h +16 -16
index ce08e47..8ed6b0b 100644
@@ -26,22 +26,22 @@
 #define VCPU_TLB_PGSZ	PPC44x_TLB_64K
 #define VCPU_SIZE_BYTES	(1<<VCPU_SIZE_LOG)
 
-#define PPC44x_INTERRUPT_CRITICAL 0
-#define PPC44x_INTERRUPT_MACHINE_CHECK 1
-#define PPC44x_INTERRUPT_DATA_STORAGE 2
-#define PPC44x_INTERRUPT_INST_STORAGE 3
-#define PPC44x_INTERRUPT_EXTERNAL 4
-#define PPC44x_INTERRUPT_ALIGNMENT 5
-#define PPC44x_INTERRUPT_PROGRAM 6
-#define PPC44x_INTERRUPT_FP_UNAVAIL 7
-#define PPC44x_INTERRUPT_SYSCALL 8
-#define PPC44x_INTERRUPT_AP_UNAVAIL 9
-#define PPC44x_INTERRUPT_DECREMENTER 10
-#define PPC44x_INTERRUPT_FIT 11
-#define PPC44x_INTERRUPT_WATCHDOG 12
-#define PPC44x_INTERRUPT_DTLB_MISS 13
-#define PPC44x_INTERRUPT_ITLB_MISS 14
-#define PPC44x_INTERRUPT_DEBUG 15
+#define BOOKE_INTERRUPT_CRITICAL 0
+#define BOOKE_INTERRUPT_MACHINE_CHECK 1
+#define BOOKE_INTERRUPT_DATA_STORAGE 2
+#define BOOKE_INTERRUPT_INST_STORAGE 3
+#define BOOKE_INTERRUPT_EXTERNAL 4
+#define BOOKE_INTERRUPT_ALIGNMENT 5
+#define BOOKE_INTERRUPT_PROGRAM 6
+#define BOOKE_INTERRUPT_FP_UNAVAIL 7
+#define BOOKE_INTERRUPT_SYSCALL 8
+#define BOOKE_INTERRUPT_AP_UNAVAIL 9
+#define BOOKE_INTERRUPT_DECREMENTER 10
+#define BOOKE_INTERRUPT_FIT 11
+#define BOOKE_INTERRUPT_WATCHDOG 12
+#define BOOKE_INTERRUPT_DTLB_MISS 13
+#define BOOKE_INTERRUPT_ITLB_MISS 14
+#define BOOKE_INTERRUPT_DEBUG 15
 
 /* MSR bits the guest is allowed to control. */
 #define GUEST_MSR_MASK (MSR_FP|MSR_FE0|MSR_FE1)
Signature · 11 lines
1.5.2


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
kvm-ppc-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/kvm-ppc-devel