From: Illyas Mansoor <illyas.mansoor@intel.com>
To: Linux Kernel <linux-kernel@vger.kernel.org>,
Linux PM <linux-pm@vger.kernel.org>,
"Frederic Weisbecker" <fweisbec@gmail.com>,
Ingo Molnar <mingo@redhat.com>
Cc: X86 <x86@kernel.org>, Len Brown <lenb@kernel.org>,
Thomas Gleixner <tglx@linutronix.de>,
Matthew Garrett <matthew.garrett@nebula.com>,
Tejun Heo <tj@kernel.org>,
"Paul E. McKenney" <paulmck@linux.vnet.ibm.com>,
"Illyas Mansoor" <illyas.mansoor@intel.com>,
"Rudramuni, Vishwesh M" <vishwesh.m.rudramuni@intel.com>,
richard@nod.at, josh@joshtriplett.org, "Kumar P,
Mahesh" <mahesh.kumar.p@intel.com>,
"Sil, Dyut K" <dyut.k.sil@intel.com>
Subject: [PATCH] x86: fix idle notifier not being called in CONFIG_X86_32
Date: Mon, 4 Mar 2013 11:11:13 +0530 [thread overview]
Message-ID: <1362375673-29287-1-git-send-email-illyas.mansoor@intel.com> (raw)
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
next reply other threads:[~2013-03-04 5:42 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-04 5:41 Illyas Mansoor [this message]
2013-03-06 10:18 ` [PATCH] x86: fix idle notifier not being called in CONFIG_X86_32 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1362375673-29287-1-git-send-email-illyas.mansoor@intel.com \
--to=illyas.mansoor@intel.com \
--cc=dyut.k.sil@intel.com \
--cc=fweisbec@gmail.com \
--cc=josh@joshtriplett.org \
--cc=lenb@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=mahesh.kumar.p@intel.com \
--cc=matthew.garrett@nebula.com \
--cc=mingo@redhat.com \
--cc=paulmck@linux.vnet.ibm.com \
--cc=richard@nod.at \
--cc=tglx@linutronix.de \
--cc=tj@kernel.org \
--cc=vishwesh.m.rudramuni@intel.com \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox