Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 279708
b: refs/heads/master
c: 7f73baf
h: refs/heads/master
v: v3
  • Loading branch information
Greg Ungerer committed Dec 24, 2011
1 parent ca4c9e7 commit 11c83e0
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 185 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 479badc364b52774d77264aaf81f4d4b375a4a97
refs/heads/master: 7f73bafc4630a450ebe8b021efa14781ffd992b1
3 changes: 3 additions & 0 deletions trunk/arch/m68k/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ config GENERIC_CALIBRATE_DELAY
config GENERIC_IOMAP
def_bool MMU

config GENERIC_CSUM
bool

config TIME_LOW_RES
bool
default y
Expand Down
2 changes: 2 additions & 0 deletions trunk/arch/m68k/Kconfig.cpu
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ comment "Processor Type"
config M68000
bool
select CPU_HAS_NO_BITFIELDS
select GENERIC_CSUM
help
The Freescale (was Motorola) 68000 CPU is the first generation of
the well known M68K family of processors. The CPU core as well as
Expand All @@ -23,6 +24,7 @@ config COLDFIRE
select GENERIC_GPIO
select ARCH_REQUIRE_GPIOLIB
select CPU_HAS_NO_BITFIELDS
select GENERIC_CSUM
help
The Freescale ColdFire family of processors is a modern derivitive
of the 68000 processor family. They are mainly targeted at embedded
Expand Down
31 changes: 5 additions & 26 deletions trunk/arch/m68k/include/asm/checksum.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@

#include <linux/in6.h>

#ifdef CONFIG_GENERIC_CSUM
#include <asm-generic/checksum.h>
#else

/*
* computes the checksum of a memory block at buff, length len,
* and adds in "sum" (32-bit)
Expand Down Expand Up @@ -34,30 +38,6 @@ extern __wsum csum_partial_copy_nocheck(const void *src,
void *dst, int len,
__wsum sum);


#ifdef CONFIG_COLDFIRE

/*
* The ColdFire cores don't support all the 68k instructions used
* in the optimized checksum code below. So it reverts back to using
* more standard C coded checksums. The fast checksum code is
* significantly larger than the optimized version, so it is not
* inlined here.
*/
__sum16 ip_fast_csum(const void *iph, unsigned int ihl);

static inline __sum16 csum_fold(__wsum sum)
{
unsigned int tmp = (__force u32)sum;

tmp = (tmp & 0xffff) + (tmp >> 16);
tmp = (tmp & 0xffff) + (tmp >> 16);

return (__force __sum16)~tmp;
}

#else

/*
* This is a version of ip_fast_csum() optimized for IP headers,
* which always checksum on 4 octet boundaries.
Expand Down Expand Up @@ -97,8 +77,6 @@ static inline __sum16 csum_fold(__wsum sum)
return (__force __sum16)~sum;
}

#endif /* CONFIG_COLDFIRE */

static inline __wsum
csum_tcpudp_nofold(__be32 saddr, __be32 daddr, unsigned short len,
unsigned short proto, __wsum sum)
Expand Down Expand Up @@ -167,4 +145,5 @@ csum_ipv6_magic(const struct in6_addr *saddr, const struct in6_addr *daddr,
return csum_fold(sum);
}

#endif /* CONFIG_GENERIC_CSUM */
#endif /* _M68K_CHECKSUM_H */
8 changes: 6 additions & 2 deletions trunk/arch/m68k/lib/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,12 @@ 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

ifndef CONFIG_GENERIC_CSUM
lib-y += checksum.o
endif

File renamed without changes.
156 changes: 0 additions & 156 deletions trunk/arch/m68k/lib/checksum_no.c

This file was deleted.

0 comments on commit 11c83e0

Please sign in to comment.