On 02/24/2011 11:48 PM, Anthony Liguori wrote:
Signed-off-by: Anthony Liguori<aliguori@xxxxxxxxxx> diff --git a/lib/x86/io.h b/lib/x86/io.h new file mode 100644 index 0000000..bd6341c --- /dev/null +++ b/lib/x86/io.h @@ -0,0 +1,40 @@ +#ifndef IO_H +#define IO_H + +static inline unsigned char inb(unsigned short port) +{ + unsigned char value; + asm volatile("inb %w1, %0" : "=a" (value) : "Nd" (port)); + return value; +}
Are those %[wb] really needed? gcc should do the right thing based on the argument type.
Might as well put all of that into processor.h. -- error compiling committee.c: too many arguments to function -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html