support an approach without response mail
This commit is contained in:
parent
feaf615724
commit
fae93b4304
1 changed files with 12 additions and 1 deletions
|
@ -36,6 +36,7 @@
|
|||
#include <asm/svm.h>
|
||||
|
||||
#define USE_PERFCOUNTERS 0
|
||||
#define USE_RESP_MAIL 0
|
||||
|
||||
#define SHARED_PAGES (4*(RCCE_SHM_SIZE_MAX >> PAGE_SHIFT))
|
||||
#define OWNER_SIZE ((SHARED_PAGES * sizeof(uint8_t) + PAGE_SIZE - 1) & ~(PAGE_SIZE - 1))
|
||||
|
@ -290,6 +291,7 @@ int svm_access_request(size_t addr)
|
|||
icc_send_gic_irq(remote_rank);
|
||||
request[remote_rank]++;
|
||||
|
||||
#if USE_RESP_MAIL
|
||||
#if USE_PERFCOUNTERS
|
||||
uint64_t wait_start = rdtsc();
|
||||
#endif
|
||||
|
@ -304,6 +306,13 @@ int svm_access_request(size_t addr)
|
|||
max_wait = res;
|
||||
#endif
|
||||
|
||||
#else
|
||||
while (page_owner[pageid] != RCCE_IAM) {
|
||||
icc_mail_check();
|
||||
NOP8;
|
||||
}
|
||||
#endif
|
||||
|
||||
addr &= 0xFFFFF000; // align address to page boundary
|
||||
ret = change_page_permissions(addr, addr + PAGE_SIZE, VMA_READ|VMA_WRITE|VMA_CACHEABLE);
|
||||
|
||||
|
@ -524,13 +533,15 @@ int svm_emit_page(size_t phyaddr, int ue)
|
|||
|
||||
svm_flush(phyaddr);
|
||||
|
||||
#if USE_RESP_MAIL
|
||||
// send response back to ue
|
||||
// ue is polling for the response => no irq is needed
|
||||
iRCCE_mail_send(0, SVM_RESP, 0, NULL, ue);
|
||||
#endif
|
||||
|
||||
emit[ue]++;
|
||||
viraddr = phys2virt[pageid];
|
||||
page_owner[pageid] = ue;
|
||||
viraddr = phys2virt[pageid];
|
||||
change_page_permissions(viraddr, viraddr+PAGE_SIZE, VMA_NOACCESS|VMA_READ|VMA_CACHEABLE);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue