Merge git://git.kernel.org/pub/scm/linux/kernel/git/x86/linux-2.6-x86
* git://git.kernel.org/pub/scm/linux/kernel/git/x86/linux-2.6-x86: x86: fix APIC related bootup crash on Athlon XP CPUs time: add ADJ_OFFSET_SS_READ x86: export the symbol empty_zero_page on the 32-bit x86 architecture x86: fix kprobes_64.c inlining borkage pci: use pci=bfsort for HP DL385 G2, DL585 G2 x86: correctly set UTS_MACHINE for "make ARCH=x86" lockdep: annotate do_debug() trap handler x86: turn off iommu merge by default x86: fix ACPI compile for LOCAL_APIC=n x86: printk kernel version in WARN_ON and other dump_stack users ACPI: Set max_cstate to 1 for early Opterons. x86: fix NMI watchdog & 'stopped time' problem
This commit is contained in:
Коммит
ff1ea52fa3
|
@ -789,7 +789,7 @@ void __init sync_Arb_IDs(void)
|
||||||
* Unsupported on P4 - see Intel Dev. Manual Vol. 3, Ch. 8.6.1 And not
|
* Unsupported on P4 - see Intel Dev. Manual Vol. 3, Ch. 8.6.1 And not
|
||||||
* needed on AMD.
|
* needed on AMD.
|
||||||
*/
|
*/
|
||||||
if (modern_apic())
|
if (modern_apic() || boot_cpu_data.x86_vendor == X86_VENDOR_AMD)
|
||||||
return;
|
return;
|
||||||
/*
|
/*
|
||||||
* Wait for idle.
|
* Wait for idle.
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
#include <asm/semaphore.h>
|
#include <asm/semaphore.h>
|
||||||
#include <asm/checksum.h>
|
#include <asm/checksum.h>
|
||||||
#include <asm/desc.h>
|
#include <asm/desc.h>
|
||||||
|
#include <asm/pgtable.h>
|
||||||
|
|
||||||
EXPORT_SYMBOL(__down_failed);
|
EXPORT_SYMBOL(__down_failed);
|
||||||
EXPORT_SYMBOL(__down_failed_interruptible);
|
EXPORT_SYMBOL(__down_failed_interruptible);
|
||||||
|
@ -29,3 +30,4 @@ EXPORT_SYMBOL(__read_lock_failed);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
EXPORT_SYMBOL(csum_partial);
|
EXPORT_SYMBOL(csum_partial);
|
||||||
|
EXPORT_SYMBOL(empty_zero_page);
|
||||||
|
|
|
@ -2166,6 +2166,10 @@ static inline void __init check_timer(void)
|
||||||
{
|
{
|
||||||
int apic1, pin1, apic2, pin2;
|
int apic1, pin1, apic2, pin2;
|
||||||
int vector;
|
int vector;
|
||||||
|
unsigned int ver;
|
||||||
|
|
||||||
|
ver = apic_read(APIC_LVR);
|
||||||
|
ver = GET_APIC_VERSION(ver);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* get/set the timer IRQ vector:
|
* get/set the timer IRQ vector:
|
||||||
|
@ -2179,11 +2183,15 @@ static inline void __init check_timer(void)
|
||||||
* mode for the 8259A whenever interrupts are routed
|
* mode for the 8259A whenever interrupts are routed
|
||||||
* through I/O APICs. Also IRQ0 has to be enabled in
|
* through I/O APICs. Also IRQ0 has to be enabled in
|
||||||
* the 8259A which implies the virtual wire has to be
|
* the 8259A which implies the virtual wire has to be
|
||||||
* disabled in the local APIC.
|
* disabled in the local APIC. Finally timer interrupts
|
||||||
|
* need to be acknowledged manually in the 8259A for
|
||||||
|
* timer_interrupt() and for the i82489DX when using
|
||||||
|
* the NMI watchdog.
|
||||||
*/
|
*/
|
||||||
apic_write_around(APIC_LVT0, APIC_LVT_MASKED | APIC_DM_EXTINT);
|
apic_write_around(APIC_LVT0, APIC_LVT_MASKED | APIC_DM_EXTINT);
|
||||||
init_8259A(1);
|
init_8259A(1);
|
||||||
timer_ack = 1;
|
timer_ack = !cpu_has_tsc;
|
||||||
|
timer_ack |= (nmi_watchdog == NMI_IO_APIC && !APIC_INTEGRATED(ver));
|
||||||
if (timer_over_8254 > 0)
|
if (timer_over_8254 > 0)
|
||||||
enable_8259A_irq(0);
|
enable_8259A_irq(0);
|
||||||
|
|
||||||
|
|
|
@ -58,7 +58,7 @@ const int kretprobe_blacklist_size = ARRAY_SIZE(kretprobe_blacklist);
|
||||||
/*
|
/*
|
||||||
* returns non-zero if opcode modifies the interrupt flag.
|
* returns non-zero if opcode modifies the interrupt flag.
|
||||||
*/
|
*/
|
||||||
static __always_inline int is_IF_modifier(kprobe_opcode_t *insn)
|
static int __kprobes is_IF_modifier(kprobe_opcode_t *insn)
|
||||||
{
|
{
|
||||||
switch (*insn) {
|
switch (*insn) {
|
||||||
case 0xfa: /* cli */
|
case 0xfa: /* cli */
|
||||||
|
|
|
@ -25,6 +25,7 @@
|
||||||
|
|
||||||
#include <asm/smp.h>
|
#include <asm/smp.h>
|
||||||
#include <asm/nmi.h>
|
#include <asm/nmi.h>
|
||||||
|
#include <asm/timer.h>
|
||||||
|
|
||||||
#include "mach_traps.h"
|
#include "mach_traps.h"
|
||||||
|
|
||||||
|
@ -83,7 +84,7 @@ static int __init check_nmi_watchdog(void)
|
||||||
|
|
||||||
prev_nmi_count = kmalloc(NR_CPUS * sizeof(int), GFP_KERNEL);
|
prev_nmi_count = kmalloc(NR_CPUS * sizeof(int), GFP_KERNEL);
|
||||||
if (!prev_nmi_count)
|
if (!prev_nmi_count)
|
||||||
return -1;
|
goto error;
|
||||||
|
|
||||||
printk(KERN_INFO "Testing NMI watchdog ... ");
|
printk(KERN_INFO "Testing NMI watchdog ... ");
|
||||||
|
|
||||||
|
@ -117,7 +118,7 @@ static int __init check_nmi_watchdog(void)
|
||||||
if (!atomic_read(&nmi_active)) {
|
if (!atomic_read(&nmi_active)) {
|
||||||
kfree(prev_nmi_count);
|
kfree(prev_nmi_count);
|
||||||
atomic_set(&nmi_active, -1);
|
atomic_set(&nmi_active, -1);
|
||||||
return -1;
|
goto error;
|
||||||
}
|
}
|
||||||
printk("OK.\n");
|
printk("OK.\n");
|
||||||
|
|
||||||
|
@ -128,6 +129,10 @@ static int __init check_nmi_watchdog(void)
|
||||||
|
|
||||||
kfree(prev_nmi_count);
|
kfree(prev_nmi_count);
|
||||||
return 0;
|
return 0;
|
||||||
|
error:
|
||||||
|
timer_ack = !cpu_has_tsc;
|
||||||
|
|
||||||
|
return -1;
|
||||||
}
|
}
|
||||||
/* This needs to happen later in boot so counters are working */
|
/* This needs to happen later in boot so counters are working */
|
||||||
late_initcall(check_nmi_watchdog);
|
late_initcall(check_nmi_watchdog);
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
#include <asm/gart.h>
|
#include <asm/gart.h>
|
||||||
#include <asm/calgary.h>
|
#include <asm/calgary.h>
|
||||||
|
|
||||||
int iommu_merge __read_mostly = 1;
|
int iommu_merge __read_mostly = 0;
|
||||||
EXPORT_SYMBOL(iommu_merge);
|
EXPORT_SYMBOL(iommu_merge);
|
||||||
|
|
||||||
dma_addr_t bad_dma_address __read_mostly;
|
dma_addr_t bad_dma_address __read_mostly;
|
||||||
|
|
|
@ -283,6 +283,11 @@ void dump_stack(void)
|
||||||
{
|
{
|
||||||
unsigned long stack;
|
unsigned long stack;
|
||||||
|
|
||||||
|
printk("Pid: %d, comm: %.20s %s %s %.*s\n",
|
||||||
|
current->pid, current->comm, print_tainted(),
|
||||||
|
init_utsname()->release,
|
||||||
|
(int)strcspn(init_utsname()->version, " "),
|
||||||
|
init_utsname()->version);
|
||||||
show_trace(current, NULL, &stack);
|
show_trace(current, NULL, &stack);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -828,6 +833,8 @@ fastcall void __kprobes do_debug(struct pt_regs * regs, long error_code)
|
||||||
unsigned int condition;
|
unsigned int condition;
|
||||||
struct task_struct *tsk = current;
|
struct task_struct *tsk = current;
|
||||||
|
|
||||||
|
trace_hardirqs_fixup();
|
||||||
|
|
||||||
get_debugreg(condition, 6);
|
get_debugreg(condition, 6);
|
||||||
|
|
||||||
if (notify_die(DIE_DEBUG, "debug", regs, condition, error_code,
|
if (notify_die(DIE_DEBUG, "debug", regs, condition, error_code,
|
||||||
|
|
|
@ -31,6 +31,7 @@
|
||||||
#include <linux/uaccess.h>
|
#include <linux/uaccess.h>
|
||||||
#include <linux/bug.h>
|
#include <linux/bug.h>
|
||||||
#include <linux/kdebug.h>
|
#include <linux/kdebug.h>
|
||||||
|
#include <linux/utsname.h>
|
||||||
|
|
||||||
#if defined(CONFIG_EDAC)
|
#if defined(CONFIG_EDAC)
|
||||||
#include <linux/edac.h>
|
#include <linux/edac.h>
|
||||||
|
@ -400,6 +401,12 @@ void show_stack(struct task_struct *tsk, unsigned long * rsp)
|
||||||
void dump_stack(void)
|
void dump_stack(void)
|
||||||
{
|
{
|
||||||
unsigned long dummy;
|
unsigned long dummy;
|
||||||
|
|
||||||
|
printk("Pid: %d, comm: %.20s %s %s %.*s\n",
|
||||||
|
current->pid, current->comm, print_tainted(),
|
||||||
|
init_utsname()->release,
|
||||||
|
(int)strcspn(init_utsname()->version, " "),
|
||||||
|
init_utsname()->version);
|
||||||
show_trace(NULL, NULL, &dummy);
|
show_trace(NULL, NULL, &dummy);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -846,6 +853,8 @@ asmlinkage void __kprobes do_debug(struct pt_regs * regs,
|
||||||
struct task_struct *tsk = current;
|
struct task_struct *tsk = current;
|
||||||
siginfo_t info;
|
siginfo_t info;
|
||||||
|
|
||||||
|
trace_hardirqs_fixup();
|
||||||
|
|
||||||
get_debugreg(condition, 6);
|
get_debugreg(condition, 6);
|
||||||
|
|
||||||
if (notify_die(DIE_DEBUG, "debug", regs, condition, error_code,
|
if (notify_die(DIE_DEBUG, "debug", regs, condition, error_code,
|
||||||
|
|
|
@ -315,6 +315,22 @@ static struct dmi_system_id __devinitdata pciprobe_dmi_table[] = {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
#endif
|
#endif
|
||||||
|
{
|
||||||
|
.callback = set_bf_sort,
|
||||||
|
.ident = "HP ProLiant DL385 G2",
|
||||||
|
.matches = {
|
||||||
|
DMI_MATCH(DMI_SYS_VENDOR, "HP"),
|
||||||
|
DMI_MATCH(DMI_PRODUCT_NAME, "ProLiant DL385 G2"),
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
.callback = set_bf_sort,
|
||||||
|
.ident = "HP ProLiant DL585 G2",
|
||||||
|
.matches = {
|
||||||
|
DMI_MATCH(DMI_SYS_VENDOR, "HP"),
|
||||||
|
DMI_MATCH(DMI_PRODUCT_NAME, "ProLiant DL585 G2"),
|
||||||
|
},
|
||||||
|
},
|
||||||
{}
|
{}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -1673,6 +1673,7 @@ int __cpuinit acpi_processor_power_init(struct acpi_processor *pr,
|
||||||
|
|
||||||
if (!first_run) {
|
if (!first_run) {
|
||||||
dmi_check_system(processor_power_dmi_table);
|
dmi_check_system(processor_power_dmi_table);
|
||||||
|
max_cstate = acpi_processor_cstate_check(max_cstate);
|
||||||
if (max_cstate < ACPI_C_STATES_MAX)
|
if (max_cstate < ACPI_C_STATES_MAX)
|
||||||
printk(KERN_NOTICE
|
printk(KERN_NOTICE
|
||||||
"ACPI: processor limited to max C-state %d\n",
|
"ACPI: processor limited to max C-state %d\n",
|
||||||
|
|
|
@ -94,6 +94,7 @@ ia64_acpi_release_global_lock (unsigned int *lock)
|
||||||
#define acpi_noirq 0 /* ACPI always enabled on IA64 */
|
#define acpi_noirq 0 /* ACPI always enabled on IA64 */
|
||||||
#define acpi_pci_disabled 0 /* ACPI PCI always enabled on IA64 */
|
#define acpi_pci_disabled 0 /* ACPI PCI always enabled on IA64 */
|
||||||
#define acpi_strict 1 /* no ACPI spec workarounds on IA64 */
|
#define acpi_strict 1 /* no ACPI spec workarounds on IA64 */
|
||||||
|
#define acpi_processor_cstate_check(x) (x) /* no idle limits on IA64 :) */
|
||||||
static inline void disable_acpi(void) { }
|
static inline void disable_acpi(void) { }
|
||||||
|
|
||||||
const char *acpi_get_sysname (void);
|
const char *acpi_get_sysname (void);
|
||||||
|
|
|
@ -1,5 +1,32 @@
|
||||||
|
#ifndef _ASM_X86_ACPI_H
|
||||||
|
#define _ASM_X86_ACPI_H
|
||||||
|
|
||||||
#ifdef CONFIG_X86_32
|
#ifdef CONFIG_X86_32
|
||||||
# include "acpi_32.h"
|
# include "acpi_32.h"
|
||||||
#else
|
#else
|
||||||
# include "acpi_64.h"
|
# include "acpi_64.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include <asm/processor.h>
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Check if the CPU can handle C2 and deeper
|
||||||
|
*/
|
||||||
|
static inline unsigned int acpi_processor_cstate_check(unsigned int max_cstate)
|
||||||
|
{
|
||||||
|
/*
|
||||||
|
* Early models (<=5) of AMD Opterons are not supposed to go into
|
||||||
|
* C2 state.
|
||||||
|
*
|
||||||
|
* Steppings 0x0A and later are good
|
||||||
|
*/
|
||||||
|
if (boot_cpu_data.x86 == 0x0F &&
|
||||||
|
boot_cpu_data.x86_vendor == X86_VENDOR_AMD &&
|
||||||
|
boot_cpu_data.x86_model <= 0x05 &&
|
||||||
|
boot_cpu_data.x86_mask < 0x0A)
|
||||||
|
return 1;
|
||||||
|
else
|
||||||
|
return max_cstate;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
|
@ -120,6 +120,7 @@ extern int local_apic_timer_disabled;
|
||||||
|
|
||||||
#else /* !CONFIG_X86_LOCAL_APIC */
|
#else /* !CONFIG_X86_LOCAL_APIC */
|
||||||
static inline void lapic_shutdown(void) { }
|
static inline void lapic_shutdown(void) { }
|
||||||
|
#define local_apic_timer_c2_ok 1
|
||||||
|
|
||||||
#endif /* !CONFIG_X86_LOCAL_APIC */
|
#endif /* !CONFIG_X86_LOCAL_APIC */
|
||||||
|
|
||||||
|
|
|
@ -137,6 +137,7 @@ struct timex {
|
||||||
#define ADJ_TIMECONST 0x0020 /* pll time constant */
|
#define ADJ_TIMECONST 0x0020 /* pll time constant */
|
||||||
#define ADJ_TICK 0x4000 /* tick value */
|
#define ADJ_TICK 0x4000 /* tick value */
|
||||||
#define ADJ_OFFSET_SINGLESHOT 0x8001 /* old-fashioned adjtime */
|
#define ADJ_OFFSET_SINGLESHOT 0x8001 /* old-fashioned adjtime */
|
||||||
|
#define ADJ_OFFSET_SS_READ 0xa001 /* read-only adjtime */
|
||||||
|
|
||||||
/* xntp 3.4 compatibility names */
|
/* xntp 3.4 compatibility names */
|
||||||
#define MOD_OFFSET ADJ_OFFSET
|
#define MOD_OFFSET ADJ_OFFSET
|
||||||
|
|
|
@ -249,10 +249,12 @@ int do_adjtimex(struct timex *txc)
|
||||||
|
|
||||||
/* Now we validate the data before disabling interrupts */
|
/* Now we validate the data before disabling interrupts */
|
||||||
|
|
||||||
if ((txc->modes & ADJ_OFFSET_SINGLESHOT) == ADJ_OFFSET_SINGLESHOT)
|
if ((txc->modes & ADJ_OFFSET_SINGLESHOT) == ADJ_OFFSET_SINGLESHOT) {
|
||||||
/* singleshot must not be used with any other mode bits */
|
/* singleshot must not be used with any other mode bits */
|
||||||
if (txc->modes != ADJ_OFFSET_SINGLESHOT)
|
if (txc->modes != ADJ_OFFSET_SINGLESHOT &&
|
||||||
|
txc->modes != ADJ_OFFSET_SS_READ)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
}
|
||||||
|
|
||||||
if (txc->modes != ADJ_OFFSET_SINGLESHOT && (txc->modes & ADJ_OFFSET))
|
if (txc->modes != ADJ_OFFSET_SINGLESHOT && (txc->modes & ADJ_OFFSET))
|
||||||
/* adjustment Offset limited to +- .512 seconds */
|
/* adjustment Offset limited to +- .512 seconds */
|
||||||
|
@ -372,7 +374,8 @@ int do_adjtimex(struct timex *txc)
|
||||||
leave: if ((time_status & (STA_UNSYNC|STA_CLOCKERR)) != 0)
|
leave: if ((time_status & (STA_UNSYNC|STA_CLOCKERR)) != 0)
|
||||||
result = TIME_ERROR;
|
result = TIME_ERROR;
|
||||||
|
|
||||||
if ((txc->modes & ADJ_OFFSET_SINGLESHOT) == ADJ_OFFSET_SINGLESHOT)
|
if ((txc->modes == ADJ_OFFSET_SINGLESHOT) ||
|
||||||
|
(txc->modes == ADJ_OFFSET_SS_READ))
|
||||||
txc->offset = save_adjust;
|
txc->offset = save_adjust;
|
||||||
else
|
else
|
||||||
txc->offset = ((long)shift_right(time_offset, SHIFT_UPDATE)) *
|
txc->offset = ((long)shift_right(time_offset, SHIFT_UPDATE)) *
|
||||||
|
|
Загрузка…
Ссылка в новой задаче