um: Create asm/sections.h
authorNicolas Iooss <nicolas.iooss_linux@m4x.org>
Sun, 12 Oct 2014 11:02:11 +0000 (13:02 +0200)
committerRichard Weinberger <richard@nod.at>
Sun, 31 May 2015 11:14:05 +0000 (13:14 +0200)
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 <nicolas.iooss_linux@m4x.org>
Signed-off-by: Richard Weinberger <richard@nod.at>
arch/um/include/asm/Kbuild
arch/um/include/asm/sections.h [new file with mode: 0644]
arch/um/kernel/physmem.c
arch/um/kernel/skas/mmu.c
arch/um/kernel/um_arch.c

index 9176fa11d49b917e8d417b1fcdc7daaa271d9cfd..ea9ec2e34384011946741c4d5cf70480e8f55b89 100644 (file)
@@ -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 (file)
index 0000000..3a6ebcc
--- /dev/null
@@ -0,0 +1,9 @@
+#ifndef __UM_SECTIONS_H
+#define __UM_SECTIONS_H
+
+#include <asm-generic/sections.h>
+
+extern char __binary_start;
+extern int __syscall_stub_start, __syscall_stub_end;
+
+#endif
index 9034fc8056b485d2eb34cf7af2f20a23dde87b51..249c9feb5485f80cb7b8abffb525138a0db1f301 100644 (file)
@@ -8,6 +8,7 @@
 #include <linux/mm.h>
 #include <linux/pfn.h>
 #include <asm/page.h>
+#include <asm/sections.h>
 #include <as-layout.h>
 #include <init.h>
 #include <kern.h>
@@ -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,
index 94abdcc1d6ad19c7de8683b34db17331fa2ec926..2216eddc6893c3f1c8f362763436d4c35216453b 100644 (file)
@@ -8,12 +8,11 @@
 #include <linux/slab.h>
 #include <asm/pgalloc.h>
 #include <asm/pgtable.h>
+#include <asm/sections.h>
 #include <as-layout.h>
 #include <os.h>
 #include <skas.h>
 
-extern int __syscall_stub_start;
-
 static int init_stub_pte(struct mm_struct *mm, unsigned long proc,
                         unsigned long kernel)
 {
index 07f798f4bcee24bfd867e30f9d1d89d6069f5195..ffa185d92d2d6ef4fc03777f1e99e569531266cc 100644 (file)
@@ -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;