From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754807AbcDGFYr (ORCPT ); Thu, 7 Apr 2016 01:24:47 -0400 Received: from mail-pf0-f176.google.com ([209.85.192.176]:35434 "EHLO mail-pf0-f176.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752624AbcDGFYp (ORCPT ); Thu, 7 Apr 2016 01:24:45 -0400 Date: Wed, 6 Apr 2016 22:24:34 -0700 (PDT) From: Hugh Dickins X-X-Sender: hugh@eggly.anvils To: Stephen Rothwell cc: Andrew Morton , linux-next@vger.kernel.org, linux-kernel@vger.kernel.org, Hugh Dickins Subject: Re: linux-next: build failure after merge of the akpm-current tree In-Reply-To: <20160407151201.0afc790f@canb.auug.org.au> Message-ID: References: <20160407151201.0afc790f@canb.auug.org.au> User-Agent: Alpine 2.11 (LSU 23 2013-08-11) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 7 Apr 2016, Stephen Rothwell wrote: > Hi Andrew, > > After merging the akpm-current tree, today's linux-next build (arm > multi_v7_defconfig) failed like this: > > In file included from include/linux/linkage.h:4:0, > from include/linux/fs.h:4, > from mm/shmem.c:24: > In function 'shmem_disband_hugeteam', > inlined from 'shmem_getpage_gfp' at mm/shmem.c:3075:3: > include/linux/compiler.h:510:38: error: call to '__compiletime_assert_1747' declared with attribute error: BUILD_BUG failed > _compiletime_assert(condition, msg, __compiletime_assert_, __LINE__) > ^ > include/linux/compiler.h:493:4: note: in definition of macro '__compiletime_assert' > prefix ## suffix(); \ > ^ > include/linux/compiler.h:510:2: note: in expansion of macro '_compiletime_assert' > _compiletime_assert(condition, msg, __compiletime_assert_, __LINE__) > ^ > include/linux/bug.h:51:37: note: in expansion of macro 'compiletime_assert' > #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg) > ^ > include/linux/bug.h:85:21: note: in expansion of macro 'BUILD_BUG_ON_MSG' > #define BUILD_BUG() BUILD_BUG_ON_MSG(1, "BUILD_BUG failed") > ^ > mm/shmem.c:1747:2: note: in expansion of macro 'BUILD_BUG' > BUILD_BUG(); > ^ > > Caused by commit > > ab61a0a665d8 ("huge tmpfs: try to allocate huge pages, split into a team") > > I added the following (hacky, but builds for my compiler at least) > patch for today: Sorry about that, thanks a lot Stephen, your patch will do fine (though what I'll do is simply delete that BUILD_BUG(), which isn't really serving any useful purpose). It certainly has been compiled before on arm and without CONFIG_TRANSPARENT_HUGEPAGE, but I guess different compiler versions make different optimizations, so I never noticed I was unwittingly relying on too sophisticated an optimization there. Hugh > > From: Stephen Rothwell > Date: Thu, 7 Apr 2016 14:57:45 +1000 > Subject: [PATCH] huge tmpfs: fix build problem on arm > > allocated_huge will never be non-NULL if CONFIG_TRANSPARENT_HUGEPAGE is not. > > Fixes: ab61a0a665d8 ("huge tmpfs: try to allocate huge pages, split into a team") > Signed-off-by: Stephen Rothwell > --- > mm/shmem.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/mm/shmem.c b/mm/shmem.c > index 5b9fecc9ce72..f2307d9630aa 100644 > --- a/mm/shmem.c > +++ b/mm/shmem.c > @@ -3071,7 +3071,7 @@ unlock: > unlock_page(page); > put_page(page); > } > - if (alloced_huge) { > + if (IS_ENABLED(CONFIG_TRANSPARENT_HUGEPAGE) && alloced_huge) { > shmem_disband_hugeteam(alloced_huge); > alloced_huge = NULL; > } > --