Skip to content

Commit d954ffe

Browse files
committed
MIPS: tlbex: Fix build error in R3000 code.
Only some GCC versions such as gcc 4.2 notice that the variable wr in build_r3000_tlb_modify_handler is used uninitialized. When using one of those GCCs the build will fail due to -Werror. GCC 4.6 does not warn about the uninitialized use of wr. This issue was introduced by 7211f4d7a3dcbe57c5d396c334dca525315dceb2 [MIPS: Close races in TLB modify handlers.] Reported-by: Ganesan Ramalingam <ganesan18@gmail.com> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
1 parent 870168a commit d954ffe

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

‎arch/mips/mm/tlbex.c‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1759,14 +1759,13 @@ static void __cpuinit build_r3000_tlb_modify_handler(void)
17591759
u32 *p = handle_tlbm;
17601760
struct uasm_label *l = labels;
17611761
struct uasm_reloc *r = relocs;
1762-
struct work_registers wr;
17631762

17641763
memset(handle_tlbm, 0, sizeof(handle_tlbm));
17651764
memset(labels, 0, sizeof(labels));
17661765
memset(relocs, 0, sizeof(relocs));
17671766

17681767
build_r3000_tlbchange_handler_head(&p, K0, K1);
1769-
build_pte_modifiable(&p, &r, wr.r1, wr.r2, wr.r3, label_nopage_tlbm);
1768+
build_pte_modifiable(&p, &r, K0, K1, -1, label_nopage_tlbm);
17701769
uasm_i_nop(&p); /* load delay */
17711770
build_make_write(&p, &r, K0, K1);
17721771
build_r3000_pte_reload_tlbwi(&p, K0, K1);

0 commit comments

Comments
 (0)