Merge commit 'v3.2-rc7' into x86/asm
Merge reason: Update from -rc4 to -rc7. Signed-off-by: Ingo Molnar <mingo@elte.hu>
This commit is contained in:
@@ -93,6 +93,8 @@ static int __init early_get_pnodeid(void)
|
||||
|
||||
if (node_id.s.part_number == UV2_HUB_PART_NUMBER)
|
||||
uv_min_hub_revision_id += UV2_HUB_REVISION_BASE - 1;
|
||||
if (node_id.s.part_number == UV2_HUB_PART_NUMBER_X)
|
||||
uv_min_hub_revision_id += UV2_HUB_REVISION_BASE - 1;
|
||||
|
||||
uv_hub_info->hub_revision = uv_min_hub_revision_id;
|
||||
pnode = (node_id.s.node_id >> 1) & ((1 << m_n_config.s.n_skt) - 1);
|
||||
|
@@ -547,6 +547,7 @@ static void generic_get_mtrr(unsigned int reg, unsigned long *base,
|
||||
|
||||
if (tmp != mask_lo) {
|
||||
printk(KERN_WARNING "mtrr: your BIOS has configured an incorrect mask, fixing it.\n");
|
||||
add_taint(TAINT_FIRMWARE_WORKAROUND);
|
||||
mask_lo = tmp;
|
||||
}
|
||||
}
|
||||
@@ -693,6 +694,7 @@ static void prepare_set(void) __acquires(set_atomicity_lock)
|
||||
|
||||
/* Disable MTRRs, and set the default type to uncached */
|
||||
mtrr_wrmsr(MSR_MTRRdefType, deftype_lo & ~0xcff, deftype_hi);
|
||||
wbinvd();
|
||||
}
|
||||
|
||||
static void post_set(void) __releases(set_atomicity_lock)
|
||||
|
@@ -312,12 +312,8 @@ int x86_setup_perfctr(struct perf_event *event)
|
||||
return -EOPNOTSUPP;
|
||||
}
|
||||
|
||||
/*
|
||||
* Do not allow config1 (extended registers) to propagate,
|
||||
* there's no sane user-space generalization yet:
|
||||
*/
|
||||
if (attr->type == PERF_TYPE_RAW)
|
||||
return 0;
|
||||
return x86_pmu_extra_regs(event->attr.config, event);
|
||||
|
||||
if (attr->type == PERF_TYPE_HW_CACHE)
|
||||
return set_ext_hw_attr(hwc, event);
|
||||
@@ -588,7 +584,7 @@ done:
|
||||
x86_pmu.put_event_constraints(cpuc, cpuc->event_list[i]);
|
||||
}
|
||||
}
|
||||
return num ? -ENOSPC : 0;
|
||||
return num ? -EINVAL : 0;
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -607,7 +603,7 @@ static int collect_events(struct cpu_hw_events *cpuc, struct perf_event *leader,
|
||||
|
||||
if (is_x86_event(leader)) {
|
||||
if (n >= max_count)
|
||||
return -ENOSPC;
|
||||
return -EINVAL;
|
||||
cpuc->event_list[n] = leader;
|
||||
n++;
|
||||
}
|
||||
@@ -620,7 +616,7 @@ static int collect_events(struct cpu_hw_events *cpuc, struct perf_event *leader,
|
||||
continue;
|
||||
|
||||
if (n >= max_count)
|
||||
return -ENOSPC;
|
||||
return -EINVAL;
|
||||
|
||||
cpuc->event_list[n] = event;
|
||||
n++;
|
||||
@@ -1316,7 +1312,7 @@ static int validate_event(struct perf_event *event)
|
||||
c = x86_pmu.get_event_constraints(fake_cpuc, event);
|
||||
|
||||
if (!c || !c->weight)
|
||||
ret = -ENOSPC;
|
||||
ret = -EINVAL;
|
||||
|
||||
if (x86_pmu.put_event_constraints)
|
||||
x86_pmu.put_event_constraints(fake_cpuc, event);
|
||||
@@ -1341,7 +1337,7 @@ static int validate_group(struct perf_event *event)
|
||||
{
|
||||
struct perf_event *leader = event->group_leader;
|
||||
struct cpu_hw_events *fake_cpuc;
|
||||
int ret = -ENOSPC, n;
|
||||
int ret = -EINVAL, n;
|
||||
|
||||
fake_cpuc = allocate_fake_cpuc();
|
||||
if (IS_ERR(fake_cpuc))
|
||||
|
@@ -199,8 +199,7 @@ static int force_ibs_eilvt_setup(void)
|
||||
goto out;
|
||||
}
|
||||
|
||||
pr_err(FW_BUG "using offset %d for IBS interrupts\n", offset);
|
||||
pr_err(FW_BUG "workaround enabled for IBS LVT offset\n");
|
||||
pr_info("IBS: LVT offset %d assigned\n", offset);
|
||||
|
||||
return 0;
|
||||
out:
|
||||
@@ -265,19 +264,23 @@ perf_ibs_cpu_notifier(struct notifier_block *self, unsigned long action, void *h
|
||||
static __init int amd_ibs_init(void)
|
||||
{
|
||||
u32 caps;
|
||||
int ret;
|
||||
int ret = -EINVAL;
|
||||
|
||||
caps = __get_ibs_caps();
|
||||
if (!caps)
|
||||
return -ENODEV; /* ibs not supported by the cpu */
|
||||
|
||||
if (!ibs_eilvt_valid()) {
|
||||
ret = force_ibs_eilvt_setup();
|
||||
if (ret) {
|
||||
pr_err("Failed to setup IBS, %d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
/*
|
||||
* Force LVT offset assignment for family 10h: The offsets are
|
||||
* not assigned by the BIOS for this family, so the OS is
|
||||
* responsible for doing it. If the OS assignment fails, fall
|
||||
* back to BIOS settings and try to setup this.
|
||||
*/
|
||||
if (boot_cpu_data.x86 == 0x10)
|
||||
force_ibs_eilvt_setup();
|
||||
|
||||
if (!ibs_eilvt_valid())
|
||||
goto out;
|
||||
|
||||
get_online_cpus();
|
||||
ibs_caps = caps;
|
||||
@@ -287,7 +290,11 @@ static __init int amd_ibs_init(void)
|
||||
smp_call_function(setup_APIC_ibs, NULL, 1);
|
||||
put_online_cpus();
|
||||
|
||||
return perf_event_ibs_init();
|
||||
ret = perf_event_ibs_init();
|
||||
out:
|
||||
if (ret)
|
||||
pr_err("Failed to setup IBS, %d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* Since we need the pci subsystem to init ibs we can't do this earlier: */
|
||||
|
@@ -1545,6 +1545,13 @@ static void intel_clovertown_quirks(void)
|
||||
x86_pmu.pebs_constraints = NULL;
|
||||
}
|
||||
|
||||
static void intel_sandybridge_quirks(void)
|
||||
{
|
||||
printk(KERN_WARNING "PEBS disabled due to CPU errata.\n");
|
||||
x86_pmu.pebs = 0;
|
||||
x86_pmu.pebs_constraints = NULL;
|
||||
}
|
||||
|
||||
__init int intel_pmu_init(void)
|
||||
{
|
||||
union cpuid10_edx edx;
|
||||
@@ -1694,6 +1701,7 @@ __init int intel_pmu_init(void)
|
||||
break;
|
||||
|
||||
case 42: /* SandyBridge */
|
||||
x86_pmu.quirks = intel_sandybridge_quirks;
|
||||
case 45: /* SandyBridge, "Romely-EP" */
|
||||
memcpy(hw_cache_event_ids, snb_hw_cache_event_ids,
|
||||
sizeof(hw_cache_event_ids));
|
||||
|
@@ -493,6 +493,7 @@ static int intel_pmu_pebs_fixup_ip(struct pt_regs *regs)
|
||||
unsigned long from = cpuc->lbr_entries[0].from;
|
||||
unsigned long old_to, to = cpuc->lbr_entries[0].to;
|
||||
unsigned long ip = regs->ip;
|
||||
int is_64bit = 0;
|
||||
|
||||
/*
|
||||
* We don't need to fixup if the PEBS assist is fault like
|
||||
@@ -544,7 +545,10 @@ static int intel_pmu_pebs_fixup_ip(struct pt_regs *regs)
|
||||
} else
|
||||
kaddr = (void *)to;
|
||||
|
||||
kernel_insn_init(&insn, kaddr);
|
||||
#ifdef CONFIG_X86_64
|
||||
is_64bit = kernel_ip(to) || !test_thread_flag(TIF_IA32);
|
||||
#endif
|
||||
insn_init(&insn, kaddr, is_64bit);
|
||||
insn_get_length(&insn);
|
||||
to += insn.length;
|
||||
} while (to < ip);
|
||||
|
@@ -1268,7 +1268,7 @@ reserve:
|
||||
}
|
||||
|
||||
done:
|
||||
return num ? -ENOSPC : 0;
|
||||
return num ? -EINVAL : 0;
|
||||
}
|
||||
|
||||
static __initconst const struct x86_pmu p4_pmu = {
|
||||
|
@@ -116,16 +116,16 @@ void show_registers(struct pt_regs *regs)
|
||||
for (i = 0; i < code_len; i++, ip++) {
|
||||
if (ip < (u8 *)PAGE_OFFSET ||
|
||||
probe_kernel_address(ip, c)) {
|
||||
printk(" Bad EIP value.");
|
||||
printk(KERN_CONT " Bad EIP value.");
|
||||
break;
|
||||
}
|
||||
if (ip == (u8 *)regs->ip)
|
||||
printk("<%02x> ", c);
|
||||
printk(KERN_CONT "<%02x> ", c);
|
||||
else
|
||||
printk("%02x ", c);
|
||||
printk(KERN_CONT "%02x ", c);
|
||||
}
|
||||
}
|
||||
printk("\n");
|
||||
printk(KERN_CONT "\n");
|
||||
}
|
||||
|
||||
int is_valid_bugaddr(unsigned long ip)
|
||||
|
@@ -284,16 +284,16 @@ void show_registers(struct pt_regs *regs)
|
||||
for (i = 0; i < code_len; i++, ip++) {
|
||||
if (ip < (u8 *)PAGE_OFFSET ||
|
||||
probe_kernel_address(ip, c)) {
|
||||
printk(" Bad RIP value.");
|
||||
printk(KERN_CONT " Bad RIP value.");
|
||||
break;
|
||||
}
|
||||
if (ip == (u8 *)regs->ip)
|
||||
printk("<%02x> ", c);
|
||||
printk(KERN_CONT "<%02x> ", c);
|
||||
else
|
||||
printk("%02x ", c);
|
||||
printk(KERN_CONT "%02x ", c);
|
||||
}
|
||||
}
|
||||
printk("\n");
|
||||
printk(KERN_CONT "\n");
|
||||
}
|
||||
|
||||
int is_valid_bugaddr(unsigned long ip)
|
||||
|
@@ -1049,6 +1049,14 @@ int hpet_rtc_timer_init(void)
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(hpet_rtc_timer_init);
|
||||
|
||||
static void hpet_disable_rtc_channel(void)
|
||||
{
|
||||
unsigned long cfg;
|
||||
cfg = hpet_readl(HPET_T1_CFG);
|
||||
cfg &= ~HPET_TN_ENABLE;
|
||||
hpet_writel(cfg, HPET_T1_CFG);
|
||||
}
|
||||
|
||||
/*
|
||||
* The functions below are called from rtc driver.
|
||||
* Return 0 if HPET is not being used.
|
||||
@@ -1060,6 +1068,9 @@ int hpet_mask_rtc_irq_bit(unsigned long bit_mask)
|
||||
return 0;
|
||||
|
||||
hpet_rtc_flags &= ~bit_mask;
|
||||
if (unlikely(!hpet_rtc_flags))
|
||||
hpet_disable_rtc_channel();
|
||||
|
||||
return 1;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(hpet_mask_rtc_irq_bit);
|
||||
@@ -1125,15 +1136,11 @@ EXPORT_SYMBOL_GPL(hpet_rtc_dropped_irq);
|
||||
|
||||
static void hpet_rtc_timer_reinit(void)
|
||||
{
|
||||
unsigned int cfg, delta;
|
||||
unsigned int delta;
|
||||
int lost_ints = -1;
|
||||
|
||||
if (unlikely(!hpet_rtc_flags)) {
|
||||
cfg = hpet_readl(HPET_T1_CFG);
|
||||
cfg &= ~HPET_TN_ENABLE;
|
||||
hpet_writel(cfg, HPET_T1_CFG);
|
||||
return;
|
||||
}
|
||||
if (unlikely(!hpet_rtc_flags))
|
||||
hpet_disable_rtc_channel();
|
||||
|
||||
if (!(hpet_rtc_flags & RTC_PIE) || hpet_pie_limit)
|
||||
delta = hpet_default_delta;
|
||||
|
@@ -38,6 +38,9 @@ static inline void stack_overflow_check(struct pt_regs *regs)
|
||||
#ifdef CONFIG_DEBUG_STACKOVERFLOW
|
||||
u64 curbase = (u64)task_stack_page(current);
|
||||
|
||||
if (user_mode_vm(regs))
|
||||
return;
|
||||
|
||||
WARN_ONCE(regs->sp >= curbase &&
|
||||
regs->sp <= curbase + THREAD_SIZE &&
|
||||
regs->sp < curbase + sizeof(struct thread_info) +
|
||||
|
@@ -256,7 +256,7 @@ static int __init microcode_dev_init(void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void microcode_dev_exit(void)
|
||||
static void __exit microcode_dev_exit(void)
|
||||
{
|
||||
misc_deregister(µcode_dev);
|
||||
}
|
||||
@@ -519,10 +519,8 @@ static int __init microcode_init(void)
|
||||
|
||||
microcode_pdev = platform_device_register_simple("microcode", -1,
|
||||
NULL, 0);
|
||||
if (IS_ERR(microcode_pdev)) {
|
||||
microcode_dev_exit();
|
||||
if (IS_ERR(microcode_pdev))
|
||||
return PTR_ERR(microcode_pdev);
|
||||
}
|
||||
|
||||
get_online_cpus();
|
||||
mutex_lock(µcode_mutex);
|
||||
@@ -532,14 +530,12 @@ static int __init microcode_init(void)
|
||||
mutex_unlock(µcode_mutex);
|
||||
put_online_cpus();
|
||||
|
||||
if (error) {
|
||||
platform_device_unregister(microcode_pdev);
|
||||
return error;
|
||||
}
|
||||
if (error)
|
||||
goto out_pdev;
|
||||
|
||||
error = microcode_dev_init();
|
||||
if (error)
|
||||
return error;
|
||||
goto out_sysdev_driver;
|
||||
|
||||
register_syscore_ops(&mc_syscore_ops);
|
||||
register_hotcpu_notifier(&mc_cpu_notifier);
|
||||
@@ -548,6 +544,20 @@ static int __init microcode_init(void)
|
||||
" <tigran@aivazian.fsnet.co.uk>, Peter Oruba\n");
|
||||
|
||||
return 0;
|
||||
|
||||
out_sysdev_driver:
|
||||
get_online_cpus();
|
||||
mutex_lock(µcode_mutex);
|
||||
|
||||
sysdev_driver_unregister(&cpu_sysdev_class, &mc_sysdev_driver);
|
||||
|
||||
mutex_unlock(µcode_mutex);
|
||||
put_online_cpus();
|
||||
|
||||
out_pdev:
|
||||
platform_device_unregister(microcode_pdev);
|
||||
return error;
|
||||
|
||||
}
|
||||
module_init(microcode_init);
|
||||
|
||||
|
@@ -95,8 +95,8 @@ static void __init MP_bus_info(struct mpc_bus *m)
|
||||
}
|
||||
#endif
|
||||
|
||||
set_bit(m->busid, mp_bus_not_pci);
|
||||
if (strncmp(str, BUSTYPE_ISA, sizeof(BUSTYPE_ISA) - 1) == 0) {
|
||||
set_bit(m->busid, mp_bus_not_pci);
|
||||
#if defined(CONFIG_EISA) || defined(CONFIG_MCA)
|
||||
mp_bus_id_to_type[m->busid] = MP_BUS_ISA;
|
||||
#endif
|
||||
|
@@ -553,4 +553,17 @@ DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_10H_NB_MISC,
|
||||
quirk_amd_nb_node);
|
||||
DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_10H_NB_LINK,
|
||||
quirk_amd_nb_node);
|
||||
DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_15H_NB_F0,
|
||||
quirk_amd_nb_node);
|
||||
DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_15H_NB_F1,
|
||||
quirk_amd_nb_node);
|
||||
DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_15H_NB_F2,
|
||||
quirk_amd_nb_node);
|
||||
DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_15H_NB_F3,
|
||||
quirk_amd_nb_node);
|
||||
DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_15H_NB_F4,
|
||||
quirk_amd_nb_node);
|
||||
DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_15H_NB_F5,
|
||||
quirk_amd_nb_node);
|
||||
|
||||
#endif
|
||||
|
@@ -124,7 +124,7 @@ __setup("reboot=", reboot_setup);
|
||||
*/
|
||||
|
||||
/*
|
||||
* Some machines require the "reboot=b" commandline option,
|
||||
* Some machines require the "reboot=b" or "reboot=k" commandline options,
|
||||
* this quirk makes that automatic.
|
||||
*/
|
||||
static int __init set_bios_reboot(const struct dmi_system_id *d)
|
||||
@@ -136,6 +136,15 @@ static int __init set_bios_reboot(const struct dmi_system_id *d)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int __init set_kbd_reboot(const struct dmi_system_id *d)
|
||||
{
|
||||
if (reboot_type != BOOT_KBD) {
|
||||
reboot_type = BOOT_KBD;
|
||||
printk(KERN_INFO "%s series board detected. Selecting KBD-method for reboot.\n", d->ident);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
static struct dmi_system_id __initdata reboot_dmi_table[] = {
|
||||
{ /* Handle problems with rebooting on Dell E520's */
|
||||
.callback = set_bios_reboot,
|
||||
@@ -295,7 +304,7 @@ static struct dmi_system_id __initdata reboot_dmi_table[] = {
|
||||
},
|
||||
},
|
||||
{ /* Handle reboot issue on Acer Aspire one */
|
||||
.callback = set_bios_reboot,
|
||||
.callback = set_kbd_reboot,
|
||||
.ident = "Acer Aspire One A110",
|
||||
.matches = {
|
||||
DMI_MATCH(DMI_SYS_VENDOR, "Acer"),
|
||||
@@ -443,6 +452,14 @@ static struct dmi_system_id __initdata pci_reboot_dmi_table[] = {
|
||||
DMI_MATCH(DMI_PRODUCT_NAME, "Latitude E6420"),
|
||||
},
|
||||
},
|
||||
{ /* Handle problems with rebooting on the OptiPlex 990. */
|
||||
.callback = set_pci_reboot,
|
||||
.ident = "Dell OptiPlex 990",
|
||||
.matches = {
|
||||
DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
|
||||
DMI_MATCH(DMI_PRODUCT_NAME, "OptiPlex 990"),
|
||||
},
|
||||
},
|
||||
{ }
|
||||
};
|
||||
|
||||
|
@@ -12,6 +12,7 @@
|
||||
#include <asm/vsyscall.h>
|
||||
#include <asm/x86_init.h>
|
||||
#include <asm/time.h>
|
||||
#include <asm/mrst.h>
|
||||
|
||||
#ifdef CONFIG_X86_32
|
||||
/*
|
||||
@@ -242,6 +243,10 @@ static __init int add_rtc_cmos(void)
|
||||
if (of_have_populated_dt())
|
||||
return 0;
|
||||
|
||||
/* Intel MID platforms don't have ioport rtc */
|
||||
if (mrst_identify_cpu())
|
||||
return -ENODEV;
|
||||
|
||||
platform_device_register(&rtc_device);
|
||||
dev_info(&rtc_device.dev,
|
||||
"registered platform RTC device (no PNP device found)\n");
|
||||
|
Reference in New Issue
Block a user