Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

powerpc/44x: Fix/Initialize PID to kernel PID before the TLB search

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>

authored by

Suzuki Poulose and committed by
Josh Boyer
f13bfcc6 ec34a681

+6 -2
+6 -2
arch/powerpc/kernel/misc_32.S
··· 761 761 mr r30, r4 762 762 mr r31, r5 763 763 764 - /* Load our MSR_IS and TID to MMUCR for TLB search */ 765 - mfspr r3,SPRN_PID 764 + /* 765 + * Load the PID with kernel PID (0). 766 + * Also load our MSR_IS and TID to MMUCR for TLB search. 767 + */ 768 + li r3, 0 769 + mtspr SPRN_PID, r3 766 770 mfmsr r4 767 771 andi. r4,r4,MSR_IS@l 768 772 beq wmmucr