Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1727915 > unrolled thread
| Started by | Stephen Rothwell <sfr@canb.auug.org.au> |
|---|---|
| First post | 2017-09-07 07:30 +0200 |
| Last post | 2017-09-08 05:50 +0200 |
| Articles | 4 — 2 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: linux-next: build failure after merge of the akpm-current tree Stephen Rothwell <sfr@canb.auug.org.au> - 2017-09-07 07:30 +0200
Re: linux-next: build failure after merge of the akpm-current tree Andrew Morton <akpm@linux-foundation.org> - 2017-09-07 09:50 +0200
Re: linux-next: build failure after merge of the akpm-current tree Stephen Rothwell <sfr@canb.auug.org.au> - 2017-09-08 05:00 +0200
Re: linux-next: build failure after merge of the akpm-current tree Stephen Rothwell <sfr@canb.auug.org.au> - 2017-09-08 05:50 +0200
| From | Stephen Rothwell <sfr@canb.auug.org.au> |
|---|---|
| Date | 2017-09-07 07:30 +0200 |
| Subject | Re: linux-next: build failure after merge of the akpm-current tree |
| Message-ID | <umXy1-3Mj-7@gated-at.bofh.it> |
Hi all,
On Wed, 2 Aug 2017 16:31:45 +1000 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>
> 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)')
This has reappeared today :-( (for the arm multi_v7_defconfig build at
least)
> So I used the other idea (on top of Andrew's current tree):
The fix patch now looks like this:
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_t){};
+ pmd_t e;
+ memset(&e, 0, sizeof(pmd_t));
+ return e;
}
static inline int is_pmd_migration_entry(pmd_t pmd)
--
Cheers,
Stephen Rothwell
[toc] | [next] | [standalone]
| From | Andrew Morton <akpm@linux-foundation.org> |
|---|---|
| Date | 2017-09-07 09:50 +0200 |
| Message-ID | <umZJw-5lZ-17@gated-at.bofh.it> |
| In reply to | #1727915 |
On Thu, 7 Sep 2017 15:23:55 +1000 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> Hi all,
>
> On Wed, 2 Aug 2017 16:31:45 +1000 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> >
> > 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)')
>
> This has reappeared today :-( (for the arm multi_v7_defconfig build at
> least)
>
> > So I used the other idea (on top of Andrew's current tree):
>
> The fix patch now looks like this:
>
> 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_t){};
> + pmd_t e;
> + memset(&e, 0, sizeof(pmd_t));
> + return e;
> }
err, yeah. I didn't want to add that one :(
At the very least we should add a good comment explaining why we had to
resort to this.
[toc] | [prev] | [next] | [standalone]
| From | Stephen Rothwell <sfr@canb.auug.org.au> |
|---|---|
| Date | 2017-09-08 05:00 +0200 |
| Message-ID | <unhGp-JG-1@gated-at.bofh.it> |
| In reply to | #1727984 |
Hi all,
On Thu, 07 Sep 2017 06:59:09 -0400 "Zi Yan" <zi.yan@cs.rutgers.edu> wrote:
>
> I think __pmd(0) can be used now. I fixed __pmd() in sparc32 at commit
> 9157259d16a8ee8116a98d32f29b797689327e8d, which is in 4.13 now.
> I should have told you this earlier, sorry about that.
>
> Just wonder if any other reason prevents us using __pmd().
OK, so today I have applied this instead (which is the same as dropping
mm-thp-enable-thp-migration-in-generic-path-fix-fix-fix):
From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Fri, 8 Sep 2017 12:40:39 +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 | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/linux/swapops.h b/include/linux/swapops.h
index b88441d284e2..291c4b534658 100644
--- a/include/linux/swapops.h
+++ b/include/linux/swapops.h
@@ -291,7 +291,7 @@ 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_t){};
+ return __pmd(0);
}
static inline int is_pmd_migration_entry(pmd_t pmd)
--
2.13.2
--
Cheers,
Stephen Rothwell
[toc] | [prev] | [next] | [standalone]
| From | Stephen Rothwell <sfr@canb.auug.org.au> |
|---|---|
| Date | 2017-09-08 05:50 +0200 |
| Message-ID | <unisN-1hS-1@gated-at.bofh.it> |
| In reply to | #1728548 |
Hi all,
On Fri, 8 Sep 2017 12:49:59 +1000 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>
> OK, so today I have applied this instead (which is the same as dropping
> mm-thp-enable-thp-migration-in-generic-path-fix-fix-fix):
>
> From: Stephen Rothwell <sfr@canb.auug.org.au>
> Date: Fri, 8 Sep 2017 12:40:39 +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 | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/include/linux/swapops.h b/include/linux/swapops.h
> index b88441d284e2..291c4b534658 100644
> --- a/include/linux/swapops.h
> +++ b/include/linux/swapops.h
> @@ -291,7 +291,7 @@ 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_t){};
> + return __pmd(0);
> }
>
> static inline int is_pmd_migration_entry(pmd_t pmd)
That survived my "during the day" builds (including sparc32). Some one
should just check the overnight build results:
http://kisskb.ellerman.id.au/linux-next
--
Cheers,
Stephen Rothwell
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web