From 5d1938c83ca826891a02badef7c9ea8ed57e01a2 Mon Sep 17 00:00:00 2001 From: Haavard Skinnemoen Date: Sun, 13 May 2007 16:05:59 +0200 Subject: [AVR32] Remove bogus comment in arch/avr32/kernel/irq.c The comment at the top of arch/avr32/kernel/irq.c doesn't really make sense anymore since most of the actual interrupt handling code is elsewhere. Signed-off-by: Haavard Skinnemoen --- arch/avr32/kernel/irq.c | 9 --------- 1 file changed, 9 deletions(-) diff --git a/arch/avr32/kernel/irq.c b/arch/avr32/kernel/irq.c index fd311248c143..61f2de266f62 100644 --- a/arch/avr32/kernel/irq.c +++ b/arch/avr32/kernel/irq.c @@ -7,15 +7,6 @@ * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. - * - * This file contains the code used by various IRQ handling routines: - * asking for different IRQ's should be done through these routines - * instead of just grabbing them. Thus setups with different IRQ numbers - * shouldn't result in any weird surprises, and installing new handlers - * should be easier. - * - * IRQ's are in fact implemented a bit like signal handlers for the kernel. - * Naturally it's not a 1:1 relation, but there are similarities. */ #include -- cgit v1.2.3-55-g7522 From 9caebec7b8093574fca5a334a1939530872d75e3 Mon Sep 17 00:00:00 2001 From: Christoph Hellwig Date: Sat, 12 May 2007 17:56:11 +0200 Subject: [AVR32] optimize pagefault path Avoid the costly notifier list in the pagefault path and call the kprobes code directly. The same change went into the 2.6.22 cycle for powerpc, 2s390 and sparc64 already. Signed-off-by: Christoph Hellwig Signed-off-by: Haavard Skinnemoen --- arch/avr32/kernel/kprobes.c | 7 +------ arch/avr32/mm/fault.c | 36 ++++++++++++------------------------ include/asm-avr32/kdebug.h | 17 +++++++++++++---- include/asm-avr32/kprobes.h | 1 + 4 files changed, 27 insertions(+), 34 deletions(-) diff --git a/arch/avr32/kernel/kprobes.c b/arch/avr32/kernel/kprobes.c index 004c94b6fc1d..4942ee662e0b 100644 --- a/arch/avr32/kernel/kprobes.c +++ b/arch/avr32/kernel/kprobes.c @@ -179,7 +179,7 @@ static int __kprobes post_kprobe_handler(struct pt_regs *regs) return 1; } -static int __kprobes kprobe_fault_handler(struct pt_regs *regs, int trapnr) +int __kprobes kprobe_fault_handler(struct pt_regs *regs, int trapnr) { struct kprobe *cur = kprobe_running(); @@ -216,11 +216,6 @@ int __kprobes kprobe_exceptions_notify(struct notifier_block *self, if (post_kprobe_handler(args->regs)) ret = NOTIFY_STOP; break; - case DIE_FAULT: - if (kprobe_running() - && kprobe_fault_handler(args->regs, args->trapnr)) - ret = NOTIFY_STOP; - break; default: break; } diff --git a/arch/avr32/mm/fault.c b/arch/avr32/mm/fault.c index 88b00b15970f..e011f1ce1875 100644 --- a/arch/avr32/mm/fault.c +++ b/arch/avr32/mm/fault.c @@ -12,41 +12,30 @@ #include #include #include - #include +#include + #include #include #include #include #ifdef CONFIG_KPROBES -ATOMIC_NOTIFIER_HEAD(notify_page_fault_chain); - -/* Hook to register for page fault notifications */ -int register_page_fault_notifier(struct notifier_block *nb) +static inline int notify_page_fault(struct pt_regs *regs, int trap) { - return atomic_notifier_chain_register(¬ify_page_fault_chain, nb); -} + int ret = 0; -int unregister_page_fault_notifier(struct notifier_block *nb) -{ - return atomic_notifier_chain_unregister(¬ify_page_fault_chain, nb); -} + if (!user_mode(regs)) { + if (kprobe_running() && kprobe_fault_handler(regs, trap)) + ret = 1; + } -static inline int notify_page_fault(enum die_val val, struct pt_regs *regs, - int trap, int sig) -{ - struct die_args args = { - .regs = regs, - .trapnr = trap, - }; - return atomic_notifier_call_chain(¬ify_page_fault_chain, val, &args); + return ret; } #else -static inline int notify_page_fault(enum die_val val, struct pt_regs *regs, - int trap, int sig) +static inline int notify_page_fault(struct pt_regs *regs, int trap) { - return NOTIFY_DONE; + return 0; } #endif @@ -76,8 +65,7 @@ asmlinkage void do_page_fault(unsigned long ecr, struct pt_regs *regs) long signr; int code; - if (notify_page_fault(DIE_PAGE_FAULT, regs, - ecr, SIGSEGV) == NOTIFY_STOP) + if (notify_page_fault(regs, ecr)) return; address = sysreg_read(TLBEAR); diff --git a/include/asm-avr32/kdebug.h b/include/asm-avr32/kdebug.h index de419278fc39..7f54e2b15d13 100644 --- a/include/asm-avr32/kdebug.h +++ b/include/asm-avr32/kdebug.h @@ -5,13 +5,22 @@ /* Grossly misnamed. */ enum die_val { - DIE_FAULT, DIE_BREAKPOINT, DIE_SSTEP, - DIE_PAGE_FAULT, }; -int register_page_fault_notifier(struct notifier_block *nb); -int unregister_page_fault_notifier(struct notifier_block *nb); +/* + * These are only here because kprobes.c wants them to implement a + * blatant layering violation. Will hopefully go away soon once all + * architectures are updated. + */ +static inline int register_page_fault_notifier(struct notifier_block *nb) +{ + return 0; +} +static inline int unregister_page_fault_notifier(struct notifier_block *nb) +{ + return 0; +} #endif /* __ASM_AVR32_KDEBUG_H */ diff --git a/include/asm-avr32/kprobes.h b/include/asm-avr32/kprobes.h index 09a5cbe2f896..190a6377c809 100644 --- a/include/asm-avr32/kprobes.h +++ b/include/asm-avr32/kprobes.h @@ -26,6 +26,7 @@ struct arch_specific_insn { kprobe_opcode_t insn[MAX_INSN_SIZE]; }; +extern int kprobe_fault_handler(struct pt_regs *regs, int trapnr); extern int kprobe_exceptions_notify(struct notifier_block *self, unsigned long val, void *data); -- cgit v1.2.3-55-g7522 From 78c129b949bdee21dd996ac5f5cfc655cd5bd42e Mon Sep 17 00:00:00 2001 From: Haavard Skinnemoen Date: Sun, 13 May 2007 16:33:33 +0200 Subject: [AVR32] Wire up signalfd, timerfd and eventfd Signed-off-by: Haavard Skinnemoen --- arch/avr32/kernel/syscall_table.S | 3 +++ include/asm-avr32/unistd.h | 5 ++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/arch/avr32/kernel/syscall_table.S b/arch/avr32/kernel/syscall_table.S index 07f6a6fa340d..75c81f2dd0b3 100644 --- a/arch/avr32/kernel/syscall_table.S +++ b/arch/avr32/kernel/syscall_table.S @@ -292,4 +292,7 @@ sys_call_table: .long sys_shmdt .long sys_shmctl .long sys_utimensat + .long sys_signalfd + .long sys_timerfd /* 280 */ + .long sys_eventfd .long sys_ni_syscall /* r8 is saturated at nr_syscalls */ diff --git a/include/asm-avr32/unistd.h b/include/asm-avr32/unistd.h index 2418cce624cc..3b4e35b55c82 100644 --- a/include/asm-avr32/unistd.h +++ b/include/asm-avr32/unistd.h @@ -296,9 +296,12 @@ #define __NR_shmctl 277 #define __NR_utimensat 278 +#define __NR_signalfd 279 +#define __NR_timerfd 280 +#define __NR_eventfd 281 #ifdef __KERNEL__ -#define NR_syscalls 279 +#define NR_syscalls 282 #define __ARCH_WANT_IPC_PARSE_VERSION -- cgit v1.2.3-55-g7522 From d0a2b7af27f6d01a443f3af8252fa0b955bf1913 Mon Sep 17 00:00:00 2001 From: Haavard Skinnemoen Date: Wed, 21 Mar 2007 18:08:49 +0100 Subject: [AVR32] Implement platform hooks for atmel_lcdfb driver This modifies and extends the existing lcdc platform code to support the new atmel_lcdfb driver. The ATSTK1000 board code is set up to use the on-board Samsung LTV350QV LCD panel. Signed-off-by: Haavard Skinnemoen --- arch/avr32/boards/atstk1000/atstk1000.h | 15 +++++++ arch/avr32/boards/atstk1000/atstk1002.c | 10 ++--- arch/avr32/boards/atstk1000/setup.c | 45 ++++++++++++++++++- arch/avr32/mach-at32ap/at32ap7000.c | 77 +++++++++++++++++++++++++-------- include/asm-avr32/arch-at32ap/board.h | 8 ++-- 5 files changed, 127 insertions(+), 28 deletions(-) create mode 100644 arch/avr32/boards/atstk1000/atstk1000.h diff --git a/arch/avr32/boards/atstk1000/atstk1000.h b/arch/avr32/boards/atstk1000/atstk1000.h new file mode 100644 index 000000000000..9a49ed036b72 --- /dev/null +++ b/arch/avr32/boards/atstk1000/atstk1000.h @@ -0,0 +1,15 @@ +/* + * ATSTK1000 setup code: Daughterboard interface + * + * Copyright (C) 2007 Atmel Corporation + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ +#ifndef __ARCH_AVR32_BOARDS_ATSTK1000_ATSTK1000_H +#define __ARCH_AVR32_BOARDS_ATSTK1000_ATSTK1000_H + +extern struct atmel_lcdfb_info atstk1000_lcdc_data; + +#endif /* __ARCH_AVR32_BOARDS_ATSTK1000_ATSTK1000_H */ diff --git a/arch/avr32/boards/atstk1000/atstk1002.c b/arch/avr32/boards/atstk1000/atstk1002.c index abe6ca203fa7..fe1dbe2e28f4 100644 --- a/arch/avr32/boards/atstk1000/atstk1002.c +++ b/arch/avr32/boards/atstk1000/atstk1002.c @@ -16,6 +16,8 @@ #include #include +#include