All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paul Gortmaker <paul.gortmaker@windriver.com>
To: linux-arm-kernel@lists.infradead.org
Subject: Re: ARM CPU Hotplug breakage on mach-shmobile and KZM9D
Date: Tue, 30 Jul 2013 14:27:51 +0000	[thread overview]
Message-ID: <51F7CD67.6020209@windriver.com> (raw)
In-Reply-To: <20130730074939.GE7210@verge.net.au>

On 13-07-30 03:49 AM, Simon Horman wrote:
> [ Cc Paul Gortmaker ]
> 
> On Thu, Jul 25, 2013 at 10:06:07AM +0900, Simon Horman wrote:
>> On Thu, Jul 25, 2013 at 12:15:49AM +0900, Magnus Damm wrote:
>>> Hi everyone,
>>>
>>> Bad news: CPU Hotplug on KZM9D seems broken on recent kernels.
>>>
>>> On renesas-next-20130710 or earlier I can perform the following:
>>>
>>> # echo 0 > /sys/devices/system/cpu/cpu1/online
>>> CPU1: shutdown
>>> # echo 1 > /sys/devices/system/cpu/cpu1/online
>>> CPU1: Booted secondary processor
>>> #
>>>
>>> While on more recent kernels the hotplug boot fails. This may be
>>> related to the move to v3.11-rc. The tag renesas-next-20130710
>>> surprisingly seems to be the final kernel based on v3.10-rc before
>>> jumping to v3.11-rc.
>>>
>>> I wonder, do other ARM platforms have working CPU Hotplug in v3.11-rc?
>>
>> I have a snowball that I could test if you think it would be useful.
> 
> Unfortunately getting snowball to work turned out to be rather painful.
> So instead I bisected the problem on the KZM9G (N.b: the D in the subject
> seems to be incorrect :^)
> 
> The result is that the following patch, added in v3.11-rc1,
> appears to be the culprit.

Double check that you have this commit present:
 ---------------
commit 8c69d7af12265e5be9326110b695e010b47505bd
Author: Stephen Warren <swarren@nvidia.com>
Date:   Fri Jul 5 22:59:42 2013 +0100

    ARM: 7780/1: add missing linker section markup to head-common.S
 ---------------

as I think you are reporting the same problem that it fixed.

Thanks,
Paul.
--

> 
> commit 22f0a27367742f65130c0fb25ef00f7297e032c1
> Author: Paul Gortmaker <paul.gortmaker@windriver.com>
> Date:   Mon Jun 17 18:34:14 2013 -0400
> 
>     init.h: remove __cpuinit sections from the kernel
>     
>     The __cpuinit type of throwaway sections might have made sense
>     some time ago when RAM was more constrained, but now the savings
>     do not offset the cost and complications.  For example, the fix in
>     commit 5e427ec2d0 ("x86: Fix bit corruption at CPU resume time")
>     is a good example of the nasty type of bugs that can be created
>     with improper use of the various __init prefixes.
>     
>     After a discussion on LKML[1] it was decided that cpuinit should go
>     the way of devinit and be phased out.  Once all the users are gone,
>     we can then finally remove the macros themselves from linux/init.h.
>     
>     As an interim step, we can dummy out the macros to be no-ops, and
>     this will allow us to avoid a giant tree-wide patch, and instead
>     we can feed in smaller chunks mainly via the arch/ trees.  This
>     is in keeping with commit 78d86c213f28193082b5d8a1a424044b7ba406f1
>     ("init.h: Remove __dev* sections from the kernel")
>     
>     We don't strictly need to dummy out the macros to do this, but if
>     we don't then some harmless section mismatch warnings may temporarily
>     result.  For example, notify_cpu_starting() and cpu_up() are arch
>     independent (kernel/cpu.c) and are flagged as __cpuinit.  And hence
>     the calling functions in the arch specific code are also expected
>     to be __cpuinit -- if not, then we get the section mismatch warning.
>     
>     Two of the three __CPUINIT variants are not used whatsoever, and
>     so they are simply removed directly at this point in time.
>     
>     [1] https://lkml.org/lkml/2013/5/20/589
>     
>     Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
> 
> diff --git a/include/linux/init.h b/include/linux/init.h
> index 8618147..e73f2b70 100644
> --- a/include/linux/init.h
> +++ b/include/linux/init.h
> @@ -93,13 +93,13 @@
>  
>  #define __exit          __section(.exit.text) __exitused __cold notrace
>  
> -/* Used for HOTPLUG_CPU */
> -#define __cpuinit        __section(.cpuinit.text) __cold notrace
> -#define __cpuinitdata    __section(.cpuinit.data)
> -#define __cpuinitconst   __constsection(.cpuinit.rodata)
> -#define __cpuexit        __section(.cpuexit.text) __exitused __cold notrace
> -#define __cpuexitdata    __section(.cpuexit.data)
> -#define __cpuexitconst   __constsection(.cpuexit.rodata)
> +/* temporary, until all users are removed */
> +#define __cpuinit
> +#define __cpuinitdata
> +#define __cpuinitconst
> +#define __cpuexit
> +#define __cpuexitdata
> +#define __cpuexitconst
>  
>  /* Used for MEMORY_HOTPLUG */
>  #define __meminit        __section(.meminit.text) __cold notrace
> @@ -118,9 +118,8 @@
>  #define __INITRODATA	.section	".init.rodata","a",%progbits
>  #define __FINITDATA	.previous
>  
> -#define __CPUINIT        .section	".cpuinit.text", "ax"
> -#define __CPUINITDATA    .section	".cpuinit.data", "aw"
> -#define __CPUINITRODATA  .section	".cpuinit.rodata", "a"
> +/* temporary, until all users are removed */
> +#define __CPUINIT
>  
>  #define __MEMINIT        .section	".meminit.text", "ax"
>  #define __MEMINITDATA    .section	".meminit.data", "aw"
> 

