Merge remote branch 'linus/master' into x86/cpu
This commit is contained in:
@@ -118,7 +118,7 @@ static unsigned int gsi_to_irq(unsigned int gsi)
|
||||
if (gsi >= NR_IRQS_LEGACY)
|
||||
irq = gsi;
|
||||
else
|
||||
irq = gsi_end + 1 + gsi;
|
||||
irq = gsi_top + gsi;
|
||||
|
||||
return irq;
|
||||
}
|
||||
@@ -129,10 +129,10 @@ static u32 irq_to_gsi(int irq)
|
||||
|
||||
if (irq < NR_IRQS_LEGACY)
|
||||
gsi = isa_irq_to_gsi[irq];
|
||||
else if (irq <= gsi_end)
|
||||
else if (irq < gsi_top)
|
||||
gsi = irq;
|
||||
else if (irq <= (gsi_end + NR_IRQS_LEGACY))
|
||||
gsi = irq - gsi_end;
|
||||
else if (irq < (gsi_top + NR_IRQS_LEGACY))
|
||||
gsi = irq - gsi_top;
|
||||
else
|
||||
gsi = 0xffffffff;
|
||||
|
||||
|
@@ -145,6 +145,15 @@ int acpi_processor_ffh_cstate_probe(unsigned int cpu,
|
||||
percpu_entry->states[cx->index].eax = cx->address;
|
||||
percpu_entry->states[cx->index].ecx = MWAIT_ECX_INTERRUPT_BREAK;
|
||||
}
|
||||
|
||||
/*
|
||||
* For _CST FFH on Intel, if GAS.access_size bit 1 is cleared,
|
||||
* then we should skip checking BM_STS for this C-state.
|
||||
* ref: "Intel Processor Vendor-Specific ACPI Interface Specification"
|
||||
*/
|
||||
if ((c->x86_vendor == X86_VENDOR_INTEL) && !(reg->access_size & 0x2))
|
||||
cx->bm_sts_skip = 1;
|
||||
|
||||
return retval;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(acpi_processor_ffh_cstate_probe);
|
||||
|
@@ -157,9 +157,14 @@ static int __init acpi_sleep_setup(char *str)
|
||||
#ifdef CONFIG_HIBERNATION
|
||||
if (strncmp(str, "s4_nohwsig", 10) == 0)
|
||||
acpi_no_s4_hw_signature();
|
||||
if (strncmp(str, "s4_nonvs", 8) == 0)
|
||||
acpi_s4_no_nvs();
|
||||
if (strncmp(str, "s4_nonvs", 8) == 0) {
|
||||
pr_warning("ACPI: acpi_sleep=s4_nonvs is deprecated, "
|
||||
"please use acpi_sleep=nonvs instead");
|
||||
acpi_nvs_nosave();
|
||||
}
|
||||
#endif
|
||||
if (strncmp(str, "nonvs", 5) == 0)
|
||||
acpi_nvs_nosave();
|
||||
if (strncmp(str, "old_ordering", 12) == 0)
|
||||
acpi_old_suspend_ordering();
|
||||
str = strchr(str, ',');
|
||||
|
@@ -921,7 +921,7 @@ void disable_local_APIC(void)
|
||||
unsigned int value;
|
||||
|
||||
/* APIC hasn't been mapped yet */
|
||||
if (!apic_phys)
|
||||
if (!x2apic_mode && !apic_phys)
|
||||
return;
|
||||
|
||||
clear_local_APIC();
|
||||
|
@@ -89,8 +89,8 @@ int nr_ioapics;
|
||||
/* IO APIC gsi routing info */
|
||||
struct mp_ioapic_gsi mp_gsi_routing[MAX_IO_APICS];
|
||||
|
||||
/* The last gsi number used */
|
||||
u32 gsi_end;
|
||||
/* The one past the highest gsi number used */
|
||||
u32 gsi_top;
|
||||
|
||||
/* MP IRQ source entries */
|
||||
struct mpc_intsrc mp_irqs[MAX_IRQ_SOURCES];
|
||||
@@ -1035,7 +1035,7 @@ static int pin_2_irq(int idx, int apic, int pin)
|
||||
if (gsi >= NR_IRQS_LEGACY)
|
||||
irq = gsi;
|
||||
else
|
||||
irq = gsi_end + 1 + gsi;
|
||||
irq = gsi_top + gsi;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_X86_32
|
||||
@@ -3853,7 +3853,7 @@ void __init probe_nr_irqs_gsi(void)
|
||||
{
|
||||
int nr;
|
||||
|
||||
nr = gsi_end + 1 + NR_IRQS_LEGACY;
|
||||
nr = gsi_top + NR_IRQS_LEGACY;
|
||||
if (nr > nr_irqs_gsi)
|
||||
nr_irqs_gsi = nr;
|
||||
|
||||
@@ -4294,8 +4294,8 @@ void __init mp_register_ioapic(int id, u32 address, u32 gsi_base)
|
||||
*/
|
||||
nr_ioapic_registers[idx] = entries;
|
||||
|
||||
if (mp_gsi_routing[idx].gsi_end > gsi_end)
|
||||
gsi_end = mp_gsi_routing[idx].gsi_end;
|
||||
if (mp_gsi_routing[idx].gsi_end >= gsi_top)
|
||||
gsi_top = mp_gsi_routing[idx].gsi_end + 1;
|
||||
|
||||
printk(KERN_INFO "IOAPIC[%d]: apic_id %d, version %d, address 0x%x, "
|
||||
"GSI %d-%d\n", idx, mp_ioapics[idx].apicid,
|
||||
|
@@ -102,8 +102,8 @@ static const u64 amd_perfmon_event_map[] =
|
||||
[PERF_COUNT_HW_INSTRUCTIONS] = 0x00c0,
|
||||
[PERF_COUNT_HW_CACHE_REFERENCES] = 0x0080,
|
||||
[PERF_COUNT_HW_CACHE_MISSES] = 0x0081,
|
||||
[PERF_COUNT_HW_BRANCH_INSTRUCTIONS] = 0x00c4,
|
||||
[PERF_COUNT_HW_BRANCH_MISSES] = 0x00c5,
|
||||
[PERF_COUNT_HW_BRANCH_INSTRUCTIONS] = 0x00c2,
|
||||
[PERF_COUNT_HW_BRANCH_MISSES] = 0x00c3,
|
||||
};
|
||||
|
||||
static u64 amd_pmu_event_map(int hw_event)
|
||||
|
@@ -72,6 +72,7 @@ static struct event_constraint intel_westmere_event_constraints[] =
|
||||
INTEL_EVENT_CONSTRAINT(0x51, 0x3), /* L1D */
|
||||
INTEL_EVENT_CONSTRAINT(0x60, 0x1), /* OFFCORE_REQUESTS_OUTSTANDING */
|
||||
INTEL_EVENT_CONSTRAINT(0x63, 0x3), /* CACHE_LOCK_CYCLES */
|
||||
INTEL_EVENT_CONSTRAINT(0xb3, 0x1), /* SNOOPQ_REQUEST_OUTSTANDING */
|
||||
EVENT_CONSTRAINT_END
|
||||
};
|
||||
|
||||
|
@@ -729,7 +729,7 @@ static int __init e820_mark_nvs_memory(void)
|
||||
struct e820entry *ei = &e820.map[i];
|
||||
|
||||
if (ei->type == E820_NVS)
|
||||
hibernate_nvs_register(ei->addr, ei->size);
|
||||
suspend_nvs_register(ei->addr, ei->size);
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
@@ -18,6 +18,7 @@
|
||||
#include <asm/apic.h>
|
||||
#include <asm/iommu.h>
|
||||
#include <asm/gart.h>
|
||||
#include <asm/hpet.h>
|
||||
|
||||
static void __init fix_hypertransport_config(int num, int slot, int func)
|
||||
{
|
||||
@@ -191,6 +192,21 @@ static void __init ati_bugs_contd(int num, int slot, int func)
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Force the read back of the CMP register in hpet_next_event()
|
||||
* to work around the problem that the CMP register write seems to be
|
||||
* delayed. See hpet_next_event() for details.
|
||||
*
|
||||
* We do this on all SMBUS incarnations for now until we have more
|
||||
* information about the affected chipsets.
|
||||
*/
|
||||
static void __init ati_hpet_bugs(int num, int slot, int func)
|
||||
{
|
||||
#ifdef CONFIG_HPET_TIMER
|
||||
hpet_readback_cmp = 1;
|
||||
#endif
|
||||
}
|
||||
|
||||
#define QFLAG_APPLY_ONCE 0x1
|
||||
#define QFLAG_APPLIED 0x2
|
||||
#define QFLAG_DONE (QFLAG_APPLY_ONCE|QFLAG_APPLIED)
|
||||
@@ -220,6 +236,8 @@ static struct chipset early_qrk[] __initdata = {
|
||||
PCI_CLASS_SERIAL_SMBUS, PCI_ANY_ID, 0, ati_bugs },
|
||||
{ PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_SBX00_SMBUS,
|
||||
PCI_CLASS_SERIAL_SMBUS, PCI_ANY_ID, 0, ati_bugs_contd },
|
||||
{ PCI_VENDOR_ID_ATI, PCI_ANY_ID,
|
||||
PCI_CLASS_SERIAL_SMBUS, PCI_ANY_ID, 0, ati_hpet_bugs },
|
||||
{}
|
||||
};
|
||||
|
||||
|
@@ -571,8 +571,8 @@ auditsys:
|
||||
* masked off.
|
||||
*/
|
||||
sysret_audit:
|
||||
movq %rax,%rsi /* second arg, syscall return value */
|
||||
cmpq $0,%rax /* is it < 0? */
|
||||
movq RAX-ARGOFFSET(%rsp),%rsi /* second arg, syscall return value */
|
||||
cmpq $0,%rsi /* is it < 0? */
|
||||
setl %al /* 1 if so, 0 if not */
|
||||
movzbl %al,%edi /* zero-extend that into %edi */
|
||||
inc %edi /* first arg, 0->1(AUDITSC_SUCCESS), 1->2(AUDITSC_FAILURE) */
|
||||
|
@@ -640,8 +640,8 @@ static int __kprobes kprobe_handler(struct pt_regs *regs)
|
||||
/* Skip cs, ip, orig_ax and gs. */ \
|
||||
" subl $16, %esp\n" \
|
||||
" pushl %fs\n" \
|
||||
" pushl %ds\n" \
|
||||
" pushl %es\n" \
|
||||
" pushl %ds\n" \
|
||||
" pushl %eax\n" \
|
||||
" pushl %ebp\n" \
|
||||
" pushl %edi\n" \
|
||||
|
@@ -123,7 +123,7 @@ static void __init MP_ioapic_info(struct mpc_ioapic *m)
|
||||
printk(KERN_INFO "I/O APIC #%d Version %d at 0x%X.\n",
|
||||
m->apicid, m->apicver, m->apicaddr);
|
||||
|
||||
mp_register_ioapic(m->apicid, m->apicaddr, gsi_end + 1);
|
||||
mp_register_ioapic(m->apicid, m->apicaddr, gsi_top);
|
||||
}
|
||||
|
||||
static void print_MP_intsrc_info(struct mpc_intsrc *m)
|
||||
|
@@ -216,6 +216,12 @@ static void __init mrst_setup_boot_clock(void)
|
||||
setup_boot_APIC_clock();
|
||||
};
|
||||
|
||||
/* MID systems don't have i8042 controller */
|
||||
static int mrst_i8042_detect(void)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* Moorestown specific x86_init function overrides and early setup
|
||||
* calls.
|
||||
@@ -233,6 +239,7 @@ void __init x86_mrst_early_setup(void)
|
||||
x86_cpuinit.setup_percpu_clockev = mrst_setup_secondary_clock;
|
||||
|
||||
x86_platform.calibrate_tsc = mrst_calibrate_tsc;
|
||||
x86_platform.i8042_detect = mrst_i8042_detect;
|
||||
x86_init.pci.init = pci_mrst_init;
|
||||
x86_init.pci.fixup_irqs = x86_init_noop;
|
||||
|
||||
|
@@ -103,11 +103,16 @@ int use_calgary __read_mostly = 0;
|
||||
#define PMR_SOFTSTOPFAULT 0x40000000
|
||||
#define PMR_HARDSTOP 0x20000000
|
||||
|
||||
#define MAX_NUM_OF_PHBS 8 /* how many PHBs in total? */
|
||||
#define MAX_NUM_CHASSIS 8 /* max number of chassis */
|
||||
/* MAX_PHB_BUS_NUM is the maximal possible dev->bus->number */
|
||||
#define MAX_PHB_BUS_NUM (MAX_NUM_OF_PHBS * MAX_NUM_CHASSIS * 2)
|
||||
#define PHBS_PER_CALGARY 4
|
||||
/*
|
||||
* The maximum PHB bus number.
|
||||
* x3950M2 (rare): 8 chassis, 48 PHBs per chassis = 384
|
||||
* x3950M2: 4 chassis, 48 PHBs per chassis = 192
|
||||
* x3950 (PCIE): 8 chassis, 32 PHBs per chassis = 256
|
||||
* x3950 (PCIX): 8 chassis, 16 PHBs per chassis = 128
|
||||
*/
|
||||
#define MAX_PHB_BUS_NUM 256
|
||||
|
||||
#define PHBS_PER_CALGARY 4
|
||||
|
||||
/* register offsets in Calgary's internal register space */
|
||||
static const unsigned long tar_offsets[] = {
|
||||
@@ -1051,8 +1056,6 @@ static int __init calgary_init_one(struct pci_dev *dev)
|
||||
struct iommu_table *tbl;
|
||||
int ret;
|
||||
|
||||
BUG_ON(dev->bus->number >= MAX_PHB_BUS_NUM);
|
||||
|
||||
bbar = busno_to_bbar(dev->bus->number);
|
||||
ret = calgary_setup_tar(dev, bbar);
|
||||
if (ret)
|
||||
|
@@ -498,15 +498,10 @@ void force_hpet_resume(void)
|
||||
* See erratum #27 (Misinterpreted MSI Requests May Result in
|
||||
* Corrupted LPC DMA Data) in AMD Publication #46837,
|
||||
* "SB700 Family Product Errata", Rev. 1.0, March 2010.
|
||||
*
|
||||
* Also force the read back of the CMP register in hpet_next_event()
|
||||
* to work around the problem that the CMP register write seems to be
|
||||
* delayed. See hpet_next_event() for details.
|
||||
*/
|
||||
static void force_disable_hpet_msi(struct pci_dev *unused)
|
||||
{
|
||||
hpet_msi_disable = 1;
|
||||
hpet_readback_cmp = 1;
|
||||
}
|
||||
|
||||
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_SBX00_SMBUS,
|
||||
|
@@ -228,6 +228,14 @@ static struct dmi_system_id __initdata reboot_dmi_table[] = {
|
||||
DMI_MATCH(DMI_PRODUCT_NAME, "Precision WorkStation T5400"),
|
||||
},
|
||||
},
|
||||
{ /* Handle problems with rebooting on Dell T7400's */
|
||||
.callback = set_bios_reboot,
|
||||
.ident = "Dell Precision T7400",
|
||||
.matches = {
|
||||
DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
|
||||
DMI_MATCH(DMI_PRODUCT_NAME, "Precision WorkStation T7400"),
|
||||
},
|
||||
},
|
||||
{ /* Handle problems with rebooting on HP laptops */
|
||||
.callback = set_bios_reboot,
|
||||
.ident = "HP Compaq Laptop",
|
||||
|
@@ -238,6 +238,15 @@ void __init setup_per_cpu_areas(void)
|
||||
#ifdef CONFIG_NUMA
|
||||
per_cpu(x86_cpu_to_node_map, cpu) =
|
||||
early_per_cpu_map(x86_cpu_to_node_map, cpu);
|
||||
/*
|
||||
* Ensure that the boot cpu numa_node is correct when the boot
|
||||
* cpu is on a node that doesn't have memory installed.
|
||||
* Also cpu_up() will call cpu_to_node() for APs when
|
||||
* MEMORY_HOTPLUG is defined, before per_cpu(numa_node) is set
|
||||
* up later with c_init aka intel_init/amd_init.
|
||||
* So set them all (boot cpu and all APs).
|
||||
*/
|
||||
set_cpu_numa_node(cpu, early_cpu_to_node(cpu));
|
||||
#endif
|
||||
#endif
|
||||
/*
|
||||
@@ -257,14 +266,6 @@ void __init setup_per_cpu_areas(void)
|
||||
early_per_cpu_ptr(x86_cpu_to_node_map) = NULL;
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_X86_64) && defined(CONFIG_NUMA)
|
||||
/*
|
||||
* make sure boot cpu numa_node is right, when boot cpu is on the
|
||||
* node that doesn't have mem installed
|
||||
*/
|
||||
set_cpu_numa_node(boot_cpu_id, early_cpu_to_node(boot_cpu_id));
|
||||
#endif
|
||||
|
||||
/* Setup node to cpumask map */
|
||||
setup_node_to_cpumask_map();
|
||||
|
||||
|
@@ -93,7 +93,7 @@ static int __init sfi_parse_ioapic(struct sfi_table_header *table)
|
||||
pentry = (struct sfi_apic_table_entry *)sb->pentry;
|
||||
|
||||
for (i = 0; i < num; i++) {
|
||||
mp_register_ioapic(i, pentry->phys_addr, gsi_end + 1);
|
||||
mp_register_ioapic(i, pentry->phys_addr, gsi_top);
|
||||
pentry++;
|
||||
}
|
||||
|
||||
|
@@ -526,6 +526,7 @@ asmlinkage __kprobes struct pt_regs *sync_regs(struct pt_regs *eregs)
|
||||
dotraplinkage void __kprobes do_debug(struct pt_regs *regs, long error_code)
|
||||
{
|
||||
struct task_struct *tsk = current;
|
||||
int user_icebp = 0;
|
||||
unsigned long dr6;
|
||||
int si_code;
|
||||
|
||||
@@ -534,6 +535,14 @@ dotraplinkage void __kprobes do_debug(struct pt_regs *regs, long error_code)
|
||||
/* Filter out all the reserved bits which are preset to 1 */
|
||||
dr6 &= ~DR6_RESERVED;
|
||||
|
||||
/*
|
||||
* If dr6 has no reason to give us about the origin of this trap,
|
||||
* then it's very likely the result of an icebp/int01 trap.
|
||||
* User wants a sigtrap for that.
|
||||
*/
|
||||
if (!dr6 && user_mode(regs))
|
||||
user_icebp = 1;
|
||||
|
||||
/* Catch kmemcheck conditions first of all! */
|
||||
if ((dr6 & DR_STEP) && kmemcheck_trap(regs))
|
||||
return;
|
||||
@@ -575,7 +584,7 @@ dotraplinkage void __kprobes do_debug(struct pt_regs *regs, long error_code)
|
||||
regs->flags &= ~X86_EFLAGS_TF;
|
||||
}
|
||||
si_code = get_si_code(tsk->thread.debugreg6);
|
||||
if (tsk->thread.debugreg6 & (DR_STEP | DR_TRAP_BITS))
|
||||
if (tsk->thread.debugreg6 & (DR_STEP | DR_TRAP_BITS) || user_icebp)
|
||||
send_sigtrap(tsk, regs, error_code, si_code);
|
||||
preempt_conditional_cli(regs);
|
||||
|
||||
|
@@ -5,6 +5,7 @@
|
||||
*/
|
||||
#include <linux/init.h>
|
||||
#include <linux/ioport.h>
|
||||
#include <linux/module.h>
|
||||
|
||||
#include <asm/bios_ebda.h>
|
||||
#include <asm/paravirt.h>
|
||||
@@ -85,6 +86,7 @@ struct x86_cpuinit_ops x86_cpuinit __cpuinitdata = {
|
||||
};
|
||||
|
||||
static void default_nmi_init(void) { };
|
||||
static int default_i8042_detect(void) { return 1; };
|
||||
|
||||
struct x86_platform_ops x86_platform = {
|
||||
.calibrate_tsc = native_calibrate_tsc,
|
||||
@@ -92,5 +94,8 @@ struct x86_platform_ops x86_platform = {
|
||||
.set_wallclock = mach_set_rtc_mmss,
|
||||
.iommu_shutdown = iommu_shutdown_noop,
|
||||
.is_untracked_pat_range = is_ISA_range,
|
||||
.nmi_init = default_nmi_init
|
||||
.nmi_init = default_nmi_init,
|
||||
.i8042_detect = default_i8042_detect
|
||||
};
|
||||
|
||||
EXPORT_SYMBOL_GPL(x86_platform);
|
||||
|
Reference in New Issue
Block a user