Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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 <nicolas.iooss_linux@m4x.org>
Signed-off-by: Richard Weinberger <richard@nod.at>

authored by

Nicolas Iooss and committed by
Richard Weinberger
d5f20be7 ba155e2d

+11 -7
-1
arch/um/include/asm/Kbuild
··· 22 22 generic-y += percpu.h 23 23 generic-y += preempt.h 24 24 generic-y += scatterlist.h 25 - generic-y += sections.h 26 25 generic-y += switch_to.h 27 26 generic-y += topology.h 28 27 generic-y += trace_clock.h
+9
arch/um/include/asm/sections.h
··· 1 + #ifndef __UM_SECTIONS_H 2 + #define __UM_SECTIONS_H 3 + 4 + #include <asm-generic/sections.h> 5 + 6 + extern char __binary_start; 7 + extern int __syscall_stub_start, __syscall_stub_end; 8 + 9 + #endif
+1 -2
arch/um/kernel/physmem.c
··· 8 8 #include <linux/mm.h> 9 9 #include <linux/pfn.h> 10 10 #include <asm/page.h> 11 + #include <asm/sections.h> 11 12 #include <as-layout.h> 12 13 #include <init.h> 13 14 #include <kern.h> ··· 55 54 "err = %d\n", virt, fd, offset, len, r, w, x, err); 56 55 } 57 56 } 58 - 59 - extern int __syscall_stub_start; 60 57 61 58 /** 62 59 * setup_physmem() - Setup physical memory for UML
+1 -2
arch/um/kernel/skas/mmu.c
··· 8 8 #include <linux/slab.h> 9 9 #include <asm/pgalloc.h> 10 10 #include <asm/pgtable.h> 11 + #include <asm/sections.h> 11 12 #include <as-layout.h> 12 13 #include <os.h> 13 14 #include <skas.h> 14 - 15 - extern int __syscall_stub_start; 16 15 17 16 static int init_stub_pte(struct mm_struct *mm, unsigned long proc, 18 17 unsigned long kernel)
-2
arch/um/kernel/um_arch.c
··· 248 248 249 249 #define MIN_VMALLOC (32 * 1024 * 1024) 250 250 251 - extern char __binary_start; 252 - 253 251 int __init linux_main(int argc, char **argv) 254 252 { 255 253 unsigned long avail, diff;