1
1
This commit was SVN r2385.
Этот коммит содержится в:
Weikuan Yu 2004-08-29 20:07:16 +00:00
родитель 8026bf4db2
Коммит 6db1034a60
3 изменённых файлов: 57 добавлений и 39 удалений

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

@ -161,7 +161,6 @@ mca_ptl_elan_putget_desc_contruct (
desc->req = NULL;
#if OMPI_PTL_ELAN_COMP_QUEUE
/* Allocate elan memory for chained event and buff */
desc->chain_buff = (E4_Addr *) ((char *)elan_event);
desc->comp_buff = (E4_Addr *) ((char *)elan_event + ELAN_BLOCK_SIZE );
@ -170,6 +169,33 @@ mca_ptl_elan_putget_desc_contruct (
+ 2 * ELAN_BLOCK_SIZE + sizeof (E4_Event32));
desc->comp_event= (E4_Event *) ((char *)elan_event
+ 2 * ELAN_BLOCK_SIZE + 2 * sizeof (E4_Event32));
/* XXX: provide a DMA structure for each chained event */
desc->comp_dma.dma_typeSize = E4_DMA_TYPE_SIZE (
sizeof(mca_ptl_base_frag_header_t),
DMA_DataTypeByte, DMA_QueueWrite, 8);
desc->comp_dma.dma_vproc = ptl->elan_vp;
desc->comp_dma.dma_srcAddr = 0x0ULL; /* To be filled in */
desc->comp_dma.dma_dstAddr = 0x0ULL; /* To be filled in */
/* XXX: If completion is to be detected from the Queue
* there is no need to trigger a local event */
desc->comp_dma.dma_dstEvent = elan4_main2elan (ctx,
(void *) ptl->comp->input);
desc->comp_dma.dma_srcEvent = 0x0ULL;
desc->comp_dma.dma_typeSize |= RUN_DMA_CMD;
desc->comp_dma.dma_pad = NOP_CMD;
desc->comp_event->ev_CountAndType = E4_EVENT_INIT_VALUE(-32,
E4_EVENT_COPY, E4_EVENT_DTYPE_LONG, 8);
desc->comp_event->ev_Params[0] = elan4_main2elan (ctx,
(void *)desc->comp_buff);
desc->comp_event->ev_Params[1] = 0x0ULL;
/* Initialize some of the dma structures */
desc->main_dma.dma_srcEvent= elan4_main2elan(ctx,
(E4_Event *)desc->chain_event);
desc->main_dma.dma_dstEvent= 0x0ULL;
#else
desc->elan_event = elan_event;
desc->chain_event= (E4_Event32 *)
@ -177,17 +203,6 @@ mca_ptl_elan_putget_desc_contruct (
desc->chain_buff = (E4_Addr *)
((char *)elan_event + 2*sizeof (E4_Event32));
#if 0
desc->main_dma.dma_typeSize = 0;
desc->main_dma.dma_cookie = 0;
desc->main_dma.dma_vproc = 0;
/* XXX + TODO: To remove this block after verification
* Remember all the address needs to be converted
* before assigning to DMA descritpor */
desc->main_dma.dma_srcAddr = src_elan4_addr;
desc->main_dma.dma_dstAddr = dst_elan4_addr;
#endif
if (local) {
desc->main_dma.dma_srcEvent = elan4_main2elan(ctx, elan_event);
} else {

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

@ -352,8 +352,7 @@ mca_ptl_elan_init_qdma_desc (struct mca_ptl_elan_send_frag_t *frag,
desc->main_dma.dma_vproc = destvp;
desc->main_dma.dma_cookie= elan4_local_cookie (ptl->queue->tx_cpool,
E4_COOKIE_TYPE_LOCAL_DMA, destvp);
desc->main_dma.dma_srcEvent= elan4_main2elan(
ctx, (E4_Event *)desc->comp_event);
desc->main_dma.dma_srcEvent= elan4_main2elan(ctx, desc->comp_event);
desc->main_dma.dma_srcAddr = MAIN2ELAN (ctx, &desc->buff[0]);
#else
desc->main_dma.dma_srcAddr = MAIN2ELAN (ctx, &desc->buff[0]);
@ -373,7 +372,7 @@ mca_ptl_elan_init_qdma_desc (struct mca_ptl_elan_send_frag_t *frag,
}
static void
mca_ptl_elan_init_putget_desc (struct mca_ptl_elan_send_frag_t *frag,
mca_ptl_elan_init_put_desc (struct mca_ptl_elan_send_frag_t *frag,
mca_ptl_elan_module_t * ptl,
struct mca_ptl_elan_peer_t *ptl_peer,
mca_pml_base_send_request_t *pml_req,
@ -474,8 +473,17 @@ mca_ptl_elan_init_putget_desc (struct mca_ptl_elan_send_frag_t *frag,
#if OMPI_PTL_ELAN_COMP_QUEUE
/* XXX: Chain a QDMA to each queue and
* Have all the srcEvent fired to the Queue */
* Have all the srcEvent fired to the Queue
*
* XXX: The chain dma will go directly into a command stream
* so we need addend the command queue control bits.
* Allocate space from command queues hanged off the CTX.
*/
desc->comp_event->ev_Params[0] = elan4_main2elan (ctx,
(void *)desc->comp_buff);
desc->comp_event->ev_Params[1] = elan4_alloccq_space (ctx, 8, CQ_Size8K);
desc->comp_event->ev_CountAndType = E4_EVENT_INIT_VALUE(-32,
E4_EVENT_COPY, E4_EVENT_DTYPE_LONG, 8);
desc->comp_dma.dma_cookie = elan4_local_cookie(ptl->queue->tx_cpool,
E4_COOKIE_TYPE_LOCAL_DMA, ptl->elan_vp);
desc->comp_dma.dma_srcAddr = elan4_main2elan (ctx,
@ -483,19 +491,12 @@ mca_ptl_elan_init_putget_desc (struct mca_ptl_elan_send_frag_t *frag,
memcpy ((void *)desc->comp_buff, (void *)&desc->comp_dma,
sizeof (E4_DMA64));
/* XXX: The chain dma will go directly into a command stream
* so we need addend the command queue control bits.
* Allocate space from command queues hanged off the CTX.
*/
desc->comp_event->ev_Params[1] = elan4_alloccq_space (ctx, 8, CQ_Size8K);
desc->chain_dma.dma_srcEvent= elan4_main2elan(
ctx, (E4_Event *)desc->comp_event);
/* XXX: chain the comp event to the put_dma */
desc->chain_dma.dma_srcEvent= elan4_main2elan(ctx, desc->comp_event);
#else
desc->chain_dma.dma_srcEvent = elan4_main2elan (ctx, desc->elan_event);
INITEVENT_WORD (ctx, (E4_Event *) desc->elan_event, &desc->main_doneWord);
RESETEVENT_WORD (&desc->main_doneWord);
/* Be sure that padding E4_Event is not causing problems */
PRIMEEVENT_WORD (ctx, (E4_Event *)desc->elan_event, 1);
#endif
@ -615,8 +616,18 @@ mca_ptl_elan_init_get_desc (mca_ptl_elan_module_t *ptl,
*size);
#if OMPI_PTL_ELAN_COMP_QUEUE
/* XXX: Chain a QDMA to each queue and
* Have all the srcEvent fired to the Queue */
* Have all the srcEvent fired to the Queue
*
* XXX: The chain dma will go directly into a command stream
* so we need addend the command queue control bits.
* Allocate space from command queues hanged off the CTX.
*/
desc->comp_event->ev_Params[1] = elan4_alloccq_space (ctx, 8, CQ_Size8K);
desc->comp_event->ev_CountAndType = E4_EVENT_INIT_VALUE(-32,
E4_EVENT_COPY, E4_EVENT_DTYPE_LONG, 8);
desc->comp_dma.dma_cookie = elan4_local_cookie(ptl->queue->tx_cpool,
E4_COOKIE_TYPE_LOCAL_DMA, ptl->elan_vp);
desc->comp_dma.dma_srcAddr = elan4_main2elan (ctx,
@ -624,13 +635,8 @@ mca_ptl_elan_init_get_desc (mca_ptl_elan_module_t *ptl,
memcpy ((void *)desc->comp_buff, (void *)&desc->comp_dma,
sizeof (E4_DMA64));
/* XXX: The chained COMP/DMA will go directly into a command stream
* so we need addend the command queue control bits.
* Allocate space from command queues hanged off the CTX.
*/
desc->comp_event->ev_Params[1] = elan4_alloccq_space (ctx, 8, CQ_Size8K);
desc->chain_dma.dma_srcEvent= elan4_main2elan(ctx,
(E4_Event *)desc->comp_event);
/* XXX: chain the comp event to the put_dma */
desc->chain_dma.dma_srcEvent= elan4_main2elan(ctx, desc->comp_event);
#else
desc->chain_dma.dma_srcEvent = elan4_main2elan (ctx, desc->elan_event);
INITEVENT_WORD (ctx, (E4_Event *) desc->elan_event, &desc->main_doneWord);
@ -760,7 +766,7 @@ mca_ptl_elan_start_desc (mca_ptl_elan_send_frag_t * frag,
struct ompi_ptl_elan_putget_desc_t *pdesc;
pdesc = (ompi_ptl_elan_putget_desc_t *)frag->desc;
mca_ptl_elan_init_putget_desc (frag, ptl, ptl_peer, sendreq,
mca_ptl_elan_init_put_desc (frag, ptl, ptl_peer, sendreq,
offset, size, flags);
elan4_run_dma_cmd (ptl->putget->put_cmdq, (E4_DMA *) &pdesc->main_dma);
elan4_flush_cmdq_reorder (ptl->putget->put_cmdq);
@ -1069,9 +1075,6 @@ mca_ptl_elan_update_desc (struct mca_ptl_elan_module_t *ptl)
mca_ptl_elan_send_desc_done (frag,
(mca_pml_base_send_request_t *) basic->req);
/* XXX: Reset the comp event, buggy */
/*PRIMEEVENT_WORD (ctx, basic->comp_event, 1);*/
/* Work out the new front pointer */
if (rxq->qr_fptr == rxq->qr_top) {
rxq->qr_fptr = rxq->qr_base;

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

@ -207,7 +207,7 @@ typedef struct ompi_ptl_elan_comp_queue_t ompi_ptl_elan_comp_queue_t;
/* 8 byte aligned */ \
volatile E4_uint64 comp_doneWord; \
/* 8 byte aligned */ \
E4_Event32 *comp_event; /* E4_Event plus pad */ \
E4_Event *comp_event; /* E4_Event plus pad */ \
/* 8 byte aligned */ \
E4_Addr *comp_buff; \
E4_Addr *comp_pad; \