diff options
Diffstat (limited to 'arch/microblaze')
-rw-r--r-- | arch/microblaze/Kconfig | 9 | ||||
-rw-r--r-- | arch/microblaze/include/asm/gpio.h | 57 | ||||
-rw-r--r-- | arch/microblaze/include/asm/kvm_para.h | 1 | ||||
-rw-r--r-- | arch/microblaze/include/asm/processor.h | 1 | ||||
-rw-r--r-- | arch/microblaze/kernel/Makefile | 2 | ||||
-rw-r--r-- | arch/microblaze/kernel/entry-nommu.S | 20 | ||||
-rw-r--r-- | arch/microblaze/kernel/entry.S | 30 | ||||
-rw-r--r-- | arch/microblaze/kernel/init_task.c | 26 | ||||
-rw-r--r-- | arch/microblaze/kernel/ptrace.c | 2 | ||||
-rw-r--r-- | arch/microblaze/kernel/signal.c | 85 | ||||
-rw-r--r-- | arch/microblaze/pci/pci-common.c | 1 |
11 files changed, 74 insertions, 160 deletions
diff --git a/arch/microblaze/Kconfig b/arch/microblaze/Kconfig index 333b85e80c07..0bf44231aaf9 100644 --- a/arch/microblaze/Kconfig +++ b/arch/microblaze/Kconfig | |||
@@ -22,6 +22,7 @@ config MICROBLAZE | |||
22 | select GENERIC_PCI_IOMAP | 22 | select GENERIC_PCI_IOMAP |
23 | select GENERIC_CPU_DEVICES | 23 | select GENERIC_CPU_DEVICES |
24 | select GENERIC_ATOMIC64 | 24 | select GENERIC_ATOMIC64 |
25 | select GENERIC_CLOCKEVENTS | ||
25 | 26 | ||
26 | config SWAP | 27 | config SWAP |
27 | def_bool n | 28 | def_bool n |
@@ -50,12 +51,6 @@ config GENERIC_HWEIGHT | |||
50 | config GENERIC_CALIBRATE_DELAY | 51 | config GENERIC_CALIBRATE_DELAY |
51 | def_bool y | 52 | def_bool y |
52 | 53 | ||
53 | config GENERIC_TIME_VSYSCALL | ||
54 | def_bool n | ||
55 | |||
56 | config GENERIC_CLOCKEVENTS | ||
57 | def_bool y | ||
58 | |||
59 | config GENERIC_GPIO | 54 | config GENERIC_GPIO |
60 | bool | 55 | bool |
61 | 56 | ||
@@ -79,8 +74,6 @@ source "arch/microblaze/platform/Kconfig.platform" | |||
79 | 74 | ||
80 | menu "Processor type and features" | 75 | menu "Processor type and features" |
81 | 76 | ||
82 | source "kernel/time/Kconfig" | ||
83 | |||
84 | source "kernel/Kconfig.preempt" | 77 | source "kernel/Kconfig.preempt" |
85 | 78 | ||
86 | source "kernel/Kconfig.hz" | 79 | source "kernel/Kconfig.hz" |
diff --git a/arch/microblaze/include/asm/gpio.h b/arch/microblaze/include/asm/gpio.h index 2b2c18be71c6..b3799d88ffcf 100644 --- a/arch/microblaze/include/asm/gpio.h +++ b/arch/microblaze/include/asm/gpio.h | |||
@@ -1,53 +1,4 @@ | |||
1 | /* | 1 | #ifndef __LINUX_GPIO_H |
2 | * Generic GPIO API implementation for PowerPC. | 2 | #warning Include linux/gpio.h instead of asm/gpio.h |
3 | * | 3 | #include <linux/gpio.h> |
4 | * Copyright (c) 2007-2008 MontaVista Software, Inc. | 4 | #endif |
5 | * | ||
6 | * Author: Anton Vorontsov <avorontsov@ru.mvista.com> | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify | ||
9 | * it under the terms of the GNU General Public License as published by | ||
10 | * the Free Software Foundation; either version 2 of the License, or | ||
11 | * (at your option) any later version. | ||
12 | */ | ||
13 | |||
14 | #ifndef _ASM_MICROBLAZE_GPIO_H | ||
15 | #define _ASM_MICROBLAZE_GPIO_H | ||
16 | |||
17 | #include <linux/errno.h> | ||
18 | #include <asm-generic/gpio.h> | ||
19 | |||
20 | #ifdef CONFIG_GPIOLIB | ||
21 | |||
22 | /* | ||
23 | * We don't (yet) implement inlined/rapid versions for on-chip gpios. | ||
24 | * Just call gpiolib. | ||
25 | */ | ||
26 | static inline int gpio_get_value(unsigned int gpio) | ||
27 | { | ||
28 | return __gpio_get_value(gpio); | ||
29 | } | ||
30 | |||
31 | static inline void gpio_set_value(unsigned int gpio, int value) | ||
32 | { | ||
33 | __gpio_set_value(gpio, value); | ||
34 | } | ||
35 | |||
36 | static inline int gpio_cansleep(unsigned int gpio) | ||
37 | { | ||
38 | return __gpio_cansleep(gpio); | ||
39 | } | ||
40 | |||
41 | static inline int gpio_to_irq(unsigned int gpio) | ||
42 | { | ||
43 | return __gpio_to_irq(gpio); | ||
44 | } | ||
45 | |||
46 | static inline int irq_to_gpio(unsigned int irq) | ||
47 | { | ||
48 | return -EINVAL; | ||
49 | } | ||
50 | |||
51 | #endif /* CONFIG_GPIOLIB */ | ||
52 | |||
53 | #endif /* _ASM_MICROBLAZE_GPIO_H */ | ||
diff --git a/arch/microblaze/include/asm/kvm_para.h b/arch/microblaze/include/asm/kvm_para.h new file mode 100644 index 000000000000..14fab8f0b957 --- /dev/null +++ b/arch/microblaze/include/asm/kvm_para.h | |||
@@ -0,0 +1 @@ | |||
#include <asm-generic/kvm_para.h> | |||
diff --git a/arch/microblaze/include/asm/processor.h b/arch/microblaze/include/asm/processor.h index bffb54527299..af2bb9652392 100644 --- a/arch/microblaze/include/asm/processor.h +++ b/arch/microblaze/include/asm/processor.h | |||
@@ -23,7 +23,6 @@ extern const struct seq_operations cpuinfo_op; | |||
23 | 23 | ||
24 | # define cpu_relax() barrier() | 24 | # define cpu_relax() barrier() |
25 | # define cpu_sleep() do {} while (0) | 25 | # define cpu_sleep() do {} while (0) |
26 | # define prepare_to_copy(tsk) do {} while (0) | ||
27 | 26 | ||
28 | #define task_pt_regs(tsk) \ | 27 | #define task_pt_regs(tsk) \ |
29 | (((struct pt_regs *)(THREAD_SIZE + task_stack_page(tsk))) - 1) | 28 | (((struct pt_regs *)(THREAD_SIZE + task_stack_page(tsk))) - 1) |
diff --git a/arch/microblaze/kernel/Makefile b/arch/microblaze/kernel/Makefile index 494b63b72dd7..928c950fc14c 100644 --- a/arch/microblaze/kernel/Makefile +++ b/arch/microblaze/kernel/Makefile | |||
@@ -16,7 +16,7 @@ endif | |||
16 | extra-y := head.o vmlinux.lds | 16 | extra-y := head.o vmlinux.lds |
17 | 17 | ||
18 | obj-y += dma.o exceptions.o \ | 18 | obj-y += dma.o exceptions.o \ |
19 | hw_exception_handler.o init_task.o intc.o irq.o \ | 19 | hw_exception_handler.o intc.o irq.o \ |
20 | process.o prom.o prom_parse.o ptrace.o \ | 20 | process.o prom.o prom_parse.o ptrace.o \ |
21 | reset.o setup.o signal.o sys_microblaze.o timer.o traps.o unwind.o | 21 | reset.o setup.o signal.o sys_microblaze.o timer.o traps.o unwind.o |
22 | 22 | ||
diff --git a/arch/microblaze/kernel/entry-nommu.S b/arch/microblaze/kernel/entry-nommu.S index 34b526f59b43..75c3ea1f48a1 100644 --- a/arch/microblaze/kernel/entry-nommu.S +++ b/arch/microblaze/kernel/entry-nommu.S | |||
@@ -132,11 +132,10 @@ ret_from_intr: | |||
132 | beqi r11, 1f | 132 | beqi r11, 1f |
133 | bralid r15, schedule | 133 | bralid r15, schedule |
134 | nop | 134 | nop |
135 | 1: andi r11, r19, _TIF_SIGPENDING | 135 | 1: andi r11, r19, _TIF_SIGPENDING | _TIF_NOTIFY_RESUME |
136 | beqid r11, no_intr_resched | 136 | beqid r11, no_intr_resched |
137 | addk r5, r1, r0 | 137 | addk r5, r1, r0 |
138 | addk r7, r0, r0 | 138 | bralid r15, do_notify_resume |
139 | bralid r15, do_signal | ||
140 | addk r6, r0, r0 | 139 | addk r6, r0, r0 |
141 | 140 | ||
142 | no_intr_resched: | 141 | no_intr_resched: |
@@ -292,8 +291,8 @@ ENTRY(_user_exception) | |||
292 | 291 | ||
293 | /* | 292 | /* |
294 | * Debug traps are like a system call, but entered via brki r14, 0x60 | 293 | * Debug traps are like a system call, but entered via brki r14, 0x60 |
295 | * All we need to do is send the SIGTRAP signal to current, ptrace and do_signal | 294 | * All we need to do is send the SIGTRAP signal to current, ptrace and |
296 | * will handle the rest | 295 | * do_notify_resume will handle the rest |
297 | */ | 296 | */ |
298 | ENTRY(_debug_exception) | 297 | ENTRY(_debug_exception) |
299 | swi r1, r0, PER_CPU(ENTRY_SP) /* save the current sp */ | 298 | swi r1, r0, PER_CPU(ENTRY_SP) /* save the current sp */ |
@@ -482,12 +481,11 @@ work_pending: | |||
482 | beqi r11, 1f | 481 | beqi r11, 1f |
483 | bralid r15, schedule | 482 | bralid r15, schedule |
484 | nop | 483 | nop |
485 | 1: andi r11, r19, _TIF_SIGPENDING | 484 | 1: andi r11, r19, _TIF_SIGPENDING | _TIF_NOTIFY_RESUME |
486 | beqi r11, no_work_pending | 485 | beqi r11, no_work_pending |
487 | addk r5, r1, r0 | 486 | addk r5, r1, r0 |
488 | addik r7, r0, 1 | 487 | bralid r15, do_notify_resume |
489 | bralid r15, do_signal | 488 | addik r6, r0, 1 |
490 | addk r6, r0, r0 | ||
491 | bri no_work_pending | 489 | bri no_work_pending |
492 | 490 | ||
493 | ENTRY(ret_to_user) | 491 | ENTRY(ret_to_user) |
@@ -569,10 +567,6 @@ sys_rt_sigreturn_wrapper: | |||
569 | brid sys_rt_sigreturn | 567 | brid sys_rt_sigreturn |
570 | addk r5, r1, r0 | 568 | addk r5, r1, r0 |
571 | 569 | ||
572 | sys_rt_sigsuspend_wrapper: | ||
573 | brid sys_rt_sigsuspend | ||
574 | addk r7, r1, r0 | ||
575 | |||
576 | /* Interrupt vector table */ | 570 | /* Interrupt vector table */ |
577 | .section .init.ivt, "ax" | 571 | .section .init.ivt, "ax" |
578 | .org 0x0 | 572 | .org 0x0 |
diff --git a/arch/microblaze/kernel/entry.S b/arch/microblaze/kernel/entry.S index 288678c5fea6..03f7b8ce6b6b 100644 --- a/arch/microblaze/kernel/entry.S +++ b/arch/microblaze/kernel/entry.S | |||
@@ -430,13 +430,12 @@ C_ENTRY(ret_from_trap): | |||
430 | 5: /* get thread info from current task*/ | 430 | 5: /* get thread info from current task*/ |
431 | lwi r11, CURRENT_TASK, TS_THREAD_INFO; | 431 | lwi r11, CURRENT_TASK, TS_THREAD_INFO; |
432 | lwi r11, r11, TI_FLAGS; /* get flags in thread info */ | 432 | lwi r11, r11, TI_FLAGS; /* get flags in thread info */ |
433 | andi r11, r11, _TIF_SIGPENDING; | 433 | andi r11, r11, _TIF_SIGPENDING | _TIF_NOTIFY_RESUME; |
434 | beqi r11, 1f; /* Signals to handle, handle them */ | 434 | beqi r11, 1f; /* Signals to handle, handle them */ |
435 | 435 | ||
436 | addik r5, r1, 0; /* Arg 1: struct pt_regs *regs */ | 436 | addik r5, r1, 0; /* Arg 1: struct pt_regs *regs */ |
437 | addi r7, r0, 1; /* Arg 3: int in_syscall */ | 437 | bralid r15, do_notify_resume; /* Handle any signals */ |
438 | bralid r15, do_signal; /* Handle any signals */ | 438 | addi r6, r0, 1; /* Arg 2: int in_syscall */ |
439 | add r6, r0, r0; /* Arg 2: sigset_t *oldset */ | ||
440 | 439 | ||
441 | /* Finally, return to user state. */ | 440 | /* Finally, return to user state. */ |
442 | 1: set_bip; /* Ints masked for state restore */ | 441 | 1: set_bip; /* Ints masked for state restore */ |
@@ -623,7 +622,7 @@ C_ENTRY(ret_from_exc): | |||
623 | /* Maybe handle a signal */ | 622 | /* Maybe handle a signal */ |
624 | 5: lwi r11, CURRENT_TASK, TS_THREAD_INFO; /* get thread info */ | 623 | 5: lwi r11, CURRENT_TASK, TS_THREAD_INFO; /* get thread info */ |
625 | lwi r11, r11, TI_FLAGS; /* get flags in thread info */ | 624 | lwi r11, r11, TI_FLAGS; /* get flags in thread info */ |
626 | andi r11, r11, _TIF_SIGPENDING; | 625 | andi r11, r11, _TIF_SIGPENDING | _TIF_NOTIFY_RESUME; |
627 | beqi r11, 1f; /* Signals to handle, handle them */ | 626 | beqi r11, 1f; /* Signals to handle, handle them */ |
628 | 627 | ||
629 | /* | 628 | /* |
@@ -636,11 +635,10 @@ C_ENTRY(ret_from_exc): | |||
636 | * traps), but signal handlers may want to examine or change the | 635 | * traps), but signal handlers may want to examine or change the |
637 | * complete register state. Here we save anything not saved by | 636 | * complete register state. Here we save anything not saved by |
638 | * the normal entry sequence, so that it may be safely restored | 637 | * the normal entry sequence, so that it may be safely restored |
639 | * (in a possibly modified form) after do_signal returns. */ | 638 | * (in a possibly modified form) after do_notify_resume returns. */ |
640 | addik r5, r1, 0; /* Arg 1: struct pt_regs *regs */ | 639 | addik r5, r1, 0; /* Arg 1: struct pt_regs *regs */ |
641 | addi r7, r0, 0; /* Arg 3: int in_syscall */ | 640 | bralid r15, do_notify_resume; /* Handle any signals */ |
642 | bralid r15, do_signal; /* Handle any signals */ | 641 | addi r6, r0, 0; /* Arg 2: int in_syscall */ |
643 | add r6, r0, r0; /* Arg 2: sigset_t *oldset */ | ||
644 | 642 | ||
645 | /* Finally, return to user state. */ | 643 | /* Finally, return to user state. */ |
646 | 1: set_bip; /* Ints masked for state restore */ | 644 | 1: set_bip; /* Ints masked for state restore */ |
@@ -733,13 +731,12 @@ ret_from_irq: | |||
733 | /* Maybe handle a signal */ | 731 | /* Maybe handle a signal */ |
734 | 5: lwi r11, CURRENT_TASK, TS_THREAD_INFO; /* MS: get thread info */ | 732 | 5: lwi r11, CURRENT_TASK, TS_THREAD_INFO; /* MS: get thread info */ |
735 | lwi r11, r11, TI_FLAGS; /* get flags in thread info */ | 733 | lwi r11, r11, TI_FLAGS; /* get flags in thread info */ |
736 | andi r11, r11, _TIF_SIGPENDING; | 734 | andi r11, r11, _TIF_SIGPENDING | _TIF_NOTIFY_RESUME; |
737 | beqid r11, no_intr_resched | 735 | beqid r11, no_intr_resched |
738 | /* Handle a signal return; Pending signals should be in r18. */ | 736 | /* Handle a signal return; Pending signals should be in r18. */ |
739 | addi r7, r0, 0; /* Arg 3: int in_syscall */ | ||
740 | addik r5, r1, 0; /* Arg 1: struct pt_regs *regs */ | 737 | addik r5, r1, 0; /* Arg 1: struct pt_regs *regs */ |
741 | bralid r15, do_signal; /* Handle any signals */ | 738 | bralid r15, do_notify_resume; /* Handle any signals */ |
742 | add r6, r0, r0; /* Arg 2: sigset_t *oldset */ | 739 | addi r6, r0, 0; /* Arg 2: int in_syscall */ |
743 | 740 | ||
744 | /* Finally, return to user state. */ | 741 | /* Finally, return to user state. */ |
745 | no_intr_resched: | 742 | no_intr_resched: |
@@ -870,13 +867,12 @@ dbtrap_call: /* Return point for kernel/user entry + 8 because of rtsd r15, 8 */ | |||
870 | /* Maybe handle a signal */ | 867 | /* Maybe handle a signal */ |
871 | 5: lwi r11, CURRENT_TASK, TS_THREAD_INFO; /* get thread info */ | 868 | 5: lwi r11, CURRENT_TASK, TS_THREAD_INFO; /* get thread info */ |
872 | lwi r11, r11, TI_FLAGS; /* get flags in thread info */ | 869 | lwi r11, r11, TI_FLAGS; /* get flags in thread info */ |
873 | andi r11, r11, _TIF_SIGPENDING; | 870 | andi r11, r11, _TIF_SIGPENDING | _TIF_NOTIFY_RESUME; |
874 | beqi r11, 1f; /* Signals to handle, handle them */ | 871 | beqi r11, 1f; /* Signals to handle, handle them */ |
875 | 872 | ||
876 | addik r5, r1, 0; /* Arg 1: struct pt_regs *regs */ | 873 | addik r5, r1, 0; /* Arg 1: struct pt_regs *regs */ |
877 | addi r7, r0, 0; /* Arg 3: int in_syscall */ | 874 | bralid r15, do_notify_resume; /* Handle any signals */ |
878 | bralid r15, do_signal; /* Handle any signals */ | 875 | addi r6, r0, 0; /* Arg 2: int in_syscall */ |
879 | add r6, r0, r0; /* Arg 2: sigset_t *oldset */ | ||
880 | 876 | ||
881 | /* Finally, return to user state. */ | 877 | /* Finally, return to user state. */ |
882 | 1: swi CURRENT_TASK, r0, PER_CPU(CURRENT_SAVE); /* save current */ | 878 | 1: swi CURRENT_TASK, r0, PER_CPU(CURRENT_SAVE); /* save current */ |
diff --git a/arch/microblaze/kernel/init_task.c b/arch/microblaze/kernel/init_task.c deleted file mode 100644 index b5d711f94ff8..000000000000 --- a/arch/microblaze/kernel/init_task.c +++ /dev/null | |||
@@ -1,26 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2009 Michal Simek <monstr@monstr.eu> | ||
3 | * Copyright (C) 2009 PetaLogix | ||
4 | * Copyright (C) 2006 Atmark Techno, Inc. | ||
5 | * | ||
6 | * This file is subject to the terms and conditions of the GNU General Public | ||
7 | * License. See the file "COPYING" in the main directory of this archive | ||
8 | * for more details. | ||
9 | */ | ||
10 | |||
11 | #include <linux/module.h> | ||
12 | #include <linux/sched.h> | ||
13 | #include <linux/init_task.h> | ||
14 | #include <linux/fs.h> | ||
15 | #include <linux/mqueue.h> | ||
16 | |||
17 | #include <asm/pgtable.h> | ||
18 | |||
19 | static struct signal_struct init_signals = INIT_SIGNALS(init_signals); | ||
20 | static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand); | ||
21 | |||
22 | union thread_union init_thread_union __init_task_data = | ||
23 | { INIT_THREAD_INFO(init_task) }; | ||
24 | |||
25 | struct task_struct init_task = INIT_TASK(init_task); | ||
26 | EXPORT_SYMBOL(init_task); | ||
diff --git a/arch/microblaze/kernel/ptrace.c b/arch/microblaze/kernel/ptrace.c index 6eb2aa927d89..ab1b9db661f3 100644 --- a/arch/microblaze/kernel/ptrace.c +++ b/arch/microblaze/kernel/ptrace.c | |||
@@ -136,7 +136,7 @@ asmlinkage long do_syscall_trace_enter(struct pt_regs *regs) | |||
136 | { | 136 | { |
137 | long ret = 0; | 137 | long ret = 0; |
138 | 138 | ||
139 | secure_computing(regs->r12); | 139 | secure_computing_strict(regs->r12); |
140 | 140 | ||
141 | if (test_thread_flag(TIF_SYSCALL_TRACE) && | 141 | if (test_thread_flag(TIF_SYSCALL_TRACE) && |
142 | tracehook_report_syscall_entry(regs)) | 142 | tracehook_report_syscall_entry(regs)) |
diff --git a/arch/microblaze/kernel/signal.c b/arch/microblaze/kernel/signal.c index 599671168980..7f4c7bef1642 100644 --- a/arch/microblaze/kernel/signal.c +++ b/arch/microblaze/kernel/signal.c | |||
@@ -31,6 +31,7 @@ | |||
31 | #include <linux/personality.h> | 31 | #include <linux/personality.h> |
32 | #include <linux/percpu.h> | 32 | #include <linux/percpu.h> |
33 | #include <linux/linkage.h> | 33 | #include <linux/linkage.h> |
34 | #include <linux/tracehook.h> | ||
34 | #include <asm/entry.h> | 35 | #include <asm/entry.h> |
35 | #include <asm/ucontext.h> | 36 | #include <asm/ucontext.h> |
36 | #include <linux/uaccess.h> | 37 | #include <linux/uaccess.h> |
@@ -42,8 +43,6 @@ | |||
42 | 43 | ||
43 | #define _BLOCKABLE (~(sigmask(SIGKILL) | sigmask(SIGSTOP))) | 44 | #define _BLOCKABLE (~(sigmask(SIGKILL) | sigmask(SIGSTOP))) |
44 | 45 | ||
45 | asmlinkage int do_signal(struct pt_regs *regs, sigset_t *oldset, int in_sycall); | ||
46 | |||
47 | asmlinkage long | 46 | asmlinkage long |
48 | sys_sigaltstack(const stack_t __user *uss, stack_t __user *uoss, | 47 | sys_sigaltstack(const stack_t __user *uss, stack_t __user *uoss, |
49 | struct pt_regs *regs) | 48 | struct pt_regs *regs) |
@@ -98,6 +97,9 @@ asmlinkage long sys_rt_sigreturn(struct pt_regs *regs) | |||
98 | sigset_t set; | 97 | sigset_t set; |
99 | int rval; | 98 | int rval; |
100 | 99 | ||
100 | /* Always make any pending restarted system calls return -EINTR */ | ||
101 | current_thread_info()->restart_block.fn = do_no_restart_syscall; | ||
102 | |||
101 | if (!access_ok(VERIFY_READ, frame, sizeof(*frame))) | 103 | if (!access_ok(VERIFY_READ, frame, sizeof(*frame))) |
102 | goto badframe; | 104 | goto badframe; |
103 | 105 | ||
@@ -105,10 +107,7 @@ asmlinkage long sys_rt_sigreturn(struct pt_regs *regs) | |||
105 | goto badframe; | 107 | goto badframe; |
106 | 108 | ||
107 | sigdelsetmask(&set, ~_BLOCKABLE); | 109 | sigdelsetmask(&set, ~_BLOCKABLE); |
108 | spin_lock_irq(¤t->sighand->siglock); | 110 | set_current_blocked(&set); |
109 | current->blocked = set; | ||
110 | recalc_sigpending(); | ||
111 | spin_unlock_irq(¤t->sighand->siglock); | ||
112 | 111 | ||
113 | if (restore_sigcontext(regs, &frame->uc.uc_mcontext, &rval)) | 112 | if (restore_sigcontext(regs, &frame->uc.uc_mcontext, &rval)) |
114 | goto badframe; | 113 | goto badframe; |
@@ -169,7 +168,7 @@ get_sigframe(struct k_sigaction *ka, struct pt_regs *regs, size_t frame_size) | |||
169 | return (void __user *)((sp - frame_size) & -8UL); | 168 | return (void __user *)((sp - frame_size) & -8UL); |
170 | } | 169 | } |
171 | 170 | ||
172 | static void setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info, | 171 | static int setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info, |
173 | sigset_t *set, struct pt_regs *regs) | 172 | sigset_t *set, struct pt_regs *regs) |
174 | { | 173 | { |
175 | struct rt_sigframe __user *frame; | 174 | struct rt_sigframe __user *frame; |
@@ -267,12 +266,11 @@ static void setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info, | |||
267 | current->comm, current->pid, frame, regs->pc); | 266 | current->comm, current->pid, frame, regs->pc); |
268 | #endif | 267 | #endif |
269 | 268 | ||
270 | return; | 269 | return 0; |
271 | 270 | ||
272 | give_sigsegv: | 271 | give_sigsegv: |
273 | if (sig == SIGSEGV) | 272 | force_sigsegv(sig, current); |
274 | ka->sa.sa_handler = SIG_DFL; | 273 | return -EFAULT; |
275 | force_sig(SIGSEGV, current); | ||
276 | } | 274 | } |
277 | 275 | ||
278 | /* Handle restarting system calls */ | 276 | /* Handle restarting system calls */ |
@@ -316,24 +314,20 @@ static int | |||
316 | handle_signal(unsigned long sig, struct k_sigaction *ka, | 314 | handle_signal(unsigned long sig, struct k_sigaction *ka, |
317 | siginfo_t *info, sigset_t *oldset, struct pt_regs *regs) | 315 | siginfo_t *info, sigset_t *oldset, struct pt_regs *regs) |
318 | { | 316 | { |
317 | int ret; | ||
318 | |||
319 | /* Set up the stack frame */ | 319 | /* Set up the stack frame */ |
320 | if (ka->sa.sa_flags & SA_SIGINFO) | 320 | if (ka->sa.sa_flags & SA_SIGINFO) |
321 | setup_rt_frame(sig, ka, info, oldset, regs); | 321 | ret = setup_rt_frame(sig, ka, info, oldset, regs); |
322 | else | 322 | else |
323 | setup_rt_frame(sig, ka, NULL, oldset, regs); | 323 | ret = setup_rt_frame(sig, ka, NULL, oldset, regs); |
324 | 324 | ||
325 | if (ka->sa.sa_flags & SA_ONESHOT) | 325 | if (ret) |
326 | ka->sa.sa_handler = SIG_DFL; | 326 | return ret; |
327 | 327 | ||
328 | if (!(ka->sa.sa_flags & SA_NODEFER)) { | 328 | block_sigmask(ka, sig); |
329 | spin_lock_irq(¤t->sighand->siglock); | 329 | |
330 | sigorsets(¤t->blocked, | 330 | return 0; |
331 | ¤t->blocked, &ka->sa.sa_mask); | ||
332 | sigaddset(¤t->blocked, sig); | ||
333 | recalc_sigpending(); | ||
334 | spin_unlock_irq(¤t->sighand->siglock); | ||
335 | } | ||
336 | return 1; | ||
337 | } | 331 | } |
338 | 332 | ||
339 | /* | 333 | /* |
@@ -345,24 +339,17 @@ handle_signal(unsigned long sig, struct k_sigaction *ka, | |||
345 | * the kernel can handle, and then we build all the user-level signal handling | 339 | * the kernel can handle, and then we build all the user-level signal handling |
346 | * stack-frames in one go after that. | 340 | * stack-frames in one go after that. |
347 | */ | 341 | */ |
348 | int do_signal(struct pt_regs *regs, sigset_t *oldset, int in_syscall) | 342 | static void do_signal(struct pt_regs *regs, int in_syscall) |
349 | { | 343 | { |
350 | siginfo_t info; | 344 | siginfo_t info; |
351 | int signr; | 345 | int signr; |
352 | struct k_sigaction ka; | 346 | struct k_sigaction ka; |
347 | sigset_t *oldset; | ||
353 | #ifdef DEBUG_SIG | 348 | #ifdef DEBUG_SIG |
354 | printk(KERN_INFO "do signal: %p %p %d\n", regs, oldset, in_syscall); | 349 | printk(KERN_INFO "do signal: %p %d\n", regs, in_syscall); |
355 | printk(KERN_INFO "do signal2: %lx %lx %ld [%lx]\n", regs->pc, regs->r1, | 350 | printk(KERN_INFO "do signal2: %lx %lx %ld [%lx]\n", regs->pc, regs->r1, |
356 | regs->r12, current_thread_info()->flags); | 351 | regs->r12, current_thread_info()->flags); |
357 | #endif | 352 | #endif |
358 | /* | ||
359 | * We want the common case to go fast, which | ||
360 | * is why we may in certain cases get here from | ||
361 | * kernel mode. Just return without doing anything | ||
362 | * if so. | ||
363 | */ | ||
364 | if (kernel_mode(regs)) | ||
365 | return 1; | ||
366 | 353 | ||
367 | if (current_thread_info()->status & TS_RESTORE_SIGMASK) | 354 | if (current_thread_info()->status & TS_RESTORE_SIGMASK) |
368 | oldset = ¤t->saved_sigmask; | 355 | oldset = ¤t->saved_sigmask; |
@@ -374,7 +361,7 @@ int do_signal(struct pt_regs *regs, sigset_t *oldset, int in_syscall) | |||
374 | /* Whee! Actually deliver the signal. */ | 361 | /* Whee! Actually deliver the signal. */ |
375 | if (in_syscall) | 362 | if (in_syscall) |
376 | handle_restart(regs, &ka, 1); | 363 | handle_restart(regs, &ka, 1); |
377 | if (handle_signal(signr, &ka, &info, oldset, regs)) { | 364 | if (!handle_signal(signr, &ka, &info, oldset, regs)) { |
378 | /* | 365 | /* |
379 | * A signal was successfully delivered; the saved | 366 | * A signal was successfully delivered; the saved |
380 | * sigmask will have been stored in the signal frame, | 367 | * sigmask will have been stored in the signal frame, |
@@ -384,7 +371,7 @@ int do_signal(struct pt_regs *regs, sigset_t *oldset, int in_syscall) | |||
384 | current_thread_info()->status &= | 371 | current_thread_info()->status &= |
385 | ~TS_RESTORE_SIGMASK; | 372 | ~TS_RESTORE_SIGMASK; |
386 | } | 373 | } |
387 | return 1; | 374 | return; |
388 | } | 375 | } |
389 | 376 | ||
390 | if (in_syscall) | 377 | if (in_syscall) |
@@ -398,7 +385,25 @@ int do_signal(struct pt_regs *regs, sigset_t *oldset, int in_syscall) | |||
398 | current_thread_info()->status &= ~TS_RESTORE_SIGMASK; | 385 | current_thread_info()->status &= ~TS_RESTORE_SIGMASK; |
399 | sigprocmask(SIG_SETMASK, ¤t->saved_sigmask, NULL); | 386 | sigprocmask(SIG_SETMASK, ¤t->saved_sigmask, NULL); |
400 | } | 387 | } |
388 | } | ||
401 | 389 | ||
402 | /* Did we come from a system call? */ | 390 | void do_notify_resume(struct pt_regs *regs, int in_syscall) |
403 | return 0; | 391 | { |
392 | /* | ||
393 | * We want the common case to go fast, which | ||
394 | * is why we may in certain cases get here from | ||
395 | * kernel mode. Just return without doing anything | ||
396 | * if so. | ||
397 | */ | ||
398 | if (kernel_mode(regs)) | ||
399 | return; | ||
400 | |||
401 | if (test_thread_flag(TIF_SIGPENDING)) | ||
402 | do_signal(regs, in_syscall); | ||
403 | |||
404 | if (test_and_clear_thread_flag(TIF_NOTIFY_RESUME)) { | ||
405 | tracehook_notify_resume(regs); | ||
406 | if (current->replacement_session_keyring) | ||
407 | key_replace_session_keyring(); | ||
408 | } | ||
404 | } | 409 | } |
diff --git a/arch/microblaze/pci/pci-common.c b/arch/microblaze/pci/pci-common.c index d10403dadd2b..ed22bfc5db14 100644 --- a/arch/microblaze/pci/pci-common.c +++ b/arch/microblaze/pci/pci-common.c | |||
@@ -1422,6 +1422,7 @@ int pcibios_enable_device(struct pci_dev *dev, int mask) | |||
1422 | 1422 | ||
1423 | static void __devinit pcibios_setup_phb_resources(struct pci_controller *hose, struct list_head *resources) | 1423 | static void __devinit pcibios_setup_phb_resources(struct pci_controller *hose, struct list_head *resources) |
1424 | { | 1424 | { |
1425 | unsigned long io_offset; | ||
1425 | struct resource *res; | 1426 | struct resource *res; |
1426 | int i; | 1427 | int i; |
1427 | 1428 | ||