lkml.org 
[lkml]   [2024]   [Apr]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] memblock: add no-map alloc functions
On Wed, Apr 17, 2024 at 02:31:47AM +0000, Wei Yang wrote:
> On Mon, Apr 15, 2024 at 06:26:55PM +0300, Mike Rapoport wrote:
> [...]
> >> +
> >
> >This changes behaviour of internal function, what effect will it have on
> >the users?
> >
> >> if (!base)
> >> return -ENOMEM;
> >>
> >> *res_base = base;
> >> if (nomap) {
> >> err = memblock_mark_nomap(base, size);
>
> Mike
>
> One question may not directly relevant to this thread.
>
> NOMAP doesn't apply to all arch? I took a look into the direct mapping
> function on x86, memory_map_top_down(). It seems iterate all available pfn
> instead of skipping NOMAP range.

Right, x86 does not use NOMAP.
NOMAP was introduced to ensure that device/firmware memory on arm64 does
not have an alias mapping in the direct map because MMU does not allow
alias mapping with different caching modes.

> >> - if (err)
> >> - memblock_phys_free(base, size);
> >> }
> >>
> >> kmemleak_ignore_phys(base);
> >
> >--
> >Sincerely yours,
> >Mike.
>
> --
> Wei Yang
> Help you, Help me

--
Sincerely yours,
Mike.

\
 
 \ /
  Last update: 2024-04-17 07:56    [W:0.041 / U:0.084 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site