From: Guenter Roeck <linux@roeck-us.net>
To: Michal Hocko <mhocko@kernel.org>
Cc: Vladimir Davydov <vdavydov@parallels.com>,
Andrew Morton <akpm@linux-foundation.org>,
linux-kernel@vger.kernel.org,
"David S. Miller" <davem@davemloft.net>,
sparclinux@vger.kernel.org
Subject: Re: [PATCH] sparc32: do not include swap.h from pgtable_32.h export struct mem_cgroup'
Date: Tue, 04 Aug 2015 09:32:40 -0700 [thread overview]
Message-ID: <55C0E928.1060401@roeck-us.net> (raw)
In-Reply-To: <20150804142552.GI28571@dhcp22.suse.cz>
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 <mhocko@suse.com>
> 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 <linux@roeck-us.net>
> Signed-off-by: Michal Hocko <mhocko@suse.com>
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 <linux@roeck-us.net>
> ---
> 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 <asm-generic/4level-fixup.h>
>
> #include <linux/spinlock.h>
> -#include <linux/swap.h>
> +#include <linux/mm_types.h>
> #include <asm/types.h>
> #include <asm/pgtsrmmu.h>
> #include <asm/vaddrs.h>
>
prev parent reply other threads:[~2015-08-04 16:32 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-02 3:02 Build failure (sparc32:allmodconfig) in -next due to 'memcg: " Guenter Roeck
2015-08-04 12:18 ` Michal Hocko
2015-08-04 13:42 ` Julian Calaby
2015-08-04 13:58 ` Michal Hocko
2015-08-04 14:25 ` [PATCH] sparc32: do not include swap.h from pgtable_32.h " Michal Hocko
2015-08-04 16:32 ` Guenter Roeck [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=55C0E928.1060401@roeck-us.net \
--to=linux@roeck-us.net \
--cc=akpm@linux-foundation.org \
--cc=davem@davemloft.net \
--cc=linux-kernel@vger.kernel.org \
--cc=mhocko@kernel.org \
--cc=sparclinux@vger.kernel.org \
--cc=vdavydov@parallels.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®