On Fri, 16 Jun 2017 14:49:51 -0400 Johannes Weiner <han...@cmpxchg.org> wrote:

> On Wed, Jun 14, 2017 at 12:26:46AM -0700, Guenter Roeck wrote:
> > Hi,
> > 
> > I see the following build error in -next when building hexagon images.
> > 
> >   CC      arch/hexagon/kernel/asm-offsets.s
> > In file included from ./include/linux/memcontrol.h:30:0,
> >                  from ./include/linux/swap.h:8,
> >                  from ./arch/hexagon/include/asm/pgtable.h:27,
> >                  from ./include/linux/mm.h:70,
> >                  from arch/hexagon/kernel/asm-offsets.c:28:
> > ./include/linux/vmstat.h: In function '__inc_zone_page_state':
> > ./include/linux/vmstat.h:294:2: error: implicit declaration of function 
> > 'page_zone' [-Werror=implicit-function-declaration]
> > ./include/linux/vmstat.h:294:2: warning: passing argument 1 of 
> > '__inc_zone_state' makes pointer from integer without a cast [enabled by 
> > default]
> > ./include/linux/vmstat.h:267:20: note: expected 'struct zone *' but 
> > argument is of type 'int'
> 
> vmstat.h depends on definitions in mm.h, but mm.h through the above
> chain includes vmstat.h first. It worked in my x86 test because x86
> pgtable.h doesn't include swap.h.
> 
> The headers are a bit of a mess. memcontrol.h is supposed to be a
> lower level header than mm.h and vmstat.h, yet the new accounting
> functions depend on mm.h definitions.
> 
> Let's move the lruvec accounting infra to vmstat.h and shuffle
> memcontrol.h into the stack under mm.h and vmstat.h.
> 
> Does the following fix the hexagon build?

This breaks x86_64 allnoconfig.

arch/x86/mm/pat.c:734: error: redefinition of 'arch_io_reserve_memtype_wc'
./include/linux/io.h:175: note: previous definition of 
'arch_io_reserve_memtype_wc' was here
arch/x86/mm/pat.c:742: error: redefinition of 'arch_io_free_memtype_wc'
./include/linux/io.h:181: note: previous definition of 
'arch_io_free_memtype_wc' was here

Reply via email to