From: tip-bot for Cyrill Gorcunov <gorcunov@openvz.org>
To: linux-tip-commits@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, hpa@zytor.com, mingo@redhat.com,
gorcunov@openvz.org, tglx@linutronix.de, mingo@elte.hu
Subject: [tip:x86/apic] x86, apic: Use apic noop driver
Date: Wed, 14 Oct 2009 08:17:20 GMT [thread overview]
Message-ID: <tip-a933c61829509eb27083146dda392132baa0969a@git.kernel.org> (raw)
In-Reply-To: <20091013201022.747817361@openvz.org>
Commit-ID: a933c61829509eb27083146dda392132baa0969a
Gitweb: http://git.kernel.org/tip/a933c61829509eb27083146dda392132baa0969a
Author: Cyrill Gorcunov <gorcunov@openvz.org>
AuthorDate: Wed, 14 Oct 2009 00:07:04 +0400
Committer: Ingo Molnar <mingo@elte.hu>
CommitDate: Wed, 14 Oct 2009 09:17:00 +0200
x86, apic: Use apic noop driver
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>
Cc: yinghai@kernel.org
Cc: macro@linux-mips.org
LKML-Reference: <20091013201022.747817361@openvz.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
---
arch/x86/kernel/apic/apic.c | 22 +++-------------------
1 files changed, 3 insertions(+), 19 deletions(-)
diff --git a/arch/x86/kernel/apic/apic.c b/arch/x86/kernel/apic/apic.c
index 894aa97..61a5628 100644
--- a/arch/x86/kernel/apic/apic.c
+++ b/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-14 8:18 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 ` [patch 2/3] x86,apic -- use apic noop driver Cyrill Gorcunov
2009-10-14 8:17 ` tip-bot for Cyrill Gorcunov [this message]
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=tip-a933c61829509eb27083146dda392132baa0969a@git.kernel.org \
--to=gorcunov@openvz.org \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=mingo@redhat.com \
--cc=tglx@linutronix.de \
/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