aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarkos Chandras <markos.chandras@imgtec.com>2014-11-13 06:25:27 -0500
committerMarkos Chandras <markos.chandras@imgtec.com>2015-02-17 10:37:19 -0500
commit4e0748f5beb92a14f6be4716938cbf27177ecd07 (patch)
tree7d48121081c57a306d400423e12c051170f4003a
parent98a833c1fa4de0695830f77b2d13fd86693da298 (diff)
MIPS: Use generic checksum functions for MIPS R6
The following instructions have been removed from MIPS R6 ulw, ulh, swl, lwr, lwl, swr. However, all of them are used in the MIPS specific checksum implementation. As a result of which, we will use the generic checksum on MIPS R6 Signed-off-by: Markos Chandras <markos.chandras@imgtec.com>
-rw-r--r--arch/mips/Kconfig5
-rw-r--r--arch/mips/include/asm/Kbuild1
-rw-r--r--arch/mips/include/asm/checksum.h5
-rw-r--r--arch/mips/kernel/mips_ksyms.c2
-rw-r--r--arch/mips/lib/Makefile1
5 files changed, 14 insertions, 0 deletions
diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig
index c01e1d4e0db3..0a8508b4803d 100644
--- a/arch/mips/Kconfig
+++ b/arch/mips/Kconfig
@@ -1034,6 +1034,9 @@ config MIPS_MACHINE
1034config NO_IOPORT_MAP 1034config NO_IOPORT_MAP
1035 def_bool n 1035 def_bool n
1036 1036
1037config GENERIC_CSUM
1038 bool
1039
1037config GENERIC_ISA_DMA 1040config GENERIC_ISA_DMA
1038 bool 1041 bool
1039 select ZONE_DMA if GENERIC_ISA_DMA_SUPPORT_BROKEN=n 1042 select ZONE_DMA if GENERIC_ISA_DMA_SUPPORT_BROKEN=n
@@ -1312,6 +1315,7 @@ config CPU_MIPS32_R6
1312 select CPU_SUPPORTS_32BIT_KERNEL 1315 select CPU_SUPPORTS_32BIT_KERNEL
1313 select CPU_SUPPORTS_HIGHMEM 1316 select CPU_SUPPORTS_HIGHMEM
1314 select CPU_SUPPORTS_MSA 1317 select CPU_SUPPORTS_MSA
1318 select GENERIC_CSUM
1315 select HAVE_KVM 1319 select HAVE_KVM
1316 select MIPS_O32_FP64_SUPPORT 1320 select MIPS_O32_FP64_SUPPORT
1317 help 1321 help
@@ -1363,6 +1367,7 @@ config CPU_MIPS64_R6
1363 select CPU_SUPPORTS_64BIT_KERNEL 1367 select CPU_SUPPORTS_64BIT_KERNEL
1364 select CPU_SUPPORTS_HIGHMEM 1368 select CPU_SUPPORTS_HIGHMEM
1365 select CPU_SUPPORTS_MSA 1369 select CPU_SUPPORTS_MSA
1370 select GENERIC_CSUM
1366 help 1371 help
1367 Choose this option to build a kernel for release 6 or later of the 1372 Choose this option to build a kernel for release 6 or later of the
1368 MIPS64 architecture. New MIPS processors, starting with the Warrior 1373 MIPS64 architecture. New MIPS processors, starting with the Warrior
diff --git a/arch/mips/include/asm/Kbuild b/arch/mips/include/asm/Kbuild
index 200efeac4181..526539cbc99f 100644
--- a/arch/mips/include/asm/Kbuild
+++ b/arch/mips/include/asm/Kbuild
@@ -1,4 +1,5 @@
1# MIPS headers 1# MIPS headers
2generic-(CONFIG_GENERIC_CSUM) += checksum.h
2generic-y += cputime.h 3generic-y += cputime.h
3generic-y += current.h 4generic-y += current.h
4generic-y += dma-contiguous.h 5generic-y += dma-contiguous.h
diff --git a/arch/mips/include/asm/checksum.h b/arch/mips/include/asm/checksum.h
index 5996252680c6..5c585c5c1c3e 100644
--- a/arch/mips/include/asm/checksum.h
+++ b/arch/mips/include/asm/checksum.h
@@ -12,6 +12,10 @@
12#ifndef _ASM_CHECKSUM_H 12#ifndef _ASM_CHECKSUM_H
13#define _ASM_CHECKSUM_H 13#define _ASM_CHECKSUM_H
14 14
15#ifdef CONFIG_GENERIC_CSUM
16#include <asm-generic/checksum.h>
17#else
18
15#include <linux/in6.h> 19#include <linux/in6.h>
16 20
17#include <asm/uaccess.h> 21#include <asm/uaccess.h>
@@ -274,5 +278,6 @@ static __inline__ __sum16 csum_ipv6_magic(const struct in6_addr *saddr,
274} 278}
275 279
276#include <asm-generic/checksum.h> 280#include <asm-generic/checksum.h>
281#endif /* CONFIG_GENERIC_CSUM */
277 282
278#endif /* _ASM_CHECKSUM_H */ 283#endif /* _ASM_CHECKSUM_H */
diff --git a/arch/mips/kernel/mips_ksyms.c b/arch/mips/kernel/mips_ksyms.c
index 17eaf0cf760c..ac66c30c8cd6 100644
--- a/arch/mips/kernel/mips_ksyms.c
+++ b/arch/mips/kernel/mips_ksyms.c
@@ -67,11 +67,13 @@ EXPORT_SYMBOL(__strnlen_kernel_asm);
67EXPORT_SYMBOL(__strnlen_user_nocheck_asm); 67EXPORT_SYMBOL(__strnlen_user_nocheck_asm);
68EXPORT_SYMBOL(__strnlen_user_asm); 68EXPORT_SYMBOL(__strnlen_user_asm);
69 69
70#ifndef CONFIG_CPU_MIPSR6
70EXPORT_SYMBOL(csum_partial); 71EXPORT_SYMBOL(csum_partial);
71EXPORT_SYMBOL(csum_partial_copy_nocheck); 72EXPORT_SYMBOL(csum_partial_copy_nocheck);
72EXPORT_SYMBOL(__csum_partial_copy_kernel); 73EXPORT_SYMBOL(__csum_partial_copy_kernel);
73EXPORT_SYMBOL(__csum_partial_copy_to_user); 74EXPORT_SYMBOL(__csum_partial_copy_to_user);
74EXPORT_SYMBOL(__csum_partial_copy_from_user); 75EXPORT_SYMBOL(__csum_partial_copy_from_user);
76#endif
75 77
76EXPORT_SYMBOL(invalid_pte_table); 78EXPORT_SYMBOL(invalid_pte_table);
77#ifdef CONFIG_FUNCTION_TRACER 79#ifdef CONFIG_FUNCTION_TRACER
diff --git a/arch/mips/lib/Makefile b/arch/mips/lib/Makefile
index eeddc58802e1..1e9e900cd3c3 100644
--- a/arch/mips/lib/Makefile
+++ b/arch/mips/lib/Makefile
@@ -8,6 +8,7 @@ lib-y += bitops.o csum_partial.o delay.o memcpy.o memset.o \
8 8
9obj-y += iomap.o 9obj-y += iomap.o
10obj-$(CONFIG_PCI) += iomap-pci.o 10obj-$(CONFIG_PCI) += iomap-pci.o
11lib-$(CONFIG_GENERIC_CSUM) := $(filter-out csum_partial.o, $(lib-y))
11 12
12obj-$(CONFIG_CPU_GENERIC_DUMP_TLB) += dump_tlb.o 13obj-$(CONFIG_CPU_GENERIC_DUMP_TLB) += dump_tlb.o
13obj-$(CONFIG_CPU_R3000) += r3k_dump_tlb.o 14obj-$(CONFIG_CPU_R3000) += r3k_dump_tlb.o