Merge branch 'amd64-smp' of https://github.com/chyyuu/ucore_plus into mjj/amd64

This patch applies the difference between head of the two branches and
cleans up coding style issues.

Signed-off-by: Junjie Mao <eternal.n08@gmail.com>
Cleanup random build warnings

Signed-off-by: Junjie Mao <eternal.n08@gmail.com>
Revert "update primer.c (total from 1000 to 10) and primer.testspec to reduce test time"

This reverts commit 9963a4068765e5310b4b63656bc0aa174335f8f2.

We had better not hide the performance issue from test report. The
execution time can be controlled by a proper '@timeout' attribute in
the testspec. Mark it as a known failure.

Signed-off-by: Junjie Mao <eternal.n08@gmail.com>
Enable badbrktest on all architectures

Badbrktest is originally for testing swap functionality but can now be
used to test if a process can be killed when it asks for too much memory.

Signed-off-by: Junjie Mao <eternal.n08@gmail.com>
Fix sfs_dirtest1

The test list entries under various directories and expects the 'home'
directory to be empty. However, there must be at least one file under
that directory so that git never ignore it. Thus the number of entries
in 'home' should be 1 (. and .. are not counted) instead of 0 and its
size (number of entries include . and .. multiplies size of the name
buffer, i.e. 256) should be 768 instead of 512.

Signed-off-by: Junjie Mao <eternal.n08@gmail.com>
Fix brktest

The total size brktest allocates may vary on different architectures
as there is a pointer field in the slot which is 4-byte on i386 and
arm and 8-byte on amd64.

This patch saves the pointers to the slots allocated in a specific
array and removes the pointer in struct slot so that the result will
be the same on all architectures.

Signed-off-by: Junjie Mao <eternal.n08@gmail.com>
Fix faultreadkernel

Issue #4

In faultreadkernel, the process attempts to read a word from kernel
space and fails if it can successfully do so.

The address previously used is specific to 64-bit implementations and
the testspec is specific to x86 architectures. This patch fixes the
problem by reading different address according to the size of a pointer
and remove the architecture-related lines in the specification.

Signed-off-by: Junjie Mao <eternal.n08@gmail.com>
Mark threadgroup1 as a known failure on i386 and amd64

Issue #26

Threadgroup1 may (but not always) lead to memory leak.

Signed-off-by: Junjie Mao <eternal.n08@gmail.com>
Fix a compile warning on constant

Signed-off-by: Junjie Mao <eternal.n08@gmail.com>
Remove legacy files derived from 'supervisor' age

Signed-off-by: Junjie Mao <eternal.n08@gmail.com>
Merge branch 'mjj/amd64' into amd64-smp

Conflicts:
	ucore/Makefile
	ucore/doc/amd64-smp/design-acpica.txt
	ucore/doc/amd64-smp/design_x64init.txt
	ucore/src/kern-ucore/arch/amd64/Makefile.image
	ucore/src/kern-ucore/arch/amd64/driver/acpi.c
	ucore/src/kern-ucore/arch/amd64/driver/acpiosl.c
	ucore/src/kern-ucore/arch/amd64/driver/xapic.c
	ucore/src/kern-ucore/arch/amd64/init/bootother.S
	ucore/src/kern-ucore/arch/amd64/init/init.c
	ucore/src/kern-ucore/arch/amd64/mm/pmm.c
	ucore/src/kern-ucore/arch/amd64/numa/mp.c
	ucore/src/kern-ucore/arch/amd64/piggycode.S.in
	ucore/src/kern-ucore/arch/amd64/syscall/syscall.c
	ucore/src/kern-ucore/arch/i386/Makefile.image
	ucore/src/kern-ucore/arch/i386/configs/default_defconfig
	ucore/src/kern-ucore/arch/i386/debug/monitor.c
	ucore/src/kern-ucore/kmodule/mod.h
	ucore/src/kern-ucore/mm/pmm.c
	ucore/src/kern-ucore/mm/vmm.c
	ucore/src/kern-ucore/mm/vmm.h
	ucore/src/kern-ucore/process/proc.c
	ucore/src/libs-user-ucore/syscall.c
	ucore/src/libs-user-ucore/ulib.c
	ucore/src/user-ucore/testspecs/brktest.testspec

Signed-off-by: Junjie Mao <eternal.n08@gmail.com>