Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1700667 > unrolled thread

linux-next: build failure after merge of the akpm-current tree

Started byStephen Rothwell <sfr@canb.auug.org.au>
First post2017-08-01 08:40 +0200
Last post2017-08-02 08:40 +0200
Articles 4 — 1 participant

Back to article view | Back to linux.kernel


Contents

  linux-next: build failure after merge of the akpm-current tree Stephen Rothwell <sfr@canb.auug.org.au> - 2017-08-01 08:40 +0200
    Re: linux-next: build failure after merge of the akpm-current tree Stephen Rothwell <sfr@canb.auug.org.au> - 2017-08-01 13:00 +0200
      Re: linux-next: build failure after merge of the akpm-current tree Stephen Rothwell <sfr@canb.auug.org.au> - 2017-08-02 07:50 +0200
        Re: linux-next: build failure after merge of the akpm-current tree Stephen Rothwell <sfr@canb.auug.org.au> - 2017-08-02 08:40 +0200

#1700667 — linux-next: build failure after merge of the akpm-current tree

FromStephen Rothwell <sfr@canb.auug.org.au>
Date2017-08-01 08:40 +0200
Subjectlinux-next: build failure after merge of the akpm-current tree
Message-ID<u9z0t-8cc-3@gated-at.bofh.it>
Hi Andrew,

After merging the akpm tree, today's linux-next build (sparc defconfig)
failed like this:

In file included from mm/vmscan.c:55:0:
include/linux/swapops.h: In function 'swp_entry_to_pmd':
include/linux/swapops.h:226:9: error: implicit declaration of function '__pmd' [-Werror=implicit-function-declaration]
  return __pmd(0);
         ^
include/linux/swapops.h:226:9: error: incompatible types when returning type 'int' but 'pmd_t {aka struct <anonymous>}' was expected

Caused by commit

  9bb18490758c ("mm-thp-enable-thp-migration-in-generic-path-fix")

It looks like sparc 32 bit has no __pmd() ...

I have reverted that commit for today.

-- 
Cheers,
Stephen Rothwell

[toc] | [next] | [standalone]


#1700856

FromStephen Rothwell <sfr@canb.auug.org.au>
Date2017-08-01 13:00 +0200
Message-ID<u9D45-2XO-1@gated-at.bofh.it>
In reply to#1700667
Hi all,

On Tue, 1 Aug 2017 16:39:04 +1000 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>
> After merging the akpm tree, today's linux-next build (sparc defconfig)
> failed like this:
> 
> In file included from mm/vmscan.c:55:0:
> include/linux/swapops.h: In function 'swp_entry_to_pmd':
> include/linux/swapops.h:226:9: error: implicit declaration of function '__pmd' [-Werror=implicit-function-declaration]
>   return __pmd(0);
>          ^
> include/linux/swapops.h:226:9: error: incompatible types when returning type 'int' but 'pmd_t {aka struct <anonymous>}' was expected
> 
> Caused by commit
> 
>   9bb18490758c ("mm-thp-enable-thp-migration-in-generic-path-fix")
> 
> It looks like sparc 32 bit has no __pmd() ...
> 
> I have reverted that commit for today.

OK, that is a pain as it causes many build warnings some of which are
treated as errors :-(  (see e.g.
http://kisskb.ellerman.id.au/kisskb/buildresult/13112192/).  So maybe
we need to fix sthe sparc32 build instead?  Are there any other
architectures/platforms that do not define __pmd() ?

-- 
Cheers,
Stephen Rothwell

[toc] | [prev] | [next] | [standalone]


#1701737

FromStephen Rothwell <sfr@canb.auug.org.au>
Date2017-08-02 07:50 +0200
Message-ID<u9UHD-5LE-7@gated-at.bofh.it>
In reply to#1700856

[Multipart message — attachments visible in raw view] — view raw

Hi Zi,

On Tue, 01 Aug 2017 09:08:01 -0400 "Zi Yan" <zi.yan@cs.rutgers.edu> wrote:
>
> I found two possible fixes.
> 
> 1. This uses C++ zero initializer, GCC is OK with it.
> I tested with GCC 4.9.3 (has the initialization bug) and GCC 6.4.0.
> 
> --- a/include/linux/swapops.h~a
> +++ a/include/linux/swapops.h
> @@ -217,7 +217,7 @@ static inline swp_entry_t pmd_to_swp_ent
> 
>  static inline pmd_t swp_entry_to_pmd(swp_entry_t entry)
>  {
> -	return (pmd_t){ 0 };
> +	return (pmd_t){};
>  }

I have done that for today ... please decide which is best (or find
something better - maybe every platform really needs to have a __pmd()
definition) and submit a real fix patch to Andrew.

-- 
Cheers,
Stephen Rothwell

[toc] | [prev] | [next] | [standalone]


#1701770

FromStephen Rothwell <sfr@canb.auug.org.au>
Date2017-08-02 08:40 +0200
Message-ID<u9Vu2-6ig-25@gated-at.bofh.it>
In reply to#1701737
Hi all,

On Wed, 2 Aug 2017 15:45:54 +1000 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>
> On Tue, 01 Aug 2017 09:08:01 -0400 "Zi Yan" <zi.yan@cs.rutgers.edu> wrote:
> >
> > I found two possible fixes.
> > 
> > 1. This uses C++ zero initializer, GCC is OK with it.
> > I tested with GCC 4.9.3 (has the initialization bug) and GCC 6.4.0.
> > 
> > --- a/include/linux/swapops.h~a
> > +++ a/include/linux/swapops.h
> > @@ -217,7 +217,7 @@ static inline swp_entry_t pmd_to_swp_ent
> > 
> >  static inline pmd_t swp_entry_to_pmd(swp_entry_t entry)
> >  {
> > -	return (pmd_t){ 0 };
> > +	return (pmd_t){};
> >  }  
> 
> I have done that for today ... please decide which is best (or find
> something better - maybe every platform really needs to have a __pmd()
> definition) and submit a real fix patch to Andrew.

OK, that failed for my compiler (gcc 5.2.0) like this:

In file included from mm/vmscan.c:55:0:
include/linux/swapops.h: In function 'swp_entry_to_pmd':
include/linux/swapops.h:226:16: error: empty scalar initializer
  return (pmd_t){};
                ^
include/linux/swapops.h:226:16: note: (near initialization for '(anonymous)')

So I used the other idea (on top of Andrew's current tree):

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Wed, 2 Aug 2017 15:55:02 +1000
Subject: [PATCH] mm-thp-enable-thp-migration-in-generic-path-fix-fix

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 include/linux/swapops.h | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/include/linux/swapops.h b/include/linux/swapops.h
index 45b092aa6419..61cffa148a79 100644
--- a/include/linux/swapops.h
+++ b/include/linux/swapops.h
@@ -223,7 +223,9 @@ static inline swp_entry_t pmd_to_swp_entry(pmd_t pmd)
 
 static inline pmd_t swp_entry_to_pmd(swp_entry_t entry)
 {
-	return __pmd(0);
+	pmd_t e;
+	memset(&e, 0, sizeof(pmd_t));
+	return e;
 }
 
 static inline int is_pmd_migration_entry(pmd_t pmd)
-- 
2.13.2

-- 
Cheers,
Stephen Rothwell

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web