* [PATCH] [IA64] idle: delete (*idle)()
@ 2013-03-29 18:02 Luck, Tony
0 siblings, 0 replies; 2+ messages in thread
From: Luck, Tony @ 2013-03-29 18:02 UTC (permalink / raw)
To: linux-ia64
From: Len Brown <len.brown@intel.com>
Commit 3e7fc708eb
ia64 idle: delete pm_idle
in 3.9-rc1 didn't finish the job, leaving an un-initialized
reference to (*idle)().
Reported-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Len Brown <len.brown@intel.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
---
[Haven't seen a crash from this - but seems like we are
just being lucky that "idle" is zero so it does get
initialized before we jump to randomland]
arch/ia64/kernel/process.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/arch/ia64/kernel/process.c b/arch/ia64/kernel/process.c
index e34f565..6f7dc8b 100644
--- a/arch/ia64/kernel/process.c
+++ b/arch/ia64/kernel/process.c
@@ -291,7 +291,6 @@ cpu_idle (void)
}
if (!need_resched()) {
- void (*idle)(void);
#ifdef CONFIG_SMP
min_xtp();
#endif
@@ -299,9 +298,7 @@ cpu_idle (void)
if (mark_idle)
(*mark_idle)(1);
- if (!idle)
- idle = default_idle;
- (*idle)();
+ default_idle();
if (mark_idle)
(*mark_idle)(0);
#ifdef CONFIG_SMP
--
1.8.1.4
^ permalink raw reply related [flat|nested] 2+ messages in thread[parent not found: <1360475903-30007-1-git-send-email-lenb@kernel.org>]
* [PATCH 09/16] ia64 idle: delete pm_idle
[not found] <1360475903-30007-1-git-send-email-lenb@kernel.org>
@ 2013-02-10 5:58 ` Len Brown
2013-02-21 10:15 ` Lars-Peter Clausen
0 siblings, 1 reply; 2+ messages in thread
From: Len Brown @ 2013-02-10 5:58 UTC (permalink / raw)
To: linux-pm; +Cc: linux-kernel, Len Brown, linux-ia64
From: Len Brown <len.brown@intel.com>
pm_idle() on ia64 was a synonym for default_idle().
So simply invoke default_idle() directly.
Signed-off-by: Len Brown <len.brown@intel.com>
Cc: linux-ia64@vger.kernel.org
---
arch/ia64/kernel/process.c | 3 ---
arch/ia64/kernel/setup.c | 1 -
2 files changed, 4 deletions(-)
diff --git a/arch/ia64/kernel/process.c b/arch/ia64/kernel/process.c
index 31360cb..e34f565 100644
--- a/arch/ia64/kernel/process.c
+++ b/arch/ia64/kernel/process.c
@@ -57,8 +57,6 @@ void (*ia64_mark_idle)(int);
unsigned long boot_option_idle_override = IDLE_NO_OVERRIDE;
EXPORT_SYMBOL(boot_option_idle_override);
-void (*pm_idle) (void);
-EXPORT_SYMBOL(pm_idle);
void (*pm_power_off) (void);
EXPORT_SYMBOL(pm_power_off);
@@ -301,7 +299,6 @@ cpu_idle (void)
if (mark_idle)
(*mark_idle)(1);
- idle = pm_idle;
if (!idle)
idle = default_idle;
(*idle)();
diff --git a/arch/ia64/kernel/setup.c b/arch/ia64/kernel/setup.c
index aaefd9b..2029cc0 100644
--- a/arch/ia64/kernel/setup.c
+++ b/arch/ia64/kernel/setup.c
@@ -1051,7 +1051,6 @@ cpu_init (void)
max_num_phys_stacked = num_phys_stacked;
}
platform_cpu_init();
- pm_idle = default_idle;
}
void __init
--
1.8.1.3.535.ga923c31
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH 09/16] ia64 idle: delete pm_idle
2013-02-10 5:58 ` [PATCH 09/16] ia64 idle: delete pm_idle Len Brown
@ 2013-02-21 10:15 ` Lars-Peter Clausen
2013-03-26 3:12 ` Brown, Len
0 siblings, 1 reply; 2+ messages in thread
From: Lars-Peter Clausen @ 2013-02-21 10:15 UTC (permalink / raw)
To: Len Brown; +Cc: linux-pm, linux-kernel, Len Brown, linux-ia64
On 02/10/2013 06:58 AM, Len Brown wrote:
> From: Len Brown <len.brown@intel.com>
>
> pm_idle() on ia64 was a synonym for default_idle().
> So simply invoke default_idle() directly.
>
> Signed-off-by: Len Brown <len.brown@intel.com>
> Cc: linux-ia64@vger.kernel.org
> ---
> arch/ia64/kernel/process.c | 3 ---
> arch/ia64/kernel/setup.c | 1 -
> 2 files changed, 4 deletions(-)
>
> diff --git a/arch/ia64/kernel/process.c b/arch/ia64/kernel/process.c
> index 31360cb..e34f565 100644
> --- a/arch/ia64/kernel/process.c
> +++ b/arch/ia64/kernel/process.c
> @@ -57,8 +57,6 @@ void (*ia64_mark_idle)(int);
>
> unsigned long boot_option_idle_override = IDLE_NO_OVERRIDE;
> EXPORT_SYMBOL(boot_option_idle_override);
> -void (*pm_idle) (void);
> -EXPORT_SYMBOL(pm_idle);
> void (*pm_power_off) (void);
> EXPORT_SYMBOL(pm_power_off);
>
> @@ -301,7 +299,6 @@ cpu_idle (void)
> if (mark_idle)
> (*mark_idle)(1);
>
> - idle = pm_idle;
> if (!idle)
Hm, if I'm not mistaken idle will uninitialized at this point, so this could
quite likely lead to a crash.
> idle = default_idle;
> (*idle)();
> diff --git a/arch/ia64/kernel/setup.c b/arch/ia64/kernel/setup.c
> index aaefd9b..2029cc0 100644
> --- a/arch/ia64/kernel/setup.c
> +++ b/arch/ia64/kernel/setup.c
> @@ -1051,7 +1051,6 @@ cpu_init (void)
> max_num_phys_stacked = num_phys_stacked;
> }
> platform_cpu_init();
> - pm_idle = default_idle;
> }
>
> void __init
^ permalink raw reply [flat|nested] 2+ messages in thread
* RE: [PATCH 09/16] ia64 idle: delete pm_idle
2013-02-21 10:15 ` Lars-Peter Clausen
@ 2013-03-26 3:12 ` Brown, Len
2013-03-26 4:29 ` [PATCH] ia64 idle: delete (*idle)() Len Brown
0 siblings, 1 reply; 2+ messages in thread
From: Brown, Len @ 2013-03-26 3:12 UTC (permalink / raw)
To: Lars-Peter Clausen, Len Brown
Cc: linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-ia64@vger.kernel.org
> > - idle = pm_idle;
> > if (!idle)
>
> Hm, if I'm not mistaken idle will uninitialized at this point, so this
> could quite likely lead to a crash.
thanks,
will fix.
-Len
^ permalink raw reply [flat|nested] 2+ messages in thread
* [PATCH] ia64 idle: delete (*idle)()
2013-03-26 3:12 ` Brown, Len
@ 2013-03-26 4:29 ` Len Brown
0 siblings, 0 replies; 2+ messages in thread
From: Len Brown @ 2013-03-26 4:29 UTC (permalink / raw)
To: Luck, Tony
Cc: Lars-Peter Clausen, linux-pm@vger.kernel.org,
linux-kernel@vger.kernel.org, linux-ia64@vger.kernel.org
From: Len Brown <len.brown@intel.com>
3e7fc708eb (ia64 idle: delete pm_idle) in 3.9-rc1
didn't finish the job, leaving an un-initialized
reference to (*idle)().
Reported-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Len Brown <len.brown@intel.com>
---
arch/ia64/kernel/process.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/arch/ia64/kernel/process.c b/arch/ia64/kernel/process.c
index e34f565..6f7dc8b 100644
--- a/arch/ia64/kernel/process.c
+++ b/arch/ia64/kernel/process.c
@@ -291,7 +291,6 @@ cpu_idle (void)
}
if (!need_resched()) {
- void (*idle)(void);
#ifdef CONFIG_SMP
min_xtp();
#endif
@@ -299,9 +298,7 @@ cpu_idle (void)
if (mark_idle)
(*mark_idle)(1);
- if (!idle)
- idle = default_idle;
- (*idle)();
+ default_idle();
if (mark_idle)
(*mark_idle)(0);
#ifdef CONFIG_SMP
--
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-03-29 18:02 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-29 18:02 [PATCH] [IA64] idle: delete (*idle)() Luck, Tony
[not found] <1360475903-30007-1-git-send-email-lenb@kernel.org>
2013-02-10 5:58 ` [PATCH 09/16] ia64 idle: delete pm_idle Len Brown
2013-02-21 10:15 ` Lars-Peter Clausen
2013-03-26 3:12 ` Brown, Len
2013-03-26 4:29 ` [PATCH] ia64 idle: delete (*idle)() Len Brown
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox