diff options
Diffstat (limited to 'arch/mips/include')
| -rw-r--r-- | arch/mips/include/asm/mipsregs.h | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/arch/mips/include/asm/mipsregs.h b/arch/mips/include/asm/mipsregs.h index 0417516503f6..526f327475ce 100644 --- a/arch/mips/include/asm/mipsregs.h +++ b/arch/mips/include/asm/mipsregs.h | |||
| @@ -1391,11 +1391,11 @@ static inline void tlb_write_random(void) | |||
| 1391 | static inline unsigned int \ | 1391 | static inline unsigned int \ |
| 1392 | set_c0_##name(unsigned int set) \ | 1392 | set_c0_##name(unsigned int set) \ |
| 1393 | { \ | 1393 | { \ |
| 1394 | unsigned int res; \ | 1394 | unsigned int res, new; \ |
| 1395 | \ | 1395 | \ |
| 1396 | res = read_c0_##name(); \ | 1396 | res = read_c0_##name(); \ |
| 1397 | res |= set; \ | 1397 | new = res | set; \ |
| 1398 | write_c0_##name(res); \ | 1398 | write_c0_##name(new); \ |
| 1399 | \ | 1399 | \ |
| 1400 | return res; \ | 1400 | return res; \ |
| 1401 | } \ | 1401 | } \ |
| @@ -1403,24 +1403,24 @@ set_c0_##name(unsigned int set) \ | |||
| 1403 | static inline unsigned int \ | 1403 | static inline unsigned int \ |
| 1404 | clear_c0_##name(unsigned int clear) \ | 1404 | clear_c0_##name(unsigned int clear) \ |
| 1405 | { \ | 1405 | { \ |
| 1406 | unsigned int res; \ | 1406 | unsigned int res, new; \ |
| 1407 | \ | 1407 | \ |
| 1408 | res = read_c0_##name(); \ | 1408 | res = read_c0_##name(); \ |
| 1409 | res &= ~clear; \ | 1409 | new = res & ~clear; \ |
| 1410 | write_c0_##name(res); \ | 1410 | write_c0_##name(new); \ |
| 1411 | \ | 1411 | \ |
| 1412 | return res; \ | 1412 | return res; \ |
| 1413 | } \ | 1413 | } \ |
| 1414 | \ | 1414 | \ |
| 1415 | static inline unsigned int \ | 1415 | static inline unsigned int \ |
| 1416 | change_c0_##name(unsigned int change, unsigned int new) \ | 1416 | change_c0_##name(unsigned int change, unsigned int val) \ |
| 1417 | { \ | 1417 | { \ |
| 1418 | unsigned int res; \ | 1418 | unsigned int res, new; \ |
| 1419 | \ | 1419 | \ |
| 1420 | res = read_c0_##name(); \ | 1420 | res = read_c0_##name(); \ |
| 1421 | res &= ~change; \ | 1421 | new = res & ~change; \ |
| 1422 | res |= (new & change); \ | 1422 | new |= (val & change); \ |
| 1423 | write_c0_##name(res); \ | 1423 | write_c0_##name(new); \ |
| 1424 | \ | 1424 | \ |
| 1425 | return res; \ | 1425 | return res; \ |
| 1426 | } | 1426 | } |
