diff mbox series

[kvm-unit-tests,RFC,01/13] x86/apic: Include asm/io.h and use those definitions to avoid duplication

Message ID 20240419125759.242870-2-papaluri@amd.com (mailing list archive)
State New, archived
Headers show
Series Introduce SEV-SNP Support | expand

Commit Message

Paluri, PavanKumar April 19, 2024, 12:57 p.m. UTC
To avoid duplication, use outb() definition from asm/io.h.

No functional change has been introduced in this patch.

Signed-off-by: Pavan Kumar Paluri <papaluri@amd.com>
---
 lib/x86/apic.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)
diff mbox series

Patch

diff --git a/lib/x86/apic.c b/lib/x86/apic.c
index 0d15147677dd..ed22820784cf 100644
--- a/lib/x86/apic.c
+++ b/lib/x86/apic.c
@@ -4,6 +4,7 @@ 
 #include "processor.h"
 #include "smp.h"
 #include "asm/barrier.h"
+#include "asm/io.h"
 
 /* xAPIC and I/O APIC are identify mapped, and never relocated. */
 static void *g_apic = (void *)APIC_DEFAULT_PHYS_BASE;
@@ -23,11 +24,6 @@  static struct apic_ops *get_apic_ops(void)
 	return this_cpu_read_apic_ops();
 }
 
-static void outb(unsigned char data, unsigned short port)
-{
-	asm volatile ("out %0, %1" : : "a"(data), "d"(port));
-}
-
 void eoi(void)
 {
 	apic_write(APIC_EOI, 0);