]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc/fsl-booke: Fix setup_initial_memory_limit to not blindly map
authorKumar Gala <galak@kernel.crashing.org>
Fri, 16 Sep 2011 15:39:59 +0000 (10:39 -0500)
committerKumar Gala <galak@kernel.crashing.org>
Wed, 12 Oct 2011 04:30:41 +0000 (23:30 -0500)
commit9516067e38e755b4f40dbff7bf06908e8f0ae2d9
tree2634578bcd9f6cd596de3817ee9dcbc25227e478
parent53fdfcfd616f0fc6fe75512a458d3fb71f02bf41
powerpc/fsl-booke: Fix setup_initial_memory_limit to not blindly map

On FSL Book-E devices we support multiple large TLB sizes and so we can
get into situations in which the initial 1G TLB size is too big and
we're asked for a size that is not mappable by a single entry (like
512M).  The single entry is important because when we bring up secondary
cores they need to ensure any data structure they need to access (eg
PACA or stack) is always mapped.

So we really need to determine what size will actually be mapped by the
first TLB entry to ensure we limit early memory references to that
region.  We refactor the map_mem_in_cams() code to provider a helper
function that we can utilize to determine the size of the first TLB
entry while taking into account size and alignment constraints.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
arch/powerpc/mm/fsl_booke_mmu.c
arch/powerpc/mm/mmu_decl.h
arch/powerpc/mm/tlb_nohash.c