linux-pm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] x86: fix idle notifier not being called in CONFIG_X86_32
@ 2013-03-04  5:41 Illyas Mansoor
  2013-03-06 10:18 ` Ingo Molnar
  0 siblings, 1 reply; 6+ messages in thread
From: Illyas Mansoor @ 2013-03-04  5:41 UTC (permalink / raw)
  To: Linux Kernel, Linux PM, Frederic Weisbecker, Ingo Molnar
  Cc: X86, Len Brown, Thomas Gleixner, Matthew Garrett, Tejun Heo,
	Paul E. McKenney, Illyas Mansoor, Rudramuni, Vishwesh M, richard,
	josh, Kumar P, Mahesh, Sil, Dyut K

Idle notifier not registered if CONFIG_X86_32 is defined,
those callbacks are empty for X86_32 platform.

ifdef CONFIG_X86_64
 void enter_idle(void);
 void exit_idle(void);
else
static inline void enter_idle(void) { }
static inline void exit_idle(void) { }
static inline void __exit_idle(void) { }
endif

Make this work on X86_32 platforms by
removing the restriction for X86_64

Signed-off-by: Dyut Kumar Sil <dyut.k.sil@intel.com>
Signed-off-by: Ashish K <ashish.k@intel.com>
Signed-off-by: Illyas Mansoor <illyas.mansoor@intel.com>
Reviewed-by: Cuesta, Fernand <fernand.cuesta@intel.com>
Reviewed-by: Cuesta, Fernand <fernand.cuesta@intel.com>
Reviewed-by: Kumar P, Mahesh <mahesh.kumar.p@intel.com>
Tested-by: Cuesta, Fernand <fernand.cuesta@intel.com>
---
 arch/x86/include/asm/idle.h |    6 ------
 arch/x86/kernel/process.c   |    4 ----
 2 files changed, 10 deletions(-)

diff --git a/arch/x86/include/asm/idle.h b/arch/x86/include/asm/idle.h
index c5d1785..489ac46 100644
--- a/arch/x86/include/asm/idle.h
+++ b/arch/x86/include/asm/idle.h
@@ -8,14 +8,8 @@ struct notifier_block;
 void idle_notifier_register(struct notifier_block *n);
 void idle_notifier_unregister(struct notifier_block *n);
 
-#ifdef CONFIG_X86_64
 void enter_idle(void);
 void exit_idle(void);
-#else /* !CONFIG_X86_64 */
-static inline void enter_idle(void) { }
-static inline void exit_idle(void) { }
-static inline void __exit_idle(void) { }
-#endif /* CONFIG_X86_64 */
 
 void amd_e400_remove_cpu(int cpu);
 
diff --git a/arch/x86/kernel/process.c b/arch/x86/kernel/process.c
index 14ae100..043e553 100644
--- a/arch/x86/kernel/process.c
+++ b/arch/x86/kernel/process.c
@@ -38,7 +38,6 @@
  */
 DEFINE_PER_CPU_SHARED_ALIGNED(struct tss_struct, init_tss) = INIT_TSS;
 
-#ifdef CONFIG_X86_64
 static DEFINE_PER_CPU(unsigned char, is_idle);
 static ATOMIC_NOTIFIER_HEAD(idle_notifier);
 
@@ -53,7 +52,6 @@ void idle_notifier_unregister(struct notifier_block *n)
 	atomic_notifier_chain_unregister(&idle_notifier, n);
 }
 EXPORT_SYMBOL_GPL(idle_notifier_unregister);
-#endif
 
 struct kmem_cache *task_xstate_cachep;
 EXPORT_SYMBOL_GPL(task_xstate_cachep);
@@ -277,7 +275,6 @@ static inline void play_dead(void)
 }
 #endif
 
-#ifdef CONFIG_X86_64
 void enter_idle(void)
 {
 	this_cpu_write(is_idle, 1);
@@ -299,7 +296,6 @@ void exit_idle(void)
 		return;
 	__exit_idle();
 }
-#endif
 
 /*
  * The idle thread. There's no useful work to be
-- 
1.7.9.5


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2013-03-25 17:18 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-04  5:41 [PATCH] x86: fix idle notifier not being called in CONFIG_X86_32 Illyas Mansoor
2013-03-06 10:18 ` Ingo Molnar
2013-03-06 10:20   ` Mansoor, Illyas
2013-03-06 10:36     ` Ingo Molnar
2013-03-06 10:56       ` Mansoor, Illyas
2013-03-25 16:48         ` Len Brown

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).