Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751012AbdFPTOz (ORCPT ); Fri, 16 Jun 2017 15:14:55 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:41306 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750827AbdFPTOy (ORCPT ); Fri, 16 Jun 2017 15:14:54 -0400 Date: Fri, 16 Jun 2017 12:14:53 -0700 From: Andrew Morton To: Johannes Weiner Cc: Guenter Roeck , "linux-kernel@vger.kernel.org" Subject: Re: hexagon: build error in -next due to 'mm: memcontrol: per-lruvec stats infrastructure' Message-Id: <20170616121453.34d92894ee9da8af895c4208@linux-foundation.org> In-Reply-To: <20170616184951.GA2665@cmpxchg.org> References: <534ef333-b27f-e525-31c1-bc5b7516d63f@roeck-us.net> <20170616184951.GA2665@cmpxchg.org> X-Mailer: Sylpheed 3.4.1 (GTK+ 2.24.23; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1915 Lines: 37 On Fri, 16 Jun 2017 14:49:51 -0400 Johannes Weiner 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