MLK-11985-2 ARM: imx: call __pa instead of virt_to_phys
Use different API to fix below issue reported by coverity: Out-of-bounds access (ARRAY_VS_SINGLETON), ptr_arith: Using &iram_tlb_phys_addr as an array. This might corrupt or misinterpret adjacent memory locations. Signed-off-by: Anson Huang <Anson.Huang@freescale.com>steinar/wifi_calib_4_9_kernel
parent
cdb01849f1
commit
9287ad77bf
|
@ -343,8 +343,8 @@ int update_ddr_freq_imx_smp(int ddr_rate)
|
|||
__cpuc_flush_dcache_area(&iram_tlb_phys_addr,
|
||||
sizeof(iram_tlb_phys_addr));
|
||||
if (cpu_is_imx6())
|
||||
outer_clean_range(virt_to_phys(&iram_tlb_phys_addr),
|
||||
virt_to_phys(&iram_tlb_phys_addr + 1));
|
||||
outer_clean_range(__pa(&iram_tlb_phys_addr),
|
||||
__pa(&iram_tlb_phys_addr + 1));
|
||||
|
||||
ttbr1 = save_ttbr1();
|
||||
/* Now we can change the DDR frequency. */
|
||||
|
|
Loading…
Reference in New Issue