aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorKevin D. Kissell <kevink@paralogos.com>2009-03-31 06:59:24 -0400
committerRalf Baechle <ralf@linux-mips.org>2009-05-14 08:50:24 -0400
commitc34e6e8bdd99c746b7844c937c3a2529ef2c4437 (patch)
tree028a8f4e2ffd144ef4c3217f9df6b503617ce630 /arch
parent45d447406a19cbfd42720f066f156f4eb9d68801 (diff)
MIPS: SMTC: Bring set/clear/change_c0_## return value semantics uptodate.
Signed-off-by: Kevin D. Kissell <kevink@paralogos.com> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch')
-rw-r--r--arch/mips/include/asm/mipsregs.h19
1 files changed, 11 insertions, 8 deletions
diff --git a/arch/mips/include/asm/mipsregs.h b/arch/mips/include/asm/mipsregs.h
index 526f327475ce..1f7987793782 100644
--- a/arch/mips/include/asm/mipsregs.h
+++ b/arch/mips/include/asm/mipsregs.h
@@ -1484,14 +1484,15 @@ static inline unsigned int \
1484set_c0_##name(unsigned int set) \ 1484set_c0_##name(unsigned int set) \
1485{ \ 1485{ \
1486 unsigned int res; \ 1486 unsigned int res; \
1487 unsigned int new; \
1487 unsigned int omt; \ 1488 unsigned int omt; \
1488 unsigned long flags; \ 1489 unsigned long flags; \
1489 \ 1490 \
1490 local_irq_save(flags); \ 1491 local_irq_save(flags); \
1491 omt = __dmt(); \ 1492 omt = __dmt(); \
1492 res = read_c0_##name(); \ 1493 res = read_c0_##name(); \
1493 res |= set; \ 1494 new = res | set; \
1494 write_c0_##name(res); \ 1495 write_c0_##name(new); \
1495 __emt(omt); \ 1496 __emt(omt); \
1496 local_irq_restore(flags); \ 1497 local_irq_restore(flags); \
1497 \ 1498 \
@@ -1502,14 +1503,15 @@ static inline unsigned int \
1502clear_c0_##name(unsigned int clear) \ 1503clear_c0_##name(unsigned int clear) \
1503{ \ 1504{ \
1504 unsigned int res; \ 1505 unsigned int res; \
1506 unsigned int new; \
1505 unsigned int omt; \ 1507 unsigned int omt; \
1506 unsigned long flags; \ 1508 unsigned long flags; \
1507 \ 1509 \
1508 local_irq_save(flags); \ 1510 local_irq_save(flags); \
1509 omt = __dmt(); \ 1511 omt = __dmt(); \
1510 res = read_c0_##name(); \ 1512 res = read_c0_##name(); \
1511 res &= ~clear; \ 1513 new = res & ~clear; \
1512 write_c0_##name(res); \ 1514 write_c0_##name(new); \
1513 __emt(omt); \ 1515 __emt(omt); \
1514 local_irq_restore(flags); \ 1516 local_irq_restore(flags); \
1515 \ 1517 \
@@ -1517,9 +1519,10 @@ clear_c0_##name(unsigned int clear) \
1517} \ 1519} \
1518 \ 1520 \
1519static inline unsigned int \ 1521static inline unsigned int \
1520change_c0_##name(unsigned int change, unsigned int new) \ 1522change_c0_##name(unsigned int change, unsigned int newbits) \
1521{ \ 1523{ \
1522 unsigned int res; \ 1524 unsigned int res; \
1525 unsigned int new; \
1523 unsigned int omt; \ 1526 unsigned int omt; \
1524 unsigned long flags; \ 1527 unsigned long flags; \
1525 \ 1528 \
@@ -1527,9 +1530,9 @@ change_c0_##name(unsigned int change, unsigned int new) \
1527 \ 1530 \
1528 omt = __dmt(); \ 1531 omt = __dmt(); \
1529 res = read_c0_##name(); \ 1532 res = read_c0_##name(); \
1530 res &= ~change; \ 1533 new = res & ~change; \
1531 res |= (new & change); \ 1534 new |= (newbits & change); \
1532 write_c0_##name(res); \ 1535 write_c0_##name(new); \
1533 __emt(omt); \ 1536 __emt(omt); \
1534 local_irq_restore(flags); \ 1537 local_irq_restore(flags); \
1535 \ 1538 \