Merge branch 'x86/urgent' into x86/asm
Get the cr4 fixes so we can apply the final cleanup
This commit is contained in:
@@ -1164,7 +1164,9 @@ fpu_emul:
|
||||
regs->regs[31] = r31;
|
||||
regs->cp0_epc = epc;
|
||||
if (!used_math()) { /* First time FPU user. */
|
||||
preempt_disable();
|
||||
err = init_fpu();
|
||||
preempt_enable();
|
||||
set_used_math();
|
||||
}
|
||||
lose_fpu(1); /* Save FPU state for the emulator. */
|
||||
|
@@ -605,14 +605,14 @@ int mips_set_process_fp_mode(struct task_struct *task, unsigned int value)
|
||||
return -EOPNOTSUPP;
|
||||
|
||||
/* Avoid inadvertently triggering emulation */
|
||||
if ((value & PR_FP_MODE_FR) && cpu_has_fpu &&
|
||||
!(current_cpu_data.fpu_id & MIPS_FPIR_F64))
|
||||
if ((value & PR_FP_MODE_FR) && raw_cpu_has_fpu &&
|
||||
!(raw_current_cpu_data.fpu_id & MIPS_FPIR_F64))
|
||||
return -EOPNOTSUPP;
|
||||
if ((value & PR_FP_MODE_FRE) && cpu_has_fpu && !cpu_has_fre)
|
||||
if ((value & PR_FP_MODE_FRE) && raw_cpu_has_fpu && !cpu_has_fre)
|
||||
return -EOPNOTSUPP;
|
||||
|
||||
/* FR = 0 not supported in MIPS R6 */
|
||||
if (!(value & PR_FP_MODE_FR) && cpu_has_fpu && cpu_has_mips_r6)
|
||||
if (!(value & PR_FP_MODE_FR) && raw_cpu_has_fpu && cpu_has_mips_r6)
|
||||
return -EOPNOTSUPP;
|
||||
|
||||
/* Proceed with the mode switch */
|
||||
|
@@ -87,6 +87,13 @@ void __init add_memory_region(phys_addr_t start, phys_addr_t size, long type)
|
||||
int x = boot_mem_map.nr_map;
|
||||
int i;
|
||||
|
||||
/*
|
||||
* If the region reaches the top of the physical address space, adjust
|
||||
* the size slightly so that (start + size) doesn't overflow
|
||||
*/
|
||||
if (start + size - 1 == (phys_addr_t)ULLONG_MAX)
|
||||
--size;
|
||||
|
||||
/* Sanity check */
|
||||
if (start + size < start) {
|
||||
pr_warn("Trying to add an invalid memory region, skipped\n");
|
||||
|
@@ -322,6 +322,9 @@ asmlinkage void start_secondary(void)
|
||||
cpumask_set_cpu(cpu, &cpu_coherent_mask);
|
||||
notify_cpu_starting(cpu);
|
||||
|
||||
cpumask_set_cpu(cpu, &cpu_callin_map);
|
||||
synchronise_count_slave(cpu);
|
||||
|
||||
set_cpu_online(cpu, true);
|
||||
|
||||
set_cpu_sibling_map(cpu);
|
||||
@@ -329,10 +332,6 @@ asmlinkage void start_secondary(void)
|
||||
|
||||
calculate_cpu_foreign_map();
|
||||
|
||||
cpumask_set_cpu(cpu, &cpu_callin_map);
|
||||
|
||||
synchronise_count_slave(cpu);
|
||||
|
||||
/*
|
||||
* irq will be enabled in ->smp_finish(), enabling it too early
|
||||
* is dangerous.
|
||||
|
@@ -222,7 +222,7 @@ int arch_uprobe_exception_notify(struct notifier_block *self,
|
||||
return NOTIFY_DONE;
|
||||
|
||||
switch (val) {
|
||||
case DIE_BREAK:
|
||||
case DIE_UPROBE:
|
||||
if (uprobe_pre_sstep_notifier(regs))
|
||||
return NOTIFY_STOP;
|
||||
break;
|
||||
|
@@ -39,16 +39,16 @@ static struct vm_special_mapping vdso_vvar_mapping = {
|
||||
static void __init init_vdso_image(struct mips_vdso_image *image)
|
||||
{
|
||||
unsigned long num_pages, i;
|
||||
unsigned long data_pfn;
|
||||
|
||||
BUG_ON(!PAGE_ALIGNED(image->data));
|
||||
BUG_ON(!PAGE_ALIGNED(image->size));
|
||||
|
||||
num_pages = image->size / PAGE_SIZE;
|
||||
|
||||
for (i = 0; i < num_pages; i++) {
|
||||
image->mapping.pages[i] =
|
||||
virt_to_page(image->data + (i * PAGE_SIZE));
|
||||
}
|
||||
data_pfn = __phys_to_pfn(__pa_symbol(image->data));
|
||||
for (i = 0; i < num_pages; i++)
|
||||
image->mapping.pages[i] = pfn_to_page(data_pfn + i);
|
||||
}
|
||||
|
||||
static int __init init_vdso(void)
|
||||
|
Reference in New Issue
Block a user