[MIPS] Fix csum_partial_copy_from_user
commit4af695b6093f2a523076796bcab0061f70c96005
authorAtsushi Nemoto <anemo@mba.ocn.ne.jp>
Fri, 5 Jan 2007 16:23:06 +0000 (6 01:23 +0900)
committerRalf Baechle <ralf@linux-mips.org>
Mon, 8 Jan 2007 15:41:30 +0000 (8 15:41 +0000)
tree2f4f622b8cabceac3166cc2a0a9bb4482b176b4a
parentf9adb90189a7a922efef1cc0f79c055248c401a6
[MIPS] Fix csum_partial_copy_from_user

I found that asm version of csum_partial_copy_from_user() introduced
in e9e016815f264227b6260f77ca84f1c43cf8b9bd was less effective.

For csum_partial_copy_from_user() case, "both_aligned" 8-word copy/sum
loop block is skipped to handle LOAD failure properly, and 4-word
copy/sum block is not loop, thus we will loop at ineffective
"less_than_4units" block.

This patch re-arrange register usages so that t0-t7 can be used in
"both_aligned" loop.  This makes "both_aligned" loop can be used for
copy_from_user case too.  This patch also cleanup codes around entry
point.

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
arch/mips/lib/csum_partial.S
include/asm-mips/checksum.h