WARNING: multiple messages have this Message-ID (diff)
From: paul.gortmaker@windriver.com (Paul Gortmaker)
To: linux-arm-kernel@lists.infradead.org
Subject: ARM CPU Hotplug breakage on mach-shmobile and KZM9D
Date: Tue, 30 Jul 2013 10:27:51 -0400	[thread overview]
Message-ID: <51F7CD67.6020209@windriver.com> (raw)
In-Reply-To: <20130730074939.GE7210@verge.net.au>

On 13-07-30 03:49 AM, Simon Horman wrote:
> [ Cc Paul Gortmaker ]
> 
> On Thu, Jul 25, 2013 at 10:06:07AM +0900, Simon Horman wrote:
>> On Thu, Jul 25, 2013 at 12:15:49AM +0900, Magnus Damm wrote:
>>> Hi everyone,
>>>
>>> Bad news: CPU Hotplug on KZM9D seems broken on recent kernels.
>>>
>>> On renesas-next-20130710 or earlier I can perform the following:
>>>
>>> # echo 0 > /sys/devices/system/cpu/cpu1/online
>>> CPU1: shutdown
>>> # echo 1 > /sys/devices/system/cpu/cpu1/online
>>> CPU1: Booted secondary processor
>>> #
>>>
>>> While on more recent kernels the hotplug boot fails. This may be
>>> related to the move to v3.11-rc. The tag renesas-next-20130710
>>> surprisingly seems to be the final kernel based on v3.10-rc before
>>> jumping to v3.11-rc.
>>>
>>> I wonder, do other ARM platforms have working CPU Hotplug in v3.11-rc?
>>
>> I have a snowball that I could test if you think it would be useful.
> 
> Unfortunately getting snowball to work turned out to be rather painful.
> So instead I bisected the problem on the KZM9G (N.b: the D in the subject
> seems to be incorrect :^)
> 
> The result is that the following patch, added in v3.11-rc1,
> appears to be the culprit.

Double check that you have this commit present:
 ---------------
commit 8c69d7af12265e5be9326110b695e010b47505bd
Author: Stephen Warren <swarren@nvidia.com>
Date:   Fri Jul 5 22:59:42 2013 +0100

    ARM: 7780/1: add missing linker section markup to head-common.S
 ---------------

as I think you are reporting the same problem that it fixed.

Thanks,
Paul.
--

