* [PATCH] Fixes gemmi_idle in file idle.c
@ 2014-06-30 2:52 Nicholas Krause
2014-06-30 6:43 ` Arnd Bergmann
2014-06-30 9:41 ` Russell King - ARM Linux
0 siblings, 2 replies; 4+ messages in thread
From: Nicholas Krause @ 2014-06-30 2:52 UTC (permalink / raw)
To: linux-arm-kernel
disables the IRQ line in gemmi_idle before calling cpu_do_idle.
In addition, according to the Fixme message in this file fixes
races that may occur due to not disabling the IRQ before calling
cpu_do_idle.
Signed-off-by: Nicholas Krause <xerofoify@gmail.com>
---
arch/arm/mach-gemini/idle.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/arch/arm/mach-gemini/idle.c b/arch/arm/mach-gemini/idle.c
index ddf8ec9..2880f5a 100644
--- a/arch/arm/mach-gemini/idle.c
+++ b/arch/arm/mach-gemini/idle.c
@@ -17,8 +17,7 @@ static void gemini_idle(void)
* disabled.
*/
- /* FIXME: Enabling interrupts here is racy! */
- local_irq_enable();
+ local_irq_disable();
cpu_do_idle();
}
--
1.9.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH] Fixes gemmi_idle in file idle.c
2014-06-30 2:52 [PATCH] Fixes gemmi_idle in file idle.c Nicholas Krause
@ 2014-06-30 6:43 ` Arnd Bergmann
2014-06-30 9:41 ` Russell King - ARM Linux
1 sibling, 0 replies; 4+ messages in thread
From: Arnd Bergmann @ 2014-06-30 6:43 UTC (permalink / raw)
To: linux-arm-kernel
On Sunday 29 June 2014 22:52:40 Nicholas Krause wrote:
> disables the IRQ line in gemmi_idle before calling cpu_do_idle.
> In addition, according to the Fixme message in this file fixes
> races that may occur due to not disabling the IRQ before calling
> cpu_do_idle.
>
> Signed-off-by: Nicholas Krause <xerofoify@gmail.com>
Have you actually read the comment above the function?
> diff --git a/arch/arm/mach-gemini/idle.c b/arch/arm/mach-gemini/idle.c
> index ddf8ec9..2880f5a 100644
> --- a/arch/arm/mach-gemini/idle.c
> +++ b/arch/arm/mach-gemini/idle.c
> @@ -17,8 +17,7 @@ static void gemini_idle(void)
> * disabled.
> */
>
> - /* FIXME: Enabling interrupts here is racy! */
> - local_irq_enable();
> + local_irq_disable();
> cpu_do_idle();
> }
This has the same effect as deleting the entire file. Doing that
is probably the right thing now that 8182a34d85698 ("ARM: 7760/1:
cpu_fa526_do_idle: remove WFI") has been merged, but that needs
a better changeset description to explain why it was needed before
and is not needed any more.
Please submit a new patch doing that.
Arnd
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH] Fixes gemmi_idle in file idle.c
2014-06-30 2:52 [PATCH] Fixes gemmi_idle in file idle.c Nicholas Krause
2014-06-30 6:43 ` Arnd Bergmann
@ 2014-06-30 9:41 ` Russell King - ARM Linux
2014-07-01 1:59 ` Nick Krause
1 sibling, 1 reply; 4+ messages in thread
From: Russell King - ARM Linux @ 2014-06-30 9:41 UTC (permalink / raw)
To: linux-arm-kernel
On Sun, Jun 29, 2014 at 10:52:40PM -0400, Nicholas Krause wrote:
> disables the IRQ line in gemmi_idle before calling cpu_do_idle.
> In addition, according to the Fixme message in this file fixes
> races that may occur due to not disabling the IRQ before calling
> cpu_do_idle.
1) the idle method is called with interrupts already disabled.
2) I wonder if you read the comment above the comment you removed, and
if so, why it wasn't removed.
3) can you indicate how the hardware problem has been fixed, or give some
justification why this change should be accepted.
--
FTTC broadband for 0.8mile line: now at 9.7Mbps down 460kbps up... slowly
improving, and getting towards what was expected from it.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH] Fixes gemmi_idle in file idle.c
2014-06-30 9:41 ` Russell King - ARM Linux
@ 2014-07-01 1:59 ` Nick Krause
0 siblings, 0 replies; 4+ messages in thread
From: Nick Krause @ 2014-07-01 1:59 UTC (permalink / raw)
To: linux-arm-kernel
Thanks for the good feedback on kernel development , I will delete this file
in order to clean up race conditions caused by it.
Cheers Nick
On Mon, Jun 30, 2014 at 5:41 AM, Russell King - ARM Linux
<linux@arm.linux.org.uk> wrote:
> On Sun, Jun 29, 2014 at 10:52:40PM -0400, Nicholas Krause wrote:
>> disables the IRQ line in gemmi_idle before calling cpu_do_idle.
>> In addition, according to the Fixme message in this file fixes
>> races that may occur due to not disabling the IRQ before calling
>> cpu_do_idle.
>
> 1) the idle method is called with interrupts already disabled.
> 2) I wonder if you read the comment above the comment you removed, and
> if so, why it wasn't removed.
> 3) can you indicate how the hardware problem has been fixed, or give some
> justification why this change should be accepted.
>
> --
> FTTC broadband for 0.8mile line: now at 9.7Mbps down 460kbps up... slowly
> improving, and getting towards what was expected from it.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2014-07-01 1:59 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-06-30 2:52 [PATCH] Fixes gemmi_idle in file idle.c Nicholas Krause
2014-06-30 6:43 ` Arnd Bergmann
2014-06-30 9:41 ` Russell King - ARM Linux
2014-07-01 1:59 ` Nick Krause
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).