Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[MIPS] TX49: Fix use of CDEX build_store_reg()

The commit a923660d786a53e78834b19062f7af2535f7f8ad accidently
prevents TX49 from using CDEX. Use build_dst_pref() only if prefetch
for store was really available.

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

authored by

Atsushi Nemoto and committed by
Ralf Baechle
33b06b51 d98f9237

+4 -5
+4 -5
arch/mips/mm/pg-r4k.c
··· 243 243 244 244 static inline void build_store_reg(int reg) 245 245 { 246 - if (cpu_has_prefetch) 247 - if (reg) 248 - build_dst_pref(pref_offset_copy); 249 - else 250 - build_dst_pref(pref_offset_clear); 246 + int pref_off = cpu_has_prefetch ? 247 + (reg ? pref_offset_copy : pref_offset_clear) : 0; 248 + if (pref_off) 249 + build_dst_pref(pref_off); 251 250 else if (cpu_has_cache_cdex_s) 252 251 build_cdex_s(); 253 252 else if (cpu_has_cache_cdex_p)