Skip to content

Commit 98d38dd

Browse files
committed
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
2 parents e4528d6 + 621c2cd commit 98d38dd

6 files changed

Lines changed: 19 additions & 27 deletions

File tree

‎arch/openrisc/Makefile‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ OBJCOPYFLAGS := -O binary -R .note -R .comment -S
2424
LDFLAGS_vmlinux :=
2525
LIBGCC := $(shell $(CC) $(KBUILD_CFLAGS) -print-libgcc-file-name)
2626

27-
KBUILD_CFLAGS += -pipe -ffixed-r10
27+
KBUILD_CFLAGS += -pipe -ffixed-r10 -D__linux__
2828

2929
ifeq ($(CONFIG_OPENRISC_HAVE_INST_MUL),y)
3030
KBUILD_CFLAGS += $(call cc-option,-mhard-mul)

‎arch/openrisc/configs/or1ksim_defconfig‎

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
CONFIG_CROSS_COMPILE="or32-linux-"
2+
CONFIG_NO_HZ=y
23
CONFIG_LOG_BUF_SHIFT=14
34
CONFIG_BLK_DEV_INITRD=y
45
# CONFIG_RD_GZIP is not set
56
CONFIG_EXPERT=y
6-
# CONFIG_SYSCTL_SYSCALL is not set
77
# CONFIG_KALLSYMS is not set
88
# CONFIG_EPOLL is not set
99
# CONFIG_TIMERFD is not set
@@ -15,7 +15,6 @@ CONFIG_SLOB=y
1515
CONFIG_MODULES=y
1616
# CONFIG_BLOCK is not set
1717
CONFIG_OPENRISC_BUILTIN_DTB="or1ksim"
18-
CONFIG_NO_HZ=y
1918
CONFIG_HZ_100=y
2019
CONFIG_NET=y
2120
CONFIG_PACKET=y
@@ -39,11 +38,8 @@ CONFIG_DEVTMPFS_MOUNT=y
3938
# CONFIG_FW_LOADER is not set
4039
CONFIG_PROC_DEVICETREE=y
4140
CONFIG_NETDEVICES=y
42-
CONFIG_MICREL_PHY=y
43-
CONFIG_NET_ETHERNET=y
4441
CONFIG_ETHOC=y
45-
# CONFIG_NETDEV_1000 is not set
46-
# CONFIG_NETDEV_10000 is not set
42+
CONFIG_MICREL_PHY=y
4743
# CONFIG_WLAN is not set
4844
# CONFIG_INPUT is not set
4945
# CONFIG_SERIO is not set
@@ -55,11 +51,9 @@ CONFIG_SERIAL_8250_CONSOLE=y
5551
CONFIG_SERIAL_OF_PLATFORM=y
5652
# CONFIG_HW_RANDOM is not set
5753
# CONFIG_HWMON is not set
58-
# CONFIG_MFD_SUPPORT is not set
5954
# CONFIG_USB_SUPPORT is not set
6055
# CONFIG_DNOTIFY is not set
6156
CONFIG_TMPFS=y
6257
CONFIG_NFS_FS=y
63-
CONFIG_NFS_V3=y
6458
# CONFIG_ENABLE_WARN_DEPRECATED is not set
6559
# CONFIG_ENABLE_MUST_CHECK is not set

‎arch/openrisc/include/asm/Kbuild‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ generic-y += trace_clock.h
6565
generic-y += types.h
6666
generic-y += ucontext.h
6767
generic-y += user.h
68+
generic-y += vga.h
6869
generic-y += word-at-a-time.h
6970
generic-y += xor.h
7071
generic-y += preempt.h

‎arch/openrisc/kernel/module.c‎

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,12 +47,10 @@ int apply_relocate_add(Elf32_Shdr *sechdrs,
4747
*location = value;
4848
break;
4949
case R_OR32_CONST:
50-
location = (uint16_t *)location + 1;
51-
*((uint16_t *)location) = (uint16_t) (value);
50+
*((uint16_t *)location + 1) = value;
5251
break;
5352
case R_OR32_CONSTH:
54-
location = (uint16_t *)location + 1;
55-
*((uint16_t *)location) = (uint16_t) (value >> 16);
53+
*((uint16_t *)location + 1) = value >> 16;
5654
break;
5755
case R_OR32_JUMPTARG:
5856
value -= (uint32_t)location;

‎arch/openrisc/kernel/setup.c‎

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@
4040
#include <linux/device.h>
4141
#include <linux/of_platform.h>
4242

43+
#include <asm/sections.h>
4344
#include <asm/segment.h>
4445
#include <asm/pgtable.h>
4546
#include <asm/types.h>
@@ -75,7 +76,7 @@ static unsigned long __init setup_memory(void)
7576

7677
ram_start_pfn = PFN_UP(memory_start);
7778
/* 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));
7980
ram_end_pfn = PFN_DOWN(memblock_end_of_DRAM());
8081

8182
max_pfn = ram_end_pfn;
@@ -207,15 +208,15 @@ void __init setup_cpuinfo(void)
207208
* Falls back on built-in device tree in case null pointer is passed.
208209
*/
209210

210-
void __init or32_early_setup(unsigned int fdt)
211+
void __init or32_early_setup(void *fdt)
211212
{
212-
if (fdt) {
213-
early_init_devtree((void*) fdt);
214-
printk(KERN_INFO "FDT at 0x%08x\n", fdt);
215-
} else {
216-
early_init_devtree(__dtb_start);
217-
printk(KERN_INFO "Compiled-in FDT at %p\n", __dtb_start);
213+
if (fdt)
214+
pr_info("FDT at %p\n", fdt);
215+
else {
216+
fdt = __dtb_start;
217+
pr_info("Compiled-in FDT at %p\n", fdt);
218218
}
219+
early_init_devtree(fdt);
219220
}
220221

221222
static int __init openrisc_device_probe(void)
@@ -288,10 +289,10 @@ void __init setup_arch(char **cmdline_p)
288289
setup_cpuinfo();
289290

290291
/* process 1's initial memory region is the kernel code/data */
291-
init_mm.start_code = (unsigned long)&_stext;
292-
init_mm.end_code = (unsigned long)&_etext;
293-
init_mm.end_data = (unsigned long)&_edata;
294-
init_mm.brk = (unsigned long)&_end;
292+
init_mm.start_code = (unsigned long)_stext;
293+
init_mm.end_code = (unsigned long)_etext;
294+
init_mm.end_data = (unsigned long)_edata;
295+
init_mm.brk = (unsigned long)_end;
295296

296297
#ifdef CONFIG_BLK_DEV_INITRD
297298
initrd_start = (unsigned long)&__initrd_start;

‎arch/openrisc/kernel/vmlinux.h‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
#ifndef __OPENRISC_VMLINUX_H_
22
#define __OPENRISC_VMLINUX_H_
33

4-
extern char _stext, _etext, _edata, _end;
54
#ifdef CONFIG_BLK_DEV_INITRD
65
extern char __initrd_start, __initrd_end;
7-
extern char __initramfs_start;
86
#endif
97

108
extern u32 __dtb_start[];

0 commit comments

Comments
 (0)