1
1

Fixing OSHMEM 64-bit compiler warnings/picky errors in MXM enabled components.

This commit was SVN r29239.
Этот коммит содержится в:
Joshua Ladd 2013-09-24 21:48:57 +00:00
родитель eee8e9bb92
Коммит ac421fc1b9
3 изменённых файлов: 50 добавлений и 25 удалений

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

@ -31,7 +31,8 @@ int mca_atomic_mxm_cswap(void *target,
{
unsigned my_pe;
uint8_t nlong_order;
uint64_t remote_addr;
//uint64_t remote_addr;
void *remote_addr;
int ptl_id;
mxm_send_req_t sreq;
mxm_error_t mxm_err;
@ -77,7 +78,8 @@ int mca_atomic_mxm_cswap(void *target,
}
if (!mca_memheap.memheap_get_cached_mkey(pe,
(unsigned long) target,
//(unsigned long) target,
target,
ptl_id,
&remote_addr)) {
ATOMIC_ERROR("[#%d] %p is not address of symmetric variable",

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

@ -32,7 +32,8 @@ int mca_atomic_mxm_fadd(void *target,
{
unsigned my_pe;
uint8_t nlong_order;
uint64_t remote_addr;
//uint64_t remote_addr;
void *remote_addr;
int ptl_id;
mxm_send_req_t sreq;
mxm_error_t mxm_err;
@ -78,7 +79,8 @@ int mca_atomic_mxm_fadd(void *target,
}
if (!mca_memheap.memheap_get_cached_mkey(pe,
(unsigned long) target,
//(unsigned long) target,
target,
ptl_id,
&remote_addr)) {
ATOMIC_ERROR("[#%d] %p is not address of symmetric variable",

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

@ -543,14 +543,16 @@ mca_spml_mkey_t *mca_spml_ikrit_register(void* addr,
mkeys[i].va_base = 0;
} else {
mkeys[i].key = 0;
mkeys[i].va_base = (unsigned long) addr;
//mkeys[i].va_base = (unsigned long) addr;
mkeys[i].va_base = addr;
}
mkeys[i].spml_context = 0;
break;
case MXM_PTL_SELF:
mkeys[i].key = 0;
mkeys[i].spml_context = 0;
mkeys[i].va_base = (unsigned long) addr;
//mkeys[i].va_base = (unsigned long) addr;
mkeys[i].va_base = addr;
break;
case MXM_PTL_RDMA:
#if MXM_API < MXM_VERSION(1,5)
@ -559,7 +561,8 @@ mca_spml_mkey_t *mca_spml_ikrit_register(void* addr,
mkeys[i].ib.lkey = mkeys[i].ib.rkey = 0;
#endif
mkeys[i].spml_context = 0;
mkeys[i].va_base = (unsigned long) addr;
//mkeys[i].va_base = (unsigned long) addr;
mkeys[i].va_base = addr;
break;
default:
@ -651,7 +654,8 @@ static int mca_spml_ikrit_get_helper(mxm_send_req_t *sreq,
{
/* shmem spec states that get() operations are blocking. So it is enough
to have single mxm request. Also we count on mxm doing copy */
uint64_t rva;
//uint64_t rva;
void *rva;
mca_spml_mkey_t *r_mkey;
int ptl_id;
@ -664,7 +668,8 @@ static int mca_spml_ikrit_get_helper(mxm_send_req_t *sreq,
* Get the address to the remote rkey.
**/
r_mkey = mca_memheap.memheap_get_cached_mkey(src,
(unsigned long) src_addr,
//(unsigned long) src_addr,
src_addr,
ptl_id,
&rva);
if (!r_mkey) {
@ -706,7 +711,8 @@ static inline int mca_spml_ikrit_get_shm(void *src_addr,
int src)
{
int ptl_id;
uint64_t rva;
//uint64_t rva;
void *rva;
mca_spml_mkey_t *r_mkey;
ptl_id = get_ptl_id(src);
@ -717,7 +723,8 @@ static inline int mca_spml_ikrit_get_shm(void *src_addr,
return OSHMEM_ERROR;
r_mkey = mca_memheap.memheap_get_cached_mkey(src,
(unsigned long) src_addr,
//(unsigned long) src_addr,
src_addr,
ptl_id,
&rva);
if (!r_mkey) {
@ -727,7 +734,8 @@ static inline int mca_spml_ikrit_get_shm(void *src_addr,
return OSHMEM_ERROR;
}
if (OPAL_UNLIKELY(!mca_memheap.memheap_is_symmetric_addr((unsigned long)src_addr) || (unsigned long)src_addr == rva))
//if (OPAL_UNLIKELY(!mca_memheap.memheap_is_symmetric_addr((unsigned long)src_addr) || (unsigned long)src_addr == rva))
if (OPAL_UNLIKELY(!mca_memheap.memheap_is_symmetric_addr(src_addr) || src_addr == rva))
return OSHMEM_ERROR;
SPML_VERBOSE(100,
@ -940,7 +948,8 @@ static inline int mca_spml_ikrit_put_internal(void* dst_addr,
void **handle,
int zcopy)
{
uint64_t rva;
//uint64_t rva;
void *rva;
mca_spml_ikrit_put_request_t *put_req;
int ptl_id;
mca_spml_mkey_t *r_mkey;
@ -954,7 +963,8 @@ static inline int mca_spml_ikrit_put_internal(void* dst_addr,
ptl_id = get_ptl_id(dst);
/* Get rkey of remote PE (dst proc) which must be on memheap */
r_mkey = mca_memheap.memheap_get_cached_mkey(dst,
(unsigned long) dst_addr,
//(unsigned long) dst_addr,
dst_addr,
ptl_id,
&rva);
if (!r_mkey) {
@ -971,7 +981,8 @@ static inline int mca_spml_ikrit_put_internal(void* dst_addr,
#endif
if (ptl_id == MXM_PTL_SHM) {
if (OPAL_LIKELY(mca_memheap.memheap_is_symmetric_addr((unsigned long)dst_addr) && (unsigned long)dst_addr != rva)) {
//if (OPAL_LIKELY(mca_memheap.memheap_is_symmetric_addr((unsigned long)dst_addr) && (unsigned long)dst_addr != rva)) {
if (OPAL_LIKELY(mca_memheap.memheap_is_symmetric_addr(dst_addr) && dst_addr != rva)) {
memcpy((void *) (unsigned long) rva, src_addr, size);
/* call progress as often as we would have with regular put */
if (++count % SPML_IKRIT_PACKETS_PER_SYNC == 0)
@ -981,7 +992,8 @@ static inline int mca_spml_ikrit_put_internal(void* dst_addr,
/* segment not mapped - fallback to rmda */
ptl_id = MXM_PTL_RDMA;
r_mkey = mca_memheap.memheap_get_cached_mkey(dst,
(unsigned long) dst_addr,
//(unsigned long) dst_addr,
dst_addr,
ptl_id,
&rva);
if (!r_mkey) {
@ -1052,7 +1064,8 @@ static inline int mca_spml_ikrit_put_internal(void* dst_addr,
#endif
if (mca_spml_ikrit.mxm_peers[dst]->pe_relay >= 0
&& mca_memheap_base_detect_addr_type((unsigned long) dst_addr)
//&& mca_memheap_base_detect_addr_type((unsigned long) dst_addr)
&& mca_memheap_base_detect_addr_type(dst_addr)
== ADDR_USER) {
put_req->mxm_req.op.am.hid = 0;
put_req->mxm_req.op.am.imm_data = dst;
@ -1117,7 +1130,8 @@ int mca_spml_ikrit_put_simple(void* dst_addr,
void* src_addr,
int dst)
{
uint64_t rva;
//uint64_t rva;
void *rva;
mxm_send_req_t mxm_req;
mxm_wait_t wait;
int ptl_id;
@ -1127,7 +1141,8 @@ int mca_spml_ikrit_put_simple(void* dst_addr,
ptl_id = get_ptl_id(dst);
/* Get rkey of remote PE (dst proc) which must be on memheap */
r_mkey = mca_memheap.memheap_get_cached_mkey(dst,
(unsigned long) dst_addr,
//(unsigned long) dst_addr,
dst_addr,
ptl_id,
&rva);
if (!r_mkey) {
@ -1143,7 +1158,8 @@ int mca_spml_ikrit_put_simple(void* dst_addr,
#endif
if (ptl_id == MXM_PTL_SHM) {
if (OPAL_LIKELY(mca_memheap.memheap_is_symmetric_addr((unsigned long)dst_addr) && (unsigned long)dst_addr != rva)) {
//if (OPAL_LIKELY(mca_memheap.memheap_is_symmetric_addr((unsigned long)dst_addr) && (unsigned long)dst_addr != rva)) {
if (OPAL_LIKELY(mca_memheap.memheap_is_symmetric_addr(dst_addr) && dst_addr != rva)) {
memcpy((void *) (unsigned long) rva, src_addr, size);
/* call progress as often as we would have with regular put */
if (++count % SPML_IKRIT_PACKETS_PER_SYNC == 0)
@ -1153,7 +1169,8 @@ int mca_spml_ikrit_put_simple(void* dst_addr,
/* segment not mapped - fallback to rmda */
ptl_id = MXM_PTL_RDMA;
r_mkey = mca_memheap.memheap_get_cached_mkey(dst,
(unsigned long) dst_addr,
//(unsigned long) dst_addr,
dst_addr,
ptl_id,
&rva);
if (!r_mkey) {
@ -1273,26 +1290,30 @@ static void mxm_relay_handler(mxm_conn_h conn,
size_t offset,
int is_lf)
{
uint64_t va, rva;
//uint64_t va, rva;
void *va, *rva;
char *pkt_data;
mca_spml_mkey_t *r_mkey;
int ptl_id;
mxm_peer_t *peer;
if (offset == 0) {
va = *(uint64_t *) data;
//va = *(uint64_t *) data;
va = data;
pkt_data = (char *) data + sizeof(va);
len -= sizeof(va);
if (!is_lf) {
/* we expect more fragments: save destination virtual address */
peer = mxm_conn_ctx_get(conn);
peer->dst_va = va;
//peer->dst_va = va;
peer->dst_va = (uintptr_t) va;
}
} else {
/* next fragment: use saved va and offset to compute va */
pkt_data = data;
peer = mxm_conn_ctx_get(conn);
va = peer->dst_va + offset - sizeof(va);
//va = peer->dst_va + offset - sizeof(va);
va = (void *)(peer->dst_va + offset - sizeof(va));
}
ptl_id = get_ptl_id(imm);