mirror of
https://github.com/fail0verflow/mini.git
synced 2026-09-01 23:34:00 -05:00
Mebbe speed up IPC a bit
This commit is contained in:
4
ipc.c
4
ipc.c
@@ -90,7 +90,7 @@ void ipc_post(u32 code, u32 tag, u32 num_args, ...)
|
||||
}
|
||||
va_end(ap);
|
||||
}
|
||||
dc_flushrange((void*)&out_queue[out_tail], 32);
|
||||
dc_flush_block_fast((void*)&out_queue[out_tail]);
|
||||
out_tail = (out_tail+1)&(IPC_OUT_SIZE-1);
|
||||
poke_outtail(out_tail);
|
||||
write32(HW_IPC_ARMCTRL, IPC_CTRL_IRQ_IN | IPC_CTRL_OUT);
|
||||
@@ -148,7 +148,7 @@ static void process_in(void)
|
||||
|
||||
//gecko_printf("IPC: process in %d @ %p\n",in_head,req);
|
||||
|
||||
dc_invalidaterange((void*)req, 32);
|
||||
dc_inval_block_fast((void*)req);
|
||||
|
||||
//gecko_printf("IPC: req %08x %08x [%08x %08x %08x %08x %08x %08x]\n", req->code, req->tag,
|
||||
// req->args[0], req->args[1], req->args[2], req->args[3], req->args[4], req->args[5]);
|
||||
|
||||
2
memory.c
2
memory.c
@@ -138,7 +138,7 @@ void ahb_flush_to(enum AHBDEV type)
|
||||
{
|
||||
u32 cookie = irq_kill();
|
||||
_ahb_flush_to(type);
|
||||
if(type != 0)
|
||||
if(type != AHB_STARLET)
|
||||
_ahb_flush_to(AHB_STARLET);
|
||||
irq_restore(cookie);
|
||||
}
|
||||
|
||||
14
memory.h
14
memory.h
@@ -82,5 +82,19 @@ static inline u32 get_far(void)
|
||||
return data;
|
||||
}
|
||||
|
||||
void _ahb_flush_to(enum AHBDEV dev);
|
||||
|
||||
static inline void dc_inval_block_fast(void *block)
|
||||
{
|
||||
__asm__ volatile ( "mcr\tp15, 0, %0, c7, c6, 1" :: "r" (block) );
|
||||
_ahb_flush_to(AHB_STARLET); //TODO: check if really needed and if not, remove
|
||||
}
|
||||
|
||||
static inline void dc_flush_block_fast(void *block)
|
||||
{
|
||||
__asm__ volatile ( "mcr\tp15, 0, %0, c7, c10, 1" :: "r" (block) );
|
||||
__asm__ volatile ( "mcr\tp15, 0, %0, c7, c10, 4" :: "r" (0) );
|
||||
ahb_flush_from(AHB_1); //TODO: check if really needed and if not, remove
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user