[PATCH v3] arm: Fix memory attribute inconsistencies when using fixmap

Jon Medhurst (Tixy) tixy at linaro.org
Thu Apr 6 06:46:43 PDT 2017


On Wed, 2017-04-05 at 23:42 +0100, Russell King - ARM Linux wrote:
> On Tue, Apr 04, 2017 at 08:31:27AM +0100, Ard Biesheuvel wrote:
> > diff --git a/arch/arm/include/asm/mmu.h b/arch/arm/include/asm/mmu.h
> > index a5b47421059d..80dfeb8ce8f2 100644
> > --- a/arch/arm/include/asm/mmu.h
> > +++ b/arch/arm/include/asm/mmu.h
> > @@ -1,6 +1,8 @@
> >  #ifndef __ARM_MMU_H
> >  #define __ARM_MMU_H
> >  
> > +struct machine_desc;
> > +
> >  #ifdef CONFIG_MMU
> >  
> >  typedef struct {
> > @@ -24,6 +26,8 @@ typedef struct {
> >  #define ASID(mm)	(0)
> >  #endif
> >  
> > +void early_mm_init(const struct machine_desc *mdesc);
> > +
> >  #else
> >  
> >  /*
> > @@ -35,6 +39,8 @@ typedef struct {
> >  	unsigned long	end_brk;
> >  } mm_context_t;
> >  
> > +static inline void early_mm_init(const struct machine_desc *mdesc) { }
> > +
> 
> Why are we stuffing this into mmu.h?  mmu.h is not the header file for
> arch/arm/mm/mmu.c - although they have the same base filename, they are
> not really related.
> 
> asm/mmu.h is supposed to be a kernel-wide include file for the mm_context_t
> thing, and should not be filled with arch-private stuff.
> 
> Please find a better location for this.

In arch/arm/mm/mm.h ?

Or as early_mm_init() is replacing early_paging_init() in setup.c, and
that is currently handled by a local extern statement, keeping doing the
same? That keeps the diff neater which is a plus for a patch that should
be backported to stable kernels.

-- 
Tixy




More information about the linux-arm-kernel mailing list