Rev 226 | Rev 253 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 226 | Rev 252 | ||
---|---|---|---|
Line 51... | Line 51... | ||
51 | 51 | ||
52 | static inline __u8 inb(__u16 port) |
52 | static inline __u8 inb(__u16 port) |
53 | { |
53 | { |
54 | __u8 out; |
54 | __u8 out; |
55 | 55 | ||
56 | asm ( |
56 | __asm__ volatile ( |
57 | "mov %1, %%dx;" |
57 | "mov %1, %%dx;" |
58 | "inb %%dx,%%al;" |
58 | "inb %%dx,%%al;" |
59 | "mov %%al, %0;" |
59 | "mov %%al, %0;" |
60 | :"=m"(out) |
60 | :"=m"(out) |
61 | :"m"(port) |
61 | :"m"(port) |
62 | :"%dx","%al" |
62 | :"%rdx","%rax" |
63 | ); |
63 | ); |
64 | return out; |
64 | return out; |
65 | } |
65 | } |
66 | 66 | ||
67 | static inline __u8 outb(__u16 port,__u8 b) |
67 | static inline __u8 outb(__u16 port,__u8 b) |
68 | { |
68 | { |
69 | asm ( |
69 | __asm__ volatile ( |
70 | "mov %0,%%dx;" |
70 | "mov %0,%%dx;" |
71 | "mov %1,%%al;" |
71 | "mov %1,%%al;" |
72 | "outb %%al,%%dx;" |
72 | "outb %%al,%%dx;" |
73 | : |
73 | : |
74 | :"m"( port), "m" (b) |
74 | :"m"( port), "m" (b) |
75 | :"%dx","%al" |
75 | :"%rdx","%rax" |
76 | ); |
76 | ); |
77 | } |
77 | } |
78 | 78 | ||
79 | /** Set priority level low |
79 | /** Set priority level low |
80 | * |
80 | * |