From: Greg Kroah-Hartman Date: Tue, 15 Jul 2014 00:58:57 +0000 (-0700) Subject: 3.10-stable patches X-Git-Tag: v3.4.99~15 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=134b2f662abfff4dca27fe565334b546fc52b385;p=thirdparty%2Fkernel%2Fstable-queue.git 3.10-stable patches added patches: score-implement-the-function-csum_ipv6_magic.patch score-modify-the-makefile-of-score-remove-mlong-calls-for-compiling.patch score-normalize-global-variables-exported-by-vmlinux.lds.patch score-the-commit-is-for-compiling-successfully.patch --- diff --git a/queue-3.10/score-implement-the-function-csum_ipv6_magic.patch b/queue-3.10/score-implement-the-function-csum_ipv6_magic.patch new file mode 100644 index 00000000000..8a90e61106f --- /dev/null +++ b/queue-3.10/score-implement-the-function-csum_ipv6_magic.patch @@ -0,0 +1,119 @@ +From 1ed62ca648557b884d117a4a8bbcf2ae4e2d1153 Mon Sep 17 00:00:00 2001 +From: Lennox Wu +Date: Sat, 14 Sep 2013 13:58:40 +0800 +Subject: Score: Implement the function csum_ipv6_magic + +From: Lennox Wu + +commit 1ed62ca648557b884d117a4a8bbcf2ae4e2d1153 upstream. + +Signed-off-by: Lennox Wu +Guenter Roeck +Signed-off-by: Greg Kroah-Hartman + +--- + arch/score/include/asm/checksum.h | 93 ++++++++++++++++++++------------------ + 1 file changed, 51 insertions(+), 42 deletions(-) + +--- a/arch/score/include/asm/checksum.h ++++ b/arch/score/include/asm/checksum.h +@@ -184,48 +184,57 @@ static inline __sum16 csum_ipv6_magic(co + __wsum sum) + { + __asm__ __volatile__( +- ".set\tnoreorder\t\t\t# csum_ipv6_magic\n\t" +- ".set\tnoat\n\t" +- "addu\t%0, %5\t\t\t# proto (long in network byte order)\n\t" +- "sltu\t$1, %0, %5\n\t" +- "addu\t%0, $1\n\t" +- "addu\t%0, %6\t\t\t# csum\n\t" +- "sltu\t$1, %0, %6\n\t" +- "lw\t%1, 0(%2)\t\t\t# four words source address\n\t" +- "addu\t%0, $1\n\t" +- "addu\t%0, %1\n\t" +- "sltu\t$1, %0, %1\n\t" +- "lw\t%1, 4(%2)\n\t" +- "addu\t%0, $1\n\t" +- "addu\t%0, %1\n\t" +- "sltu\t$1, %0, %1\n\t" +- "lw\t%1, 8(%2)\n\t" +- "addu\t%0, $1\n\t" +- "addu\t%0, %1\n\t" +- "sltu\t$1, %0, %1\n\t" +- "lw\t%1, 12(%2)\n\t" +- "addu\t%0, $1\n\t" +- "addu\t%0, %1\n\t" +- "sltu\t$1, %0, %1\n\t" +- "lw\t%1, 0(%3)\n\t" +- "addu\t%0, $1\n\t" +- "addu\t%0, %1\n\t" +- "sltu\t$1, %0, %1\n\t" +- "lw\t%1, 4(%3)\n\t" +- "addu\t%0, $1\n\t" +- "addu\t%0, %1\n\t" +- "sltu\t$1, %0, %1\n\t" +- "lw\t%1, 8(%3)\n\t" +- "addu\t%0, $1\n\t" +- "addu\t%0, %1\n\t" +- "sltu\t$1, %0, %1\n\t" +- "lw\t%1, 12(%3)\n\t" +- "addu\t%0, $1\n\t" +- "addu\t%0, %1\n\t" +- "sltu\t$1, %0, %1\n\t" +- "addu\t%0, $1\t\t\t# Add final carry\n\t" +- ".set\tnoat\n\t" +- ".set\tnoreorder" ++ ".set\tvolatile\t\t\t# csum_ipv6_magic\n\t" ++ "add\t%0, %0, %5\t\t\t# proto (long in network byte order)\n\t" ++ "cmp.c\t%5, %0\n\t" ++ "bleu 1f\n\t" ++ "addi\t%0, 0x1\n\t" ++ "1:add\t%0, %0, %6\t\t\t# csum\n\t" ++ "cmp.c\t%6, %0\n\t" ++ "lw\t%1, [%2, 0]\t\t\t# four words source address\n\t" ++ "bleu 1f\n\t" ++ "addi\t%0, 0x1\n\t" ++ "1:add\t%0, %0, %1\n\t" ++ "cmp.c\t%1, %0\n\t" ++ "1:lw\t%1, [%2, 4]\n\t" ++ "bleu 1f\n\t" ++ "addi\t%0, 0x1\n\t" ++ "1:add\t%0, %0, %1\n\t" ++ "cmp.c\t%1, %0\n\t" ++ "lw\t%1, [%2,8]\n\t" ++ "bleu 1f\n\t" ++ "addi\t%0, 0x1\n\t" ++ "1:add\t%0, %0, %1\n\t" ++ "cmp.c\t%1, %0\n\t" ++ "lw\t%1, [%2, 12]\n\t" ++ "bleu 1f\n\t" ++ "addi\t%0, 0x1\n\t" ++ "1:add\t%0, %0,%1\n\t" ++ "cmp.c\t%1, %0\n\t" ++ "lw\t%1, [%3, 0]\n\t" ++ "bleu 1f\n\t" ++ "addi\t%0, 0x1\n\t" ++ "1:add\t%0, %0, %1\n\t" ++ "cmp.c\t%1, %0\n\t" ++ "lw\t%1, [%3, 4]\n\t" ++ "bleu 1f\n\t" ++ "addi\t%0, 0x1\n\t" ++ "1:add\t%0, %0, %1\n\t" ++ "cmp.c\t%1, %0\n\t" ++ "lw\t%1, [%3, 8]\n\t" ++ "bleu 1f\n\t" ++ "addi\t%0, 0x1\n\t" ++ "1:add\t%0, %0, %1\n\t" ++ "cmp.c\t%1, %0\n\t" ++ "lw\t%1, [%3, 12]\n\t" ++ "bleu 1f\n\t" ++ "addi\t%0, 0x1\n\t" ++ "1:add\t%0, %0, %1\n\t" ++ "cmp.c\t%1, %0\n\t" ++ "bleu 1f\n\t" ++ "addi\t%0, 0x1\n\t" ++ "1:\n\t" ++ ".set\toptimize" + : "=r" (sum), "=r" (proto) + : "r" (saddr), "r" (daddr), + "0" (htonl(len)), "1" (htonl(proto)), "r" (sum)); diff --git a/queue-3.10/score-modify-the-makefile-of-score-remove-mlong-calls-for-compiling.patch b/queue-3.10/score-modify-the-makefile-of-score-remove-mlong-calls-for-compiling.patch new file mode 100644 index 00000000000..016f9e7f149 --- /dev/null +++ b/queue-3.10/score-modify-the-makefile-of-score-remove-mlong-calls-for-compiling.patch @@ -0,0 +1,30 @@ +From df9e4d1c39c472cb44d81ab2ed2db503fc486e3b Mon Sep 17 00:00:00 2001 +From: Lennox Wu +Date: Sat, 14 Sep 2013 14:41:22 +0800 +Subject: Score: Modify the Makefile of Score, remove -mlong-calls for compiling + +From: Lennox Wu + +commit df9e4d1c39c472cb44d81ab2ed2db503fc486e3b upstream. + +Signed-off-by: Lennox Wu +Cc: Guenter Roeck +Signed-off-by: Greg Kroah-Hartman + +--- + arch/score/Makefile | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +--- a/arch/score/Makefile ++++ b/arch/score/Makefile +@@ -20,8 +20,8 @@ cflags-y += -G0 -pipe -mel -mnhwloop -D_ + # + KBUILD_AFLAGS += $(cflags-y) + KBUILD_CFLAGS += $(cflags-y) +-KBUILD_AFLAGS_MODULE += -mlong-calls +-KBUILD_CFLAGS_MODULE += -mlong-calls ++KBUILD_AFLAGS_MODULE += ++KBUILD_CFLAGS_MODULE += + LDFLAGS += --oformat elf32-littlescore + LDFLAGS_vmlinux += -G0 -static -nostdlib + diff --git a/queue-3.10/score-normalize-global-variables-exported-by-vmlinux.lds.patch b/queue-3.10/score-normalize-global-variables-exported-by-vmlinux.lds.patch new file mode 100644 index 00000000000..28b540f2c76 --- /dev/null +++ b/queue-3.10/score-normalize-global-variables-exported-by-vmlinux.lds.patch @@ -0,0 +1,33 @@ +From ae49b83dcacfb69e22092cab688c415c2f2d870c Mon Sep 17 00:00:00 2001 +From: Jiang Liu +Date: Wed, 3 Jul 2013 15:03:37 -0700 +Subject: score: normalize global variables exported by vmlinux.lds + +From: Jiang Liu + +commit ae49b83dcacfb69e22092cab688c415c2f2d870c upstream. + +Generate mandatory global variables _sdata in file vmlinux.lds. + +Signed-off-by: Jiang Liu +Cc: Chen Liqin +Cc: Lennox Wu +Signed-off-by: Andrew Morton +Signed-off-by: Linus Torvalds +Cc: Guenter Roeck +Signed-off-by: Greg Kroah-Hartman + +--- + arch/score/kernel/vmlinux.lds.S | 1 + + 1 file changed, 1 insertion(+) + +--- a/arch/score/kernel/vmlinux.lds.S ++++ b/arch/score/kernel/vmlinux.lds.S +@@ -49,6 +49,7 @@ SECTIONS + } + + . = ALIGN(16); ++ _sdata = .; /* Start of data section */ + RODATA + + EXCEPTION_TABLE(16) diff --git a/queue-3.10/score-the-commit-is-for-compiling-successfully.patch b/queue-3.10/score-the-commit-is-for-compiling-successfully.patch new file mode 100644 index 00000000000..5f627a64da1 --- /dev/null +++ b/queue-3.10/score-the-commit-is-for-compiling-successfully.patch @@ -0,0 +1,89 @@ +From 5fbbf8a1a93452b26e7791cf32cefce62b0a480b Mon Sep 17 00:00:00 2001 +From: Lennox Wu +Date: Sat, 14 Sep 2013 13:48:37 +0800 +Subject: Score: The commit is for compiling successfully. + +From: Lennox Wu + +commit 5fbbf8a1a93452b26e7791cf32cefce62b0a480b upstream. + +The modifications include: + 1. Kconfig of Score: we don't support ioremap + 2. Missed headfile including + 3. There are some errors in other people's commit not checked by us, we fix it now + 3.1 arch/score/kernel/entry.S: wrong instructions + 3.2 arch/score/kernel/process.c : just some typos + +Signed-off-by: Lennox Wu +Cc: Guenter Roeck +Signed-off-by: Greg Kroah-Hartman + +--- + arch/score/Kconfig | 3 +++ + arch/score/include/asm/io.h | 1 - + arch/score/include/asm/pgalloc.h | 2 +- + arch/score/kernel/entry.S | 4 ++-- + arch/score/kernel/process.c | 4 ++-- + 5 files changed, 8 insertions(+), 6 deletions(-) + +--- a/arch/score/Kconfig ++++ b/arch/score/Kconfig +@@ -109,3 +109,6 @@ source "security/Kconfig" + source "crypto/Kconfig" + + source "lib/Kconfig" ++ ++config NO_IOMEM ++ def_bool y +--- a/arch/score/include/asm/io.h ++++ b/arch/score/include/asm/io.h +@@ -5,5 +5,4 @@ + + #define virt_to_bus virt_to_phys + #define bus_to_virt phys_to_virt +- + #endif /* _ASM_SCORE_IO_H */ +--- a/arch/score/include/asm/pgalloc.h ++++ b/arch/score/include/asm/pgalloc.h +@@ -2,7 +2,7 @@ + #define _ASM_SCORE_PGALLOC_H + + #include +- ++#include + static inline void pmd_populate_kernel(struct mm_struct *mm, pmd_t *pmd, + pte_t *pte) + { +--- a/arch/score/kernel/entry.S ++++ b/arch/score/kernel/entry.S +@@ -264,7 +264,7 @@ resume_kernel: + disable_irq + lw r8, [r28, TI_PRE_COUNT] + cmpz.c r8 +- bne r8, restore_all ++ bne restore_all + need_resched: + lw r8, [r28, TI_FLAGS] + andri.c r9, r8, _TIF_NEED_RESCHED +@@ -415,7 +415,7 @@ ENTRY(handle_sys) + sw r9, [r0, PT_EPC] + + cmpi.c r27, __NR_syscalls # check syscall number +- bgeu illegal_syscall ++ bcs illegal_syscall + + slli r8, r27, 2 # get syscall routine + la r11, sys_call_table +--- a/arch/score/kernel/process.c ++++ b/arch/score/kernel/process.c +@@ -78,8 +78,8 @@ int copy_thread(unsigned long clone_flag + p->thread.reg0 = (unsigned long) childregs; + if (unlikely(p->flags & PF_KTHREAD)) { + memset(childregs, 0, sizeof(struct pt_regs)); +- p->thread->reg12 = usp; +- p->thread->reg13 = arg; ++ p->thread.reg12 = usp; ++ p->thread.reg13 = arg; + p->thread.reg3 = (unsigned long) ret_from_kernel_thread; + } else { + *childregs = *current_pt_regs(); diff --git a/queue-3.10/series b/queue-3.10/series index e11b5a64f78..bf9544abdd5 100644 --- a/queue-3.10/series +++ b/queue-3.10/series @@ -31,3 +31,7 @@ rtmutex-fix-deadlock-detector-for-real.patch rtmutex-detect-changes-in-the-pi-lock-chain.patch rtmutex-handle-deadlock-detection-smarter.patch rtmutex-plug-slow-unlock-race.patch +score-normalize-global-variables-exported-by-vmlinux.lds.patch +score-implement-the-function-csum_ipv6_magic.patch +score-the-commit-is-for-compiling-successfully.patch +score-modify-the-makefile-of-score-remove-mlong-calls-for-compiling.patch