diff options
Diffstat (limited to 'arch/powerpc/kernel/process.c')
-rw-r--r-- | arch/powerpc/kernel/process.c | 28 |
1 files changed, 7 insertions, 21 deletions
diff --git a/arch/powerpc/kernel/process.c b/arch/powerpc/kernel/process.c index 8f85dabe4df3..7f64f0464d44 100644 --- a/arch/powerpc/kernel/process.c +++ b/arch/powerpc/kernel/process.c | |||
@@ -48,8 +48,8 @@ | |||
48 | #include <asm/prom.h> | 48 | #include <asm/prom.h> |
49 | #ifdef CONFIG_PPC64 | 49 | #ifdef CONFIG_PPC64 |
50 | #include <asm/firmware.h> | 50 | #include <asm/firmware.h> |
51 | #include <asm/plpar_wrappers.h> | ||
52 | #include <asm/time.h> | 51 | #include <asm/time.h> |
52 | #include <asm/machdep.h> | ||
53 | #endif | 53 | #endif |
54 | 54 | ||
55 | extern unsigned long _get_SP(void); | 55 | extern unsigned long _get_SP(void); |
@@ -201,27 +201,15 @@ int dump_spe(struct pt_regs *regs, elf_vrregset_t *evrregs) | |||
201 | } | 201 | } |
202 | #endif /* CONFIG_SPE */ | 202 | #endif /* CONFIG_SPE */ |
203 | 203 | ||
204 | static void set_dabr_spr(unsigned long val) | ||
205 | { | ||
206 | mtspr(SPRN_DABR, val); | ||
207 | } | ||
208 | |||
209 | int set_dabr(unsigned long dabr) | 204 | int set_dabr(unsigned long dabr) |
210 | { | 205 | { |
211 | int ret = 0; | ||
212 | |||
213 | #ifdef CONFIG_PPC64 | 206 | #ifdef CONFIG_PPC64 |
214 | if (firmware_has_feature(FW_FEATURE_XDABR)) { | 207 | if (ppc_md.set_dabr) |
215 | /* We want to catch accesses from kernel and userspace */ | 208 | return ppc_md.set_dabr(dabr); |
216 | unsigned long flags = H_DABRX_KERNEL|H_DABRX_USER; | ||
217 | ret = plpar_set_xdabr(dabr, flags); | ||
218 | } else if (firmware_has_feature(FW_FEATURE_DABR)) { | ||
219 | ret = plpar_set_dabr(dabr); | ||
220 | } else | ||
221 | #endif | 209 | #endif |
222 | set_dabr_spr(dabr); | ||
223 | 210 | ||
224 | return ret; | 211 | mtspr(SPRN_DABR, dabr); |
212 | return 0; | ||
225 | } | 213 | } |
226 | 214 | ||
227 | #ifdef CONFIG_PPC64 | 215 | #ifdef CONFIG_PPC64 |
@@ -566,12 +554,10 @@ int copy_thread(int nr, unsigned long clone_flags, unsigned long usp, | |||
566 | #ifdef CONFIG_PPC64 | 554 | #ifdef CONFIG_PPC64 |
567 | if (cpu_has_feature(CPU_FTR_SLB)) { | 555 | if (cpu_has_feature(CPU_FTR_SLB)) { |
568 | unsigned long sp_vsid = get_kernel_vsid(sp); | 556 | unsigned long sp_vsid = get_kernel_vsid(sp); |
557 | unsigned long llp = mmu_psize_defs[mmu_linear_psize].sllp; | ||
569 | 558 | ||
570 | sp_vsid <<= SLB_VSID_SHIFT; | 559 | sp_vsid <<= SLB_VSID_SHIFT; |
571 | sp_vsid |= SLB_VSID_KERNEL; | 560 | sp_vsid |= SLB_VSID_KERNEL | llp; |
572 | if (cpu_has_feature(CPU_FTR_16M_PAGE)) | ||
573 | sp_vsid |= SLB_VSID_L; | ||
574 | |||
575 | p->thread.ksp_vsid = sp_vsid; | 561 | p->thread.ksp_vsid = sp_vsid; |
576 | } | 562 | } |
577 | 563 | ||