Rev 1731 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1731 | Rev 1780 | ||
---|---|---|---|
Line 61... | Line 61... | ||
61 | #define cp0_mask_all_int() cp0_status_write(cp0_status_read() & ~(cp0_status_im_mask)) |
61 | #define cp0_mask_all_int() cp0_status_write(cp0_status_read() & ~(cp0_status_im_mask)) |
62 | #define cp0_unmask_all_int() cp0_status_write(cp0_status_read() | cp0_status_im_mask) |
62 | #define cp0_unmask_all_int() cp0_status_write(cp0_status_read() | cp0_status_im_mask) |
63 | #define cp0_mask_int(it) cp0_status_write(cp0_status_read() & ~(1<<(cp0_status_im_shift+(it)))) |
63 | #define cp0_mask_int(it) cp0_status_write(cp0_status_read() & ~(1<<(cp0_status_im_shift+(it)))) |
64 | #define cp0_unmask_int(it) cp0_status_write(cp0_status_read() | (1<<(cp0_status_im_shift+(it)))) |
64 | #define cp0_unmask_int(it) cp0_status_write(cp0_status_read() | (1<<(cp0_status_im_shift+(it)))) |
65 | 65 | ||
66 | #define GEN_READ_CP0(nm,reg) static inline __u32 cp0_ ##nm##_read(void) \ |
66 | #define GEN_READ_CP0(nm,reg) static inline uint32_t cp0_ ##nm##_read(void) \ |
67 | { \ |
67 | { \ |
68 | __u32 retval; \ |
68 | uint32_t retval; \ |
69 | asm("mfc0 %0, $" #reg : "=r"(retval)); \ |
69 | asm("mfc0 %0, $" #reg : "=r"(retval)); \ |
70 | return retval; \ |
70 | return retval; \ |
71 | } |
71 | } |
72 | 72 | ||
73 | #define GEN_WRITE_CP0(nm,reg) static inline void cp0_ ##nm##_write(__u32 val) \ |
73 | #define GEN_WRITE_CP0(nm,reg) static inline void cp0_ ##nm##_write(uint32_t val) \ |
74 | { \ |
74 | { \ |
75 | asm("mtc0 %0, $" #reg : : "r"(val) ); \ |
75 | asm("mtc0 %0, $" #reg : : "r"(val) ); \ |
76 | } |
76 | } |
77 | 77 | ||
78 | GEN_READ_CP0(index, 0); |
78 | GEN_READ_CP0(index, 0); |