Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753044AbdFQPh0 (ORCPT ); Sat, 17 Jun 2017 11:37:26 -0400 Received: from bh-25.webhostbox.net ([208.91.199.152]:42784 "EHLO bh-25.webhostbox.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751458AbdFQPhX (ORCPT ); Sat, 17 Jun 2017 11:37:23 -0400 Date: Sat, 17 Jun 2017 08:37:21 -0700 From: Guenter Roeck 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: <20170617153721.GA4382@roeck-us.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.24 (2015-08-30) X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - bh-25.webhostbox.net X-AntiAbuse: Original Domain - vger.kernel.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - roeck-us.net X-Get-Message-Sender-Via: bh-25.webhostbox.net: authenticated_id: guenter@roeck-us.net X-Authenticated-Sender: bh-25.webhostbox.net: guenter@roeck-us.net X-Source: X-Source-Args: X-Source-Dir: Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 3845 Lines: 103 On Fri, Jun 16, 2017 at 01:37:21PM -0700, wrote: > On Fri, 16 Jun 2017 16:15:23 -0400 Johannes Weiner wrote: > > > In any case, memcontrol.h doesn't/shouldn't need hardirq.h. When that > > include is removed, the below patch compiles on: x86 allno, x86_64 > > allno, and my regular x86_64 config: > > > > --- > > Subject: mm-memcontrol-per-lruvec-stats-infrastructure-fix-4 > > Did you try x86_64 allmodconfig? I'm getting a mess: > > In file included from ./include/linux/mm.h:1032, > from ./include/linux/highmem.h:7, > from ./include/linux/bio.h:21, > from ./include/linux/writeback.h:205, > from ./include/linux/memcontrol.h:28, > from ./include/linux/swap.h:8, > from ./include/linux/suspend.h:4, > from arch/x86/kernel/asm-offsets.c:12: > ./include/linux/vmstat.h: In function 'lruvec_page_state': > ./include/linux/vmstat.h:362: error: implicit declaration of function 'mem_cgroup_disabled' > ./include/linux/vmstat.h:365: error: dereferencing pointer to incomplete type > ./include/linux/vmstat.h:365: error: type defaults to 'int' in declaration of 'type name' > ... > > Presumably because we have memcontrol.h indirectly including mm.h which > includes vmstat.h (from a stupid place) and with this patch we have > vmstat.h including memcontrol.h. > How about the following ? Seems to be less invasive, and it fixes the immediate problem. Guenter --- >From 3aa278a36b5f71ff64b28e0cea05182fbcaa72e6 Mon Sep 17 00:00:00 2001 From: Guenter Roeck Date: Sat, 17 Jun 2017 08:15:57 -0700 Subject: [PATCH] hexagon: Fix build error caused by include file order hexagon builds fail with the following error message. 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' Drop unnecessary includes from header files and add missing includes to source files to fix the problem. Cc: Johannes Weiner Cc: Andrew Morton Fixes: fb6646f52c45 ("mm: memcontrol: per-lruvec stats infrastructure") Signed-off-by: Guenter Roeck --- arch/hexagon/include/asm/pgtable.h | 1 - arch/hexagon/kernel/asm-offsets.c | 1 - arch/hexagon/mm/vm_tlb.c | 1 + 3 files changed, 1 insertion(+), 2 deletions(-) diff --git a/arch/hexagon/include/asm/pgtable.h b/arch/hexagon/include/asm/pgtable.h index 24a9177fb897..aef02f7ca8aa 100644 --- a/arch/hexagon/include/asm/pgtable.h +++ b/arch/hexagon/include/asm/pgtable.h @@ -24,7 +24,6 @@ /* * Page table definitions for Qualcomm Hexagon processor. */ -#include #include #define __ARCH_USE_5LEVEL_HACK #include diff --git a/arch/hexagon/kernel/asm-offsets.c b/arch/hexagon/kernel/asm-offsets.c index 308be68d4fb3..3980c0407aa1 100644 --- a/arch/hexagon/kernel/asm-offsets.c +++ b/arch/hexagon/kernel/asm-offsets.c @@ -25,7 +25,6 @@ #include #include #include -#include #include #include #include diff --git a/arch/hexagon/mm/vm_tlb.c b/arch/hexagon/mm/vm_tlb.c index 9647d00cb761..b474065533ce 100644 --- a/arch/hexagon/mm/vm_tlb.c +++ b/arch/hexagon/mm/vm_tlb.c @@ -24,6 +24,7 @@ * be instantiated for it, differently from a native build. */ #include +#include #include #include -- 2.7.4