2020-02-04 14:08:52

by Horia Geanta

[permalink] [raw]
Subject: Re: [PATCH v7 1/9] crypto: caam - allocate RNG instantiation descriptor with GFP_DMA

On 1/27/2020 6:57 PM, Andrey Smirnov wrote:
> Be consistent with the rest of the codebase and use GFP_DMA when
> allocating memory for a CAAM JR descriptor.
>
Please use GFP_DMA32 instead.
Device is not limited to less than 32 bits of addressing
in any of its incarnations.

s/GFP_DMA/GFP_DMA32 should be performed throughout caam driver.
(But of course, I wouldn't include this change in current patch series).

Horia


2020-02-24 16:40:46

by Andrey Smirnov

[permalink] [raw]
Subject: Re: [PATCH v7 1/9] crypto: caam - allocate RNG instantiation descriptor with GFP_DMA

On Tue, Feb 4, 2020 at 6:08 AM Horia Geanta <[email protected]> wrote:
>
> On 1/27/2020 6:57 PM, Andrey Smirnov wrote:
> > Be consistent with the rest of the codebase and use GFP_DMA when
> > allocating memory for a CAAM JR descriptor.
> >
> Please use GFP_DMA32 instead.
> Device is not limited to less than 32 bits of addressing
> in any of its incarnations.
>
> s/GFP_DMA/GFP_DMA32 should be performed throughout caam driver.
> (But of course, I wouldn't include this change in current patch series).
>

Will do in v8.

Thanks,
Andrey Smirnov

2020-03-16 04:15:40

by Andrey Smirnov

[permalink] [raw]
Subject: Re: [PATCH v7 1/9] crypto: caam - allocate RNG instantiation descriptor with GFP_DMA

On Tue, Feb 4, 2020 at 6:08 AM Horia Geanta <[email protected]> wrote:
>
> On 1/27/2020 6:57 PM, Andrey Smirnov wrote:
> > Be consistent with the rest of the codebase and use GFP_DMA when
> > allocating memory for a CAAM JR descriptor.
> >
> Please use GFP_DMA32 instead.
> Device is not limited to less than 32 bits of addressing
> in any of its incarnations.
>
> s/GFP_DMA/GFP_DMA32 should be performed throughout caam driver.
> (But of course, I wouldn't include this change in current patch series).
>

Hmm, I am triggering
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/mm/slub.c?h=v5.6-rc6#n1721
by using GFP_DMA32. AFAICT, GFP_DMA32 can't be used in SLUB/SLAB
allocated memory:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/mm/internal.h?h=v5.6-rc6#n32

I'll stick with GFP_DMA for now, unless you have a different preference.

Thanks,
Andrey Smirnov

2020-03-17 15:21:16

by Horia Geanta

[permalink] [raw]
Subject: Re: [PATCH v7 1/9] crypto: caam - allocate RNG instantiation descriptor with GFP_DMA

On 3/16/2020 6:15 AM, Andrey Smirnov wrote:
> On Tue, Feb 4, 2020 at 6:08 AM Horia Geanta <[email protected]> wrote:
>>
>> On 1/27/2020 6:57 PM, Andrey Smirnov wrote:
>>> Be consistent with the rest of the codebase and use GFP_DMA when
>>> allocating memory for a CAAM JR descriptor.
>>>
>> Please use GFP_DMA32 instead.
>> Device is not limited to less than 32 bits of addressing
>> in any of its incarnations.
>>
>> s/GFP_DMA/GFP_DMA32 should be performed throughout caam driver.
>> (But of course, I wouldn't include this change in current patch series).
>>
>
> Hmm, I am triggering
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/mm/slub.c?h=v5.6-rc6#n1721
> by using GFP_DMA32. AFAICT, GFP_DMA32 can't be used in SLUB/SLAB
> allocated memory:
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/mm/internal.h?h=v5.6-rc6#n32
>
Indeed.

> I'll stick with GFP_DMA for now, unless you have a different preference.
>
I'm ok with this, will deal with memory allocation separately.

Thanks,
Horia