From patchwork Tue Aug 4 14:25:52 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michal Hocko X-Patchwork-Id: 503630 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id EAFC31402AE for ; Wed, 5 Aug 2015 00:25:57 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751685AbbHDOZ4 (ORCPT ); Tue, 4 Aug 2015 10:25:56 -0400 Received: from mail-wi0-f172.google.com ([209.85.212.172]:35032 "EHLO mail-wi0-f172.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751425AbbHDOZz (ORCPT ); Tue, 4 Aug 2015 10:25:55 -0400 Received: by wibxm9 with SMTP id xm9so168920616wib.0; Tue, 04 Aug 2015 07:25:54 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=NZjLSht1U2VkhdkA2fwEJSExcuBV8Q/z8yVso4gZBvI=; b=AanNEVMSRZLn25sAKKOPz9ANonGZmqfQzYisIGjagOG3W6teWvse3M9zt0mFNSmwAY ODFqMZy6Dfyj4DmRYWSXxK2Zh5a6YnPRSF+Axs01SUA/SPvz6EddouN5+YIDRkR/Q1Wt +AYQl1FMn2y0dyEOKBF2RVcPYpvlYFxF8xqkNbu9y5Hu7R/9Q7xQJKY2VKD+6jqltwZ2 8keJbs9+zxzKA9BnfxDAO6uufl9AzEiZVmWVlgAB6PAG+Lgo9zgj2Eef09gN9cUSJTjA gHg33g71YRlAym+u97W8ChU9dhoM4Q1SW0LacYT1cB5rcYjiBdeiREHYo/svcXLchjSH 8GGQ== X-Received: by 10.194.122.132 with SMTP id ls4mr8264431wjb.130.1438698353772; Tue, 04 Aug 2015 07:25:53 -0700 (PDT) Received: from localhost (nat1.scz.suse.com. [213.151.88.250]) by smtp.gmail.com with ESMTPSA id lm5sm2652808wic.22.2015.08.04.07.25.53 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 04 Aug 2015 07:25:53 -0700 (PDT) Date: Tue, 4 Aug 2015 16:25:52 +0200 From: Michal Hocko To: Guenter Roeck Cc: Vladimir Davydov , Andrew Morton , linux-kernel@vger.kernel.org, "David S. Miller" , sparclinux@vger.kernel.org Subject: [PATCH] sparc32: do not include swap.h from pgtable_32.h export struct mem_cgroup' Message-ID: <20150804142552.GI28571@dhcp22.suse.cz> References: <20150802030220.GA25165@roeck-us.net> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20150802030220.GA25165@roeck-us.net> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: sparclinux-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: sparclinux@vger.kernel.org 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. Tested-by: Guenter Roeck --- 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 --- 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