> 
> commit 22f0a27367742f65130c0fb25ef00f7297e032c1
> Author: Paul Gortmaker <paul.gortmaker@windriver.com>
> Date:   Mon Jun 17 18:34:14 2013 -0400
> 
>     init.h: remove __cpuinit sections from the kernel
>     
>     The __cpuinit type of throwaway sections might have made sense
>     some time ago when RAM was more constrained, but now the savings
>     do not offset the cost and complications.  For example, the fix in
>     commit 5e427ec2d0 ("x86: Fix bit corruption at CPU resume time")
>     is a good example of the nasty type of bugs that can be created
>     with improper use of the various __init prefixes.
>     
>     After a discussion on LKML[1] it was decided that cpuinit should go
>     the way of devinit and be phased out.  Once all the users are gone,
>     we can then finally remove the macros themselves from linux/init.h.
>     
>     As an interim step, we can dummy out the macros to be no-ops, and
>     this will allow us to avoid a giant tree-wide patch, and instead
>     we can feed in smaller chunks mainly via the arch/ trees.  This
>     is in keeping with commit 78d86c213f28193082b5d8a1a424044b7ba406f1
>     ("init.h: Remove __dev* sections from the kernel")
>     
>     We don't strictly need to dummy out the macros to do this, but if
>     we don't then some harmless section mismatch warnings may temporarily
>     result.  For example, notify_cpu_starting() and cpu_up() are arch
>     independent (kernel/cpu.c) and are flagged as __cpuinit.  And hence
>     the calling functions in the arch specific code are also expected
>     to be __cpuinit -- if not, then we get the section mismatch warning.
>     
>     Two of the three __CPUINIT variants are not used whatsoever, and
>     so they are simply removed directly at this point in time.
>     
>     [1] https://lkml.org/lkml/2013/5/20/589
>     
>     Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
> 
> diff --git a/include/linux/init.h b/include/linux/init.h
> index 8618147..e73f2b70 100644
> --- a/include/linux/init.h
> +++ b/include/linux/init.h
> @@ -93,13 +93,13 @@
>  
>  #define __exit          __section(.exit.text) __exitused __cold notrace
>  
> -/* Used for HOTPLUG_CPU */
> -#define __cpuinit        __section(.cpuinit.text) __cold notrace
> -#define __cpuinitdata    __section(.cpuinit.data)
> -#define __cpuinitconst   __constsection(.cpuinit.rodata)
> -#define __cpuexit        __section(.cpuexit.text) __exitused __cold notrace
> -#define __cpuexitdata    __section(.cpuexit.data)
> -#define __cpuexitconst   __constsection(.cpuexit.rodata)
> +/* temporary, until all users are removed */
> +#define __cpuinit
> +#define __cpuinitdata
> +#define __cpuinitconst
> +#define __cpuexit
> +#define __cpuexitdata
> +#define __cpuexitconst
>  
>  /* Used for MEMORY_HOTPLUG */
>  #define __meminit        __section(.meminit.text) __cold notrace
> @@ -118,9 +118,8 @@
>  #define __INITRODATA	.section	".init.rodata","a",%progbits
>  #define __FINITDATA	.previous
>  
> -#define __CPUINIT        .section	".cpuinit.text", "ax"
> -#define __CPUINITDATA    .section	".cpuinit.data", "aw"
> -#define __CPUINITRODATA  .section	".cpuinit.rodata", "a"
> +/* temporary, until all users are removed */
> +#define __CPUINIT
>  
>  #define __MEMINIT        .section	".meminit.text", "ax"
>  #define __MEMINITDATA    .section	".meminit.data", "aw"
> 

  reply	other threads:[~2013-07-30 14:27 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-24 15:15 ARM CPU Hotplug breakage on mach-shmobile and KZM9D Magnus Damm
2013-07-24 15:15 ` Magnus Damm
2013-07-25  1:06 ` Simon Horman
2013-07-25  1:06   ` Simon Horman
2013-07-25  1:49   ` Magnus Damm
2013-07-25  1:49     ` Magnus Damm
2013-07-30  7:49   ` Simon Horman
2013-07-30  7:49     ` Simon Horman
2013-07-30 14:27     ` Paul Gortmaker [this message]
2013-07-30 14:27       ` Paul Gortmaker
2013-07-31  1:04       ` Simon Horman
2013-07-31  1:04         ` Simon Horman
2013-07-31  6:00         ` Magnus Damm
2013-07-31  6:00           ` Magnus Damm

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=51F7CD67.6020209@windriver.com \
    --to=paul.gortmaker@windriver.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.