Re: [PATCH 07/32] arm: delete __cpuinit/__CPUINIT usage from all ARM users

2013-07-02 Thread Paul Gortmaker
[Re: [PATCH 07/32] arm: delete __cpuinit/__CPUINIT usage from all ARM users] On 
02/07/2013 (Tue 09:58) Russell King - ARM Linux wrote:

> On Tue, Jul 02, 2013 at 04:52:00PM +0800, Joseph Lo wrote:
> > I just tested this series on Tegra platform. It looks broken CPU hotplug
> > function for Tegra at least. The CPU can't plug-in after unplugging. And
> > the system resume function also not working when "enable_nonboot_cpus".
> > 
> > Both of the issue cause system hang up. Are we missing something for
> > __cpuinit removal work?
> 
> Check that any assembly code you're using where the __CPUINIT* marker has
> been removed is not preceded by an __INIT or similar.   This code needs
> to end up in the normal .text, .data or .bss sections now.

Yes, As Russell says it is entirely possible that the earlier section
was __INIT and there was already a missing __FINIT (or .previous).

Hence what was __cpuinit got grandfathered into __INIT instead of
.text/.data/.bss

I'm offline at the moment but will double check myself later this
evening if nothing obvious has been found by then.

Thanks,
Paul.
--
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH 07/32] arm: delete __cpuinit/__CPUINIT usage from all ARM users

2013-07-02 Thread Russell King - ARM Linux
On Tue, Jul 02, 2013 at 04:52:00PM +0800, Joseph Lo wrote:
> I just tested this series on Tegra platform. It looks broken CPU hotplug
> function for Tegra at least. The CPU can't plug-in after unplugging. And
> the system resume function also not working when "enable_nonboot_cpus".
> 
> Both of the issue cause system hang up. Are we missing something for
> __cpuinit removal work?

Check that any assembly code you're using where the __CPUINIT* marker has
been removed is not preceded by an __INIT or similar.   This code needs
to end up in the normal .text, .data or .bss sections now.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH 07/32] arm: delete __cpuinit/__CPUINIT usage from all ARM users

2013-07-02 Thread Joseph Lo
Adding linux-tegra in Cc.

On Tue, 2013-06-25 at 03:30 +0800, Paul Gortmaker wrote:
> 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.
> 
> Note that some harmless section mismatch warnings may result, since
> notify_cpu_starting() and cpu_up() are arch independent (kernel/cpu.c)
> and are flagged as __cpuinit  -- so if we remove the __cpuinit from
> the arch specific callers, we will also get section mismatch warnings.
> As an intermediate step, we intend to turn the linux/init.h cpuinit
> related content into no-ops as early as possible, since that will get
> rid of these warnings.  In any case, they are temporary and harmless.
> 
> This removes all the ARM uses of the __cpuinit macros from C code,
> and all __CPUINIT from assembly code.  It also had two ".previous"
> section statements that were paired off against __CPUINIT
> (aka .section ".cpuinit.text") that also get removed here.
> 
> [1] https://lkml.org/lkml/2013/5/20/589
> 
> Cc: Russell King 
> Cc: Will Deacon 
> Cc: linux-arm-ker...@lists.infradead.org
> Signed-off-by: Paul Gortmaker 
> ---
> 
> [This commit is part of the __cpuinit removal work.  If you don't see
>  any problems with it, then you don't have to do anything ; it will be
>  submitted with all the rest of the __cpuinit removal work.  On the
>  other hand, if you want to carry this patch in with your other pending
>  changes so as to handle conflicts with other pending work yourself, then
>  that is fine too, as the commits can largely be treated independently.
>  For more information, please see: https://lkml.org/lkml/2013/6/20/513 ]
> 

Hi Paul,

I just tested this series on Tegra platform. It looks broken CPU hotplug
function for Tegra at least. The CPU can't plug-in after unplugging. And
the system resume function also not working when "enable_nonboot_cpus".

Both of the issue cause system hang up. Are we missing something for
__cpuinit removal work?

Thanks,
Joseph

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH 07/32] arm: delete __cpuinit/__CPUINIT usage from all ARM users

2013-07-02 Thread Paul Gortmaker
[Re: [PATCH 07/32] arm: delete __cpuinit/__CPUINIT usage from all ARM users] On 
02/07/2013 (Tue 09:58) Russell King - ARM Linux wrote:

 On Tue, Jul 02, 2013 at 04:52:00PM +0800, Joseph Lo wrote:
  I just tested this series on Tegra platform. It looks broken CPU hotplug
  function for Tegra at least. The CPU can't plug-in after unplugging. And
  the system resume function also not working when enable_nonboot_cpus.
  
  Both of the issue cause system hang up. Are we missing something for
  __cpuinit removal work?
 
 Check that any assembly code you're using where the __CPUINIT* marker has
 been removed is not preceded by an __INIT or similar.   This code needs
 to end up in the normal .text, .data or .bss sections now.

