Skip to content

Commit

Permalink
powerpc/44x: Fix/Initialize PID to kernel PID before the TLB search
Browse files Browse the repository at this point in the history
Initialize the PID register with kernel pid (0) before we start
setting the TLB mapping for KEXEC. Also set the MMUCR[TID] to kernel
PID.

This was spotted while testing the kexec on ISS for 47x. ISS  doesn't
return a successful tlbsx for a kernel address with PID set to a user PID.
Though the hardware/qemu/simics work fine.

This patch is harmless and initializes the PID to 0 (kernel PID) which
is usually the case during a normal kernel boot. This would fix the kexec
on ISS for 440. I have tested this patch on sequoia board.

Signed-off-by: Suzuki K Poulose <suzuki@in.ibm.com>
Cc: Josh Boyer <jwboyer@gmail.com>
Signed-off-by: Josh Boyer <jwboyer@gmail.com>
  • Loading branch information
Suzuki Poulose authored and Josh Boyer committed May 3, 2012
1 parent ec34a68 commit f13bfcc
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions arch/powerpc/kernel/misc_32.S
Original file line number Diff line number Diff line change
Expand Up @@ -761,8 +761,12 @@ relocate_new_kernel:
mr r30, r4
mr r31, r5

/* Load our MSR_IS and TID to MMUCR for TLB search */
mfspr r3,SPRN_PID
/*
* Load the PID with kernel PID (0).
* Also load our MSR_IS and TID to MMUCR for TLB search.
*/
li r3, 0
mtspr SPRN_PID, r3
mfmsr r4
andi. r4,r4,MSR_IS@l
beq wmmucr
Expand Down

0 comments on commit f13bfcc

Please sign in to comment.