* [PATCH] powerpc: don't re-issue spinlock typedef that breaks older gcc
@ 2014-01-28 16:16 Paul Gortmaker
2014-01-28 17:28 ` Aneesh Kumar K.V
0 siblings, 1 reply; 5+ messages in thread
From: Paul Gortmaker @ 2014-01-28 16:16 UTC (permalink / raw)
To: linuxppc-dev; +Cc: Paul Gortmaker, Aneesh Kumar K.V, Kirill A. Shutemov
Commit b3084f4db3aeb991c507ca774337c7e7893ed04f ("powerpc/thp: Fix
crash on mremap") added a "typedef struct spinlock spinlock_t;"
which on gcc 4.5.2 (and possibly other versions) causes many of:
include/linux/spinlock_types.h:76:3: error: redefinition of typedef 'spinlock_t'
arch/powerpc/include/asm/pgtable-ppc64.h:563:25: note: previous declaration of 'spinlock_t' was here
In file included from include/linux/mutex.h:15:0,
from include/linux/notifier.h:13,
from include/linux/pm_qos.h:8,
from include/linux/netdevice.h:28,
from drivers/net/wireless/ath/wil6210/wil6210.h:20,
from drivers/net/wireless/ath/wil6210/debug.c:17:
It appears that somewhere between gcc 4.5.2 and 4.6.3 this
redefinition restriction was lifted. Using the proper header
from within !ASSEMBLY seems to fix it up in an acceptable way.
Cc: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Cc: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
---
[ Note that b3084f4db3 isn't mainline yet, it is currently in
benh/powerpc.git #merge -- but is headed there soon via:
https://lkml.org/lkml/2014/1/27/599 ]
arch/powerpc/include/asm/pgtable-ppc64.h | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/arch/powerpc/include/asm/pgtable-ppc64.h b/arch/powerpc/include/asm/pgtable-ppc64.h
index d27960c89a71..3b638411646a 100644
--- a/arch/powerpc/include/asm/pgtable-ppc64.h
+++ b/arch/powerpc/include/asm/pgtable-ppc64.h
@@ -111,6 +111,8 @@
#ifndef __ASSEMBLY__
+#include <linux/spinlock_types.h>
+
/*
* This is the default implementation of various PTE accessors, it's
* used in all cases except Book3S with 64K pages where we have a
@@ -560,7 +562,6 @@ extern void pmdp_invalidate(struct vm_area_struct *vma, unsigned long address,
pmd_t *pmdp);
#define pmd_move_must_withdraw pmd_move_must_withdraw
-typedef struct spinlock spinlock_t;
static inline int pmd_move_must_withdraw(spinlock_t *new_pmd_ptl,
spinlock_t *old_pmd_ptl)
{
--
1.8.5.2
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] powerpc: don't re-issue spinlock typedef that breaks older gcc
2014-01-28 16:16 [PATCH] powerpc: don't re-issue spinlock typedef that breaks older gcc Paul Gortmaker
@ 2014-01-28 17:28 ` Aneesh Kumar K.V
2014-01-28 17:49 ` Paul Gortmaker
0 siblings, 1 reply; 5+ messages in thread
From: Aneesh Kumar K.V @ 2014-01-28 17:28 UTC (permalink / raw)
To: Paul Gortmaker, linuxppc-dev; +Cc: Paul Gortmaker, Kirill A. Shutemov
Paul Gortmaker <paul.gortmaker@windriver.com> writes:
> Commit b3084f4db3aeb991c507ca774337c7e7893ed04f ("powerpc/thp: Fix
> crash on mremap") added a "typedef struct spinlock spinlock_t;"
> which on gcc 4.5.2 (and possibly other versions) causes many of:
>
> include/linux/spinlock_types.h:76:3: error: redefinition of typedef 'spinlock_t'
> arch/powerpc/include/asm/pgtable-ppc64.h:563:25: note: previous declaration of 'spinlock_t' was here
> In file included from include/linux/mutex.h:15:0,
> from include/linux/notifier.h:13,
> from include/linux/pm_qos.h:8,
> from include/linux/netdevice.h:28,
> from drivers/net/wireless/ath/wil6210/wil6210.h:20,
> from drivers/net/wireless/ath/wil6210/debug.c:17:
>
> It appears that somewhere between gcc 4.5.2 and 4.6.3 this
> redefinition restriction was lifted. Using the proper header
> from within !ASSEMBLY seems to fix it up in an acceptable way.
>
> Cc: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
> Cc: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
> Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
> ---
>
http://mid.gmane.org/1389939036.3000.7.camel@ThinkPad-T5421.cn.ibm.com
This was posted earlier.
> [ Note that b3084f4db3 isn't mainline yet, it is currently in
> benh/powerpc.git #merge -- but is headed there soon via:
> https://lkml.org/lkml/2014/1/27/599 ]
>
> arch/powerpc/include/asm/pgtable-ppc64.h | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/arch/powerpc/include/asm/pgtable-ppc64.h b/arch/powerpc/include/asm/pgtable-ppc64.h
> index d27960c89a71..3b638411646a 100644
> --- a/arch/powerpc/include/asm/pgtable-ppc64.h
> +++ b/arch/powerpc/include/asm/pgtable-ppc64.h
> @@ -111,6 +111,8 @@
>
> #ifndef __ASSEMBLY__
>
> +#include <linux/spinlock_types.h>
> +
> /*
> * This is the default implementation of various PTE accessors, it's
> * used in all cases except Book3S with 64K pages where we have a
> @@ -560,7 +562,6 @@ extern void pmdp_invalidate(struct vm_area_struct *vma, unsigned long address,
> pmd_t *pmdp);
>
> #define pmd_move_must_withdraw pmd_move_must_withdraw
> -typedef struct spinlock spinlock_t;
> static inline int pmd_move_must_withdraw(spinlock_t *new_pmd_ptl,
> spinlock_t *old_pmd_ptl)
> {
> --
> 1.8.5.2
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] powerpc: don't re-issue spinlock typedef that breaks older gcc
2014-01-28 17:28 ` Aneesh Kumar K.V
@ 2014-01-28 17:49 ` Paul Gortmaker
2014-01-28 18:49 ` Aneesh Kumar K.V
0 siblings, 1 reply; 5+ messages in thread
From: Paul Gortmaker @ 2014-01-28 17:49 UTC (permalink / raw)
To: Aneesh Kumar K.V, linuxppc-dev; +Cc: Kirill A. Shutemov
On 14-01-28 12:28 PM, Aneesh Kumar K.V wrote:
> Paul Gortmaker <paul.gortmaker@windriver.com> writes:
>
>> Commit b3084f4db3aeb991c507ca774337c7e7893ed04f ("powerpc/thp: Fix
>> crash on mremap") added a "typedef struct spinlock spinlock_t;"
>> which on gcc 4.5.2 (and possibly other versions) causes many of:
>>
>> include/linux/spinlock_types.h:76:3: error: redefinition of typedef 'spinlock_t'
>> arch/powerpc/include/asm/pgtable-ppc64.h:563:25: note: previous declaration of 'spinlock_t' was here
>> In file included from include/linux/mutex.h:15:0,
>> from include/linux/notifier.h:13,
>> from include/linux/pm_qos.h:8,
>> from include/linux/netdevice.h:28,
>> from drivers/net/wireless/ath/wil6210/wil6210.h:20,
>> from drivers/net/wireless/ath/wil6210/debug.c:17:
>>
>> It appears that somewhere between gcc 4.5.2 and 4.6.3 this
>> redefinition restriction was lifted. Using the proper header
>> from within !ASSEMBLY seems to fix it up in an acceptable way.
>>
>> Cc: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
>> Cc: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
>> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
>> Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
>> ---
>>
>
>
> http://mid.gmane.org/1389939036.3000.7.camel@ThinkPad-T5421.cn.ibm.com
>
> This was posted earlier.
I see. Well I guess Ben didn't use it since it is the same as the
temporary not-signed-off-by hack patch I posted earlier as well.
https://lkml.org/lkml/2014/1/27/584
I believe what I've posted here below to be the proper fix.
Paul.
--
>
>
>
>> [ Note that b3084f4db3 isn't mainline yet, it is currently in
>> benh/powerpc.git #merge -- but is headed there soon via:
>> https://lkml.org/lkml/2014/1/27/599 ]
>>
>> arch/powerpc/include/asm/pgtable-ppc64.h | 3 ++-
>> 1 file changed, 2 insertions(+), 1 deletion(-)
>>
>> diff --git a/arch/powerpc/include/asm/pgtable-ppc64.h b/arch/powerpc/include/asm/pgtable-ppc64.h
>> index d27960c89a71..3b638411646a 100644
>> --- a/arch/powerpc/include/asm/pgtable-ppc64.h
>> +++ b/arch/powerpc/include/asm/pgtable-ppc64.h
>> @@ -111,6 +111,8 @@
>>
>> #ifndef __ASSEMBLY__
>>
>> +#include <linux/spinlock_types.h>
>> +
>> /*
>> * This is the default implementation of various PTE accessors, it's
>> * used in all cases except Book3S with 64K pages where we have a
>> @@ -560,7 +562,6 @@ extern void pmdp_invalidate(struct vm_area_struct *vma, unsigned long address,
>> pmd_t *pmdp);
>>
>> #define pmd_move_must_withdraw pmd_move_must_withdraw
>> -typedef struct spinlock spinlock_t;
>> static inline int pmd_move_must_withdraw(spinlock_t *new_pmd_ptl,
>> spinlock_t *old_pmd_ptl)
>> {
>> --
>> 1.8.5.2
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] powerpc: don't re-issue spinlock typedef that breaks older gcc
2014-01-28 17:49 ` Paul Gortmaker
@ 2014-01-28 18:49 ` Aneesh Kumar K.V
2014-01-28 19:07 ` Paul Gortmaker
0 siblings, 1 reply; 5+ messages in thread
From: Aneesh Kumar K.V @ 2014-01-28 18:49 UTC (permalink / raw)
To: Paul Gortmaker, linuxppc-dev; +Cc: Kirill A. Shutemov
Paul Gortmaker <paul.gortmaker@windriver.com> writes:
> On 14-01-28 12:28 PM, Aneesh Kumar K.V wrote:
>> Paul Gortmaker <paul.gortmaker@windriver.com> writes:
>>
>>> Commit b3084f4db3aeb991c507ca774337c7e7893ed04f ("powerpc/thp: Fix
>>> crash on mremap") added a "typedef struct spinlock spinlock_t;"
>>> which on gcc 4.5.2 (and possibly other versions) causes many of:
>>>
>>> include/linux/spinlock_types.h:76:3: error: redefinition of typedef 'spinlock_t'
>>> arch/powerpc/include/asm/pgtable-ppc64.h:563:25: note: previous declaration of 'spinlock_t' was here
>>> In file included from include/linux/mutex.h:15:0,
>>> from include/linux/notifier.h:13,
>>> from include/linux/pm_qos.h:8,
>>> from include/linux/netdevice.h:28,
>>> from drivers/net/wireless/ath/wil6210/wil6210.h:20,
>>> from drivers/net/wireless/ath/wil6210/debug.c:17:
>>>
>>> It appears that somewhere between gcc 4.5.2 and 4.6.3 this
>>> redefinition restriction was lifted. Using the proper header
>>> from within !ASSEMBLY seems to fix it up in an acceptable way.
>>>
>>> Cc: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
>>> Cc: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
>>> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
>>> Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
>>> ---
>>>
>>
>>
>> http://mid.gmane.org/1389939036.3000.7.camel@ThinkPad-T5421.cn.ibm.com
>>
>> This was posted earlier.
>
> I see. Well I guess Ben didn't use it since it is the same as the
> temporary not-signed-off-by hack patch I posted earlier as well.
>
> https://lkml.org/lkml/2014/1/27/584
>
> I believe what I've posted here below to be the proper fix.
I had another variant which needed this
http://mid.gmane.org/1388999012-14424-1-git-send-email-aneesh.kumar@linux.vnet.ibm.com
BTW I had added the above struct spinlock; patch as the backport to
stable 3.13 series. So if we are picking another one, we may need to
update stable also
-aneesh
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] powerpc: don't re-issue spinlock typedef that breaks older gcc
2014-01-28 18:49 ` Aneesh Kumar K.V
@ 2014-01-28 19:07 ` Paul Gortmaker
0 siblings, 0 replies; 5+ messages in thread
From: Paul Gortmaker @ 2014-01-28 19:07 UTC (permalink / raw)
To: Aneesh Kumar K.V, linuxppc-dev; +Cc: Kirill A. Shutemov
On 14-01-28 01:49 PM, Aneesh Kumar K.V wrote:
> Paul Gortmaker <paul.gortmaker@windriver.com> writes:
>
>> On 14-01-28 12:28 PM, Aneesh Kumar K.V wrote:
>>> Paul Gortmaker <paul.gortmaker@windriver.com> writes:
>>>
>>>> Commit b3084f4db3aeb991c507ca774337c7e7893ed04f ("powerpc/thp: Fix
>>>> crash on mremap") added a "typedef struct spinlock spinlock_t;"
>>>> which on gcc 4.5.2 (and possibly other versions) causes many of:
>>>>
>>>> include/linux/spinlock_types.h:76:3: error: redefinition of typedef 'spinlock_t'
>>>> arch/powerpc/include/asm/pgtable-ppc64.h:563:25: note: previous declaration of 'spinlock_t' was here
>>>> In file included from include/linux/mutex.h:15:0,
>>>> from include/linux/notifier.h:13,
>>>> from include/linux/pm_qos.h:8,
>>>> from include/linux/netdevice.h:28,
>>>> from drivers/net/wireless/ath/wil6210/wil6210.h:20,
>>>> from drivers/net/wireless/ath/wil6210/debug.c:17:
>>>>
>>>> It appears that somewhere between gcc 4.5.2 and 4.6.3 this
>>>> redefinition restriction was lifted. Using the proper header
>>>> from within !ASSEMBLY seems to fix it up in an acceptable way.
>>>>
>>>> Cc: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
>>>> Cc: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
>>>> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
>>>> Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
>>>> ---
>>>>
>>>
>>>
>>> http://mid.gmane.org/1389939036.3000.7.camel@ThinkPad-T5421.cn.ibm.com
>>>
>>> This was posted earlier.
>>
>> I see. Well I guess Ben didn't use it since it is the same as the
>> temporary not-signed-off-by hack patch I posted earlier as well.
>>
>> https://lkml.org/lkml/2014/1/27/584
>>
>> I believe what I've posted here below to be the proper fix.
>
> I had another variant which needed this
>
> http://mid.gmane.org/1388999012-14424-1-git-send-email-aneesh.kumar@linux.vnet.ibm.com
What config did you use to trigger that? I've not seen it in
allyes/allmodconfig. I'd like us to try and fix it an alternate
way, vs. fragmenting the header into smaller and smaller
specialized chunks, if possible.
>
> BTW I had added the above struct spinlock; patch as the backport to
> stable 3.13 series. So if we are picking another one, we may need to
> update stable also
The stable tree is self-correcting ; it won't take any patches that
don't have the same commit present in mainline. But yes, someone
will still have to _nominate_ one for stable tree consideration.
Paul.
--
>
> -aneesh
>
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2014-01-28 19:06 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-01-28 16:16 [PATCH] powerpc: don't re-issue spinlock typedef that breaks older gcc Paul Gortmaker
2014-01-28 17:28 ` Aneesh Kumar K.V
2014-01-28 17:49 ` Paul Gortmaker
2014-01-28 18:49 ` Aneesh Kumar K.V
2014-01-28 19:07 ` Paul Gortmaker
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).