Skip to content

Commit

Permalink
openrisc: Use the declarations provided by <asm/sections.h>
Browse files Browse the repository at this point in the history
Openrisc's private vmlinux.h duplicates a few definitions that are already
provided by asm-generic/sections.h. The former is used by setup.c only,
while the latter is already used everywhere else.

Convert setup.c to use the generic version:
  - Include <asm/sections.h>,
  - Remove the (slightly different) extern declarations,
  - Remove the no longer needed address-of ('&') operators.

Signed-off-by: Geert Uytterhoeven <[email protected]>
Signed-off-by: Jonas Bonn <[email protected]>
  • Loading branch information
geertu authored and Jonas Bonn committed Nov 15, 2013
1 parent f38d45d commit be5940c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
11 changes: 6 additions & 5 deletions arch/openrisc/kernel/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
#include <linux/device.h>
#include <linux/of_platform.h>

#include <asm/sections.h>
#include <asm/segment.h>
#include <asm/pgtable.h>
#include <asm/types.h>
Expand Down Expand Up @@ -77,7 +78,7 @@ static unsigned long __init setup_memory(void)

ram_start_pfn = PFN_UP(memory_start);
/* free_ram_start_pfn is first page after kernel */
free_ram_start_pfn = PFN_UP(__pa(&_end));
free_ram_start_pfn = PFN_UP(__pa(_end));
ram_end_pfn = PFN_DOWN(memblock_end_of_DRAM());

max_pfn = ram_end_pfn;
Expand Down Expand Up @@ -290,10 +291,10 @@ void __init setup_arch(char **cmdline_p)
setup_cpuinfo();

/* process 1's initial memory region is the kernel code/data */
init_mm.start_code = (unsigned long)&_stext;
init_mm.end_code = (unsigned long)&_etext;
init_mm.end_data = (unsigned long)&_edata;
init_mm.brk = (unsigned long)&_end;
init_mm.start_code = (unsigned long)_stext;
init_mm.end_code = (unsigned long)_etext;
init_mm.end_data = (unsigned long)_edata;
init_mm.brk = (unsigned long)_end;

#ifdef CONFIG_BLK_DEV_INITRD
initrd_start = (unsigned long)&__initrd_start;
Expand Down
1 change: 0 additions & 1 deletion arch/openrisc/kernel/vmlinux.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#ifndef __OPENRISC_VMLINUX_H_
#define __OPENRISC_VMLINUX_H_

extern char _stext, _etext, _edata, _end;
#ifdef CONFIG_BLK_DEV_INITRD
extern char __initrd_start, __initrd_end;
extern char __initramfs_start;
Expand Down

0 comments on commit be5940c

Please sign in to comment.