linux-sg2042/arch/powerpc
Trent Piepho b389889535 powerpc: Better setup of boot page TLB entry
The initial TLB mapping for the kernel boot didn't set the memory coherent
attribute, MAS2[M], in SMP mode.

If this code supported booting a secondary processor, which it doesn't yet,
but if it did, then when a secondary processor boots, it would probably signal
the primary processor by setting a variable called something like
__secondary_hold_acknowledge.  However, due to the lack of the M bit, the
primary processor would not snoop the transaction (even if a transaction were
broadcast).  If primary CPU's L1 D-cache had a copy, it would not be flushed
and the CPU would never see the ack.  Which would have resulted in the primary
CPU spinning for a long time, perhaps a full second before it gives up, while
it would have waited for the ack from the secondary CPU that it wouldn't have
been able to see because of the stale cache.

The value of MAS2 for the boot page TLB1 entry is a compile time constant,
so there is no need to calculate it in powerpc assembly language.

Also, from the MPC8572 manual section 6.12.5.3, "Bits that represent
offsets within a page are ignored and should be cleared." Existing code
didn't clear them, this code does.

The same when the page of KERNELBASE is found; we don't need to use asm to
mask the lower 12 bits off.

In the code that computes the address to rfi from, don't hard code the
offset to 24 bytes, but have the assembler figure that out for us.

Signed-off-by: Trent Piepho <tpiepho@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2008-12-03 08:19:18 -06:00
..
boot Merge branch 'merge' 2008-12-03 20:11:06 +11:00
configs Merge branch 'merge' of git://git.secretlab.ca/git/linux-2.6-mpc52xx into merge 2008-11-24 11:53:44 +11:00
include/asm powerpc: Better setup of boot page TLB entry 2008-12-03 08:19:18 -06:00
kernel powerpc: Better setup of boot page TLB entry 2008-12-03 08:19:18 -06:00
kvm KVM: ppc: stop leaking host memory on VM exit 2008-11-25 12:02:48 +02:00
lib powerpc: Update 64bit __copy_tofrom_user() using CPU_FTR_UNALIGNED_LD_STD 2008-11-19 16:04:54 +11:00
math-emu powerpc: Add SPE/EFP math emulation for E500v1/v2 processors. 2008-12-03 08:19:16 -06:00
mm powerpc: Use RCU based pte freeing mechanism for all powerpc 2008-12-03 20:46:35 +11:00
oprofile powerpc/cell/OProfile: Fix on-stack array size in activate spu profiling function 2008-10-31 16:13:51 +11:00
platforms Merge branch 'merge' 2008-12-03 20:11:06 +11:00
sysdev Merge branch 'merge' 2008-12-03 20:11:06 +11:00
xmon powerpc: Fix compile errors with CONFIG_BUG=n 2008-10-31 21:34:09 +11:00
Kconfig powerpc: Add sync_*_for_* to dma_ops 2008-12-03 20:46:36 +11:00
Kconfig.debug powerpc: Allow the max stack trace depth to be configured 2008-12-03 20:46:35 +11:00
Makefile powerpc: Remove unncessary SPE related compiler flag 2008-12-03 08:19:10 -06:00