aboutsummaryrefslogtreecommitdiffstats
path: root/arch/openrisc/kernel
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2013-11-15 17:26:38 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2013-11-15 17:26:38 -0500
commit98d38dd2ee30322fc9934d7490be3c5bee80950e (patch)
treea65a3ccb525156f1dd5ffdc7286eddcfd33d3c5e /arch/openrisc/kernel
parente4528d696f0fbb8eda231e2696b9ce0660f1e814 (diff)
parent621c2cd853fca98258b720d9fe7e8c031ec7f96f (diff)
Merge tag 'for-3.13' of git://git.openrisc.net/~jonas/linux
Pull OpenRISC updates from Jonas Bonn: - small cleanups to make allmodconfig pass - defconfig refresh - a handful of code sanitization patches * tag 'for-3.13' of git://git.openrisc.net/~jonas/linux: openrisc: Refactor or32_early_setup() openrisc: Remove unused declaration of __initramfs_start openrisc: Use the declarations provided by <asm/sections.h> openrisc: Refresh or1ksim_defconfig for v3.12 openrisc: Refactor 16-bit constant relocation openrisc: include: asm: Kbuild: add default "vga.h" openrisc: Makefile: append "-D__linux__" to KBUILD_CFLAGS
Diffstat (limited to 'arch/openrisc/kernel')
-rw-r--r--arch/openrisc/kernel/module.c6
-rw-r--r--arch/openrisc/kernel/setup.c25
-rw-r--r--arch/openrisc/kernel/vmlinux.h2
3 files changed, 15 insertions, 18 deletions
diff --git a/arch/openrisc/kernel/module.c b/arch/openrisc/kernel/module.c
index 10ff50f0202a..ef872ae4c878 100644
--- a/arch/openrisc/kernel/module.c
+++ b/arch/openrisc/kernel/module.c
@@ -47,12 +47,10 @@ int apply_relocate_add(Elf32_Shdr *sechdrs,
47 *location = value; 47 *location = value;
48 break; 48 break;
49 case R_OR32_CONST: 49 case R_OR32_CONST:
50 location = (uint16_t *)location + 1; 50 *((uint16_t *)location + 1) = value;
51 *((uint16_t *)location) = (uint16_t) (value);
52 break; 51 break;
53 case R_OR32_CONSTH: 52 case R_OR32_CONSTH:
54 location = (uint16_t *)location + 1; 53 *((uint16_t *)location + 1) = value >> 16;
55 *((uint16_t *)location) = (uint16_t) (value >> 16);
56 break; 54 break;
57 case R_OR32_JUMPTARG: 55 case R_OR32_JUMPTARG:
58 value -= (uint32_t)location; 56 value -= (uint32_t)location;
diff --git a/arch/openrisc/kernel/setup.c b/arch/openrisc/kernel/setup.c
index 09a769b69572..4fc7ccc0a2cf 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>
@@ -75,7 +76,7 @@ static unsigned long __init setup_memory(void)
75 76
76 ram_start_pfn = PFN_UP(memory_start); 77 ram_start_pfn = PFN_UP(memory_start);
77 /* free_ram_start_pfn is first page after kernel */ 78 /* free_ram_start_pfn is first page after kernel */
78 free_ram_start_pfn = PFN_UP(__pa(&_end)); 79 free_ram_start_pfn = PFN_UP(__pa(_end));
79 ram_end_pfn = PFN_DOWN(memblock_end_of_DRAM()); 80 ram_end_pfn = PFN_DOWN(memblock_end_of_DRAM());
80 81
81 max_pfn = ram_end_pfn; 82 max_pfn = ram_end_pfn;
@@ -207,15 +208,15 @@ void __init setup_cpuinfo(void)
207 * Falls back on built-in device tree in case null pointer is passed. 208 * Falls back on built-in device tree in case null pointer is passed.
208 */ 209 */
209 210
210void __init or32_early_setup(unsigned int fdt) 211void __init or32_early_setup(void *fdt)
211{ 212{
212 if (fdt) { 213 if (fdt)
213 early_init_devtree((void*) fdt); 214 pr_info("FDT at %p\n", fdt);
214 printk(KERN_INFO "FDT at 0x%08x\n", fdt); 215 else {
215 } else { 216 fdt = __dtb_start;
216 early_init_devtree(__dtb_start); 217 pr_info("Compiled-in FDT at %p\n", fdt);
217 printk(KERN_INFO "Compiled-in FDT at %p\n", __dtb_start);
218 } 218 }
219 early_init_devtree(fdt);
219} 220}
220 221
221static int __init openrisc_device_probe(void) 222static int __init openrisc_device_probe(void)
@@ -288,10 +289,10 @@ void __init setup_arch(char **cmdline_p)
288 setup_cpuinfo(); 289 setup_cpuinfo();
289 290
290 /* process 1's initial memory region is the kernel code/data */ 291 /* process 1's initial memory region is the kernel code/data */
291 init_mm.start_code = (unsigned long)&_stext; 292 init_mm.start_code = (unsigned long)_stext;
292 init_mm.end_code = (unsigned long)&_etext; 293 init_mm.end_code = (unsigned long)_etext;
293 init_mm.end_data = (unsigned long)&_edata; 294 init_mm.end_data = (unsigned long)_edata;
294 init_mm.brk = (unsigned long)&_end; 295 init_mm.brk = (unsigned long)_end;
295 296
296#ifdef CONFIG_BLK_DEV_INITRD 297#ifdef CONFIG_BLK_DEV_INITRD
297 initrd_start = (unsigned long)&__initrd_start; 298 initrd_start = (unsigned long)&__initrd_start;
diff --git a/arch/openrisc/kernel/vmlinux.h b/arch/openrisc/kernel/vmlinux.h
index ee842a2d3f36..70b9ce41835c 100644
--- a/arch/openrisc/kernel/vmlinux.h
+++ b/arch/openrisc/kernel/vmlinux.h
@@ -1,10 +1,8 @@
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;
8#endif 6#endif
9 7
10extern u32 __dtb_start[]; 8extern u32 __dtb_start[];