x86: Add AMD Barcelona extended interrupt support for 32bit
PATCH 1/2 x86: apic: Export symbols for extended interrupt LVT functions
In reply to Robert Richter--- arch/x86/kernel/apic_64.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)
arch/x86/kernel/apic_64.c +2 -0
@@ -215,12 +215,14 @@ 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);/* * Program the next event, relative to now
Signature · 6 lines
1.5.1.6 -- Advanced Micro Devices, Inc. Operating System Research Center email: [email protected]
cover x86: Add AMD Barcelona extended interrupt support for 32bit
This patch series adds support for extended interrupts on AMD Barcelona CPUs. Implementation is the same as it exists already for 64bit. Also EXPORT_SYMBOL macros are added to the 64bit code.
Signature · 3 lines
Advanced Micro Devices, Inc. Operating System Research Center email: [email protected]
PATCH 2/2 x86: apic: Extended interrupt LVT support for AMD Barcelona (32bit)
--- arch/x86/kernel/apic_32.c | 31 +++++++++++++++++++++++++++++++ 1 files changed, 31 insertions(+), 0 deletions(-)
arch/x86/kernel/apic_32.c +31 -0
@@ -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 */
Signature · 6 lines
1.5.1.6 -- Advanced Micro Devices, Inc. Operating System Research Center email: [email protected]
Re: [patch 1/2] x86: apic: Export symbols for extended interrupt LVT functions
In reply to Robert RichterQuoted 11 lines · On Wed, 13 Feb 2008 16:19:36 +0100 (CET) "Robert Richter"…
Signed-off-by Robert Richter <[email protected]>--- arch/x86/kernel/apic_64.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)arch/x86/kernel/apic_64.c +0
-0@@ -215,12 +215,14 @@ u8 setup_APIC_eilvt_mce(u8 vector, u8 msg_type, u8 mask) setup_APIC_eilvt(APIC_EILVT_LVTOFF_MCE, vector, msg_type,
arch/x86/kernel/apic_64.c u8 setup_APIC_eilvt_mce(u8 vector, u8 msg_type, · line 225
Quoted 10 lines
arch/x86/kernel/apic_64.c +2
-0mask); 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);
which modules would even consider using any of these? Doesn't sound like something we should export..
Signature · 3 lines
If you want to reach me at my work email, use [email protected] For development, discussion and tips for power savings, visit http://www.lesswatts.org
Re: [patch 1/2] x86: apic: Export symbols for extended interrupt LVT functions
Quoted 18 lines · Arjan van de Ven
Quoted 15 lines · On Wed, 13 Feb 2008 16:19:36 +0100 (CET) "Robert Richter"…
Signed-off-by Robert Richter <[email protected]>--- arch/x86/kernel/apic_64.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)arch/x86/kernel/apic_64.c +1
-0@@ -215,12 +215,14 @@ 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);
Quoted 9 lines
arch/x86/kernel/apic_64.c u8 setup_APIC_eilvt_mce(u8 vector, u8 msg_type, u8 mask) · line 225
Quoted 6 lines
arch/x86/kernel/apic_64.c +1
-0u8 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);which modules would even consider using any of these? Doesn't sound like something we should export..
For IBS it is Perfmon. See here:
http://git.kernel.org/?p=linux/kernel/git/eranian/linux-2.6.git;a=commit;h=7caef3e19d17349f869884f5adf7c9823e32ade7
MCE export has been added for consistency reasons to allow modules to enable MCE.
-Robert
Signature · 3 lines
Advanced Micro Devices, Inc. Operating System Research Center email: [email protected]
Re: [patch 1/2] x86: apic: Export symbols for extended interrupt LVT functions
Quoted 29 lines · On Thu, 14 Feb 2008 10:40:36 +0100 "Robert Richter" <[email protected]>…
Quoted 18 lines · Arjan van de Ven
Quoted 15 lines · On Wed, 13 Feb 2008 16:19:36 +0100 (CET) "Robert Richter"…
Signed-off-by Robert Richter <[email protected]>--- arch/x86/kernel/apic_64.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)arch/x86/kernel/apic_64.c +1
-0@@ -215,12 +215,14 @@ 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);Quoted 9 lines
arch/x86/kernel/apic_64.c u8 setup_APIC_eilvt_mce(u8 vector, u8 msg_type, u8 mask) · line 225
Quoted 6 lines
arch/x86/kernel/apic_64.c +1
-0u8 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);which modules would even consider using any of these? Doesn't sound like something we should export..
Quoted 3 lines
For IBS it is Perfmon. See here:
http://git.kernel.org/?p=linux/kernel/git/eranian/linux-2.6.git;a=commit;h=7caef3e19d17349f869884f5adf7c9823e32ade7
perfmon doesn't seem to go anywhere lately, so realistically this chunk should be part of the perfmon tree.
Quoted 2 lines
MCE export has been added for consistency reasons to allow modules to enable MCE.
no module does that right now, nor should it. MCE is really something the core kernel should do right? "consistency reasons" isn't "just export everything used or not", it's "oh this makes sense as part of a well thought out, generic consistent api". This one isn't./
Signature · 3 lines
If you want to reach me at my work email, use [email protected] For development, discussion and tips for power savings, visit http://www.lesswatts.org
Ingo Molnar
AppliedRe: [patch 2/2] x86: apic: Extended interrupt LVT support for AMD Barcelona (32bit)
In reply to Robert RichterQuoted 6 lines · Robert Richter
/*
+ * 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.
+ */
thanks, applied.
Ingo
Re: [patch 1/2] x86: apic: Export symbols for extended interrupt LVT functions
In reply to Arjan van de VenArjan,
do you see a way of how to get these EXPORT_SYMBOLs mainline? Better use EXPORT_SYMBOL_GPL? Or is it common sense to add EXPORT_SYMBOLs to mainline not until there are already use cases in the mainline?
At least the IBS symbol is needed for Perfmon but potentially also for OProfile. This will allow the use of loadable Perfmon kernel modules, especially if some lightwight Perfmon features are already upstream.
Also, APIC setup is more general and not Perfmon related. So I think the Perfmon tree is not the right place to keep the code.
I don't know, if there is a use case for loadable MCE modules. We could skip this, but as I said, code consistency...
Thanks,
-Robert
Quoted 10 lines · Arjan van de Ven
Quoted 8 lines
Quoted 4 lines
Quoted 1 line
+EXPORT_SYMBOL(setup_APIC_eilvt_ibs);
which modules would even consider using any of these? Doesn't sound like something we should export..
For IBS it is Perfmon. See here:
http://git.kernel.org/?p=linux/kernel/git/eranian/linux-2.6.git;a=commit;h=7caef3e19d17349f869884f5adf7c9823e32ade7perfmon doesn't seem to go anywhere lately, so realistically this chunk should be part of the perfmon tree.
[...]
Quoted 6 lines
Quoted 2 lines
MCE export has been added for consistency reasons to allow modules to enable MCE.
no module does that right now, nor should it. MCE is really something the core kernel should do right? "consistency reasons" isn't "just export everything used or not", it's "oh this makes sense as part of a well thought out, generic consistent api". This one isn't./
[...]
Signature · 3 lines
Advanced Micro Devices, Inc. Operating System Research Center email: [email protected]
Re: [patch 1/2] x86: apic: Export symbols for extended interrupt LVT functions
Quoted 3 lines · On Thu, 19 Jun 2008 19:00:56 +0200 Robert Richter <[email protected]>…
Arjan,
do you see a way of how to get these
EXPORT_SYMBOLsmainline?
it's easy... submit the code that uses them.....
Signature · 3 lines
If you want to reach me at my work email, use [email protected] For development, discussion and tips for power savings, visit http://www.lesswatts.org