aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/mm/page.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/mips/mm/page.c')
-rw-r--r--arch/mips/mm/page.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/arch/mips/mm/page.c b/arch/mips/mm/page.c
index d827d6144369..1edf0cbbeede 100644
--- a/arch/mips/mm/page.c
+++ b/arch/mips/mm/page.c
@@ -310,8 +310,8 @@ void __cpuinit build_clear_page(void)
310 if (R4600_V2_HIT_CACHEOP_WAR && cpu_is_r4600_v2_x()) 310 if (R4600_V2_HIT_CACHEOP_WAR && cpu_is_r4600_v2_x())
311 uasm_i_lui(&buf, AT, 0xa000); 311 uasm_i_lui(&buf, AT, 0xa000);
312 312
313 off = min(8, pref_bias_clear_store / cache_line_size) * 313 off = cache_line_size ? min(8, pref_bias_clear_store / cache_line_size)
314 cache_line_size; 314 * cache_line_size : 0;
315 while (off) { 315 while (off) {
316 build_clear_pref(&buf, -off); 316 build_clear_pref(&buf, -off);
317 off -= cache_line_size; 317 off -= cache_line_size;
@@ -454,12 +454,14 @@ void __cpuinit build_copy_page(void)
454 if (R4600_V2_HIT_CACHEOP_WAR && cpu_is_r4600_v2_x()) 454 if (R4600_V2_HIT_CACHEOP_WAR && cpu_is_r4600_v2_x())
455 uasm_i_lui(&buf, AT, 0xa000); 455 uasm_i_lui(&buf, AT, 0xa000);
456 456
457 off = min(8, pref_bias_copy_load / cache_line_size) * cache_line_size; 457 off = cache_line_size ? min(8, pref_bias_copy_load / cache_line_size) *
458 cache_line_size : 0;
458 while (off) { 459 while (off) {
459 build_copy_load_pref(&buf, -off); 460 build_copy_load_pref(&buf, -off);
460 off -= cache_line_size; 461 off -= cache_line_size;
461 } 462 }
462 off = min(8, pref_bias_copy_store / cache_line_size) * cache_line_size; 463 off = cache_line_size ? min(8, pref_bias_copy_store / cache_line_size) *
464 cache_line_size : 0;
463 while (off) { 465 while (off) {
464 build_copy_store_pref(&buf, -off); 466 build_copy_store_pref(&buf, -off);
465 off -= cache_line_size; 467 off -= cache_line_size;