[PATCH] arm64/fixmap: make notes of fixed_addresses more precisely

Catalin Marinas catalin.marinas at arm.com
Fri Jul 31 08:13:35 EDT 2020


On Fri, Jul 31, 2020 at 10:47:13AM +0800, Pingfan Liu wrote:
> On Thu, Jul 30, 2020 at 7:09 PM Catalin Marinas <catalin.marinas at arm.com> wrote:
> > On Fri, Jul 10, 2020 at 09:43:22PM +0800, Pingfan Liu wrote:
> > > These 'compile-time allocated' memory buffers can occupy more than one
> > > page. So improve the note about it.
> > >
> > > Signed-off-by: Pingfan Liu <kernelfans at gmail.com>
> > > Cc: Catalin Marinas <catalin.marinas at arm.com>
> > > Cc: Will Deacon <will at kernel.org>
> > > To: linux-arm-kernel at lists.infradead.org
> > > ---
> > >  arch/arm64/include/asm/fixmap.h | 3 ++-
> > >  1 file changed, 2 insertions(+), 1 deletion(-)
> > >
> > > diff --git a/arch/arm64/include/asm/fixmap.h b/arch/arm64/include/asm/fixmap.h
> > > index f987b8a..318aee1 100644
> > > --- a/arch/arm64/include/asm/fixmap.h
> > > +++ b/arch/arm64/include/asm/fixmap.h
> > > @@ -29,7 +29,8 @@
> > >   * in the boot process.
> > >   *
> > >   * These 'compile-time allocated' memory buffers are
> > > - * page-sized. Use set_fixmap(idx,phys) to associate
> > > + * page-sized (or larger if used with an increment
> > > + * higher than 1). Use set_fixmap(idx,phys) to associate
> > >   * physical memory with fixmap indices.
> >
> > I don't get this. set_fixmap() only maps a page. Also, what's
> > "increment" in this context?
> 
> I refer to the notes in the counterpart in x86. And for the time
> being, it is the case for the ranges (FIX_FDT, FIX_FDT_END), which may
> cost more than one page size.

OK, so increment refers to the enum increment. But if we update this, we
also need to state that set_fixmap() only maps page-size buffers,
otherwise one may think that set_fixmap(FIX_FDT, phys) maps the whole
FDT. We could say that each enum increment represents a page-sized
buffer.

-- 
Catalin



More information about the linux-arm-kernel mailing list