aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/kernel
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2015-05-20 02:23:53 -0400
committerDave Airlie <airlied@redhat.com>2015-05-20 02:23:53 -0400
commitbdcddf95e82b1c4e370fc1196b1f4f50f775dab4 (patch)
treeef2af2b3faee1f8e8287ca45d265809f56fbd0f6 /arch/mips/kernel
parent91d9f9856f91c82ac6289a0fff65dd12cfa07e34 (diff)
parente26081808edadfd257c6c9d81014e3b25e9a6118 (diff)
Backmerge v4.1-rc4 into into drm-next
We picked up a silent conflict in amdkfd with drm-fixes and drm-next, backmerge v4.1-rc5 and fix the conflicts Signed-off-by: Dave Airlie <airlied@redhat.com> Conflicts: drivers/gpu/drm/drm_irq.c
Diffstat (limited to 'arch/mips/kernel')
-rw-r--r--arch/mips/kernel/elf.c32
-rw-r--r--arch/mips/kernel/ptrace.c2
-rw-r--r--arch/mips/kernel/smp-cps.c2
-rw-r--r--arch/mips/kernel/smp.c6
-rw-r--r--arch/mips/kernel/traps.c1
5 files changed, 23 insertions, 20 deletions
diff --git a/arch/mips/kernel/elf.c b/arch/mips/kernel/elf.c
index be4899f3c393..4a4d9e067c89 100644
--- a/arch/mips/kernel/elf.c
+++ b/arch/mips/kernel/elf.c
@@ -76,14 +76,6 @@ int arch_elf_pt_proc(void *_ehdr, void *_phdr, struct file *elf,
76 76
77 /* Lets see if this is an O32 ELF */ 77 /* Lets see if this is an O32 ELF */
78 if (ehdr32->e_ident[EI_CLASS] == ELFCLASS32) { 78 if (ehdr32->e_ident[EI_CLASS] == ELFCLASS32) {
79 /* FR = 1 for N32 */
80 if (ehdr32->e_flags & EF_MIPS_ABI2)
81 state->overall_fp_mode = FP_FR1;
82 else
83 /* Set a good default FPU mode for O32 */
84 state->overall_fp_mode = cpu_has_mips_r6 ?
85 FP_FRE : FP_FR0;
86
87 if (ehdr32->e_flags & EF_MIPS_FP64) { 79 if (ehdr32->e_flags & EF_MIPS_FP64) {
88 /* 80 /*
89 * Set MIPS_ABI_FP_OLD_64 for EF_MIPS_FP64. We will override it 81 * Set MIPS_ABI_FP_OLD_64 for EF_MIPS_FP64. We will override it
@@ -104,9 +96,6 @@ int arch_elf_pt_proc(void *_ehdr, void *_phdr, struct file *elf,
104 (char *)&abiflags, 96 (char *)&abiflags,
105 sizeof(abiflags)); 97 sizeof(abiflags));
106 } else { 98 } else {
107 /* FR=1 is really the only option for 64-bit */
108 state->overall_fp_mode = FP_FR1;
109
110 if (phdr64->p_type != PT_MIPS_ABIFLAGS) 99 if (phdr64->p_type != PT_MIPS_ABIFLAGS)
111 return 0; 100 return 0;
112 if (phdr64->p_filesz < sizeof(abiflags)) 101 if (phdr64->p_filesz < sizeof(abiflags))
@@ -137,6 +126,7 @@ int arch_check_elf(void *_ehdr, bool has_interpreter,
137 struct elf32_hdr *ehdr = _ehdr; 126 struct elf32_hdr *ehdr = _ehdr;
138 struct mode_req prog_req, interp_req; 127 struct mode_req prog_req, interp_req;
139 int fp_abi, interp_fp_abi, abi0, abi1, max_abi; 128 int fp_abi, interp_fp_abi, abi0, abi1, max_abi;
129 bool is_mips64;
140 130
141 if (!config_enabled(CONFIG_MIPS_O32_FP64_SUPPORT)) 131 if (!config_enabled(CONFIG_MIPS_O32_FP64_SUPPORT))
142 return 0; 132 return 0;
@@ -152,10 +142,22 @@ int arch_check_elf(void *_ehdr, bool has_interpreter,
152 abi0 = abi1 = fp_abi; 142 abi0 = abi1 = fp_abi;
153 } 143 }
154 144
155 /* ABI limits. O32 = FP_64A, N32/N64 = FP_SOFT */ 145 is_mips64 = (ehdr->e_ident[EI_CLASS] == ELFCLASS64) ||
156 max_abi = ((ehdr->e_ident[EI_CLASS] == ELFCLASS32) && 146 (ehdr->e_flags & EF_MIPS_ABI2);
157 (!(ehdr->e_flags & EF_MIPS_ABI2))) ? 147
158 MIPS_ABI_FP_64A : MIPS_ABI_FP_SOFT; 148 if (is_mips64) {
149 /* MIPS64 code always uses FR=1, thus the default is easy */
150 state->overall_fp_mode = FP_FR1;
151
152 /* Disallow access to the various FPXX & FP64 ABIs */
153 max_abi = MIPS_ABI_FP_SOFT;
154 } else {
155 /* Default to a mode capable of running code expecting FR=0 */
156 state->overall_fp_mode = cpu_has_mips_r6 ? FP_FRE : FP_FR0;
157
158 /* Allow all ABIs we know about */
159 max_abi = MIPS_ABI_FP_64A;
160 }
159 161
160 if ((abi0 > max_abi && abi0 != MIPS_ABI_FP_UNKNOWN) || 162 if ((abi0 > max_abi && abi0 != MIPS_ABI_FP_UNKNOWN) ||
161 (abi1 > max_abi && abi1 != MIPS_ABI_FP_UNKNOWN)) 163 (abi1 > max_abi && abi1 != MIPS_ABI_FP_UNKNOWN))
diff --git a/arch/mips/kernel/ptrace.c b/arch/mips/kernel/ptrace.c
index d544e774eea6..e933a309f2ea 100644
--- a/arch/mips/kernel/ptrace.c
+++ b/arch/mips/kernel/ptrace.c
@@ -176,7 +176,7 @@ int ptrace_setfpregs(struct task_struct *child, __u32 __user *data)
176 176
177 __get_user(value, data + 64); 177 __get_user(value, data + 64);
178 fcr31 = child->thread.fpu.fcr31; 178 fcr31 = child->thread.fpu.fcr31;
179 mask = current_cpu_data.fpu_msk31; 179 mask = boot_cpu_data.fpu_msk31;
180 child->thread.fpu.fcr31 = (value & ~mask) | (fcr31 & mask); 180 child->thread.fpu.fcr31 = (value & ~mask) | (fcr31 & mask);
181 181
182 /* FIR may not be written. */ 182 /* FIR may not be written. */
diff --git a/arch/mips/kernel/smp-cps.c b/arch/mips/kernel/smp-cps.c
index 7e011f95bb8e..4251d390b5b6 100644
--- a/arch/mips/kernel/smp-cps.c
+++ b/arch/mips/kernel/smp-cps.c
@@ -92,7 +92,7 @@ static void __init cps_smp_setup(void)
92#ifdef CONFIG_MIPS_MT_FPAFF 92#ifdef CONFIG_MIPS_MT_FPAFF
93 /* If we have an FPU, enroll ourselves in the FPU-full mask */ 93 /* If we have an FPU, enroll ourselves in the FPU-full mask */
94 if (cpu_has_fpu) 94 if (cpu_has_fpu)
95 cpu_set(0, mt_fpu_cpumask); 95 cpumask_set_cpu(0, &mt_fpu_cpumask);
96#endif /* CONFIG_MIPS_MT_FPAFF */ 96#endif /* CONFIG_MIPS_MT_FPAFF */
97} 97}
98 98
diff --git a/arch/mips/kernel/smp.c b/arch/mips/kernel/smp.c
index 193ace7955fb..faa46ebd9dda 100644
--- a/arch/mips/kernel/smp.c
+++ b/arch/mips/kernel/smp.c
@@ -43,7 +43,7 @@
43#include <asm/time.h> 43#include <asm/time.h>
44#include <asm/setup.h> 44#include <asm/setup.h>
45 45
46volatile cpumask_t cpu_callin_map; /* Bitmask of started secondaries */ 46cpumask_t cpu_callin_map; /* Bitmask of started secondaries */
47 47
48int __cpu_number_map[NR_CPUS]; /* Map physical to logical */ 48int __cpu_number_map[NR_CPUS]; /* Map physical to logical */
49EXPORT_SYMBOL(__cpu_number_map); 49EXPORT_SYMBOL(__cpu_number_map);
@@ -218,8 +218,10 @@ int __cpu_up(unsigned int cpu, struct task_struct *tidle)
218 /* 218 /*
219 * Trust is futile. We should really have timeouts ... 219 * Trust is futile. We should really have timeouts ...
220 */ 220 */
221 while (!cpumask_test_cpu(cpu, &cpu_callin_map)) 221 while (!cpumask_test_cpu(cpu, &cpu_callin_map)) {
222 udelay(100); 222 udelay(100);
223 schedule();
224 }
223 225
224 synchronise_count_master(cpu); 226 synchronise_count_master(cpu);
225 return 0; 227 return 0;
diff --git a/arch/mips/kernel/traps.c b/arch/mips/kernel/traps.c
index ba32e48d4697..d2d1c1933bc9 100644
--- a/arch/mips/kernel/traps.c
+++ b/arch/mips/kernel/traps.c
@@ -269,7 +269,6 @@ static void __show_regs(const struct pt_regs *regs)
269 */ 269 */
270 printk("epc : %0*lx %pS\n", field, regs->cp0_epc, 270 printk("epc : %0*lx %pS\n", field, regs->cp0_epc,
271 (void *) regs->cp0_epc); 271 (void *) regs->cp0_epc);
272 printk(" %s\n", print_tainted());
273 printk("ra : %0*lx %pS\n", field, regs->regs[31], 272 printk("ra : %0*lx %pS\n", field, regs->regs[31],
274 (void *) regs->regs[31]); 273 (void *) regs->regs[31]);
275 274