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