Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1703100 > unrolled thread
| Started by | Zi Yan <zi.yan@sent.com> |
|---|---|
| First post | 2017-08-03 15:20 +0200 |
| Last post | 2017-08-11 00:10 +0200 |
| Articles | 3 — 2 participants |
Back to article view | Back to linux.kernel
[PATCH] mm: add pmd_t initializer __pmd() to work around a GCC bug. Zi Yan <zi.yan@sent.com> - 2017-08-03 15:20 +0200
Re: [PATCH] mm: add pmd_t initializer __pmd() to work around a GCC bug. David Miller <davem@davemloft.net> - 2017-08-10 18:30 +0200
Re: [PATCH] mm: add pmd_t initializer __pmd() to work around a GCC bug. David Miller <davem@davemloft.net> - 2017-08-11 00:10 +0200
| From | Zi Yan <zi.yan@sent.com> |
|---|---|
| Date | 2017-08-03 15:20 +0200 |
| Subject | [PATCH] mm: add pmd_t initializer __pmd() to work around a GCC bug. |
| Message-ID | <uaocG-rc-17@gated-at.bofh.it> |
From: Zi Yan <zi.yan@cs.rutgers.edu>
THP migration is added but only supports x86_64 at the moment. For all
other architectures, swp_entry_to_pmd() only returns a zero pmd_t.
Due to a GCC zero initializer bug #53119, the standard (pmd_t){0}
initializer is not accepted by all GCC versions. __pmd() is a feasible
workaround. In addition, sparc32's pmd_t is an array instead of a single
value, so we need (pmd_t){ {0}, } instead of (pmd_t){0}. Thus,
a different __pmd() definition is needed in sparc32.
Signed-off-by: Zi Yan <zi.yan@cs.rutgers.edu>
---
arch/sparc/include/asm/page_32.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/arch/sparc/include/asm/page_32.h b/arch/sparc/include/asm/page_32.h
index 0efd0583a8c9..6249214148c2 100644
--- a/arch/sparc/include/asm/page_32.h
+++ b/arch/sparc/include/asm/page_32.h
@@ -68,6 +68,7 @@ typedef struct { unsigned long iopgprot; } iopgprot_t;
#define iopgprot_val(x) ((x).iopgprot)
#define __pte(x) ((pte_t) { (x) } )
+#define __pmd(x) ((pmd_t) { { (x) }, })
#define __iopte(x) ((iopte_t) { (x) } )
#define __pgd(x) ((pgd_t) { (x) } )
#define __ctxd(x) ((ctxd_t) { (x) } )
@@ -95,6 +96,7 @@ typedef unsigned long iopgprot_t;
#define iopgprot_val(x) (x)
#define __pte(x) (x)
+#define __pmd(x) ((pmd_t) { { (x) }, })
#define __iopte(x) (x)
#define __pgd(x) (x)
#define __ctxd(x) (x)
--
2.13.2
[toc] | [next] | [standalone]
| From | David Miller <davem@davemloft.net> |
|---|---|
| Date | 2017-08-10 18:30 +0200 |
| Subject | Re: [PATCH] mm: add pmd_t initializer __pmd() to work around a GCC bug. |
| Message-ID | <ucYvp-83r-51@gated-at.bofh.it> |
| In reply to | #1703100 |
From: "Zi Yan" <zi.yan@cs.rutgers.edu> Date: Thu, 10 Aug 2017 10:46:08 -0400 > Ping. Just wonder what is the status of this patch. You never need to ask this question. Your patch is queued up in SPARC patchwork: http://patchwork.ozlabs.org/patch/797215/ And is in "Under Review" state. There is nothing for you to do but simply be patient.
[toc] | [prev] | [next] | [standalone]
| From | David Miller <davem@davemloft.net> |
|---|---|
| Date | 2017-08-11 00:10 +0200 |
| Subject | Re: [PATCH] mm: add pmd_t initializer __pmd() to work around a GCC bug. |
| Message-ID | <ud3Oq-3qn-11@gated-at.bofh.it> |
| In reply to | #1703100 |
From: Zi Yan <zi.yan@sent.com>
Date: Thu, 3 Aug 2017 09:17:21 -0400
> From: Zi Yan <zi.yan@cs.rutgers.edu>
>
> THP migration is added but only supports x86_64 at the moment. For all
> other architectures, swp_entry_to_pmd() only returns a zero pmd_t.
>
> Due to a GCC zero initializer bug #53119, the standard (pmd_t){0}
> initializer is not accepted by all GCC versions. __pmd() is a feasible
> workaround. In addition, sparc32's pmd_t is an array instead of a single
> value, so we need (pmd_t){ {0}, } instead of (pmd_t){0}. Thus,
> a different __pmd() definition is needed in sparc32.
>
> Signed-off-by: Zi Yan <zi.yan@cs.rutgers.edu>
Applied.
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web