Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 14185
b: refs/heads/master
c: 89b831e
h: refs/heads/master
i:
  14183: ec1b582
v: v3
  • Loading branch information
Jacob Shin authored and Linus Torvalds committed Nov 15, 2005
1 parent 486a238 commit c31a721
Show file tree
Hide file tree
Showing 12 changed files with 583 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 979edfadbae2286eec5b46143c00e81bca96498e
refs/heads/master: 89b831ef8bf5cfbb357dbc0a2e07700d7f20eec5
8 changes: 8 additions & 0 deletions trunk/arch/x86_64/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -374,6 +374,14 @@ config X86_MCE_INTEL
Additional support for intel specific MCE features such as
the thermal monitor.

config X86_MCE_AMD
bool "AMD MCE features"
depends on X86_MCE && X86_LOCAL_APIC
default y
help
Additional support for AMD specific MCE features such as
the DRAM Error Threshold.

config PHYSICAL_START
hex "Physical address where the kernel is loaded" if EMBEDDED
default "0x100000"
Expand Down
1 change: 1 addition & 0 deletions trunk/arch/x86_64/kernel/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ obj-y := process.o signal.o entry.o traps.o irq.o \

obj-$(CONFIG_X86_MCE) += mce.o
obj-$(CONFIG_X86_MCE_INTEL) += mce_intel.o
obj-$(CONFIG_X86_MCE_AMD) += mce_amd.o
obj-$(CONFIG_MTRR) += ../../i386/kernel/cpu/mtrr/
obj-$(CONFIG_ACPI) += acpi/
obj-$(CONFIG_X86_MSR) += msr.o
Expand Down
10 changes: 10 additions & 0 deletions trunk/arch/x86_64/kernel/apic.c
Original file line number Diff line number Diff line change
Expand Up @@ -833,6 +833,16 @@ int setup_profiling_timer(unsigned int multiplier)
return 0;
}

#ifdef CONFIG_X86_MCE_AMD
void setup_threshold_lvt(unsigned long lvt_off)
{
unsigned int v = 0;
unsigned long reg = (lvt_off << 4) + 0x500;
v |= THRESHOLD_APIC_VECTOR;
apic_write(reg, v);
}
#endif /* CONFIG_X86_MCE_AMD */

#undef APIC_DIVISOR

/*
Expand Down
3 changes: 3 additions & 0 deletions trunk/arch/x86_64/kernel/entry.S
Original file line number Diff line number Diff line change
Expand Up @@ -612,6 +612,9 @@ retint_kernel:
ENTRY(thermal_interrupt)
apicinterrupt THERMAL_APIC_VECTOR,smp_thermal_interrupt

ENTRY(threshold_interrupt)
apicinterrupt THRESHOLD_APIC_VECTOR,mce_threshold_interrupt

#ifdef CONFIG_SMP
ENTRY(reschedule_interrupt)
apicinterrupt RESCHEDULE_VECTOR,smp_reschedule_interrupt
Expand Down
2 changes: 2 additions & 0 deletions trunk/arch/x86_64/kernel/i8259.c
Original file line number Diff line number Diff line change
Expand Up @@ -492,6 +492,7 @@ void invalidate_interrupt5(void);
void invalidate_interrupt6(void);
void invalidate_interrupt7(void);
void thermal_interrupt(void);
void threshold_interrupt(void);
void i8254_timer_resume(void);

static void setup_timer_hardware(void)
Expand Down Expand Up @@ -580,6 +581,7 @@ void __init init_IRQ(void)
set_intr_gate(CALL_FUNCTION_VECTOR, call_function_interrupt);
#endif
set_intr_gate(THERMAL_APIC_VECTOR, thermal_interrupt);
set_intr_gate(THRESHOLD_APIC_VECTOR, threshold_interrupt);

#ifdef CONFIG_X86_LOCAL_APIC
/* self generated IPI for local APIC timer */
Expand Down
3 changes: 3 additions & 0 deletions trunk/arch/x86_64/kernel/mce.c
Original file line number Diff line number Diff line change
Expand Up @@ -356,6 +356,9 @@ static void __cpuinit mce_cpu_features(struct cpuinfo_x86 *c)
case X86_VENDOR_INTEL:
mce_intel_feature_init(c);
break;
case X86_VENDOR_AMD:
mce_amd_feature_init(c);
break;
default:
break;
}
Expand Down
Loading

0 comments on commit c31a721

Please sign in to comment.