lkml.org 
[lkml]   [2021]   [Dec]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2] of/fdt: Don't worry about non-memory region overlap for no-map
On Wed, Dec 15, 2021 at 11:49:37AM +0200, Mike Rapoport wrote:
>
> On Tue, Dec 14, 2021 at 11:20:11PM -0800, Stephen Boyd wrote:
> > @@ -482,9 +482,11 @@ static int __init early_init_dt_reserve_memory_arch(phys_addr_t base,
> > if (nomap) {
> > /*
> > * If the memory is already reserved (by another region), we
> > - * should not allow it to be marked nomap.
> > + * should not allow it to be marked nomap, but don't worry
> > + * if the region isn't memory as it won't be mapped.
> > */
> > - if (memblock_is_region_reserved(base, size))
> > + if (memblock_overlaps_region(&memblock.memory, base, size) &&
> > + memblock_is_region_reserved(base, size))

One more small thing. Maybe add pr_warn() here?

> > return -EBUSY;
> >
> > return memblock_mark_nomap(base, size);

--
Sincerely yours,
Mike.

\
 
 \ /
  Last update: 2021-12-15 11:02    [W:0.106 / U:1.228 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site