Yes, As Russell says it is entirely possible that the earlier section
was __INIT and there was already a missing __FINIT (or .previous).

Hence what was __cpuinit got grandfathered into __INIT instead of
.text/.data/.bss

I'm offline at the moment but will double check myself later this
evening if nothing obvious has been found by then.

Thanks,
Paul.
--
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH 07/32] arm: delete __cpuinit/__CPUINIT usage from all ARM users

2013-07-02 Thread Joseph Lo
Adding linux-tegra in Cc.

On Tue, 2013-06-25 at 03:30 +0800, Paul Gortmaker wrote:
 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.
 
 Note that some harmless section mismatch warnings may result, since
 notify_cpu_starting() and cpu_up() are arch independent (kernel/cpu.c)
 and are flagged as __cpuinit  -- so if we remove the __cpuinit from
 the arch specific callers, we will also get section mismatch warnings.
 As an intermediate step, we intend to turn the linux/init.h cpuinit
 related content into no-ops as early as possible, since that will get
 rid of these warnings.  In any case, they are temporary and harmless.
 
 This removes all the ARM uses of the __cpuinit macros from C code,
 and all __CPUINIT from assembly code.  It also had two .previous
 section statements that were paired off against __CPUINIT
 (aka .section .cpuinit.text) that also get removed here.
 
 [1] https://lkml.org/lkml/2013/5/20/589
 
 Cc: Russell King li...@arm.linux.org.uk
 Cc: Will Deacon will.dea...@arm.com
 Cc: linux-arm-ker...@lists.infradead.org
 Signed-off-by: Paul Gortmaker paul.gortma...@windriver.com
 ---
 
 [This commit is part of the __cpuinit removal work.  If you don't see
  any problems with it, then you don't have to do anything ; it will be
  submitted with all the rest of the __cpuinit removal work.  On the
  other hand, if you want to carry this patch in with your other pending
  changes so as to handle conflicts with other pending work yourself, then
  that is fine too, as the commits can largely be treated independently.
  For more information, please see: https://lkml.org/lkml/2013/6/20/513 ]
 

Hi Paul,

I just tested this series on Tegra platform. It looks broken CPU hotplug
function for Tegra at least. The CPU can't plug-in after unplugging. And
the system resume function also not working when enable_nonboot_cpus.

Both of the issue cause system hang up. Are we missing something for
__cpuinit removal work?

Thanks,
Joseph

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH 07/32] arm: delete __cpuinit/__CPUINIT usage from all ARM users

2013-07-02 Thread Russell King - ARM Linux
On Tue, Jul 02, 2013 at 04:52:00PM +0800, Joseph Lo wrote:
 I just tested this series on Tegra platform. It looks broken CPU hotplug
 function for Tegra at least. The CPU can't plug-in after unplugging. And
 the system resume function also not working when enable_nonboot_cpus.
 
 Both of the issue cause system hang up. Are we missing something for
 __cpuinit removal work?

Check that any assembly code you're using where the __CPUINIT* marker has
been removed is not preceded by an __INIT or similar.   This code needs
to end up in the normal .text, .data or .bss sections now.
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 07/32] arm: delete __cpuinit/__CPUINIT usage from all ARM users

2013-06-24 Thread Paul Gortmaker
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.

Note that some harmless section mismatch warnings may result, since
notify_cpu_starting() and cpu_up() are arch independent (kernel/cpu.c)
and are flagged as __cpuinit  -- so if we remove the __cpuinit from
the arch specific callers, we will also get section mismatch warnings.
As an intermediate step, we intend to turn the linux/init.h cpuinit
related content into no-ops as early as possible, since that will get
rid of these warnings.  In any case, they are temporary and harmless.

This removes all the ARM uses of the __cpuinit macros from C code,
and all __CPUINIT from assembly code.  It also had two ".previous"
section statements that were paired off against __CPUINIT
(aka .section ".cpuinit.text") that also get removed here.

[1] https://lkml.org/lkml/2013/5/20/589

Cc: Russell King 
Cc: Will Deacon 
Cc: linux-arm-ker...@lists.infradead.org
Signed-off-by: Paul Gortmaker 
---

