--- zzzz-none-000/linux-2.6.19.2/arch/mips/mm/pg-r4k.c 2007-01-10 19:10:37.000000000 +0000 +++ davinci-8020-5504/linux-2.6.19.2/arch/mips/mm/pg-r4k.c 2007-01-11 07:38:19.000000000 +0000 @@ -270,20 +270,6 @@ emit_instruction(mi); } -static inline void build_addiu_a2(unsigned long offset) -{ - union mips_instruction mi; - - BUG_ON(offset > 0x7fff); - - mi.i_format.opcode = cpu_has_64bit_gp_regs ? daddiu_op : addiu_op; - mi.i_format.rs = 6; /* $a2 */ - mi.i_format.rt = 6; /* $a2 */ - mi.i_format.simmediate = offset; - - emit_instruction(mi); -} - static inline void build_addiu_a1(unsigned long offset) { union mips_instruction mi; @@ -347,7 +333,6 @@ void __init build_clear_page(void) { unsigned int loop_start; - unsigned long off; epc = (unsigned int *) &clear_page_array; instruction_pending = 0; @@ -384,12 +369,7 @@ } } - off = PAGE_SIZE - (cpu_has_prefetch ? pref_offset_clear : 0); - if (off > 0x7fff) { - build_addiu_a2_a0(off >> 1); - build_addiu_a2(off >> 1); - } else - build_addiu_a2_a0(off); + build_addiu_a2_a0(PAGE_SIZE - (cpu_has_prefetch ? pref_offset_clear : 0)); if (R4600_V2_HIT_CACHEOP_WAR && cpu_is_r4600_v2_x()) build_insn_word(0x3c01a000); /* lui $at, 0xa000 */ @@ -440,18 +420,12 @@ void __init build_copy_page(void) { unsigned int loop_start; - unsigned long off; epc = (unsigned int *) ©_page_array; store_offset = load_offset = 0; instruction_pending = 0; - off = PAGE_SIZE - (cpu_has_prefetch ? pref_offset_copy : 0); - if (off > 0x7fff) { - build_addiu_a2_a0(off >> 1); - build_addiu_a2(off >> 1); - } else - build_addiu_a2_a0(off); + build_addiu_a2_a0(PAGE_SIZE - (cpu_has_prefetch ? pref_offset_copy : 0)); if (R4600_V2_HIT_CACHEOP_WAR && cpu_is_r4600_v2_x()) build_insn_word(0x3c01a000); /* lui $at, 0xa000 */