From d5f20be7cab85e6e701751323eea77c7935ae522 Mon Sep 17 00:00:00 2001 From: Nicolas Iooss Date: Sun, 12 Oct 2014 13:02:11 +0200 Subject: um: Create asm/sections.h arch/um/kernel/dyn.lds.S and arch/um/kernel/uml.lds.S define some UML-specific symbols. These symbols are used in the kernel part of UML with extern declarations. Move these declarations to a new header, asm/sections.h, like other architectures do. Signed-off-by: Nicolas Iooss Signed-off-by: Richard Weinberger --- arch/um/include/asm/Kbuild | 1 - arch/um/include/asm/sections.h | 9 +++++++++ arch/um/kernel/physmem.c | 3 +-- arch/um/kernel/skas/mmu.c | 3 +-- arch/um/kernel/um_arch.c | 2 -- 5 files changed, 11 insertions(+), 7 deletions(-) create mode 100644 arch/um/include/asm/sections.h (limited to 'arch/um') diff --git a/arch/um/include/asm/Kbuild b/arch/um/include/asm/Kbuild index 9176fa1..ea9ec2e 100644 --- a/arch/um/include/asm/Kbuild +++ b/arch/um/include/asm/Kbuild @@ -22,7 +22,6 @@ generic-y += pci.h generic-y += percpu.h generic-y += preempt.h generic-y += scatterlist.h -generic-y += sections.h generic-y += switch_to.h generic-y += topology.h generic-y += trace_clock.h diff --git a/arch/um/include/asm/sections.h b/arch/um/include/asm/sections.h new file mode 100644 index 0000000..3a6ebcc --- /dev/null +++ b/arch/um/include/asm/sections.h @@ -0,0 +1,9 @@ +#ifndef __UM_SECTIONS_H +#define __UM_SECTIONS_H + +#include + +extern char __binary_start; +extern int __syscall_stub_start, __syscall_stub_end; + +#endif diff --git a/arch/um/kernel/physmem.c b/arch/um/kernel/physmem.c index 9034fc8..249c9fe 100644 --- a/arch/um/kernel/physmem.c +++ b/arch/um/kernel/physmem.c @@ -8,6 +8,7 @@ #include #include #include +#include #include #include #include @@ -55,8 +56,6 @@ void map_memory(unsigned long virt, unsigned long phys, unsigned long len, } } -extern int __syscall_stub_start; - /** * setup_physmem() - Setup physical memory for UML * @start: Start address of the physical kernel memory, diff --git a/arch/um/kernel/skas/mmu.c b/arch/um/kernel/skas/mmu.c index 94abdcc..2216edd 100644 --- a/arch/um/kernel/skas/mmu.c +++ b/arch/um/kernel/skas/mmu.c @@ -8,12 +8,11 @@ #include #include #include +#include #include #include #include -extern int __syscall_stub_start; - static int init_stub_pte(struct mm_struct *mm, unsigned long proc, unsigned long kernel) { diff --git a/arch/um/kernel/um_arch.c b/arch/um/kernel/um_arch.c index 07f798f..ffa185d 100644 --- a/arch/um/kernel/um_arch.c +++ b/arch/um/kernel/um_arch.c @@ -248,8 +248,6 @@ EXPORT_SYMBOL(end_iomem); #define MIN_VMALLOC (32 * 1024 * 1024) -extern char __binary_start; - int __init linux_main(int argc, char **argv) { unsigned long avail, diff; -- cgit v1.1