Commit 8945546d authored by Linus Torvalds's avatar Linus Torvalds

Merge tag 'for-linus-20130929' of git://github.com/sctscore/official-linux

Pull S+core fixes from Lennox Wu:
 "These updates include updating information of maintainers, fix some
  trivial errors, and add a necessary function for supporting ipv6"

* tag 'for-linus-20130929' of git://github.com/sctscore/official-linux:
  Score: Update the information of Score maintaners
  Score: Modify the Makefile of Score, remove -mlong-calls for compiling
  Score: Implement the function csum_ipv6_magic
  Score: The commit is for compiling successfully
parents 815a4bb1 ed38665e
......@@ -7271,9 +7271,9 @@ F: include/linux/sched.h
F: include/uapi/linux/sched.h
SCORE ARCHITECTURE
M: Chen Liqin <liqin.chen@sunplusct.com>
M: Chen Liqin <liqin.linux@gmail.com>
M: Lennox Wu <lennox.wu@gmail.com>
W: http://www.sunplusct.com
W: http://www.sunplus.com
S: Supported
F: arch/score/
......
......@@ -2,6 +2,7 @@ menu "Machine selection"
config SCORE
def_bool y
select HAVE_GENERIC_HARDIRQS
select GENERIC_IRQ_SHOW
select GENERIC_IOMAP
select GENERIC_ATOMIC64
......@@ -110,3 +111,6 @@ source "security/Kconfig"
source "crypto/Kconfig"
source "lib/Kconfig"
config NO_IOMEM
def_bool y
......@@ -20,8 +20,8 @@ cflags-y += -G0 -pipe -mel -mnhwloop -D__SCOREEL__ \
#
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
......
......@@ -184,48 +184,57 @@ static inline __sum16 csum_ipv6_magic(const struct in6_addr *saddr,
__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));
......
......@@ -5,5 +5,4 @@
#define virt_to_bus virt_to_phys
#define bus_to_virt phys_to_virt
#endif /* _ASM_SCORE_IO_H */
......@@ -2,7 +2,7 @@
#define _ASM_SCORE_PGALLOC_H
#include <linux/mm.h>
#include <linux/highmem.h>
static inline void pmd_populate_kernel(struct mm_struct *mm, pmd_t *pmd,
pte_t *pte)
{
......
......@@ -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
......
......@@ -78,8 +78,8 @@ int copy_thread(unsigned long clone_flags, unsigned long usp,
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();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment