remove DMA call
This commit is contained in:
@ -10,6 +10,7 @@
|
|||||||
* HISTORY:
|
* HISTORY:
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#ifdef USE_DMA
|
||||||
#include <ihk/dma.h>
|
#include <ihk/dma.h>
|
||||||
#include <amemcpy.h>
|
#include <amemcpy.h>
|
||||||
|
|
||||||
@ -48,3 +49,4 @@ int memcpy_async(unsigned long dest, unsigned long src,
|
|||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|||||||
@ -55,6 +55,7 @@ static void handler_init(void)
|
|||||||
|
|
||||||
unsigned long data[1024] __attribute__((aligned(64)));
|
unsigned long data[1024] __attribute__((aligned(64)));
|
||||||
|
|
||||||
|
#ifdef USE_DMA
|
||||||
static void dma_test(void)
|
static void dma_test(void)
|
||||||
{
|
{
|
||||||
struct ihk_dma_request req;
|
struct ihk_dma_request req;
|
||||||
@ -102,6 +103,7 @@ static void dma_test(void)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
extern char *ihk_mc_get_kernel_args(void);
|
extern char *ihk_mc_get_kernel_args(void);
|
||||||
|
|
||||||
@ -182,8 +184,10 @@ static void rest_init(void)
|
|||||||
|
|
||||||
handler_init();
|
handler_init();
|
||||||
|
|
||||||
|
#ifdef USE_DMA
|
||||||
ihk_mc_dma_init();
|
ihk_mc_dma_init();
|
||||||
dma_test();
|
dma_test();
|
||||||
|
#endif
|
||||||
//pc_test();
|
//pc_test();
|
||||||
|
|
||||||
ap_init();
|
ap_init();
|
||||||
|
|||||||
@ -106,7 +106,6 @@ static void send_syscall(struct syscall_request *req, int cpu)
|
|||||||
struct ikc_scd_packet packet;
|
struct ikc_scd_packet packet;
|
||||||
struct syscall_response *res;
|
struct syscall_response *res;
|
||||||
unsigned long fin;
|
unsigned long fin;
|
||||||
int w;
|
|
||||||
struct syscall_params *scp;
|
struct syscall_params *scp;
|
||||||
struct ihk_ikc_channel_desc *syscall_channel;
|
struct ihk_ikc_channel_desc *syscall_channel;
|
||||||
|
|
||||||
@ -127,19 +126,20 @@ static void send_syscall(struct syscall_request *req, int cpu)
|
|||||||
res->status = 0;
|
res->status = 0;
|
||||||
req->valid = 0;
|
req->valid = 0;
|
||||||
|
|
||||||
|
#ifdef USE_DMA
|
||||||
memcpy_async(scp->request_pa,
|
memcpy_async(scp->request_pa,
|
||||||
virt_to_phys(req), sizeof(*req), 0, &fin);
|
virt_to_phys(req), sizeof(*req), 0, &fin);
|
||||||
|
|
||||||
memcpy_async_wait(&scp->post_fin);
|
memcpy_async_wait(&scp->post_fin);
|
||||||
scp->post_va->v[0] = scp->post_idx;
|
scp->post_va->v[0] = scp->post_idx;
|
||||||
|
|
||||||
w = cpu + 1;
|
|
||||||
|
|
||||||
memcpy_async_wait(&fin);
|
memcpy_async_wait(&fin);
|
||||||
|
#else
|
||||||
|
memcpy(scp->request_va, req, sizeof(*req));
|
||||||
|
#endif
|
||||||
|
|
||||||
barrier();
|
barrier();
|
||||||
scp->request_va->valid = 1;
|
scp->request_va->valid = 1;
|
||||||
*(unsigned int *)scp->doorbell_va = w;
|
*(unsigned int *)scp->doorbell_va = cpu + 1;
|
||||||
|
|
||||||
#ifdef SYSCALL_BY_IKC
|
#ifdef SYSCALL_BY_IKC
|
||||||
packet.msg = SCD_MSG_SYSCALL_ONESIDE;
|
packet.msg = SCD_MSG_SYSCALL_ONESIDE;
|
||||||
|
|||||||
Reference in New Issue
Block a user