You mean that code was in -mm for all those months and no ppc32 person
bothered testing it? Bah.
Something like this? (Could be sped up for 32-bit sector_t)
diff -puN drivers/block/as-iosched.c~as-do_div-fix drivers/block/as-iosched.c
--- 25/drivers/block/as-iosched.c~as-do_div-fix Fri Jul 11 14:00:55 2003
+++ 25-akpm/drivers/block/as-iosched.c Fri Jul 11 14:00:58 2003
@@ -836,8 +836,10 @@ static void as_update_iohist(struct as_i
aic->seek_samples += 256;
aic->seek_total += 256*seek_dist;
if (aic->seek_samples) {
- aic->seek_mean = aic->seek_total + 128;
- do_div(aic->seek_mean, aic->seek_samples);
+ u64 seek_mean = aic->seek_total + 128;
+
+ do_div(seek_mean, aic->seek_samples);
+ aic->seek_mean = seek_mean;
}
aic->seek_samples = (aic->seek_samples>>1)
+ (aic->seek_samples>>2);
_
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/