diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-09-15 12:51:09 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-09-15 12:51:09 -0400 |
commit | 723e9db7a46e328527cc3da2b478b831184fe828 (patch) | |
tree | cdeda255633057dcb4c84097bed27b2bbf76970f /arch/powerpc/kernel/process.c | |
parent | ada3fa15057205b7d3f727bba5cd26b5912e350f (diff) | |
parent | d331d8305cba713605854aab63a000fb892353a7 (diff) |
Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc
* 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc: (134 commits)
powerpc/nvram: Enable use Generic NVRAM driver for different size chips
powerpc/iseries: Fix oops reading from /proc/iSeries/mf/*/cmdline
powerpc/ps3: Workaround for flash memory I/O error
powerpc/booke: Don't set DABR on 64-bit BookE, use DAC1 instead
powerpc/perf_counters: Reduce stack usage of power_check_constraints
powerpc: Fix bug where perf_counters breaks oprofile
powerpc/85xx: Fix SMP compile error and allow NULL for smp_ops
powerpc/irq: Improve nanodoc
powerpc: Fix some late PowerMac G5 with PCIe ATI graphics
powerpc/fsl-booke: Use HW PTE format if CONFIG_PTE_64BIT
powerpc/book3e: Add missing page sizes
powerpc/pseries: Fix to handle slb resize across migration
powerpc/powermac: Thermal control turns system off too eagerly
powerpc/pci: Merge ppc32 and ppc64 versions of phb_scan()
powerpc/405ex: support cuImage via included dtb
powerpc/405ex: provide necessary fixup function to support cuImage
powerpc/40x: Add support for the ESTeem 195E (PPC405EP) SBC
powerpc/44x: Add Eiger AMCC (AppliedMicro) PPC460SX evaluation board support.
powerpc/44x: Update Arches defconfig
powerpc/44x: Update Arches dts
...
Fix up conflicts in drivers/char/agp/uninorth-agp.c
Diffstat (limited to 'arch/powerpc/kernel/process.c')
-rw-r--r-- | arch/powerpc/kernel/process.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/arch/powerpc/kernel/process.c b/arch/powerpc/kernel/process.c index 892a9f2e6d76..0a3216433051 100644 --- a/arch/powerpc/kernel/process.c +++ b/arch/powerpc/kernel/process.c | |||
@@ -284,14 +284,13 @@ int set_dabr(unsigned long dabr) | |||
284 | return ppc_md.set_dabr(dabr); | 284 | return ppc_md.set_dabr(dabr); |
285 | 285 | ||
286 | /* XXX should we have a CPU_FTR_HAS_DABR ? */ | 286 | /* XXX should we have a CPU_FTR_HAS_DABR ? */ |
287 | #if defined(CONFIG_PPC64) || defined(CONFIG_6xx) | ||
288 | mtspr(SPRN_DABR, dabr); | ||
289 | #endif | ||
290 | |||
291 | #if defined(CONFIG_BOOKE) | 287 | #if defined(CONFIG_BOOKE) |
292 | mtspr(SPRN_DAC1, dabr); | 288 | mtspr(SPRN_DAC1, dabr); |
289 | #elif defined(CONFIG_PPC_BOOK3S) | ||
290 | mtspr(SPRN_DABR, dabr); | ||
293 | #endif | 291 | #endif |
294 | 292 | ||
293 | |||
295 | return 0; | 294 | return 0; |
296 | } | 295 | } |
297 | 296 | ||
@@ -372,15 +371,16 @@ struct task_struct *__switch_to(struct task_struct *prev, | |||
372 | 371 | ||
373 | #endif /* CONFIG_SMP */ | 372 | #endif /* CONFIG_SMP */ |
374 | 373 | ||
375 | if (unlikely(__get_cpu_var(current_dabr) != new->thread.dabr)) | ||
376 | set_dabr(new->thread.dabr); | ||
377 | |||
378 | #if defined(CONFIG_BOOKE) | 374 | #if defined(CONFIG_BOOKE) |
379 | /* If new thread DAC (HW breakpoint) is the same then leave it */ | 375 | /* If new thread DAC (HW breakpoint) is the same then leave it */ |
380 | if (new->thread.dabr) | 376 | if (new->thread.dabr) |
381 | set_dabr(new->thread.dabr); | 377 | set_dabr(new->thread.dabr); |
378 | #else | ||
379 | if (unlikely(__get_cpu_var(current_dabr) != new->thread.dabr)) | ||
380 | set_dabr(new->thread.dabr); | ||
382 | #endif | 381 | #endif |
383 | 382 | ||
383 | |||
384 | new_thread = &new->thread; | 384 | new_thread = &new->thread; |
385 | old_thread = ¤t->thread; | 385 | old_thread = ¤t->thread; |
386 | 386 | ||
@@ -664,6 +664,7 @@ int copy_thread(unsigned long clone_flags, unsigned long usp, | |||
664 | sp_vsid |= SLB_VSID_KERNEL | llp; | 664 | sp_vsid |= SLB_VSID_KERNEL | llp; |
665 | p->thread.ksp_vsid = sp_vsid; | 665 | p->thread.ksp_vsid = sp_vsid; |
666 | } | 666 | } |
667 | #endif /* CONFIG_PPC_STD_MMU_64 */ | ||
667 | 668 | ||
668 | /* | 669 | /* |
669 | * The PPC64 ABI makes use of a TOC to contain function | 670 | * The PPC64 ABI makes use of a TOC to contain function |
@@ -671,6 +672,7 @@ int copy_thread(unsigned long clone_flags, unsigned long usp, | |||
671 | * to the TOC entry. The first entry is a pointer to the actual | 672 | * to the TOC entry. The first entry is a pointer to the actual |
672 | * function. | 673 | * function. |
673 | */ | 674 | */ |
675 | #ifdef CONFIG_PPC64 | ||
674 | kregs->nip = *((unsigned long *)ret_from_fork); | 676 | kregs->nip = *((unsigned long *)ret_from_fork); |
675 | #else | 677 | #else |
676 | kregs->nip = (unsigned long)ret_from_fork; | 678 | kregs->nip = (unsigned long)ret_from_fork; |