]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc: Update 64bit __copy_tofrom_user() using CPU_FTR_UNALIGNED_LD_STD
authorMark Nelson <markn@au1.ibm.com>
Tue, 11 Nov 2008 00:53:34 +0000 (00:53 +0000)
committerPaul Mackerras <paulus@samba.org>
Wed, 19 Nov 2008 05:04:54 +0000 (16:04 +1100)
commit22d8fed067fc749ea13dd7be4b3f862c9e3f1901
tree62652cde79d43420b8587344cb27ae8f9f1d12ef
parentf33605c5ed4c5fce84e86deb25483c488258b285
powerpc: Update 64bit __copy_tofrom_user() using CPU_FTR_UNALIGNED_LD_STD

In exactly the same way that we updated memcpy() with new feature
sections in commit fb992ba0d6bad95add7352ad439db5892b824582 ("powerpc:
Update 64bit memcpy() using CPU_FTR_UNALIGNED_LD_STD"), we do the same
thing here for __copy_tofrom_user().  Once again this is purely a
performance tweak for Cell and Power6 - this has no effect on all the
other 64bit powerpc chips.

We can make these same changes to __copy_tofrom_user() because the
basic copy algorithm is the same as in memcpy() - this version just
has all the exception handling logic needed when copying to or from
userspace as well as a special case for copying whole 4K pages that
are page aligned.

CPU_FTR_UNALIGNED_LD_STD CPU was added in commit
9a857a54933f4abbbb44d954962b34fa1e02deac ("powerpc: Add new CPU
feature: CPU_FTR_UNALIGNED_LD_STD").

We also make the same simple one line change from cmpldi r1,... to
cmpldi cr1,... for consistency.

Signed-off-by: Mark Nelson <markn@au1.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
arch/powerpc/lib/copyuser_64.S