Index: arch/ia32/include/asm.h
===================================================================
--- arch/ia32/include/asm.h	(revision e1587177838ccb47b7357d72843335806e36fa18)
+++ arch/ia32/include/asm.h	(revision 105a0dc62ab1ba02f53bb1c87af7e2815dd1e328)
@@ -39,8 +39,4 @@
 extern void interrupt_handlers(void);
 
-extern __u8 inb(int port);
-extern __u16 inw(int port);
-extern __u32 inl(int port);
-
 extern void enable_l_apic_in_msr(void);
 
@@ -99,6 +95,4 @@
 static inline void outw(__u16 port, __u16 val) { __asm__ volatile ("outw %w0, %w1\n" : : "a" (val), "d" (port) ); }
 
-
-
 /** Double word to port
  *
@@ -109,4 +103,31 @@
  */
 static inline void outl(__u16 port, __u32 val) { __asm__ volatile ("outl %l0, %w1\n" : : "a" (val), "d" (port) ); }
+
+/** 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; }
+
+/** Word from port
+ *
+ * Get word from port
+ *
+ * @param port Port to read from
+ * @return Value read
+ */
+static inline __u16 inw(__u16 port) { __u16 val; __asm__ volatile ("inw %w1, %w0 \n" : "=a" (val) : "d" (port) ); return val; }
+
+/** Double word from port
+ *
+ * Get double word from port
+ *
+ * @param port Port to read from
+ * @return Value read
+ */
+static inline __u32 inl(__u16 port) { __u32 val; __asm__ volatile ("inl %w1, %l0 \n" : "=a" (val) : "d" (port) ); return val; }
 
 /** Set priority level low
Index: arch/ia32/src/asm.S
===================================================================
--- arch/ia32/src/asm.S	(revision e1587177838ccb47b7357d72843335806e36fa18)
+++ arch/ia32/src/asm.S	(revision 105a0dc62ab1ba02f53bb1c87af7e2815dd1e328)
@@ -156,37 +156,4 @@
 #	handler 192 256
 h_end:
-
-
-## I/O input (byte)
-#
-# Get a byte from I/O port and store it AL.
-#
-inb:
-	xorl %eax,%eax
-	movl 4(%esp),%edx
-	inb %dx,%al
-	ret
-
-
-## I/O input (word)
-#
-# Get a word from I/O port and store it AX.
-#
-inw:
-	xorl %eax,%eax
-	movl 4(%esp),%edx
-	inw %dx,%ax
-	ret
-
-
-## I/O input (dword)
-#
-# Get a dword from I/O port and store it EAX.
-#
-inl:
-	xorl %eax,%eax
-	movl 4(%esp),%edx
-	inl %dx,%eax
-	ret
 
 
