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

powerpc/fsl_booke: introduce map_mem_in_cams_addr

Introduce this function so we can set both the physical and virtual
address for the map in cams. This will be used by the relocation code.

Signed-off-by: Kevin Hao <haokexin@gmail.com>
Signed-off-by: Scott Wood <scottwood@freescale.com>

authored by

Kevin Hao and committed by
Scott Wood
813125d8 b27652dd

+10 -3
+10 -3
arch/powerpc/mm/fsl_booke_mmu.c
··· 171 171 return 1UL << camsize; 172 172 } 173 173 174 - unsigned long map_mem_in_cams(unsigned long ram, int max_cam_idx) 174 + static unsigned long map_mem_in_cams_addr(phys_addr_t phys, unsigned long virt, 175 + unsigned long ram, int max_cam_idx) 175 176 { 176 177 int i; 177 - unsigned long virt = PAGE_OFFSET; 178 - phys_addr_t phys = memstart_addr; 179 178 unsigned long amount_mapped = 0; 180 179 181 180 /* Calculate CAM values */ ··· 192 193 tlbcam_index = i; 193 194 194 195 return amount_mapped; 196 + } 197 + 198 + unsigned long map_mem_in_cams(unsigned long ram, int max_cam_idx) 199 + { 200 + unsigned long virt = PAGE_OFFSET; 201 + phys_addr_t phys = memstart_addr; 202 + 203 + return map_mem_in_cams_addr(phys, virt, ram, max_cam_idx); 195 204 } 196 205 197 206 #ifdef CONFIG_PPC32