aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJacob Shin <jacob.w.shin@gmail.com>2006-06-26 07:58:47 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2006-06-26 13:48:20 -0400
commit17fc14ff1bdbc393e1cf4f6fd1e1e53d72ab9fe5 (patch)
tree9992a9079f4792f423f1e421d93814509b2c7d88
parentc38bfdc85aae0c6d1458269c0e063c2f4a116711 (diff)
[PATCH] x86_64: apic support for extended apic interrupt
Add support for extended APIC LVT found in future AMD processors. Signed-off-by: Jacob Shin <jacob.shin@amd.com> Signed-off-by: Andi Kleen <ak@suse.de> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-rw-r--r--arch/x86_64/kernel/apic.c10
-rw-r--r--include/asm-x86_64/apic.h11
2 files changed, 14 insertions, 7 deletions
diff --git a/arch/x86_64/kernel/apic.c b/arch/x86_64/kernel/apic.c
index 53fc17d894e8..396e125cb212 100644
--- a/arch/x86_64/kernel/apic.c
+++ b/arch/x86_64/kernel/apic.c
@@ -909,15 +909,13 @@ int setup_profiling_timer(unsigned int multiplier)
909 return -EINVAL; 909 return -EINVAL;
910} 910}
911 911
912#ifdef CONFIG_X86_MCE_AMD 912void setup_APIC_extened_lvt(unsigned char lvt_off, unsigned char vector,
913void setup_threshold_lvt(unsigned long lvt_off) 913 unsigned char msg_type, unsigned char mask)
914{ 914{
915 unsigned int v = 0; 915 unsigned long reg = (lvt_off << 4) + K8_APIC_EXT_LVT_BASE;
916 unsigned long reg = (lvt_off << 4) + 0x500; 916 unsigned int v = (mask << 16) | (msg_type << 8) | vector;
917 v |= THRESHOLD_APIC_VECTOR;
918 apic_write(reg, v); 917 apic_write(reg, v);
919} 918}
920#endif /* CONFIG_X86_MCE_AMD */
921 919
922#undef APIC_DIVISOR 920#undef APIC_DIVISOR
923 921
diff --git a/include/asm-x86_64/apic.h b/include/asm-x86_64/apic.h
index c9e6c2501a48..9d43ac8519bf 100644
--- a/include/asm-x86_64/apic.h
+++ b/include/asm-x86_64/apic.h
@@ -84,9 +84,18 @@ extern void disable_APIC_timer(void);
84extern void enable_APIC_timer(void); 84extern void enable_APIC_timer(void);
85extern void clustered_apic_check(void); 85extern void clustered_apic_check(void);
86 86
87extern void setup_APIC_extened_lvt(unsigned char lvt_off, unsigned char vector,
88 unsigned char msg_type, unsigned char mask);
89
90#define K8_APIC_EXT_LVT_BASE 0x500
91#define K8_APIC_EXT_INT_MSG_FIX 0x0
92#define K8_APIC_EXT_INT_MSG_SMI 0x2
93#define K8_APIC_EXT_INT_MSG_NMI 0x4
94#define K8_APIC_EXT_INT_MSG_EXT 0x7
95#define K8_APIC_EXT_LVT_ENTRY_THRESHOLD 0
96
87extern int disable_timer_pin_1; 97extern int disable_timer_pin_1;
88 98
89extern void setup_threshold_lvt(unsigned long lvt_off);
90 99
91void smp_send_timer_broadcast_ipi(void); 100void smp_send_timer_broadcast_ipi(void);
92void switch_APIC_timer_to_ipi(void *cpumask); 101void switch_APIC_timer_to_ipi(void *cpumask);