From: Cyrill Gorcunov <gorcunov@openvz.org>
To: mingo@elte.hu
Cc: x86@kernel.org, yinghai@kernel.org, macro@linux-mips.org,
linux-kernel@vger.kernel.org,
Cyrill Gorcunov <gorcunov@openvz.org>
Subject: [patch 2/3] x86,apic -- use apic noop driver
Date: Wed, 14 Oct 2009 00:07:04 +0400 [thread overview]
Message-ID: <20091013201022.747817361@openvz.org> (raw)
In-Reply-To: 20091013200702.019870576@openvz.org
[-- Attachment #1: x86-apic-use-noop --]
[-- Type: text/plain, Size: 1360 bytes --]
In case if apic were disabled we may use the whole apic
NOOP driver instead of sparse poking the some functions
in apic driver. Also NOOP would catch any inappropriate
apic operation calls (not just read/write).
Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
---
arch/x86/kernel/apic/apic.c | 22 +++-------------------
1 file changed, 3 insertions(+), 19 deletions(-)
Index: linux-2.6.git/arch/x86/kernel/apic/apic.c
=====================================================================
--- linux-2.6.git.orig/arch/x86/kernel/apic/apic.c
+++ linux-2.6.git/arch/x86/kernel/apic/apic.c
@@ -241,28 +241,12 @@ static int modern_apic(void)
}
/*
- * bare function to substitute write operation
- * and it's _that_ fast :)
- */
-static void native_apic_write_dummy(u32 reg, u32 v)
-{
- WARN_ON_ONCE((cpu_has_apic || !disable_apic));
-}
-
-static u32 native_apic_read_dummy(u32 reg)
-{
- WARN_ON_ONCE((cpu_has_apic && !disable_apic));
- return 0;
-}
-
-/*
- * right after this call apic->write/read doesn't do anything
- * note that there is no restore operation it works one way
+ * right after this call apic become NOOP driven
+ * so apic->write/read doesn't do anything
*/
void apic_disable(void)
{
- apic->read = native_apic_read_dummy;
- apic->write = native_apic_write_dummy;
+ apic = &apic_noop;
}
void native_apic_wait_icr_idle(void)
next prev parent reply other threads:[~2009-10-13 20:11 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-13 20:07 [patch 0/3] x86 apic series Cyrill Gorcunov
2009-10-13 20:07 ` [patch 1/3] x86,apic: introduce NOOP apic driver Cyrill Gorcunov
2009-10-14 8:17 ` [tip:x86/apic] x86, apic: Introduce the " tip-bot for Cyrill Gorcunov
2009-10-13 20:07 ` Cyrill Gorcunov [this message]
2009-10-14 8:17 ` [tip:x86/apic] x86, apic: Use apic noop driver tip-bot for Cyrill Gorcunov
2009-10-13 20:07 ` [patch 3/3] x86,apic: limit apic dumping, introduce show_lapic setup option Cyrill Gorcunov
2009-10-14 7:12 ` Ingo Molnar
2009-10-14 7:51 ` Cyrill Gorcunov
2009-10-14 15:09 ` Cyrill Gorcunov
2009-10-14 15:40 ` [tip:x86/apic] x86, apic: Explain show_lapic= in kernel parameters list tip-bot for Cyrill Gorcunov
2009-10-14 17:56 ` [patch 3/3] x86,apic: limit apic dumping, introduce show_lapic setup option Ingo Molnar
2009-10-14 18:00 ` Cyrill Gorcunov
2009-10-14 18:20 ` Cyrill Gorcunov
2009-10-14 20:29 ` Cyrill Gorcunov
2009-10-15 14:27 ` Cyrill Gorcunov
2009-10-14 8:17 ` [tip:x86/apic] x86, apic: Limit apic dumping, introduce new show_lapic= " tip-bot for Cyrill Gorcunov
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=20091013201022.747817361@openvz.org \
--to=gorcunov@openvz.org \
--cc=linux-kernel@vger.kernel.org \
--cc=macro@linux-mips.org \
--cc=mingo@elte.hu \
--cc=x86@kernel.org \
--cc=yinghai@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