Skip to content

Commit

Permalink
um: Create asm/sections.h
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Richard Weinberger <[email protected]>
  • Loading branch information
fishilico authored and richardweinberger committed May 31, 2015
1 parent ba155e2 commit d5f20be
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 7 deletions.
1 change: 0 additions & 1 deletion arch/um/include/asm/Kbuild
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
9 changes: 9 additions & 0 deletions arch/um/include/asm/sections.h
Original file line number Diff line number Diff line change
@@ -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
3 changes: 1 addition & 2 deletions arch/um/kernel/physmem.c
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down Expand Up @@ -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,
Expand Down
3 changes: 1 addition & 2 deletions arch/um/kernel/skas/mmu.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down
2 changes: 0 additions & 2 deletions arch/um/kernel/um_arch.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit d5f20be

Please sign in to comment.