summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSuman Anna <s-anna@ti.com>2019-03-26 18:00:54 -0500
committerSam Nelson <sam.nelson@ti.com>2019-05-21 15:56:08 -0400
commit75d8759d614bcf2d8ea9d0476f9d933abd79f695 (patch)
tree6ad592b93b0d72913cb0141f1ad60316cdb6bb1e
parent3c79f85abfbf10d4de59765f27e5d658c646d1bc (diff)
downloadipc-75d8759d614bcf2d8ea9d0476f9d933abd79f695.tar.gz
omapl138: VirtQueue: Fixup mapVAtoPA() and mapPAtoVA()
The mapVAtoPA() and mapPAtoVA() functions used in the OMAPL138 VirtQueue code uses a hard-coded address translating logic that caters to only a specific set of images. The DSPs on OMAPL138 do not have MMUs, so the addresses seen in the vring control structures should be identical between the processor view and the actual DDR address. The only case where this might not be true is if the MPAX is being used to perform some address translations, but this is not the case today. So, fixup these functions to provide a one-to-one exact translation. This fixes up issues with latest upstream kernels (v5.1+) where the virtio buffers are no longer allocated from the same remoteproc device DMA pool, and so can be allocated anywhere in DDR memory (from the default Linux DMA/CMA pool). Signed-off-by: Suman Anna <s-anna@ti.com>
-rw-r--r--packages/ti/ipc/family/omapl138/VirtQueue.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/packages/ti/ipc/family/omapl138/VirtQueue.c b/packages/ti/ipc/family/omapl138/VirtQueue.c
index 8b6d12b..a1f525f 100644
--- a/packages/ti/ipc/family/omapl138/VirtQueue.c
+++ b/packages/ti/ipc/family/omapl138/VirtQueue.c
@@ -108,12 +108,12 @@ static VirtQueue_Object *queueRegistry[NUM_QUEUES] = {NULL};
static inline Void * mapPAtoVA(UInt pa)
{
- return (Void *)((pa & 0x000fffffU) | 0xc3000000U);
+ return (Void *)(pa);
}
static inline UInt mapVAtoPA(Void * va)
{
- return ((UInt)va & 0x000fffffU) | 0xc9000000U;
+ return (UInt)va;
}
/*