From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753786AbbHDQcq (ORCPT ); Tue, 4 Aug 2015 12:32:46 -0400 Received: from bh-25.webhostbox.net ([208.91.199.152]:53682 "EHLO bh-25.webhostbox.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752772AbbHDQco (ORCPT ); Tue, 4 Aug 2015 12:32:44 -0400 Message-ID: <55C0E928.1060401@roeck-us.net> Date: Tue, 04 Aug 2015 09:32:40 -0700 From: Guenter Roeck User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.8.0 MIME-Version: 1.0 To: Michal Hocko CC: Vladimir Davydov , Andrew Morton , linux-kernel@vger.kernel.org, "David S. Miller" , sparclinux@vger.kernel.org Subject: Re: [PATCH] sparc32: do not include swap.h from pgtable_32.h export struct mem_cgroup' References: <20150802030220.GA25165@roeck-us.net> <20150804142552.GI28571@dhcp22.suse.cz> In-Reply-To: <20150804142552.GI28571@dhcp22.suse.cz> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Authenticated_sender: linux@roeck-us.net X-OutGoing-Spam-Status: No, score=-1.0 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: linux@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 On 08/04/2015 07:25 AM, Michal Hocko wrote: > On Sat 01-08-15 20:02:20, Guenter Roeck wrote: >> Hi, >> >> Commit b65390c6c2178f ("memcg: export struct mem_cgroup") causes several >> build failures in -next (next-20150731) when trying to build >> sparc32:allmodconfig. >> >> Below are some of the errors, as well as a bisect log. > > The following patch should take care of the mess. I've tested it with > all{no,mod}config and defconfig. allyesconfig fails due to unrelated issue but > make mm/ succeeds. > --- >>>From 3ca0dfa93b1418bcb9a8dc2860bf93f095f72399 Mon Sep 17 00:00:00 2001 > From: Michal Hocko > Date: Tue, 4 Aug 2015 14:31:28 +0200 > Subject: [PATCH] sparc32: do not include swap.h from pgtable_32.h > > "memcg: export struct mem_cgroup" has added few includes into linux/memcontro.h > which led to further header dependency issues as reported by Guenter Roeck: > > In file included from include/linux/highmem.h:7:0, > from include/linux/bio.h:23, > from include/linux/writeback.h:192, > from include/linux/memcontrol.h:30, > from include/linux/swap.h:8, > from ./arch/sparc/include/asm/pgtable_32.h:17, > from ./arch/sparc/include/asm/pgtable.h:6, > from arch/sparc/kernel/traps_32.c:23: > include/linux/mm.h: In function 'is_vmalloc_addr': > include/linux/mm.h:371:17: error: 'VMALLOC_START' undeclared (first use in this function) > include/linux/mm.h:371:17: note: each undeclared identifier is reported only once for each function it appears in > include/linux/mm.h:371:41: error: 'VMALLOC_END' undeclared (first use in this function) > include/linux/mm.h: In function 'maybe_mkwrite': > include/linux/mm.h:556:3: error: implicit declaration of function 'pte_mkwrite' > > The issue is that pgtable_32.h depends on swap.h to get swap_entry_t but > that goes all the way down to linux/mm.h which wants to have VMALLOC_* > which is defined later in pgtable_32.h, though. > > swap_entry_t is defined in include/mm_types.h so it should be sufficient > to include this header without more dependencies. > > Reported-by: Guenter Roeck > Signed-off-by: Michal Hocko Nice and simple fix. Compiled allmodconfig. Also ran through a number of qemu tests, all successful. Building sparc32:SS-5:qemu_sparc_defconfig ... running ..... passed Building sparc32:SS-20:qemu_sparc_defconfig ... running ..... passed Building sparc32:SS-600MP:qemu_sparc_defconfig ... running ..... passed Building sparc32:SS-5:qemu_sparc_smp_defconfig ... running ..... passed Building sparc32:SS-20:qemu_sparc_smp_defconfig ... running ..... passed Building sparc32:SS-600MP:qemu_sparc_smp_defconfig ... running ..... passed Tested-by: Guenter Roeck > --- > arch/sparc/include/asm/pgtable_32.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/arch/sparc/include/asm/pgtable_32.h b/arch/sparc/include/asm/pgtable_32.h > index f06b36a00a3b..91b963a887b7 100644 > --- a/arch/sparc/include/asm/pgtable_32.h > +++ b/arch/sparc/include/asm/pgtable_32.h > @@ -14,7 +14,7 @@ > #include > > #include > -#include > +#include > #include > #include > #include >