From: Cyrill Gorcunov <gorcunov@gmail.com>
To: mingo@elte.hu, hpa@zytor.com, linux-kernel@vger.kernel.org,
tglx@linutronix.de, macro@linux-mips.org
Cc: gorcunov@gmail.com
Subject: [patch 1/2] x86: apic unification - merge down lapic_get_maxlvt
Date: Thu, 01 Jan 1970 03:00:01 +0300 [thread overview]
Message-ID: <488866bf.1636440a.2c8e.ffffa160@mx.google.com> (raw)
In-Reply-To: 20080724112241.164873410@gmail.com
[-- Attachment #1: x86-apic-merge-lapic_get_maxlvt --]
[-- Type: text/plain, Size: 1479 bytes --]
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
---
No code change on binary level.
Index: linux-2.6.git/arch/x86/kernel/apic_32.c
===================================================================
--- linux-2.6.git.orig/arch/x86/kernel/apic_32.c 2008-07-24 13:40:58.000000000 +0400
+++ linux-2.6.git/arch/x86/kernel/apic_32.c 2008-07-24 13:48:52.000000000 +0400
@@ -226,9 +226,13 @@ int get_physical_broadcast(void)
*/
int lapic_get_maxlvt(void)
{
- unsigned int v = apic_read(APIC_LVR);
+ unsigned int v;
- /* 82489DXs do not report # of LVT entries. */
+ v = apic_read(APIC_LVR);
+ /*
+ * - we always have APIC integrated on 64bit mode
+ * - 82489DXs do not report # of LVT entries
+ */
return APIC_INTEGRATED(GET_APIC_VERSION(v)) ? GET_APIC_MAXLVT(v) : 2;
}
Index: linux-2.6.git/arch/x86/kernel/apic_64.c
===================================================================
--- linux-2.6.git.orig/arch/x86/kernel/apic_64.c 2008-07-24 13:40:58.000000000 +0400
+++ linux-2.6.git/arch/x86/kernel/apic_64.c 2008-07-24 13:48:38.000000000 +0400
@@ -228,11 +228,14 @@ void __cpuinit enable_NMI_through_LVT0(v
*/
int lapic_get_maxlvt(void)
{
- unsigned int v, maxlvt;
+ unsigned int v;
v = apic_read(APIC_LVR);
- maxlvt = GET_APIC_MAXLVT(v);
- return maxlvt;
+ /*
+ * - we always have APIC integrated on 64bit mode
+ * - 82489DXs do not report # of LVT entries
+ */
+ return APIC_INTEGRATED(GET_APIC_VERSION(v)) ? GET_APIC_MAXLVT(v) : 2;
}
/*
--
next parent reply other threads:[~2008-07-24 11:26 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20080724112241.164873410@gmail.com>
1970-01-01 0:00 ` Cyrill Gorcunov [this message]
1970-01-01 0:00 ` [patch 2/2] x86: apic unification - merge down enable_NMI_through_LVT0 Cyrill Gorcunov
2008-07-24 11:43 [patch 0/2] x86 apic - a few function merge v2 Cyrill Gorcunov
1970-01-01 0:00 ` [patch 1/2] x86: apic unification - merge down lapic_get_maxlvt 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=488866bf.1636440a.2c8e.ffffa160@mx.google.com \
--to=gorcunov@gmail.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=macro@linux-mips.org \
--cc=mingo@elte.hu \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.