Merge tag 'for-3.13' of git://git.openrisc.net/~jonas/linux
authorLinus Torvalds <torvalds@linux-foundation.org>
Fri, 15 Nov 2013 22:26:38 +0000 (14:26 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 15 Nov 2013 22:26:38 +0000 (14:26 -0800)
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

arch/openrisc/Makefile
arch/openrisc/configs/or1ksim_defconfig
arch/openrisc/include/asm/Kbuild
arch/openrisc/kernel/module.c
arch/openrisc/kernel/setup.c
arch/openrisc/kernel/vmlinux.h

index 4739b83..89076a6 100644 (file)
@@ -24,7 +24,7 @@ OBJCOPYFLAGS    := -O binary -R .note -R .comment -S
 LDFLAGS_vmlinux :=
 LIBGCC                 := $(shell $(CC) $(KBUILD_CFLAGS) -print-libgcc-file-name)
 
-KBUILD_CFLAGS  += -pipe -ffixed-r10
+KBUILD_CFLAGS  += -pipe -ffixed-r10 -D__linux__
 
 ifeq ($(CONFIG_OPENRISC_HAVE_INST_MUL),y)
        KBUILD_CFLAGS += $(call cc-option,-mhard-mul)
index ea172bd..42fe530 100644 (file)
@@ -1,9 +1,9 @@
 CONFIG_CROSS_COMPILE="or32-linux-"
+CONFIG_NO_HZ=y
 CONFIG_LOG_BUF_SHIFT=14
 CONFIG_BLK_DEV_INITRD=y
 # CONFIG_RD_GZIP is not set
 CONFIG_EXPERT=y
-# CONFIG_SYSCTL_SYSCALL is not set
 # CONFIG_KALLSYMS is not set
 # CONFIG_EPOLL is not set
 # CONFIG_TIMERFD is not set
@@ -15,7 +15,6 @@ CONFIG_SLOB=y
 CONFIG_MODULES=y
 # CONFIG_BLOCK is not set
 CONFIG_OPENRISC_BUILTIN_DTB="or1ksim"
-CONFIG_NO_HZ=y
 CONFIG_HZ_100=y
 CONFIG_NET=y
 CONFIG_PACKET=y
@@ -39,11 +38,8 @@ CONFIG_DEVTMPFS_MOUNT=y
 # CONFIG_FW_LOADER is not set
 CONFIG_PROC_DEVICETREE=y
 CONFIG_NETDEVICES=y
-CONFIG_MICREL_PHY=y
-CONFIG_NET_ETHERNET=y
 CONFIG_ETHOC=y
-# CONFIG_NETDEV_1000 is not set
-# CONFIG_NETDEV_10000 is not set
+CONFIG_MICREL_PHY=y
 # CONFIG_WLAN is not set
 # CONFIG_INPUT is not set
 # CONFIG_SERIO is not set
@@ -55,11 +51,9 @@ CONFIG_SERIAL_8250_CONSOLE=y
 CONFIG_SERIAL_OF_PLATFORM=y
 # CONFIG_HW_RANDOM is not set
 # CONFIG_HWMON is not set
-# CONFIG_MFD_SUPPORT is not set
 # CONFIG_USB_SUPPORT is not set
 # CONFIG_DNOTIFY is not set
 CONFIG_TMPFS=y
 CONFIG_NFS_FS=y
-CONFIG_NFS_V3=y
 # CONFIG_ENABLE_WARN_DEPRECATED is not set
 # CONFIG_ENABLE_MUST_CHECK is not set
index 7840562..da1951a 100644 (file)
@@ -65,6 +65,7 @@ generic-y += trace_clock.h
 generic-y += types.h
 generic-y += ucontext.h
 generic-y += user.h
+generic-y += vga.h
 generic-y += word-at-a-time.h
 generic-y += xor.h
 generic-y += preempt.h
index 10ff50f..ef872ae 100644 (file)
@@ -47,12 +47,10 @@ int apply_relocate_add(Elf32_Shdr *sechdrs,
                        *location = value;
                        break;
                case R_OR32_CONST:
-                       location = (uint16_t *)location + 1;
-                       *((uint16_t *)location) = (uint16_t) (value);
+                       *((uint16_t *)location + 1) = value;
                        break;
                case R_OR32_CONSTH:
-                       location = (uint16_t *)location + 1;
-                       *((uint16_t *)location) = (uint16_t) (value >> 16);
+                       *((uint16_t *)location + 1) = value >> 16;
                        break;
                case R_OR32_JUMPTARG:
                        value -= (uint32_t)location;
index 09a769b..4fc7ccc 100644 (file)
@@ -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>
@@ -75,7 +76,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;
@@ -207,15 +208,15 @@ void __init setup_cpuinfo(void)
  * Falls back on built-in device tree in case null pointer is passed.
  */
 
-void __init or32_early_setup(unsigned int fdt)
+void __init or32_early_setup(void *fdt)
 {
-       if (fdt) {
-               early_init_devtree((void*) fdt);
-               printk(KERN_INFO "FDT at 0x%08x\n", fdt);
-       } else {
-               early_init_devtree(__dtb_start);
-               printk(KERN_INFO "Compiled-in FDT at %p\n", __dtb_start);
+       if (fdt)
+               pr_info("FDT at %p\n", fdt);
+       else {
+               fdt = __dtb_start;
+               pr_info("Compiled-in FDT at %p\n", fdt);
        }
+       early_init_devtree(fdt);
 }
 
 static int __init openrisc_device_probe(void)
@@ -288,10 +289,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;
index ee842a2..70b9ce4 100644 (file)
@@ -1,10 +1,8 @@
 #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;
 #endif
 
 extern u32 __dtb_start[];