[PATCH] arm64: Force SPARSEMEM_VMEMMAP as the only memory management model

Catalin Marinas catalin.marinas at arm.com
Wed Apr 21 14:02:37 BST 2021


On Wed, Apr 21, 2021 at 10:18:56AM +0530, Anshuman Khandual wrote:
> On 4/20/21 3:05 PM, Catalin Marinas wrote:
> > diff --git a/arch/arm64/include/asm/memory.h b/arch/arm64/include/asm/memory.h
> > index b943879c1c24..15018dc59554 100644
> > --- a/arch/arm64/include/asm/memory.h
> > +++ b/arch/arm64/include/asm/memory.h
> > @@ -329,7 +329,7 @@ static inline void *phys_to_virt(phys_addr_t x)
> >   */
> >  #define ARCH_PFN_OFFSET		((unsigned long)PHYS_PFN_OFFSET)
> >  
> > -#if !defined(CONFIG_SPARSEMEM_VMEMMAP) || defined(CONFIG_DEBUG_VIRTUAL)
> > +#if defined(CONFIG_DEBUG_VIRTUAL)
> 
> A small nit. Should this be #ifdef CONFIG_DEBUG_VIRTUAL instead ?

Yeah, for consistency I changed it to #ifdef.

> This is
> an user selectable config and the conditional check here does not have an
> #elseif part either. But then there are similar such instances else where
> on arm64 platform as well.

I'm not sure I get it. What would an #elseif need to check? We already
have an #else block for this #ifdef.

-- 
Catalin



More information about the linux-arm-kernel mailing list