patch-2.1.116 linux/include/asm-i386/processor.h
Next file: linux/include/asm-i386/system.h
Previous file: linux/include/asm-i386/pgtable.h
Back to the patch index
Back to the overall index
- Lines: 28
- Date:
Mon Aug 10 09:12:56 1998
- Orig file:
v2.1.115/linux/include/asm-i386/processor.h
- Orig date:
Tue Jul 21 00:15:33 1998
diff -u --recursive --new-file v2.1.115/linux/include/asm-i386/processor.h linux/include/asm-i386/processor.h
@@ -127,22 +127,12 @@
* Cyrix CPU indexed register access macros
*/
-extern inline unsigned char getCx86(unsigned char reg)
-{
- unsigned char data;
+#define getCx86(reg) ({ outb((reg), 0x22); inb(0x23); })
- __asm__ __volatile__("movb %1,%%al\n\t"
- "outb %%al,$0x22\n\t"
- "inb $0x23,%%al" : "=a" (data) : "q" (reg));
- return data;
-}
-
-extern inline void setCx86(unsigned char reg, unsigned char data)
-{
- __asm__ __volatile__("outb %%al,$0x22\n\t"
- "movb %1,%%al\n\t"
- "outb %%al,$0x23" : : "a" (reg), "q" (data));
-}
+#define setCx86(reg, data) do { \
+ outb((reg), 0x22); \
+ outb((data), 0x23); \
+} while (0)
/*
* Bus types (default is ISA, but people can check others with these..)
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov