From: shaozhengchao <shaozhengchao@huawei.com>
To: Herbert Xu <herbert@gondor.apana.org.au>
Cc: <linux-crypto@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
<liulongfang@huawei.com>, <davem@davemloft.net>,
<xuzaibo@huawei.com>, <weiyongjun1@huawei.com>,
<yuehaibing@huawei.com>
Subject: Re: [PATCH] crypto: hisilicon/hpre - don't use GFP_KERNEL to alloc mem during softirq
Date: Tue, 19 Jul 2022 11:31:02 +0800 [thread overview]
Message-ID: <00e710db-3fcd-1fb7-3d19-b5761e241adc@huawei.com> (raw)
In-Reply-To: <YtYT+JeYj7vlz9Xp@gondor.apana.org.au>
On 2022/7/19 10:16, Herbert Xu wrote:
> On Tue, Jul 19, 2022 at 10:10:42AM +0800, Zhengchao Shao wrote:
>>
>> @@ -252,7 +252,7 @@ static int hpre_prepare_dma_buf(struct hpre_asym_request *hpre_req,
>> if (unlikely(shift < 0))
>> return -EINVAL;
>>
>> - ptr = dma_alloc_coherent(dev, ctx->key_sz, tmp, GFP_KERNEL);
>> + ptr = dma_alloc_coherent(dev, ctx->key_sz, tmp, flags);
>
> How about just using GFP_ATOMIC unconditinoally?
>
> Cheers,
Hi Herbert:
Thank you for your reply. I think differentiate the application
scenarios of GFP flags, which can be more suitable to allocate memory.
Zhengchao Shao
next prev parent reply other threads:[~2022-07-19 3:31 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-19 2:10 Zhengchao Shao
2022-07-19 2:16 ` Herbert Xu
2022-07-19 3:31 ` shaozhengchao [this message]
2022-07-19 3:47 ` Herbert Xu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=00e710db-3fcd-1fb7-3d19-b5761e241adc@huawei.com \
--to=shaozhengchao@huawei.com \
--cc=davem@davemloft.net \
--cc=herbert@gondor.apana.org.au \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=liulongfang@huawei.com \
--cc=weiyongjun1@huawei.com \
--cc=xuzaibo@huawei.com \
--cc=yuehaibing@huawei.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®