[This commit is part of the __cpuinit removal work.  If you don't see
 any problems with it, then you don't have to do anything ; it will be
 submitted with all the rest of the __cpuinit removal work.  On the
 other hand, if you want to carry this patch in with your other pending
 changes so as to handle conflicts with other pending work yourself, then
 that is fine too, as the commits can largely be treated independently.
 For more information, please see: https://lkml.org/lkml/2013/6/20/513 ]

 arch/arm/common/mcpm_platsmp.c|  4 ++--
 arch/arm/include/asm/arch_timer.h |  2 +-
 arch/arm/kernel/head-common.S |  1 -
 arch/arm/kernel/head.S|  1 -
 arch/arm/kernel/hw_breakpoint.c   |  4 ++--
 arch/arm/kernel/perf_event_cpu.c  |  6 +++---
 arch/arm/kernel/psci_smp.c|  3 +--
 arch/arm/kernel/smp.c | 18 +-
 arch/arm/kernel/smp_twd.c |  6 +++---
 arch/arm/lib/delay.c  |  2 +-
 arch/arm/mach-exynos/headsmp.S|  2 --
 arch/arm/mach-exynos/platsmp.c|  4 ++--
 arch/arm/mach-highbank/platsmp.c  |  2 +-
 arch/arm/mach-imx/platsmp.c   |  2 +-
 arch/arm/mach-msm/headsmp.S   |  2 --
 arch/arm/mach-msm/platsmp.c   |  6 +++---
 arch/arm/mach-msm/timer.c |  4 ++--
 arch/arm/mach-mvebu/coherency.c   |  2 +-
 arch/arm/mach-mvebu/headsmp.S |  2 --
 arch/arm/mach-mvebu/platsmp.c |  5 ++---
 arch/arm/mach-omap2/omap-headsmp.S|  2 --
 arch/arm/mach-omap2/omap-mpuss-lowpower.c |  2 +-
 arch/arm/mach-omap2/omap-smp.c|  4 ++--
 arch/arm/mach-omap2/omap-wakeupgen.c  |  4 ++--
 arch/arm/mach-prima2/headsmp.S|  2 --
 arch/arm/mach-prima2/platsmp.c|  4 ++--
 arch/arm/mach-shmobile/headsmp-scu.S  |  1 -
 arch/arm/mach-shmobile/headsmp.S  |  2 --
 arch/arm/mach-shmobile/smp-emev2.c|  2 +-
 arch/arm/mach-shmobile/smp-r8a7779.c  |  2 +-
 arch/arm/mach-shmobile/smp-sh73a0.c   |  2 +-
 arch/arm/mach-socfpga/headsmp.S   |  1 -
 arch/arm/mach-socfpga/platsmp.c   |  2 +-
 arch/arm/mach-spear/generic.h |  2 +-
 arch/arm/mach-spear/platsmp.c |  4 ++--
 arch/arm/mach-tegra/platsmp.c |  4 ++--
 arch/arm/mach-tegra/pm.c  |  2 +-
 arch/arm/mach-ux500/platsmp.c |  4 ++--
 arch/arm/mach-zynq/common.h   |  2 +-
 arch/arm/mach-zynq/headsmp.S  |  2 --
 arch/arm/mach-zynq/platsmp.c  |  6 +++---
 arch/arm/mm/proc-arm1020.S|  2 --
 arch/arm/mm/proc-arm1020e.S   |  2 --
 arch/arm/mm/proc-arm1022.S|  2 --
 arch/arm/mm/proc-arm1026.S|  3 ---
 arch/arm/mm/proc-arm720.S |  2 --
 arch/arm/mm/proc-arm740.S |  2 --
 arch/arm/mm/proc-arm7tdmi.S   |  2 --
 arch/arm/mm/proc-arm920.S |  2 --
 arch/arm/mm/proc-arm922.S |  2 --
 arch/arm/mm/proc-arm925.S |  2 --
 arch/arm/mm/proc-arm926.S |  2 --
 arch/arm/mm/proc-arm940.S |  2 --
 arch/arm/mm/proc-arm946.S |  2 --
 arch/arm/mm/proc-arm9tdmi.S   |  2 --
 arch/arm/mm/proc-fa526.S  |  2 --
 arch/arm/mm/proc-feroceon.S   |  2 --
 arch/arm/mm/proc-mohawk.S |  2 --
 

[PATCH 07/32] arm: delete __cpuinit/__CPUINIT usage from all ARM users

2013-06-24 Thread Paul Gortmaker
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.

Note that some harmless section mismatch warnings may result, since
notify_cpu_starting() and cpu_up() are arch independent (kernel/cpu.c)
and are flagged as __cpuinit  -- so if we remove the __cpuinit from
the arch specific callers, we will also get section mismatch warnings.
As an intermediate step, we intend to turn the linux/init.h cpuinit
related content into no-ops as early as possible, since that will get
rid of these warnings.  In any case, they are temporary and harmless.

This removes all the ARM uses of the __cpuinit macros from C code,
and all __CPUINIT from assembly code.  It also had two .previous
section statements that were paired off against __CPUINIT
(aka .section .cpuinit.text) that also get removed here.

[1] https://lkml.org/lkml/2013/5/20/589

Cc: Russell King li...@arm.linux.org.uk
Cc: Will Deacon will.dea...@arm.com
Cc: linux-arm-ker...@lists.infradead.org
Signed-off-by: Paul Gortmaker paul.gortma...@windriver.com
---

[This commit is part of the __cpuinit removal work.  If you don't see
 any problems with it, then you don't have to do anything ; it will be
 submitted with all the rest of the __cpuinit removal work.  On the
 other hand, if you want to carry this patch in with your other pending
 changes so as to handle conflicts with other pending work yourself, then
 that is fine too, as the commits can largely be treated independently.
 For more information, please see: https://lkml.org/lkml/2013/6/20/513 ]

 arch/arm/common/mcpm_platsmp.c|  4 ++--
 arch/arm/include/asm/arch_timer.h |  2 +-
 arch/arm/kernel/head-common.S |  1 -
 arch/arm/kernel/head.S|  1 -
 arch/arm/kernel/hw_breakpoint.c   |  4 ++--
 arch/arm/kernel/perf_event_cpu.c  |  6 +++---
 arch/arm/kernel/psci_smp.c|  3 +--
 arch/arm/kernel/smp.c | 18 +-
 arch/arm/kernel/smp_twd.c |  6 +++---
 arch/arm/lib/delay.c  |  2 +-
 arch/arm/mach-exynos/headsmp.S|  2 --
 arch/arm/mach-exynos/platsmp.c|  4 ++--
 arch/arm/mach-highbank/platsmp.c  |  2 +-
 arch/arm/mach-imx/platsmp.c   |  2 +-
 arch/arm/mach-msm/headsmp.S   |  2 --
 arch/arm/mach-msm/platsmp.c   |  6 +++---
 arch/arm/mach-msm/timer.c |  4 ++--
 arch/arm/mach-mvebu/coherency.c   |  2 +-
 arch/arm/mach-mvebu/headsmp.S |  2 --
 arch/arm/mach-mvebu/platsmp.c |  5 ++---
 arch/arm/mach-omap2/omap-headsmp.S|  2 --
 arch/arm/mach-omap2/omap-mpuss-lowpower.c |  2 +-
 arch/arm/mach-omap2/omap-smp.c|  4 ++--
 arch/arm/mach-omap2/omap-wakeupgen.c  |  4 ++--
 arch/arm/mach-prima2/headsmp.S|  2 --
 arch/arm/mach-prima2/platsmp.c|  4 ++--
 arch/arm/mach-shmobile/headsmp-scu.S  |  1 -
 arch/arm/mach-shmobile/headsmp.S  |  2 --
 arch/arm/mach-shmobile/smp-emev2.c|  2 +-
 arch/arm/mach-shmobile/smp-r8a7779.c  |  2 +-
 arch/arm/mach-shmobile/smp-sh73a0.c   |  2 +-
 arch/arm/mach-socfpga/headsmp.S   |  1 -
 arch/arm/mach-socfpga/platsmp.c   |  2 +-
 arch/arm/mach-spear/generic.h |  2 +-
 arch/arm/mach-spear/platsmp.c |  4 ++--
 arch/arm/mach-tegra/platsmp.c |  4 ++--
 arch/arm/mach-tegra/pm.c  |  2 +-
 arch/arm/mach-ux500/platsmp.c |  4 ++--
 arch/arm/mach-zynq/common.h   |  2 +-
 arch/arm/mach-zynq/headsmp.S  |  2 --
 arch/arm/mach-zynq/platsmp.c  |  6 +++---
 arch/arm/mm/proc-arm1020.S|  2 --
 arch/arm/mm/proc-arm1020e.S   |  2 --
 arch/arm/mm/proc-arm1022.S|  2 --
 arch/arm/mm/proc-arm1026.S|  3 ---
 arch/arm/mm/proc-arm720.S |  2 --
 arch/arm/mm/proc-arm740.S |  2 --
 arch/arm/mm/proc-arm7tdmi.S   |  2 --
 arch/arm/mm/proc-arm920.S |  2 --
 arch/arm/mm/proc-arm922.S |  2 --
 arch/arm/mm/proc-arm925.S |  2 --
 arch/arm/mm/proc-arm926.S |  2 --
 arch/arm/mm/proc-arm940.S |  2 --
 arch/arm/mm/proc-arm946.S |  2 --
 arch/arm/mm/proc-arm9tdmi.S   |  2 --
 arch/arm/mm/proc-fa526.S  |  2 --
 arch/arm/mm/proc-feroceon.S   |  2 --