[PATCH 20/36] m68k: ColdFire with MMU needs simpler lib checksum code

gerg
2011-10-25T07:21:12Z

We have 2 implementations of the IP checksuming code for m68k. One uses
the more advanced instructions available in 68020 and above processors,
the other uses the simpler instructions available on the original 68000
processors and the modern ColdFire processors.

The code choice shouldn't be made based on whether we have an MMU enabled
or not. It is a processor specific choice. The newer advanced ColdFire
CPU family members with MMU still only support the simpler instructions.

So choose the checksumming code based on CONFIG_CPU_HAS_NO_BITFIELDS.

Signed-off-by: Greg Ungerer <gerg@uclinux.org>
---
arch/m68k/lib/Makefile | 10 ++++++++--
1 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/arch/m68k/lib/Makefile b/arch/m68k/lib/Makefile
index 1a1bd90..3161158 100644
--- a/arch/m68k/lib/Makefile
+++ b/arch/m68k/lib/Makefile
@@ -7,8 +7,14 @@ lib-y := ashldi3.o ashrdi3.o lshrdi3.o muldi3.o \
memcpy.o memset.o memmove.o

ifdef CONFIG_MMU
-lib-y += string.o uaccess.o checksum_mm.o
+lib-y += string.o uaccess.o
else
-lib-y += mulsi3.o divsi3.o udivsi3.o modsi3.o umodsi3.o checksum_no.o
+lib-y += mulsi3.o divsi3.o udivsi3.o modsi3.o umodsi3.o
+endif
+
+ifdef CONFIG_CPU_HAS_NO_BITFIELDS
+lib-y += checksum_no.o
+else
+lib-y += checksum_mm.o
endif

--
1.7.0.4