diff options
Diffstat (limited to 'arch/frv')
-rw-r--r-- | arch/frv/Makefile | 2 | ||||
-rw-r--r-- | arch/frv/kernel/entry.S | 4 | ||||
-rw-r--r-- | arch/frv/kernel/gdb-stub.c | 12 | ||||
-rw-r--r-- | arch/frv/kernel/ptrace.c | 16 | ||||
-rw-r--r-- | arch/frv/kernel/setup.c | 17 | ||||
-rw-r--r-- | arch/frv/kernel/vmlinux.lds.S | 5 | ||||
-rw-r--r-- | arch/frv/mm/fault.c | 23 |
7 files changed, 25 insertions, 54 deletions
diff --git a/arch/frv/Makefile b/arch/frv/Makefile index 038e3a8457e..9bf7345c5cc 100644 --- a/arch/frv/Makefile +++ b/arch/frv/Makefile @@ -88,7 +88,7 @@ ASFLAGS += -mno-fdpic # make sure the .S files get compiled with debug info # and disable optimisations that are unhelpful whilst debugging ifdef CONFIG_DEBUG_INFO -CFLAGS += -O1 +#CFLAGS += -O1 AFLAGS += -Wa,--gdwarf2 ASFLAGS += -Wa,--gdwarf2 endif diff --git a/arch/frv/kernel/entry.S b/arch/frv/kernel/entry.S index 43dc08ec751..275673c192a 100644 --- a/arch/frv/kernel/entry.S +++ b/arch/frv/kernel/entry.S @@ -1492,6 +1492,10 @@ sys_call_table: .long sys_move_pages .long sys_getcpu .long sys_epoll_pwait + .long sys_utimensat /* 320 */ + .long sys_signalfd + .long sys_timerfd + .long sys_eventfd syscall_table_size = (. - sys_call_table) diff --git a/arch/frv/kernel/gdb-stub.c b/arch/frv/kernel/gdb-stub.c index 1e7a101cbf4..e89cad1192a 100644 --- a/arch/frv/kernel/gdb-stub.c +++ b/arch/frv/kernel/gdb-stub.c @@ -647,17 +647,11 @@ void debug_to_serial(const char *p, int n) } #endif -#ifdef CONFIG_GDBSTUB_CONSOLE - -static kdev_t gdbstub_console_dev(struct console *con) -{ - return MKDEV(1,3); /* /dev/null */ -} +#ifdef CONFIG_GDB_CONSOLE static struct console gdbstub_console = { .name = "gdb", .write = gdbstub_console_write, /* in break.S */ - .device = gdbstub_console_dev, .flags = CON_PRINTBUFFER, .index = -1, }; @@ -2021,7 +2015,7 @@ void __init gdbstub_init(void) ptr = mem2hex(gdbstub_banner, ptr, sizeof(gdbstub_banner) - 1, 0); gdbstub_send_packet(output_buffer); #endif -#if defined(CONFIG_GDBSTUB_CONSOLE) && defined(CONFIG_GDBSTUB_IMMEDIATE) +#if defined(CONFIG_GDB_CONSOLE) && defined(CONFIG_GDBSTUB_IMMEDIATE) register_console(&gdbstub_console); #endif @@ -2031,7 +2025,7 @@ void __init gdbstub_init(void) /* * register the console at a more appropriate time */ -#if defined (CONFIG_GDBSTUB_CONSOLE) && !defined(CONFIG_GDBSTUB_IMMEDIATE) +#if defined (CONFIG_GDB_CONSOLE) && !defined(CONFIG_GDBSTUB_IMMEDIATE) static int __init gdbstub_postinit(void) { printk("registering console\n"); diff --git a/arch/frv/kernel/ptrace.c b/arch/frv/kernel/ptrace.c index ce88fb95ee5..709e9bdc612 100644 --- a/arch/frv/kernel/ptrace.c +++ b/arch/frv/kernel/ptrace.c @@ -112,20 +112,12 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data) switch (request) { /* when I and D space are separate, these will need to be fixed. */ case PTRACE_PEEKTEXT: /* read word at location addr. */ - case PTRACE_PEEKDATA: { - int copied; - + case PTRACE_PEEKDATA: ret = -EIO; if (is_user_addr_valid(child, addr, sizeof(tmp)) < 0) break; - - copied = access_process_vm(child, addr, &tmp, sizeof(tmp), 0); - if (copied != sizeof(tmp)) - break; - - ret = put_user(tmp,(unsigned long *) data); + ret = generic_ptrace_peekdata(child, addr, data); break; - } /* read the word at location addr in the USER area. */ case PTRACE_PEEKUSR: { @@ -176,9 +168,7 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data) ret = -EIO; if (is_user_addr_valid(child, addr, sizeof(tmp)) < 0) break; - if (access_process_vm(child, addr, &data, sizeof(data), 1) != sizeof(data)) - break; - ret = 0; + ret = generic_ptrace_pokedata(child, addr, data); break; case PTRACE_POKEUSR: /* write the word at location addr in the USER area */ diff --git a/arch/frv/kernel/setup.c b/arch/frv/kernel/setup.c index aa3c795d535..a74c08786b2 100644 --- a/arch/frv/kernel/setup.c +++ b/arch/frv/kernel/setup.c @@ -29,6 +29,7 @@ #include <linux/serial.h> #include <linux/serial_core.h> #include <linux/serial_reg.h> +#include <linux/serial_8250.h> #include <asm/setup.h> #include <asm/irq.h> @@ -60,10 +61,6 @@ static void __init setup_linux_memory(void); static void __init setup_uclinux_memory(void); #endif -#ifdef CONFIG_CONSOLE -extern struct consw *conswitchp; -#endif - #ifdef CONFIG_MB93090_MB00 static char __initdata mb93090_banner[] = "FJ/RH FR-V Linux"; static char __initdata mb93090_version[] = UTS_RELEASE; @@ -795,13 +792,6 @@ void __init setup_arch(char **cmdline_p) #endif #endif -#if defined(CONFIG_CHR_DEV_FLASH) || defined(CONFIG_BLK_DEV_FLASH) - /* we need to initialize the Flashrom device here since we might - * do things with flash early on in the boot - */ - flash_probe(); -#endif - /* deal with the command line - RedBoot may have passed one to the kernel */ memcpy(command_line, boot_command_line, sizeof(command_line)); *cmdline_p = &command_line[0]; @@ -837,11 +827,6 @@ void __init setup_arch(char **cmdline_p) #endif #endif -#ifdef CONFIG_BLK_DEV_BLKMEM - ROOT_DEV = MKDEV(BLKMEM_MAJOR,0); -#endif - /*rom_length = (unsigned long)&_flashend - (unsigned long)&_romvec;*/ - #ifdef CONFIG_MMU setup_linux_memory(); #else diff --git a/arch/frv/kernel/vmlinux.lds.S b/arch/frv/kernel/vmlinux.lds.S index 481dc137464..3b71e0c8639 100644 --- a/arch/frv/kernel/vmlinux.lds.S +++ b/arch/frv/kernel/vmlinux.lds.S @@ -57,10 +57,7 @@ SECTIONS __alt_instructions_end = .; .altinstr_replacement : { *(.altinstr_replacement) } - . = ALIGN(4096); - __per_cpu_start = .; - .data.percpu : { *(.data.percpu) } - __per_cpu_end = .; + PERCPU(4096) #ifdef CONFIG_BLK_DEV_INITRD . = ALIGN(4096); diff --git a/arch/frv/mm/fault.c b/arch/frv/mm/fault.c index 3f12296c368..6798fa0257b 100644 --- a/arch/frv/mm/fault.c +++ b/arch/frv/mm/fault.c @@ -40,6 +40,7 @@ asmlinkage void do_page_fault(int datammu, unsigned long esr0, unsigned long ear pud_t *pue; pte_t *pte; int write; + int fault; #if 0 const char *atxc[16] = { @@ -162,18 +163,18 @@ asmlinkage void do_page_fault(int datammu, unsigned long esr0, unsigned long ear * make sure we exit gracefully rather than endlessly redo * the fault. */ - switch (handle_mm_fault(mm, vma, ear0, write)) { - case VM_FAULT_MINOR: - current->min_flt++; - break; - case VM_FAULT_MAJOR: - current->maj_flt++; - break; - case VM_FAULT_SIGBUS: - goto do_sigbus; - default: - goto out_of_memory; + fault = handle_mm_fault(mm, vma, ear0, write); + if (unlikely(fault & VM_FAULT_ERROR)) { + if (fault & VM_FAULT_OOM) + goto out_of_memory; + else if (fault & VM_FAULT_SIGBUS) + goto do_sigbus; + BUG(); } + if (fault & VM_FAULT_MAJOR) + current->maj_flt++; + else + current->min_flt++; up_read(&mm->mmap_sem); return; |