Index: arch/amd64/include/asm.h
===================================================================
--- arch/amd64/include/asm.h	(revision 7910cffd4851e0ac56b045bf13deddbae09ae9ee)
+++ arch/amd64/include/asm.h	(revision 961b5f01ab0baf25db1ae2fde08e1dd39e0e62bc)
@@ -55,30 +55,21 @@
 
 
-static inline __u8 inb(__u16 port) 
-{
-	__u8 out;
-
-	__asm__ volatile (
-		"mov %1, %%dx\n"
-		"inb %%dx,%%al\n"
-		"mov %%al, %0\n"
-		:"=m"(out)
-		:"m"(port)
-		:"%rdx","%rax"
-		);
-	return out;
-}
-
-static inline __u8 outb(__u16 port,__u8 b) 
-{
-	__asm__ volatile (
-		"mov %0,%%dx\n"
-		"mov %1,%%al\n"
-		"outb %%al,%%dx\n"
-		:
-		:"m"( port), "m" (b)
-		:"%rdx","%rax"
-		);
-}
+/** Byte from port
+ *
+ * Get byte from port
+ *
+ * @param port Port to read from
+ * @return Value read
+ */
+static inline __u8 inb(__u16 port) { __u8 val; __asm__ volatile ("inb %w1, %b0 \n" : "=a" (val) : "d" (port) ); return val; }
+
+/** Byte to port
+ *
+ * Output byte to port
+ *
+ * @param port Port to write to
+ * @param val Value to write
+ */
+static inline void outb(__u16 port, __u8 val) { __asm__ volatile ("outb %b0, %w1\n" : : "a" (val), "d" (port) ); }
 
 /** Enable interrupts.
