diff mbox

[2/8] kvm tools, bios: Rename struct int10_args to struct biosregs

Message ID 1313147226-12400-2-git-send-email-penberg@kernel.org (mailing list archive)
State New, archived
Headers show

Commit Message

Pekka Enberg Aug. 12, 2011, 11:07 a.m. UTC
This patch renames struct int10_args to struct biosregs in preparation for
unifying interrupt handler code.

Cc: Cyrill Gorcunov <gorcunov@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Sasha Levin <levinsasha928@gmail.com>
Signed-off-by: Pekka Enberg <penberg@kernel.org>
---
 tools/kvm/bios/int10.c       |   22 +++++-----------------
 tools/kvm/include/kvm/bios.h |   16 ++++++++++++++++
 tools/kvm/include/kvm/vesa.h |    4 ++--
 3 files changed, 23 insertions(+), 19 deletions(-)
diff mbox

Patch

diff --git a/tools/kvm/bios/int10.c b/tools/kvm/bios/int10.c
index 498a93a..22da9fa 100644
--- a/tools/kvm/bios/int10.c
+++ b/tools/kvm/bios/int10.c
@@ -6,18 +6,6 @@ 
 
 #define VESA_MAGIC ('V' + ('E' << 8) + ('S' << 16) + ('A' << 24))
 
-struct int10_args {
-	u32	eax;
-	u32	ebx;
-	u32	ecx;
-	u32	edx;
-	u32	esp;
-	u32	ebp;
-	u32	esi;
-	u32	edi;
-	u32	es;
-};
-
 /* VESA General Information table */
 struct vesa_general_info {
 	u32	signature;		/* 0 Magic number = "VESA" */
@@ -79,14 +67,14 @@  static inline void outb(unsigned short port, unsigned char val)
  * It's probably much more useful to make this print to the serial
  * line rather than print to a non-displayed VGA memory
  */
-static inline void int10_putchar(struct int10_args *args)
+static inline void int10_putchar(struct biosregs *args)
 {
 	u8 al = args->eax & 0xFF;
 
 	outb(0x3f8, al);
 }
 
-static void vbe_get_mode(struct int10_args *args)
+static void vbe_get_mode(struct biosregs *args)
 {
 	struct vminfo *info = (struct vminfo *) args->edi;
 
@@ -109,7 +97,7 @@  static void vbe_get_mode(struct int10_args *args)
 	};
 }
 
-static void vbe_get_info(struct int10_args *args)
+static void vbe_get_info(struct biosregs *args)
 {
 	struct vesa_general_info *info = (struct vesa_general_info *) args->edi;
 
@@ -127,7 +115,7 @@  static void vbe_get_info(struct int10_args *args)
 
 #define VBE_STATUS_OK		0x004F
 
-static void int10_vesa(struct int10_args *args)
+static void int10_vesa(struct biosregs *args)
 {
 	u8 al;
 
@@ -145,7 +133,7 @@  static void int10_vesa(struct int10_args *args)
 	args->eax = VBE_STATUS_OK;
 }
 
-bioscall void int10_handler(struct int10_args *args)
+bioscall void int10_handler(struct biosregs *args)
 {
 	u8 ah;
 
diff --git a/tools/kvm/include/kvm/bios.h b/tools/kvm/include/kvm/bios.h
index 9db2ab5..7651075 100644
--- a/tools/kvm/include/kvm/bios.h
+++ b/tools/kvm/include/kvm/bios.h
@@ -56,4 +56,20 @@ 
  */
 #define bioscall __attribute__((regparm(3)))
 
+#ifndef __ASSEMBLER__
+
+struct biosregs {
+	u32			eax;
+	u32			ebx;
+	u32			ecx;
+	u32			edx;
+	u32			esp;
+	u32			ebp;
+	u32			esi;
+	u32			edi;
+	u32			es;
+};
+
+#endif
+
 #endif /* BIOS_H_ */
diff --git a/tools/kvm/include/kvm/vesa.h b/tools/kvm/include/kvm/vesa.h
index 6621f68..7b9a5ce 100644
--- a/tools/kvm/include/kvm/vesa.h
+++ b/tools/kvm/include/kvm/vesa.h
@@ -11,9 +11,9 @@ 
 #define VESA_BPP	32
 
 struct kvm;
-struct int10_args;
+struct biosregs;
 
 struct framebuffer *vesa__init(struct kvm *self);
-void int10_handler(struct int10_args *args);
+void int10_handler(struct biosregs *args);
 
 #endif