* [PATCH] ARM: tegra: make tegra_cpu_reset_handler_enable() __init
@ 2012-06-18 21:01 Stephen Warren
[not found] ` <1340053310-20855-1-git-send-email-swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
0 siblings, 1 reply; 5+ messages in thread
From: Stephen Warren @ 2012-06-18 21:01 UTC (permalink / raw)
To: Olof Johansson, Colin Cross, Arnd Bergmann
Cc: arm-DgEjT+Ai2ygdnm+yROfE0A, linux-tegra-u79uwXL29TY76Z2rM5mHXA,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, Stephen Warren
From: Stephen Warren <swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
This solves a section mismatch warning. I hadn't noticed this before,
because my compiler was inlining tegra_cpu_reset_handler_enable() inside
tegra_cpu_reset_handler_init(), which is already __init, but I switched
compilers and it stopped doing that.
Cc: <stable-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org> # v3.4
Signed-off-by: Stephen Warren <swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
---
Arnd, Olof, do you want me to put this in a pull request, or can you apply
it directly for 3.5?
arch/arm/mach-tegra/reset.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/arch/arm/mach-tegra/reset.c b/arch/arm/mach-tegra/reset.c
index 4d6a2ee..5beb7eb 100644
--- a/arch/arm/mach-tegra/reset.c
+++ b/arch/arm/mach-tegra/reset.c
@@ -33,7 +33,7 @@
static bool is_enabled;
-static void tegra_cpu_reset_handler_enable(void)
+static void __init tegra_cpu_reset_handler_enable(void)
{
void __iomem *iram_base = IO_ADDRESS(TEGRA_IRAM_RESET_BASE);
void __iomem *evp_cpu_reset =
--
1.7.0.4
^ permalink raw reply related [flat|nested] 5+ messages in thread[parent not found: <1340053310-20855-1-git-send-email-swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>]
* Re: [PATCH] ARM: tegra: make tegra_cpu_reset_handler_enable() __init [not found] ` <1340053310-20855-1-git-send-email-swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org> @ 2012-06-18 23:44 ` Olof Johansson 2012-07-18 15:01 ` Peter De Schrijver 1 sibling, 0 replies; 5+ messages in thread From: Olof Johansson @ 2012-06-18 23:44 UTC (permalink / raw) To: Stephen Warren Cc: Colin Cross, Arnd Bergmann, arm-DgEjT+Ai2ygdnm+yROfE0A, linux-tegra-u79uwXL29TY76Z2rM5mHXA, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, Stephen Warren On Mon, Jun 18, 2012 at 03:01:50PM -0600, Stephen Warren wrote: > From: Stephen Warren <swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org> > > This solves a section mismatch warning. I hadn't noticed this before, > because my compiler was inlining tegra_cpu_reset_handler_enable() inside > tegra_cpu_reset_handler_init(), which is already __init, but I switched > compilers and it stopped doing that. > > Cc: <stable-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org> # v3.4 > Signed-off-by: Stephen Warren <swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org> > --- > Arnd, Olof, do you want me to put this in a pull request, or can you apply > it directly for 3.5? Single patches are just fine as is, no need for a pull request. Applied to fixes. Thanks! -Olof ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] ARM: tegra: make tegra_cpu_reset_handler_enable() __init [not found] ` <1340053310-20855-1-git-send-email-swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org> 2012-06-18 23:44 ` Olof Johansson @ 2012-07-18 15:01 ` Peter De Schrijver [not found] ` <20120718150130.GV9437-Rysk9IDjsxmJz7etNGeUX8VPkgjIgRvpAL8bYrjMMd8@public.gmane.org> 1 sibling, 1 reply; 5+ messages in thread From: Peter De Schrijver @ 2012-07-18 15:01 UTC (permalink / raw) To: Stephen Warren Cc: Olof Johansson, Colin Cross, Arnd Bergmann, arm-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org, linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org, Stephen Warren On Mon, Jun 18, 2012 at 11:01:50PM +0200, Stephen Warren wrote: > From: Stephen Warren <swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org> > > This solves a section mismatch warning. I hadn't noticed this before, > because my compiler was inlining tegra_cpu_reset_handler_enable() inside > tegra_cpu_reset_handler_init(), which is already __init, but I switched > compilers and it stopped doing that. Why does this generate a section mismatch warning? I see why calling a a __init marked function from a non __init marked function is a problem, but the opposite should be ok no? Cheers, Peter. ^ permalink raw reply [flat|nested] 5+ messages in thread
[parent not found: <20120718150130.GV9437-Rysk9IDjsxmJz7etNGeUX8VPkgjIgRvpAL8bYrjMMd8@public.gmane.org>]
* Re: [PATCH] ARM: tegra: make tegra_cpu_reset_handler_enable() __init [not found] ` <20120718150130.GV9437-Rysk9IDjsxmJz7etNGeUX8VPkgjIgRvpAL8bYrjMMd8@public.gmane.org> @ 2012-07-23 20:09 ` Stephen Warren 2012-07-24 9:06 ` Peter De Schrijver 0 siblings, 1 reply; 5+ messages in thread From: Stephen Warren @ 2012-07-23 20:09 UTC (permalink / raw) To: Peter De Schrijver Cc: Olof Johansson, Colin Cross, Arnd Bergmann, arm-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org, linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org, Stephen Warren On 07/18/2012 09:01 AM, Peter De Schrijver wrote: > On Mon, Jun 18, 2012 at 11:01:50PM +0200, Stephen Warren wrote: >> From: Stephen Warren <swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org> >> >> This solves a section mismatch warning. I hadn't noticed this before, >> because my compiler was inlining tegra_cpu_reset_handler_enable() inside >> tegra_cpu_reset_handler_init(), which is already __init, but I switched >> compilers and it stopped doing that. > > Why does this generate a section mismatch warning? I see why calling a > a __init marked function from a non __init marked function is a problem, but > the opposite should be ok no? The issue is that tegra_cpu_reset_handler_enable() itself (which was not __init but the patch made to be __init) was referencing variable __tegra_cpu_reset_handler_{start,end}. This wasn't noticed before because when tegra_cpu_reset_handler_enable() was inlined into tegra_cpu_reset_handler_init(), tegra_cpu_reset_handler_enable() was effectively __init. However, when built as a separate function, you ended up with a non-__init function referencing other things that were __init. In other words, this is indeed nothing to do with __init function tegra_cpu_reset_handler_init() calling non-__init function tegra_cpu_reset_handler_enable(). You can get the details by reverting the patch and building:-) ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] ARM: tegra: make tegra_cpu_reset_handler_enable() __init 2012-07-23 20:09 ` Stephen Warren @ 2012-07-24 9:06 ` Peter De Schrijver 0 siblings, 0 replies; 5+ messages in thread From: Peter De Schrijver @ 2012-07-24 9:06 UTC (permalink / raw) To: Stephen Warren Cc: Stephen Warren, Arnd Bergmann, linux-tegra@vger.kernel.org, arm@kernel.org, Colin Cross, Olof Johansson, linux-arm-kernel@lists.infradead.org On Mon, Jul 23, 2012 at 10:09:30PM +0200, Stephen Warren wrote: > On 07/18/2012 09:01 AM, Peter De Schrijver wrote: > > On Mon, Jun 18, 2012 at 11:01:50PM +0200, Stephen Warren wrote: > >> From: Stephen Warren <swarren@nvidia.com> > >> > >> This solves a section mismatch warning. I hadn't noticed this before, > >> because my compiler was inlining tegra_cpu_reset_handler_enable() inside > >> tegra_cpu_reset_handler_init(), which is already __init, but I switched > >> compilers and it stopped doing that. > > > > Why does this generate a section mismatch warning? I see why calling a > > a __init marked function from a non __init marked function is a problem, but > > the opposite should be ok no? > > The issue is that tegra_cpu_reset_handler_enable() itself (which was not > __init but the patch made to be __init) was referencing variable > __tegra_cpu_reset_handler_{start,end}. This wasn't noticed before > because when tegra_cpu_reset_handler_enable() was inlined into > tegra_cpu_reset_handler_init(), tegra_cpu_reset_handler_enable() was > effectively __init. However, when built as a separate function, you > ended up with a non-__init function referencing other things that were > __init. > > In other words, this is indeed nothing to do with __init function > tegra_cpu_reset_handler_init() calling non-__init function > tegra_cpu_reset_handler_enable(). Ah. That makes sense :) We need to be careful with this when introducing system suspend support because some of this work needs to be redone on resume. Cheers, Peter. ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2012-07-24 9:06 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-06-18 21:01 [PATCH] ARM: tegra: make tegra_cpu_reset_handler_enable() __init Stephen Warren
[not found] ` <1340053310-20855-1-git-send-email-swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2012-06-18 23:44 ` Olof Johansson
2012-07-18 15:01 ` Peter De Schrijver
[not found] ` <20120718150130.GV9437-Rysk9IDjsxmJz7etNGeUX8VPkgjIgRvpAL8bYrjMMd8@public.gmane.org>
2012-07-23 20:09 ` Stephen Warren
2012-07-24 9:06 ` Peter De Schrijver
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox