Merge "msm: sps: Update debug message format specifier"
This commit is contained in:
commit
1204b2acd6
5 changed files with 51 additions and 43 deletions
|
@ -1,4 +1,4 @@
|
||||||
/* Copyright (c) 2011-2018, The Linux Foundation. All rights reserved.
|
/* Copyright (c) 2011-2019, The Linux Foundation. All rights reserved.
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License version 2 and
|
* it under the terms of the GNU General Public License version 2 and
|
||||||
|
@ -677,7 +677,8 @@ int sps_get_bam_debug_info(unsigned long dev, u32 option, u32 para,
|
||||||
/* Search for the target BAM device */
|
/* Search for the target BAM device */
|
||||||
bam = sps_h2bam(dev);
|
bam = sps_h2bam(dev);
|
||||||
if (bam == NULL) {
|
if (bam == NULL) {
|
||||||
pr_err("sps:Can't find any BAM with handle 0x%lx.", dev);
|
pr_err("sps:Can't find any BAM with handle 0x%pK.",
|
||||||
|
(void *)dev);
|
||||||
mutex_unlock(&sps->lock);
|
mutex_unlock(&sps->lock);
|
||||||
return SPS_ERROR;
|
return SPS_ERROR;
|
||||||
}
|
}
|
||||||
|
@ -1212,7 +1213,7 @@ struct sps_bam *sps_h2bam(unsigned long h)
|
||||||
{
|
{
|
||||||
struct sps_bam *bam;
|
struct sps_bam *bam;
|
||||||
|
|
||||||
SPS_DBG1(sps, "sps:%s: BAM handle:0x%lx.", __func__, h);
|
SPS_DBG1(sps, "sps:%s: BAM handle:0x%pK.", __func__, (void *)h);
|
||||||
|
|
||||||
if (h == SPS_DEV_HANDLE_MEM || h == SPS_DEV_HANDLE_INVALID)
|
if (h == SPS_DEV_HANDLE_MEM || h == SPS_DEV_HANDLE_INVALID)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
@ -1222,7 +1223,7 @@ struct sps_bam *sps_h2bam(unsigned long h)
|
||||||
return bam;
|
return bam;
|
||||||
}
|
}
|
||||||
|
|
||||||
SPS_ERR(sps, "sps:Can't find BAM device for handle 0x%lx.", h);
|
SPS_ERR(sps, "sps:Can't find BAM device for handle 0x%pK.", (void *)h);
|
||||||
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
@ -1327,16 +1328,17 @@ int sps_connect(struct sps_pipe *h, struct sps_connect *connect)
|
||||||
|
|
||||||
bam = sps_h2bam(dev);
|
bam = sps_h2bam(dev);
|
||||||
if (bam == NULL) {
|
if (bam == NULL) {
|
||||||
SPS_ERR(sps, "sps:Invalid BAM device handle: 0x%lx", dev);
|
SPS_ERR(sps, "sps:Invalid BAM device handle: 0x%pK",
|
||||||
|
(void *)dev);
|
||||||
result = SPS_ERROR;
|
result = SPS_ERROR;
|
||||||
goto exit_err;
|
goto exit_err;
|
||||||
}
|
}
|
||||||
|
|
||||||
mutex_lock(&bam->lock);
|
mutex_lock(&bam->lock);
|
||||||
SPS_DBG2(bam, "sps:sps_connect: bam %pa src 0x%lx dest 0x%lx mode %s",
|
SPS_DBG2(bam, "sps:sps_connect: bam %pa src 0x%pK dest 0x%pK mode %s",
|
||||||
BAM_ID(bam),
|
BAM_ID(bam),
|
||||||
connect->source,
|
(void *)connect->source,
|
||||||
connect->destination,
|
(void *)connect->destination,
|
||||||
connect->mode == SPS_MODE_SRC ? "SRC" : "DEST");
|
connect->mode == SPS_MODE_SRC ? "SRC" : "DEST");
|
||||||
|
|
||||||
/* Allocate resources for the specified connection */
|
/* Allocate resources for the specified connection */
|
||||||
|
@ -1400,10 +1402,10 @@ int sps_disconnect(struct sps_pipe *h)
|
||||||
}
|
}
|
||||||
|
|
||||||
SPS_DBG2(bam,
|
SPS_DBG2(bam,
|
||||||
"sps:sps_disconnect: bam %pa src 0x%lx dest 0x%lx mode %s",
|
"sps:sps_disconnect: bam %pa src 0x%pK dest 0x%pK mode %s",
|
||||||
BAM_ID(bam),
|
BAM_ID(bam),
|
||||||
pipe->connect.source,
|
(void *)pipe->connect.source,
|
||||||
pipe->connect.destination,
|
(void *)pipe->connect.destination,
|
||||||
pipe->connect.mode == SPS_MODE_SRC ? "SRC" : "DEST");
|
pipe->connect.mode == SPS_MODE_SRC ? "SRC" : "DEST");
|
||||||
|
|
||||||
result = SPS_ERROR;
|
result = SPS_ERROR;
|
||||||
|
@ -1799,7 +1801,8 @@ int sps_device_reset(unsigned long dev)
|
||||||
/* Search for the target BAM device */
|
/* Search for the target BAM device */
|
||||||
bam = sps_h2bam(dev);
|
bam = sps_h2bam(dev);
|
||||||
if (bam == NULL) {
|
if (bam == NULL) {
|
||||||
SPS_ERR(sps, "sps:Invalid BAM device handle: 0x%lx", dev);
|
SPS_ERR(sps, "sps:Invalid BAM device handle: 0x%pK",
|
||||||
|
(void *)dev);
|
||||||
result = SPS_ERROR;
|
result = SPS_ERROR;
|
||||||
goto exit_err;
|
goto exit_err;
|
||||||
}
|
}
|
||||||
|
@ -1810,7 +1813,8 @@ int sps_device_reset(unsigned long dev)
|
||||||
result = sps_bam_reset(bam);
|
result = sps_bam_reset(bam);
|
||||||
mutex_unlock(&bam->lock);
|
mutex_unlock(&bam->lock);
|
||||||
if (result) {
|
if (result) {
|
||||||
SPS_ERR(sps, "sps:Fail to reset BAM device: 0x%lx", dev);
|
SPS_ERR(sps, "sps:Fail to reset BAM device: 0x%pK",
|
||||||
|
(void *)dev);
|
||||||
goto exit_err;
|
goto exit_err;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* Copyright (c) 2011-2017, The Linux Foundation. All rights reserved.
|
/* Copyright (c) 2011-2017, 2019, The Linux Foundation. All rights reserved.
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License version 2 and
|
* it under the terms of the GNU General Public License version 2 and
|
||||||
|
@ -884,8 +884,8 @@ int sps_bam_pipe_connect(struct sps_pipe *bam_pipe,
|
||||||
else
|
else
|
||||||
iova = bam_pipe->connect.source_iova;
|
iova = bam_pipe->connect.source_iova;
|
||||||
SPS_DBG2(dev,
|
SPS_DBG2(dev,
|
||||||
"sps:BAM %pa pipe %d uses IOVA 0x%lx.\n",
|
"sps:BAM %pa pipe %d uses IOVA 0x%pK.\n",
|
||||||
BAM_ID(dev), pipe_index, iova);
|
BAM_ID(dev), pipe_index, (void *)iova);
|
||||||
hw_params.peer_phys_addr = (u32)iova;
|
hw_params.peer_phys_addr = (u32)iova;
|
||||||
} else {
|
} else {
|
||||||
hw_params.peer_phys_addr = peer_bam->props.phys_addr;
|
hw_params.peer_phys_addr = peer_bam->props.phys_addr;
|
||||||
|
@ -907,9 +907,9 @@ int sps_bam_pipe_connect(struct sps_pipe *bam_pipe,
|
||||||
hw_params.data_base =
|
hw_params.data_base =
|
||||||
(phys_addr_t)bam_pipe->connect.data.iova;
|
(phys_addr_t)bam_pipe->connect.data.iova;
|
||||||
SPS_DBG2(dev,
|
SPS_DBG2(dev,
|
||||||
"sps:BAM %pa pipe %d uses IOVA 0x%lx for data FIFO.\n",
|
"sps:BAM %pa pipe %d uses IOVA 0x%pK for data FIFO.\n",
|
||||||
BAM_ID(dev), pipe_index,
|
BAM_ID(dev), pipe_index,
|
||||||
bam_pipe->connect.data.iova);
|
(void *)(bam_pipe->connect.data.iova));
|
||||||
} else {
|
} else {
|
||||||
hw_params.data_base = map->data.phys_base;
|
hw_params.data_base = map->data.phys_base;
|
||||||
}
|
}
|
||||||
|
@ -960,9 +960,9 @@ int sps_bam_pipe_connect(struct sps_pipe *bam_pipe,
|
||||||
hw_params.desc_base =
|
hw_params.desc_base =
|
||||||
(phys_addr_t)bam_pipe->connect.desc.iova;
|
(phys_addr_t)bam_pipe->connect.desc.iova;
|
||||||
SPS_DBG2(dev,
|
SPS_DBG2(dev,
|
||||||
"sps:BAM %pa pipe %d uses IOVA 0x%lx for desc FIFO.\n",
|
"sps:BAM %pa pipe %d uses IOVA 0x%pK for desc FIFO.\n",
|
||||||
BAM_ID(dev), pipe_index,
|
BAM_ID(dev), pipe_index,
|
||||||
bam_pipe->connect.desc.iova);
|
(void *)(bam_pipe->connect.desc.iova));
|
||||||
} else {
|
} else {
|
||||||
hw_params.desc_base = map->desc.phys_base;
|
hw_params.desc_base = map->desc.phys_base;
|
||||||
}
|
}
|
||||||
|
@ -1412,8 +1412,9 @@ int sps_bam_pipe_transfer_one(struct sps_bam *dev,
|
||||||
u32 next_write;
|
u32 next_write;
|
||||||
static int show_recom;
|
static int show_recom;
|
||||||
|
|
||||||
SPS_DBG(dev, "sps:BAM %pa pipe %d addr 0x%x size 0x%x flags 0x%x\n",
|
SPS_DBG(dev, "sps:BAM %pa pipe %d addr 0x%pK size 0x%x flags 0x%x\n",
|
||||||
BAM_ID(dev), pipe_index, addr, size, flags);
|
BAM_ID(dev), pipe_index,
|
||||||
|
(void *)(long)addr, size, flags);
|
||||||
|
|
||||||
/* Is this a BAM-to-BAM or satellite connection? */
|
/* Is this a BAM-to-BAM or satellite connection? */
|
||||||
if ((pipe->state & (BAM_STATE_BAM2BAM | BAM_STATE_REMOTE))) {
|
if ((pipe->state & (BAM_STATE_BAM2BAM | BAM_STATE_REMOTE))) {
|
||||||
|
@ -1937,8 +1938,8 @@ static void pipe_handler_eot(struct sps_bam *dev, struct sps_pipe *pipe)
|
||||||
user = &pipe->sys.user_ptrs[offset / sizeof(struct sps_iovec)];
|
user = &pipe->sys.user_ptrs[offset / sizeof(struct sps_iovec)];
|
||||||
for (;;) {
|
for (;;) {
|
||||||
SPS_DBG(dev,
|
SPS_DBG(dev,
|
||||||
"sps:%s; pipe index:%d; iovec addr:0x%x; size:0x%x; flags:0x%x; enabled:0x%x; *user is %s NULL.\n",
|
"sps:%s; pipe index:%d; iovec addr:0x%pK; size:0x%x; flags:0x%x; enabled:0x%x; *user is %s NULL.\n",
|
||||||
__func__, pipe->pipe_index, cache->addr,
|
__func__, pipe->pipe_index, (void *)(long)cache->addr,
|
||||||
cache->size, cache->flags, enabled,
|
cache->size, cache->flags, enabled,
|
||||||
(*user == NULL) ? "" : "not");
|
(*user == NULL) ? "" : "not");
|
||||||
|
|
||||||
|
@ -2226,8 +2227,8 @@ int sps_bam_pipe_get_iovec(struct sps_bam *dev, u32 pipe_index,
|
||||||
pipe->sys.acked_offset = 0;
|
pipe->sys.acked_offset = 0;
|
||||||
|
|
||||||
SPS_DBG(dev,
|
SPS_DBG(dev,
|
||||||
"sps:%s; pipe index:%d; iovec addr:0x%x; size:0x%x; flags:0x%x; acked_offset:0x%x.\n",
|
"sps:%s; pipe index:%d; iovec addr:0x%pK; size:0x%x; flags:0x%x; acked_offset:0x%x.\n",
|
||||||
__func__, pipe->pipe_index, desc->addr,
|
__func__, pipe->pipe_index, (void *)(long)desc->addr,
|
||||||
desc->size, desc->flags, pipe->sys.acked_offset);
|
desc->size, desc->flags, pipe->sys.acked_offset);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
/* Copyright (c) 2011-2013, 2015, The Linux Foundation. All rights reserved.
|
/* Copyright (c) 2011-2013, 2015, 2019 The Linux Foundation.
|
||||||
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License version 2 and
|
* it under the terms of the GNU General Public License version 2 and
|
||||||
|
@ -380,7 +381,7 @@ int sps_dma_device_de_init(unsigned long h)
|
||||||
|
|
||||||
dev = sps_dma_find_device(h);
|
dev = sps_dma_find_device(h);
|
||||||
if (dev == NULL) {
|
if (dev == NULL) {
|
||||||
SPS_ERR(sps, "sps:BAM-DMA: not registered: %lx", h);
|
SPS_ERR(sps, "sps:BAM-DMA: not registered: %pK", (void *)h);
|
||||||
result = SPS_ERROR;
|
result = SPS_ERROR;
|
||||||
goto exit_err;
|
goto exit_err;
|
||||||
}
|
}
|
||||||
|
@ -546,8 +547,8 @@ int sps_alloc_dma_chan(const struct sps_alloc_dma_chan *alloc,
|
||||||
|
|
||||||
dev = sps_dma_find_device(alloc->dev);
|
dev = sps_dma_find_device(alloc->dev);
|
||||||
if (dev == NULL) {
|
if (dev == NULL) {
|
||||||
SPS_ERR(sps, "sps:BAM-DMA: invalid BAM handle: %lx",
|
SPS_ERR(sps, "sps:BAM-DMA: invalid BAM handle: %pK",
|
||||||
alloc->dev);
|
(void *)alloc->dev);
|
||||||
goto exit_err;
|
goto exit_err;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -620,7 +621,8 @@ int sps_free_dma_chan(struct sps_dma_chan *chan)
|
||||||
|
|
||||||
dev = sps_dma_find_device(chan->dev);
|
dev = sps_dma_find_device(chan->dev);
|
||||||
if (dev == NULL) {
|
if (dev == NULL) {
|
||||||
SPS_ERR(sps, "sps:BAM-DMA: invalid BAM handle: %lx", chan->dev);
|
SPS_ERR(sps, "sps:BAM-DMA: invalid BAM handle: %pK",
|
||||||
|
(void *)chan->dev);
|
||||||
result = SPS_ERROR;
|
result = SPS_ERROR;
|
||||||
goto exit_err;
|
goto exit_err;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* Copyright (c) 2011-2013, 2015, 2017, The Linux Foundation.
|
/* Copyright (c) 2011-2013, 2015, 2017, 2019, The Linux Foundation.
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
@ -75,8 +75,8 @@ phys_addr_t sps_mem_alloc_io(u32 bytes)
|
||||||
return SPS_ADDR_INVALID;
|
return SPS_ADDR_INVALID;
|
||||||
}
|
}
|
||||||
|
|
||||||
SPS_DBG3(sps, "sps:sps_mem_alloc_io.phys=%pa.virt=0x%lx.size=0x%x.",
|
SPS_DBG3(sps, "sps:sps_mem_alloc_io.phys=%pa.virt=0x%pK.size=0x%x.",
|
||||||
&phys_addr, virt_addr, bytes);
|
&phys_addr, (void *)virt_addr, bytes);
|
||||||
|
|
||||||
return phys_addr;
|
return phys_addr;
|
||||||
}
|
}
|
||||||
|
@ -92,8 +92,8 @@ void sps_mem_free_io(phys_addr_t phys_addr, u32 bytes)
|
||||||
iomem_offset = phys_addr - iomem_phys;
|
iomem_offset = phys_addr - iomem_phys;
|
||||||
virt_addr = (uintptr_t) iomem_virt + iomem_offset;
|
virt_addr = (uintptr_t) iomem_virt + iomem_offset;
|
||||||
|
|
||||||
SPS_DBG3(sps, "sps:sps_mem_free_io.phys=%pa.virt=0x%lx.size=0x%x.",
|
SPS_DBG3(sps, "sps:sps_mem_free_io.phys=%pa.virt=0x%pK.size=0x%x.",
|
||||||
&phys_addr, virt_addr, bytes);
|
&phys_addr, (void *)virt_addr, bytes);
|
||||||
|
|
||||||
gen_pool_free(pool, virt_addr, bytes);
|
gen_pool_free(pool, virt_addr, bytes);
|
||||||
total_free += bytes;
|
total_free += bytes;
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
/* Copyright (c) 2011-2015, 2017, The Linux Foundation. All rights reserved.
|
/* Copyright (c) 2011-2015, 2017, 2019, The Linux Foundation.
|
||||||
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License version 2 and
|
* it under the terms of the GNU General Public License version 2 and
|
||||||
|
@ -380,8 +381,8 @@ static struct sps_connection *sps_rm_create(struct sps_pipe *pipe)
|
||||||
map->src.bam = sps_h2bam(map->src.dev);
|
map->src.bam = sps_h2bam(map->src.dev);
|
||||||
if (map->src.bam == NULL) {
|
if (map->src.bam == NULL) {
|
||||||
if (map->src.dev != SPS_DEV_HANDLE_MEM) {
|
if (map->src.dev != SPS_DEV_HANDLE_MEM) {
|
||||||
SPS_ERR(sps, "sps:Invalid BAM handle: %pa",
|
SPS_ERR(sps, "sps:Invalid BAM handle: %pK",
|
||||||
&map->src.dev);
|
(void *)(&map->src.dev));
|
||||||
goto exit_err;
|
goto exit_err;
|
||||||
}
|
}
|
||||||
map->src.pipe_index = SPS_BAM_PIPE_INVALID;
|
map->src.pipe_index = SPS_BAM_PIPE_INVALID;
|
||||||
|
@ -389,8 +390,8 @@ static struct sps_connection *sps_rm_create(struct sps_pipe *pipe)
|
||||||
map->dest.bam = sps_h2bam(map->dest.dev);
|
map->dest.bam = sps_h2bam(map->dest.dev);
|
||||||
if (map->dest.bam == NULL) {
|
if (map->dest.bam == NULL) {
|
||||||
if (map->dest.dev != SPS_DEV_HANDLE_MEM) {
|
if (map->dest.dev != SPS_DEV_HANDLE_MEM) {
|
||||||
SPS_ERR(sps, "sps:Invalid BAM handle: %pa",
|
SPS_ERR(sps, "sps:Invalid BAM handle: %pK",
|
||||||
&map->dest.dev);
|
(void *)(&map->dest.dev));
|
||||||
goto exit_err;
|
goto exit_err;
|
||||||
}
|
}
|
||||||
map->dest.pipe_index = SPS_BAM_PIPE_INVALID;
|
map->dest.pipe_index = SPS_BAM_PIPE_INVALID;
|
||||||
|
@ -399,8 +400,8 @@ static struct sps_connection *sps_rm_create(struct sps_pipe *pipe)
|
||||||
/* Check the BAM device for the pipe */
|
/* Check the BAM device for the pipe */
|
||||||
if ((dir == SPS_MODE_SRC && map->src.bam == NULL) ||
|
if ((dir == SPS_MODE_SRC && map->src.bam == NULL) ||
|
||||||
(dir != SPS_MODE_SRC && map->dest.bam == NULL)) {
|
(dir != SPS_MODE_SRC && map->dest.bam == NULL)) {
|
||||||
SPS_ERR(sps, "sps:Invalid BAM endpt: dir %d src %pa dest %pa",
|
SPS_ERR(sps, "sps:Invalid BAM endpt: dir %d src %pK dest %pK",
|
||||||
dir, &map->src.dev, &map->dest.dev);
|
dir, (void *)(&map->src.dev), (void *)(&map->dest.dev));
|
||||||
goto exit_err;
|
goto exit_err;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue