[PATCHv2 13/18] arm64: mm: add functions to walk tables in fixmap

Mark Rutland mark.rutland at arm.com
Tue Jan 5 03:08:06 PST 2016


On Mon, Jan 04, 2016 at 02:49:46PM -0800, Laura Abbott wrote:
> On 01/04/2016 09:56 AM, Mark Rutland wrote:
> >As a prepratory step to allow us to allocate early page tables from
> >unmapped memory using memblock_alloc, add new p??_fixmap* functions that
> >can be used to walk page tables outside of the linear mapping by using
> >fixmap slots.
> >
> >Signed-off-by: Mark Rutland <mark.rutland at arm.com>
> >Cc: Ard Biesheuvel <ard.biesheuvel at linaro.org>
> >Cc: Catalin Marinas <catalin.marinas at arm.com>
> >Cc: Jeremy Linton <jeremy.linton at arm.com>
> >Cc: Laura Abbott <labbott at fedoraproject.org>
> >Cc: Will Deacon <will.deacon at arm.com>
> >---
> >  arch/arm64/include/asm/fixmap.h  | 10 ++++++++++
> >  arch/arm64/include/asm/pgtable.h | 26 ++++++++++++++++++++++++++
> >  2 files changed, 36 insertions(+)

> >+#define pgd_fixmap(addr)		((pgd_t *)set_fixmap_offset(FIX_PGD, addr))
> >+#define pgd_fixmap_unmap()		clear_fixmap(FIX_PGD)

> Bikeshed: p??_fixmap_offset doesn't make it obvious that this is an
> operation with a side effect. It seems more similar to
> p??_offset_kernel which is read only. Perhaps it's the lack of set/map
> in the name.

I agree.

I've locally changed them to p??_set_fixmap{,_offset}, p??_clear_fixmap,
to match the usual fixmap function naming.

Thanks,
Mark.



More information about the linux-arm-kernel mailing list