unicore32/mm/fault.c: Port OOM changes to do_pf

Commit d065bd810b6deb67d4897a14bfe21f8eb526ba99
(mm: retry page fault when blocking on disk transfer) and
commit 37b23e0525d393d48a7d59f870b3bc061a30ccdb
(x86,mm: make pagefault killable)

The above commits introduced changes into the x86 pagefault handler
for making the page fault handler retryable as well as killable.

These changes reduce the mmap_sem hold time, which is crucial
during OOM killer invocation.

Port these changes to unicore32.

Signed-off-by: Kautuk Consul <consul.kautuk@gmail.com>
Acked-by: Guan Xuetao <gxt@mprc.pku.edu.cn>
UniCore32 bugfix: add missed CONFIG_ZONE_DMA

Because our PCI-bus handler confines dma zone into 128M, we should add
CONFIG_ZONE_DMA for all boards. Otherwise, all memory bigger than 128M
will be pushed into ZONE_MOVABLE.

Cc: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Liu Guoli <liuguoli@mprc.pku.edu.cn>
Signed-off-by: Guan Xuetao <gxt@mprc.pku.edu.cn>
UniCore32-bugfix: fix mismatch return value of __xchg_bad_pointer

When disintegrate system.h, I left an error in asm/cmpxchg.h, which
will result in following error:

arch/unicore32/include/asm/cmpxchg.h: In function '__xchg':
arch/unicore32/include/asm/cmpxchg.h:38: error: void value not ignored as it ought to be

Signed-off-by: Guan Xuetao <gxt@mprc.pku.edu.cn>
UniCore32-bugfix: Remove definitions in asm/bug.h to solve difference between native and cross compiler

For kernel/bound.c being compiled by native compiler, it will generate following errors in gcc 4.4.3:
  CC      kernel/bounds.s
In file included from include/linux/bug.h:4,
                 from include/linux/page-flags.h:9,
                 from kernel/bounds.c:9:
arch/unicore32/include/asm/bug.h:22: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'void'
arch/unicore32/include/asm/bug.h:23: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'void'

So, we moved definitions in asm/bug.h to arch/unicore32/kernel/setup.h to solve the problem.

Signed-off-by: Guan Xuetao <gxt@mprc.pku.edu.cn>
UAPI: (Scripted) Disintegrate arch/unicore32/include/asm

Signed-off-by: David Howells <dhowells@redhat.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Michael Kerrisk <mtk.manpages@gmail.com>
Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Acked-by: Dave Jones <davej@redhat.com>
unicore32: Use Kbuild infrastructure for kvm_para.h

All the headers but kvm_para.h use the Kbuild infrastructure to
get to the asm-generic headers.

Cc: linux-kbuild@vger.kernel.org
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Guan Xuetao <gxt@mprc.pku.edu.cn>
unicore32: switch to generic kernel_thread()/kernel_execve()

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Acked-and-Tested-by: Guan Xuetao <gxt@mprc.pku.edu.cn>
unicore32: switch to generic sys_execve()

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Acked-and-Tested-by: Guan Xuetao <gxt@mprc.pku.edu.cn>
arch/unicore32: remove CONFIG_EXPERIMENTAL

This config item has not carried much meaning for a while now and is
almost always enabled by default. As agreed during the Linux kernel
summit, remove it.

CC: Guan Xuetao <gxt@mprc.pku.edu.cn>
Signed-off-by: Kees Cook <keescook@chromium.org>
Acked-by: Guan Xuetao <gxt@mprc.pku.edu.cn>
unicore32-oldabi: add CONFIG_UNICORE32_OLDABI for distinguishing two ABIs

Signed-off-by: Guan Xuetao <gxt@mprc.pku.edu.cn>
unicore32-oldabi: apply CONFIG_CMDLINE patch

1. delete rsize and wsize
2. add proto=tcp
3. change nfs version from v3 to v4

Signed-off-by: Zhang Shu <davidshuzhang@gmail.com>
Signed-off-by: Guan Xuetao <gxt@mprc.pku.edu.cn>
unicore32-oldabi: add stat.h support for UNICORE32_OLDABI

Remove generated code in arch/unicore32/include/asm/Kbuid, and
restore asm/stat.h for UNICORE32_OLDABI

Signed-off-by: Guan Xuetao <gxt@mprc.pku.edu.cn>
unicore32-oldabi: restore signal handling

Signed-off-by: Guan Xuetao <gxt@mprc.pku.edu.cn>
unicore32-oldabi: restore oldabi syscall interface

asm/unistd-oldabi.h is added for the oldabi syscall interface,
    and wrappers and entry codes are added in sys.c and entry.S

Signed-off-by: Chang Huaixin <changhuaixin@mprc.pku.edu.cn>
Signed-off-by: Guan Xuetao <gxt@mprc.pku.edu.cn>
unicore32-oldabi: keyboard and mouse bugfix for puv3

Signed-off-by: Guan Xuetao <gxt@mprc.pku.edu.cn>
UniCore32: add pkunity-v3 net driver (umal) support

v2 -> v3: adjust codestyle and names.

v1 -> v2:
For the new version of linux, we adjust the directory position and
config/compilation method. And we replace ndo_set_multicast_list
with ndo_set_rx_mode.

v1:
We changed our code from old driver. Thanks the reviews of Arnd and Ben.
1. Use variable type integer to describe umal_speed instead of enum.
2. Changed the name ETHER_ADDR_LEN to ETH_ALEN.
3. Renamed those members in struct umaldmadscr to fit the naming convention.
4. Modified our code skb_reserve(sb_new, 2) to skb_reserve(sb_new,
	SMP_CACHE_BYTES) in function umaldma_add_rcvbuffer.
5. Put judgment statement if (!netif_device_present(dev)) before lock the
	sc->umal in function umaldma_tx_process.
6. Reorder those functions in driver and delete all prototypes.
7. Modified our code comment to fit the demands of kernel-doc.

BTW: For the mac address, we use the fixed, single mac address just for
board test, an mac address is just assigned to our company, so we didn't
choose random_ether_addr().

Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Ben Hutchings <bhutchings@solarflare.com>
Cc: netdev@vger.kernel.org
Cc: "David S. Miller" <davem@davemloft.net>

Signed-off-by: Zhang Shu <davidshuzhang@gmail.com>
Signed-off-by: Chu Xiaowei <chuxiaowei@mprc.pku.edu.cn>
Signed-off-by: Su Yonggang <tonyhook.su@gmail.com>
Signed-off-by: Guan Xuetao <gxt@mprc.pku.edu.cn>
unicore32: Add ocd console and qemu-defconfig to support qemu simulator

Signed-off-by: Guan Xuetao <gxt@mprc.pku.edu.cn>