Wrap memflush/magic with irq save/restore

This commit is contained in:
marcan 2009-03-07 06:41:43 +01:00 committed by bushing
parent ac97d347b5
commit a1570ace62

View File

@ -127,13 +127,16 @@ void _magic_bullshit(int type) {
void magic_bullshit(int type) void magic_bullshit(int type)
{ {
u32 cookie = irq_kill();
_magic_bullshit(type); _magic_bullshit(type);
if(type != 0) if(type != 0)
_magic_bullshit(0); _magic_bullshit(0);
irq_restore(cookie);
} }
void ahb_memflush(enum AHBDEV dev) void ahb_memflush(enum AHBDEV dev)
{ {
u32 cookie = irq_kill();
u16 req = 0; u16 req = 0;
u16 ack; u16 ack;
int i; int i;
@ -166,6 +169,7 @@ void ahb_memflush(enum AHBDEV dev)
if(i>=1000000) { if(i>=1000000) {
gecko_printf("ahb_memflush(%d): Flush (0x%x) did not ack!\n", dev, req); gecko_printf("ahb_memflush(%d): Flush (0x%x) did not ack!\n", dev, req);
} }
irq_restore(cookie);
} }
void dc_flushrange(const void *start, u32 size) void dc_flushrange(const void *start, u32 size)