On Wed, 7 May 2008 23:38:15 +0900, Yoichi Yuasa <yoichi_yuasa@xxxxxxxxxxxxxx> wrote: > Fix divide by zero error in build_clear_page() and build_copy_page() > > Signed-off-by: Yoichi Yuasa <yoichi_yuasa@xxxxxxxxxxxxxx> > > diff -pruN -X /home/yuasa/Memo/dontdiff linux-orig/arch/mips/mm/page.c linux/arch/mips/mm/page.c > --- linux-orig/arch/mips/mm/page.c 2008-05-07 10:28:03.732151097 +0900 > +++ linux/arch/mips/mm/page.c 2008-05-07 23:27:00.212977534 +0900 ... > - off = min(8, pref_bias_copy_store / cache_line_size) * cache_line_size; > + off = cache_line_size ? min(8, pref_bias_copy_load / cache_line_size) * > + cache_line_size : 0; > while (off) { > build_copy_store_pref(&buf, -off); > off -= cache_line_size; This change is wrong. Please apply this on top of the patch. diff --git a/arch/mips/mm/page.c b/arch/mips/mm/page.c index cab81f4..1edf0cb 100644 --- a/arch/mips/mm/page.c +++ b/arch/mips/mm/page.c @@ -460,7 +460,7 @@ void __cpuinit build_copy_page(void) build_copy_load_pref(&buf, -off); off -= cache_line_size; } - off = cache_line_size ? min(8, pref_bias_copy_load / cache_line_size) * + off = cache_line_size ? min(8, pref_bias_copy_store / cache_line_size) * cache_line_size : 0; while (off) { build_copy_store_pref(&buf, -off);