}
shm->kaddr = tee_shm_pool_p2v(tee->dev, ptee->shm_pool, shm->paddr);
if (!shm->kaddr) {
- dev_err(tee->dev, "%s: p2v(%p)=0\n", __func__,
- (void *)shm->paddr);
+ dev_err(tee->dev, "%s: p2v(%pad)=0\n", __func__,
+ &shm->paddr);
tee_shm_pool_free(tee->dev, ptee->shm_pool, shm->paddr, NULL);
devm_kfree(tee->dev, shm);
return ERR_PTR(-EFAULT);
if (ptee->shm_cached)
shm->flags |= TEE_SHM_CACHED;
- dev_dbg(tee->dev, "%s: kaddr=%p, paddr=%p, shm=%p, size %x:%x\n",
- __func__, shm->kaddr, (void *)shm->paddr, shm,
+ dev_dbg(tee->dev, "%s: kaddr=%p, paddr=%pad, shm=%p, size %x:%x\n",
+ __func__, shm->kaddr, &shm->paddr, shm,
(unsigned int)shm->size_req, (unsigned int)shm->size_alloc);
return shm;
shm->tee = tee;
- dev_dbg(_DEV(tee), "%s: shm=%p, paddr=%p,s=%d/%d app=\"%s\" pid=%d\n",
- __func__, shm, (void *)shm->paddr, (int)shm->size_req,
+ dev_dbg(_DEV(tee), "%s: shm=%p, paddr=%pad,s=%d/%d app=\"%s\" pid=%d\n",
+ __func__, shm, &shm->paddr, (int)shm->size_req,
(int)shm->size_alloc, current->comm, current->pid);
pfn = shm->paddr >> PAGE_SHIFT;
INMSG();
ctx = shm->ctx;
- dev_dbg(_DEV(ctx->tee), "%s: shm=%p, paddr=%p,s=%d/%d app=\"%s\" pid=%d\n",
- __func__, shm, (void *)shm->paddr, (int)shm->size_req,
+ dev_dbg(_DEV(ctx->tee), "%s: shm=%p, paddr=%pad,s=%d/%d app=\"%s\" pid=%d\n",
+ __func__, shm, &shm->paddr, (int)shm->size_req,
(int)shm->size_alloc, current->comm, current->pid);
tee_shm_free_io(shm);
if (!ret)
vma->vm_private_data = (void *)shm;
- dev_dbg(_DEV(shm->ctx->tee), "%s: map the shm (p@=%p,s=%dKiB) => %x\n",
- __func__, (void *)shm->paddr, (int)size / 1024,
+ dev_dbg(_DEV(shm->ctx->tee), "%s: map the shm (p@=%pad,s=%dKiB) => %x\n",
+ __func__, &shm->paddr, (int)size / 1024,
(unsigned int)vma->vm_start);
OUTMSG(ret);
{
struct tee_shm *shm = db->priv;
- dev_dbg(_DEV(shm->ctx->tee), "%s: kmap the shm (p@=%p, v@=%p, s=%zdKiB)\n",
- __func__, (void *)shm->paddr, (void *)shm->kaddr,
+ dev_dbg(_DEV(shm->ctx->tee), "%s: kmap the shm (p@=%pad, v@=%p, s=%zdKiB)\n",
+ __func__, &shm->paddr, (void *)shm->kaddr,
shm->size_alloc / 1024);
/*
* A this stage, a shm allocated by the tee
if (!list_empty(&tee->list_rpc_shm)) {
list_for_each(pshm, &tee->list_rpc_shm) {
shm = list_entry(pshm, struct tee_shm, entry);
- if ((void *)shm->paddr == shm_io->buffer)
+ if ((void *)(unsigned long)shm->paddr == shm_io->buffer)
goto found;
}
}
shm->flags |= TEEC_MEM_DMABUF;
- dev_dbg(_DEV(tee), "fd=%d @p=%p is_tee=%d db=%p\n", fd,
- (void *)shm->paddr, sdb->tee_allocated, dma_buf);
+ dev_dbg(_DEV(tee), "fd=%d @p=%pad is_tee=%d db=%p\n", fd,
+ &shm->paddr, sdb->tee_allocated, dma_buf);
goto exit;
buf_unmap:
goto err;
}
- dev_dbg(_DEV(tee), "fd=%d @p=%p\n",
- c_shm->d.fd, (void *)shm->paddr);
+ dev_dbg(_DEV(tee), "fd=%d @p=%pad\n",
+ c_shm->d.fd, &shm->paddr);
} else if (c_shm->d.fd) {
ret = tee_shm_db_get(tee, shm,
c_shm->d.fd, c_shm->flags, size, offset);
{
struct tee *tee = ctx->tee;
- dev_dbg(_DEV(tee), "%s: > shm=%p flags=%08x paddr=%p\n",
- __func__, (void *)shm, shm->flags, (void *)shm->paddr);
+ dev_dbg(_DEV(tee), "%s: > shm=%p flags=%08x paddr=%pad\n",
+ __func__, (void *)shm, shm->flags, &shm->paddr);
BUG_ON(!shm);
BUG_ON(!(shm->flags & TEE_SHM_MEMREF));