lkml.org 
[lkml]   [2021]   [Mar]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v2 3/5] crypto: hisilicon/sgl - add some dfx logs
From
Date
However, I think this log can be used to quickly locate the function or 
module if dma alloc failed.


On 2021/3/30 15:56, Joe Perches wrote:
> On Tue, 2021-03-30 at 15:39 +0800, Kai Ye wrote:
>> Add some dfx logs in some abnormal exit situations.
> []
>> diff --git a/drivers/crypto/hisilicon/sgl.c b/drivers/crypto/hisilicon/sgl.c
> []
>> @@ -87,8 +87,10 @@ struct hisi_acc_sgl_pool *hisi_acc_create_sgl_pool(struct device *dev,
>> block[i].sgl = dma_alloc_coherent(dev, block_size,
>> &block[i].sgl_dma,
>> GFP_KERNEL);
>> - if (!block[i].sgl)
>> + if (!block[i].sgl) {
>> + dev_err(dev, "Fail to allocate hw SG buffer!\n");
> This doesn't seem useful as dma_alloc_coherent does a dump_stack
> by default on OOM.
>
>
> .
>

\
 
 \ /
  Last update: 2021-03-30 11:25    [W:0.040 / U:0.040 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site