All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Robert Richter" <robert.richter@amd.com>
To: "Thomas Gleixner" <tglx@linutronix.de>,
	"Ingo Molnar" <mingo@redhat.com>,
	"H. Peter Anvin" <hpa@zytor.com>
Cc: "LKML" <linux-kernel@vger.kernel.org>,
	"Robert Richter" <robert.richter@amd.com>
Subject: [patch 2/2] x86: apic: Extended interrupt LVT support for AMD Barcelona (32bit)
Date: Wed, 13 Feb 2008 16:19:36 +0100 (CET)	[thread overview]
Message-ID: <20080213151841.586864000@amd.com> (raw)
In-Reply-To: 20080213151811.804698000@amd.com

[-- Attachment #1: 0002-x86-apic-Extended-interrupt-LVT-support-for-AMD-Ba.patch --]
[-- Type: text/plain, Size: 1473 bytes --]

Signed-off-by: Robert Richter <robert.richter@amd.com>
---
 arch/x86/kernel/apic_32.c |   31 +++++++++++++++++++++++++++++++
 1 files changed, 31 insertions(+), 0 deletions(-)

diff --git a/arch/x86/kernel/apic_32.c b/arch/x86/kernel/apic_32.c
index 35a568e..a6f9d25 100644
--- a/arch/x86/kernel/apic_32.c
+++ b/arch/x86/kernel/apic_32.c
@@ -621,6 +621,37 @@ int setup_profiling_timer(unsigned int multiplier)
 }
 
 /*
+ * Setup extended LVT, AMD specific (K8, family 10h)
+ *
+ * Vector mappings are hard coded. On K8 only offset 0 (APIC500) and
+ * MCE interrupts are supported. Thus MCE offset must be set to 0.
+ */
+
+#define APIC_EILVT_LVTOFF_MCE 0
+#define APIC_EILVT_LVTOFF_IBS 1
+
+static void setup_APIC_eilvt(u8 lvt_off, u8 vector, u8 msg_type, u8 mask)
+{
+	unsigned long reg = (lvt_off << 4) + APIC_EILVT0;
+	unsigned int  v   = (mask << 16) | (msg_type << 8) | vector;
+	apic_write(reg, v);
+}
+
+u8 setup_APIC_eilvt_mce(u8 vector, u8 msg_type, u8 mask)
+{
+	setup_APIC_eilvt(APIC_EILVT_LVTOFF_MCE, vector, msg_type, mask);
+	return APIC_EILVT_LVTOFF_MCE;
+}
+EXPORT_SYMBOL(setup_APIC_eilvt_mce);
+
+u8 setup_APIC_eilvt_ibs(u8 vector, u8 msg_type, u8 mask)
+{
+	setup_APIC_eilvt(APIC_EILVT_LVTOFF_IBS, vector, msg_type, mask);
+	return APIC_EILVT_LVTOFF_IBS;
+}
+EXPORT_SYMBOL(setup_APIC_eilvt_ibs);
+
+/*
  * Local APIC start and shutdown
  */
 
-- 
1.5.1.6

-- 
Advanced Micro Devices, Inc.
Operating System Research Center
email: robert.richter@amd.com




  reply	other threads:[~2008-02-13 15:33 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-13 15:19 [patch 0/2] x86: Add AMD Barcelona extended interrupt support for 32bit Robert Richter
2008-02-13 15:19 ` Robert Richter [this message]
2008-02-17 17:07   ` [patch 2/2] x86: apic: Extended interrupt LVT support for AMD Barcelona (32bit) Ingo Molnar
2008-02-13 15:19 ` [patch 1/2] x86: apic: Export symbols for extended interrupt LVT functions Robert Richter
2008-02-13 22:32   ` Arjan van de Ven
2008-02-14  9:40     ` Robert Richter
2008-02-14 16:47       ` Arjan van de Ven
2008-06-19 17:00         ` Robert Richter
2008-06-20  2:36           ` Arjan van de Ven

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=20080213151841.586864000@amd.com \
    --to=robert.richter@amd.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --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 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.