forked from M-Labs/artiq
runtime: remove useless copy of flush_cpu_dcache().
ksupport used to not link to libbase, I think.
This commit is contained in:
parent
b3b1ea71c5
commit
d3dcb4b8a2
|
@ -10,25 +10,6 @@
|
||||||
|
|
||||||
static unsigned int last_transmission;
|
static unsigned int last_transmission;
|
||||||
|
|
||||||
static void _flush_cpu_dcache(void)
|
|
||||||
{
|
|
||||||
unsigned long dccfgr;
|
|
||||||
unsigned long cache_set_size;
|
|
||||||
unsigned long cache_ways;
|
|
||||||
unsigned long cache_block_size;
|
|
||||||
unsigned long cache_size;
|
|
||||||
int i;
|
|
||||||
|
|
||||||
dccfgr = mfspr(SPR_DCCFGR);
|
|
||||||
cache_ways = 1 << (dccfgr & SPR_ICCFGR_NCW);
|
|
||||||
cache_set_size = 1 << ((dccfgr & SPR_DCCFGR_NCS) >> 3);
|
|
||||||
cache_block_size = (dccfgr & SPR_DCCFGR_CBS) ? 32 : 16;
|
|
||||||
cache_size = cache_set_size * cache_ways * cache_block_size;
|
|
||||||
|
|
||||||
for (i = 0; i < cache_size; i += cache_block_size)
|
|
||||||
mtspr(SPR_DCBIR, i);
|
|
||||||
}
|
|
||||||
|
|
||||||
void mailbox_send(void *ptr)
|
void mailbox_send(void *ptr)
|
||||||
{
|
{
|
||||||
last_transmission = (unsigned int)ptr;
|
last_transmission = (unsigned int)ptr;
|
||||||
|
@ -58,7 +39,7 @@ void *mailbox_receive(void)
|
||||||
return NULL;
|
return NULL;
|
||||||
else {
|
else {
|
||||||
if(r) {
|
if(r) {
|
||||||
_flush_cpu_dcache();
|
flush_cpu_dcache();
|
||||||
}
|
}
|
||||||
return (void *)r;
|
return (void *)r;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue