aboutsummaryrefslogtreecommitdiffstats
path: root/arch/openrisc
diff options
context:
space:
mode:
authorGeert Uytterhoeven <geert@linux-m68k.org>2013-11-12 14:56:20 -0500
committerJonas Bonn <jonas@southpole.se>2013-11-15 04:37:41 -0500
commitbe5940c9fd2fa1905fab4353bb9c7051d088d824 (patch)
tree9bab4a6dc363f93462dd6b73d4d6b89ec8bfa093 /arch/openrisc
parentf38d45dd5a0c05b7ae9c0fc1c5b2e7f69b4bfcfb (diff)
openrisc: Use the declarations provided by <asm/sections.h>
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 <geert@linux-m68k.org> Signed-off-by: Jonas Bonn <jonas@southpole.se>
Diffstat (limited to 'arch/openrisc')
-rw-r--r--arch/openrisc/kernel/setup.c11
-rw-r--r--arch/openrisc/kernel/vmlinux.h1
2 files changed, 6 insertions, 6 deletions
diff --git a/arch/openrisc/kernel/setup.c b/arch/openrisc/kernel/setup.c
index d7359ffbcbdd..89c497813bab 100644
--- a/arch/openrisc/kernel/setup.c
+++ b/arch/openrisc/kernel/setup.c
@@ -40,6 +40,7 @@
40#include <linux/device.h> 40#include <linux/device.h>
41#include <linux/of_platform.h> 41#include <linux/of_platform.h>
42 42
43#include <asm/sections.h>
43#include <asm/segment.h> 44#include <asm/segment.h>
44#include <asm/pgtable.h> 45#include <asm/pgtable.h>
45#include <asm/types.h> 46#include <asm/types.h>
@@ -77,7 +78,7 @@ static unsigned long __init setup_memory(void)
77 78
78 ram_start_pfn = PFN_UP(memory_start); 79 ram_start_pfn = PFN_UP(memory_start);
79 /* free_ram_start_pfn is first page after kernel */ 80 /* free_ram_start_pfn is first page after kernel */
80 free_ram_start_pfn = PFN_UP(__pa(&_end)); 81 free_ram_start_pfn = PFN_UP(__pa(_end));
81 ram_end_pfn = PFN_DOWN(memblock_end_of_DRAM()); 82 ram_end_pfn = PFN_DOWN(memblock_end_of_DRAM());
82 83
83 max_pfn = ram_end_pfn; 84 max_pfn = ram_end_pfn;
@@ -290,10 +291,10 @@ void __init setup_arch(char **cmdline_p)
290 setup_cpuinfo(); 291 setup_cpuinfo();
291 292
292 /* process 1's initial memory region is the kernel code/data */ 293 /* process 1's initial memory region is the kernel code/data */
293 init_mm.start_code = (unsigned long)&_stext; 294 init_mm.start_code = (unsigned long)_stext;
294 init_mm.end_code = (unsigned long)&_etext; 295 init_mm.end_code = (unsigned long)_etext;
295 init_mm.end_data = (unsigned long)&_edata; 296 init_mm.end_data = (unsigned long)_edata;
296 init_mm.brk = (unsigned long)&_end; 297 init_mm.brk = (unsigned long)_end;
297 298
298#ifdef CONFIG_BLK_DEV_INITRD 299#ifdef CONFIG_BLK_DEV_INITRD
299 initrd_start = (unsigned long)&__initrd_start; 300 initrd_start = (unsigned long)&__initrd_start;
diff --git a/arch/openrisc/kernel/vmlinux.h b/arch/openrisc/kernel/vmlinux.h
index ee842a2d3f36..3f7b2b23a439 100644
--- a/arch/openrisc/kernel/vmlinux.h
+++ b/arch/openrisc/kernel/vmlinux.h
@@ -1,7 +1,6 @@
1#ifndef __OPENRISC_VMLINUX_H_ 1#ifndef __OPENRISC_VMLINUX_H_
2#define __OPENRISC_VMLINUX_H_ 2#define __OPENRISC_VMLINUX_H_
3 3
4extern char _stext, _etext, _edata, _end;
5#ifdef CONFIG_BLK_DEV_INITRD 4#ifdef CONFIG_BLK_DEV_INITRD
6extern char __initrd_start, __initrd_end; 5extern char __initrd_start, __initrd_end;
7extern char __initramfs_start; 6extern char __initramfs_start;