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>
This commit is contained in:
Kevin D. Kissell 2009-03-31 12:59:24 +02:00 коммит произвёл Ralf Baechle
Родитель 45d447406a
Коммит c34e6e8bdd
1 изменённых файлов: 11 добавлений и 8 удалений

Просмотреть файл

@ -1484,14 +1484,15 @@ static inline unsigned int \
set_c0_##name(unsigned int set) \ set_c0_##name(unsigned int set) \
{ \ { \
unsigned int res; \ unsigned int res; \
unsigned int new; \
unsigned int omt; \ unsigned int omt; \
unsigned long flags; \ unsigned long flags; \
\ \
local_irq_save(flags); \ local_irq_save(flags); \
omt = __dmt(); \ omt = __dmt(); \
res = read_c0_##name(); \ res = read_c0_##name(); \
res |= set; \ new = res | set; \
write_c0_##name(res); \ write_c0_##name(new); \
__emt(omt); \ __emt(omt); \
local_irq_restore(flags); \ local_irq_restore(flags); \
\ \
@ -1502,14 +1503,15 @@ static inline unsigned int \
clear_c0_##name(unsigned int clear) \ clear_c0_##name(unsigned int clear) \
{ \ { \
unsigned int res; \ unsigned int res; \
unsigned int new; \
unsigned int omt; \ unsigned int omt; \
unsigned long flags; \ unsigned long flags; \
\ \
local_irq_save(flags); \ local_irq_save(flags); \
omt = __dmt(); \ omt = __dmt(); \
res = read_c0_##name(); \ res = read_c0_##name(); \
res &= ~clear; \ new = res & ~clear; \
write_c0_##name(res); \ write_c0_##name(new); \
__emt(omt); \ __emt(omt); \
local_irq_restore(flags); \ local_irq_restore(flags); \
\ \
@ -1517,9 +1519,10 @@ clear_c0_##name(unsigned int clear) \
} \ } \
\ \
static inline unsigned int \ static inline unsigned int \
change_c0_##name(unsigned int change, unsigned int new) \ change_c0_##name(unsigned int change, unsigned int newbits) \
{ \ { \
unsigned int res; \ unsigned int res; \
unsigned int new; \
unsigned int omt; \ unsigned int omt; \
unsigned long flags; \ unsigned long flags; \
\ \
@ -1527,9 +1530,9 @@ change_c0_##name(unsigned int change, unsigned int new) \
\ \
omt = __dmt(); \ omt = __dmt(); \
res = read_c0_##name(); \ res = read_c0_##name(); \
res &= ~change; \ new = res & ~change; \
res |= (new & change); \ new |= (newbits & change); \
write_c0_##name(res); \ write_c0_##name(new); \
__emt(omt); \ __emt(omt); \
local_irq_restore(flags); \ local_irq_restore(flags); \
\ \