Lines Matching refs:loc_new
74 static void __init apply_r_mips_64_rel(u32 *loc_new, long offset) in apply_r_mips_64_rel() argument
76 *(u64 *)loc_new += offset; in apply_r_mips_64_rel()
79 static void __init apply_r_mips_32_rel(u32 *loc_new, long offset) in apply_r_mips_32_rel() argument
81 *loc_new += offset; in apply_r_mips_32_rel()
84 static int __init apply_r_mips_26_rel(u32 *loc_orig, u32 *loc_new, long offset) in apply_r_mips_26_rel() argument
100 if ((target_addr & 0xf0000000) != ((unsigned long)loc_new & 0xf0000000)) { in apply_r_mips_26_rel()
105 target_addr -= (unsigned long)loc_new & 0xf0000000; in apply_r_mips_26_rel()
108 *loc_new = (*loc_new & ~0x03ffffff) | (target_addr & 0x03ffffff); in apply_r_mips_26_rel()
114 static void __init apply_r_mips_hi16_rel(u32 *loc_orig, u32 *loc_new, in apply_r_mips_hi16_rel() argument
122 *loc_new = (insn & ~0xffff) | ((target >> 16) & 0xffff); in apply_r_mips_hi16_rel()
125 static int __init reloc_handler(u32 type, u32 *loc_orig, u32 *loc_new, in reloc_handler() argument
130 apply_r_mips_64_rel(loc_new, offset); in reloc_handler()
133 apply_r_mips_32_rel(loc_new, offset); in reloc_handler()
136 return apply_r_mips_26_rel(loc_orig, loc_new, offset); in reloc_handler()
138 apply_r_mips_hi16_rel(loc_orig, loc_new, offset); in reloc_handler()
153 u32 *loc_new; in do_relocations() local
164 loc_new = RELOCATED(loc_orig); in do_relocations()
166 res = reloc_handler(type, loc_orig, loc_new, offset); in do_relocations()
297 static inline int __init relocation_addr_valid(void *loc_new) in relocation_addr_valid() argument
299 if ((unsigned long)loc_new & 0x0000ffff) { in relocation_addr_valid()
303 if ((unsigned long)loc_new < (unsigned long)&_end) { in relocation_addr_valid()
326 void *loc_new; in relocate_kernel() local
350 loc_new = determine_relocation_address(); in relocate_kernel()
353 if (relocation_addr_valid(loc_new)) in relocate_kernel()
354 offset = (unsigned long)loc_new - (unsigned long)(&_text); in relocate_kernel()
384 memcpy(loc_new, &_text, kernel_length); in relocate_kernel()
387 res = do_relocations(&_text, loc_new, offset); in relocate_kernel()
392 sync_icache(loc_new, kernel_length); in relocate_kernel()