aboutsummaryrefslogtreecommitdiffstats
path: root/arch/openrisc
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
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')
-rw-r--r--arch/openrisc/Makefile2
-rw-r--r--arch/openrisc/configs/or1ksim_defconfig10
-rw-r--r--arch/openrisc/include/asm/Kbuild1
-rw-r--r--arch/openrisc/kernel/module.c6
-rw-r--r--arch/openrisc/kernel/setup.c25
-rw-r--r--arch/openrisc/kernel/vmlinux.h2
6 files changed, 19 insertions, 27 deletions
diff --git a/arch/openrisc/Makefile b/arch/openrisc/Makefile
index 4739b8302a58..89076a66eee2 100644
--- a/arch/openrisc/Makefile
+++ b/arch/openrisc/Makefile
@@ -24,7 +24,7 @@ OBJCOPYFLAGS := -O binary -R .note -R .comment -S
24LDFLAGS_vmlinux := 24LDFLAGS_vmlinux :=
25LIBGCC := $(shell $(CC) $(KBUILD_CFLAGS) -print-libgcc-file-name) 25LIBGCC := $(shell $(CC) $(KBUILD_CFLAGS) -print-libgcc-file-name)
26 26
27KBUILD_CFLAGS += -pipe -ffixed-r10 27KBUILD_CFLAGS += -pipe -ffixed-r10 -D__linux__
28 28
29ifeq ($(CONFIG_OPENRISC_HAVE_INST_MUL),y) 29ifeq ($(CONFIG_OPENRISC_HAVE_INST_MUL),y)
30 KBUILD_CFLAGS += $(call cc-option,-mhard-mul) 30 KBUILD_CFLAGS += $(call cc-option,-mhard-mul)
diff --git a/arch/openrisc/configs/or1ksim_defconfig b/arch/openrisc/configs/or1ksim_defconfig
index ea172bdfa36a..42fe5303a370 100644
--- a/arch/openrisc/configs/or1ksim_defconfig
+++ b/arch/openrisc/configs/or1ksim_defconfig
@@ -1,9 +1,9 @@
1CONFIG_CROSS_COMPILE="or32-linux-" 1CONFIG_CROSS_COMPILE="or32-linux-"
2CONFIG_NO_HZ=y
2CONFIG_LOG_BUF_SHIFT=14 3CONFIG_LOG_BUF_SHIFT=14
3CONFIG_BLK_DEV_INITRD=y 4CONFIG_BLK_DEV_INITRD=y
4# CONFIG_RD_GZIP is not set 5# CONFIG_RD_GZIP is not set
5CONFIG_EXPERT=y 6CONFIG_EXPERT=y
6# CONFIG_SYSCTL_SYSCALL is not set
7# CONFIG_KALLSYMS is not set 7# CONFIG_KALLSYMS is not set
8# CONFIG_EPOLL is not set 8# CONFIG_EPOLL is not set
9# CONFIG_TIMERFD is not set 9# CONFIG_TIMERFD is not set
@@ -15,7 +15,6 @@ CONFIG_SLOB=y
15CONFIG_MODULES=y 15CONFIG_MODULES=y
16# CONFIG_BLOCK is not set 16# CONFIG_BLOCK is not set
17CONFIG_OPENRISC_BUILTIN_DTB="or1ksim" 17CONFIG_OPENRISC_BUILTIN_DTB="or1ksim"
18CONFIG_NO_HZ=y
19CONFIG_HZ_100=y 18CONFIG_HZ_100=y
20CONFIG_NET=y 19CONFIG_NET=y
21CONFIG_PACKET=y 20CONFIG_PACKET=y
@@ -39,11 +38,8 @@ CONFIG_DEVTMPFS_MOUNT=y
39# CONFIG_FW_LOADER is not set 38# CONFIG_FW_LOADER is not set
40CONFIG_PROC_DEVICETREE=y 39CONFIG_PROC_DEVICETREE=y
41CONFIG_NETDEVICES=y 40CONFIG_NETDEVICES=y
42CONFIG_MICREL_PHY=y
43CONFIG_NET_ETHERNET=y
44CONFIG_ETHOC=y 41CONFIG_ETHOC=y
45# CONFIG_NETDEV_1000 is not set 42CONFIG_MICREL_PHY=y
46# CONFIG_NETDEV_10000 is not set
47# CONFIG_WLAN is not set 43# CONFIG_WLAN is not set
48# CONFIG_INPUT is not set 44# CONFIG_INPUT is not set
49# CONFIG_SERIO is not set 45# CONFIG_SERIO is not set
@@ -55,11 +51,9 @@ CONFIG_SERIAL_8250_CONSOLE=y
55CONFIG_SERIAL_OF_PLATFORM=y 51CONFIG_SERIAL_OF_PLATFORM=y
56# CONFIG_HW_RANDOM is not set 52# CONFIG_HW_RANDOM is not set
57# CONFIG_HWMON is not set 53# CONFIG_HWMON is not set
58# CONFIG_MFD_SUPPORT is not set
59# CONFIG_USB_SUPPORT is not set 54# CONFIG_USB_SUPPORT is not set
60# CONFIG_DNOTIFY is not set 55# CONFIG_DNOTIFY is not set
61CONFIG_TMPFS=y 56CONFIG_TMPFS=y
62CONFIG_NFS_FS=y 57CONFIG_NFS_FS=y
63CONFIG_NFS_V3=y
64# CONFIG_ENABLE_WARN_DEPRECATED is not set 58# CONFIG_ENABLE_WARN_DEPRECATED is not set
65# CONFIG_ENABLE_MUST_CHECK is not set 59# CONFIG_ENABLE_MUST_CHECK is not set
diff --git a/arch/openrisc/include/asm/Kbuild b/arch/openrisc/include/asm/Kbuild
index 78405625e799..da1951a22907 100644
--- a/arch/openrisc/include/asm/Kbuild
+++ b/arch/openrisc/include/asm/Kbuild
@@ -65,6 +65,7 @@ generic-y += trace_clock.h
65generic-y += types.h 65generic-y += types.h
66generic-y += ucontext.h 66generic-y += ucontext.h
67generic-y += user.h 67generic-y += user.h
68generic-y += vga.h
68generic-y += word-at-a-time.h 69generic-y += word-at-a-time.h
69generic-y += xor.h 70generic-y += xor.h
70generic-y += preempt.h 71generic-y += preempt.h
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[];