Skip to contentSkip to conversation

x86: remove redundant local_irq_enable() after cpuidle_idle_call()

PATCH In review Li Wang 1 participant 2 messages Aug 14, 2013 – Aug 20, 2013 x86

lore
Share & tools
lore

Li Wang

author
#0 lore raw

PATCH 1/1 x86: remove redundant local_irq_enable() after cpuidle_idle_call()

When cpuidle_idle_call() return 0, it shows that linux system is using idle framwork driver. Now, local irq has already been enabled in cpuidle_idle_call(). So, it need not enable local irq again, when return 0.

The code is introduced by commit:
97a5b81fa4d3a11dcdf224befc577f2e0abadc0b ("x86: Fix idle consolidation fallout") In that defect, it does not use idle framework driver, just call amd_e400_idle(). That problem is that amd_e400_idle() does not enable irq.

---
 arch/x86/kernel/process.c |    2 --
 1 file changed, 2 deletions(-)
arch/x86/kernel/process.c +0 -2
index 83369e5..cb55ee4 100644
@@ -300,8 +300,6 @@ void arch_cpu_idle(void)
 {
 	if (cpuidle_idle_call())
 		x86_idle();
-	else
-		local_irq_enable();
 }
 
 /*
Signature · 1 line
1.7.9.5
author
#1 lore raw

Hi All,

Anybody help me review this?

Thanks,
LiWang.

Quoted 27 lines · Li Wang

When cpuidle_idle_call() return 0, it shows that linux system is using idle framwork driver. Now, local irq has already been enabled in cpuidle_idle_call(). So, it need not enable local irq again, when return 0.

The code is introduced by commit:
97a5b81fa4d3a11dcdf224befc577f2e0abadc0b ("x86: Fix idle consolidation fallout") In that defect, it does not use idle framework driver, just call amd_e400_idle(). That problem is that amd_e400_idle() does not enable irq.

---
  arch/x86/kernel/process.c |    2 --
  1 file changed, 2 deletions(-)
arch/x86/kernel/process.c +0 -2
index 83369e5..cb55ee4 100644
@@ -300,8 +300,6 @@ void arch_cpu_idle(void)
  {
  	if (cpuidle_idle_call())
  		x86_idle();
-	else
-		local_irq_enable();
  }
 
  /*