diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-03-23 20:24:25 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-03-23 20:24:25 -0400 |
commit | bab2d8c6020e1d7521cb6c4939f72b061ce947bc (patch) | |
tree | 6854225ef6027c933bfc7647c55d28c4ad930f20 /arch/openrisc/include | |
parent | 0e65ae099ca6a70a7a521e0358c57d43ec95dce5 (diff) | |
parent | fa8d9d74c360726fe743b08af00ee3d0e0eb8bc1 (diff) |
Merge tag 'for-3.4' of git://openrisc.net/jonas/linux
Pull OpenRISC changes for 3.4 from Jonas Bonn:
"This series for the OpenRISC architecture consists of mostly trivial
fixups. The most interesting bits of the series are:
* A fix to the timer code whereby the shortest trigger period is set
to 100 cycles; previously, it was possible to set this to 1 cycle,
but by the time the register was written, that time had already
passed and the timer interrupt would not go off until the cycle
counter had gone a full cycle.
* Allowing a device tree binary to be passed in to the kernel from
u-boot. The OpenRISC architecture has been recently merged into
upstream u-boot, so this change gets OpenRISC Linux into sync with
that project."
* tag 'for-3.4' of git://openrisc.net/jonas/linux:
OpenRISC: Remove memory_start/end prototypes
openrisc: remove semicolon from KSTK_ defs
openrisc: sanitize use of orig_gpr11
openrisc: fix virt_addr_valid
OpenRISC: Export dump_stack()
OpenRISC: Select GENERIC_ATOMIC64
openrisc: Set shortest clock event to 100 ticks
openrisc: included linux/thread_info.h twice
OpenRISC: Use set_current_blocked() and block_sigmask()
OpenRISC: Don't mask signals if we fail to setup signal stack
OpenRISC: No need to reset handler if SA_ONESHOT
OpenRISC: Don't reimplement force_sigsegv()
openrisc: enable passing of flattened device tree pointer
arch/openrisc/mm/init.c: trivial: use BUG_ON
Diffstat (limited to 'arch/openrisc/include')
-rw-r--r-- | arch/openrisc/include/asm/page.h | 6 | ||||
-rw-r--r-- | arch/openrisc/include/asm/processor.h | 4 | ||||
-rw-r--r-- | arch/openrisc/include/asm/ptrace.h | 6 | ||||
-rw-r--r-- | arch/openrisc/include/asm/syscall.h | 7 | ||||
-rw-r--r-- | arch/openrisc/include/asm/uaccess.h | 1 |
5 files changed, 10 insertions, 14 deletions
diff --git a/arch/openrisc/include/asm/page.h b/arch/openrisc/include/asm/page.h index b041b344b229..108906f991d6 100644 --- a/arch/openrisc/include/asm/page.h +++ b/arch/openrisc/include/asm/page.h | |||
@@ -71,9 +71,6 @@ typedef struct page *pgtable_t; | |||
71 | #define __pgd(x) ((pgd_t) { (x) }) | 71 | #define __pgd(x) ((pgd_t) { (x) }) |
72 | #define __pgprot(x) ((pgprot_t) { (x) }) | 72 | #define __pgprot(x) ((pgprot_t) { (x) }) |
73 | 73 | ||
74 | extern unsigned long memory_start; | ||
75 | extern unsigned long memory_end; | ||
76 | |||
77 | #endif /* !__ASSEMBLY__ */ | 74 | #endif /* !__ASSEMBLY__ */ |
78 | 75 | ||
79 | 76 | ||
@@ -94,8 +91,7 @@ extern unsigned long memory_end; | |||
94 | 91 | ||
95 | #define pfn_valid(pfn) ((pfn) < max_mapnr) | 92 | #define pfn_valid(pfn) ((pfn) < max_mapnr) |
96 | 93 | ||
97 | #define virt_addr_valid(kaddr) (((void *)(kaddr) >= (void *)PAGE_OFFSET) && \ | 94 | #define virt_addr_valid(kaddr) (pfn_valid(virt_to_pfn(kaddr))) |
98 | ((void *)(kaddr) < (void *)memory_end)) | ||
99 | 95 | ||
100 | #endif /* __ASSEMBLY__ */ | 96 | #endif /* __ASSEMBLY__ */ |
101 | 97 | ||
diff --git a/arch/openrisc/include/asm/processor.h b/arch/openrisc/include/asm/processor.h index bb54c97b9783..f7516fa78b58 100644 --- a/arch/openrisc/include/asm/processor.h +++ b/arch/openrisc/include/asm/processor.h | |||
@@ -81,8 +81,8 @@ extern inline void prepare_to_copy(struct task_struct *tsk) | |||
81 | #define INIT_THREAD { } | 81 | #define INIT_THREAD { } |
82 | 82 | ||
83 | 83 | ||
84 | #define KSTK_EIP(tsk) (task_pt_regs(tsk)->pc); | 84 | #define KSTK_EIP(tsk) (task_pt_regs(tsk)->pc) |
85 | #define KSTK_ESP(tsk) (task_pt_regs(tsk)->sp); | 85 | #define KSTK_ESP(tsk) (task_pt_regs(tsk)->sp) |
86 | 86 | ||
87 | 87 | ||
88 | extern int kernel_thread(int (*fn)(void *), void * arg, unsigned long flags); | 88 | extern int kernel_thread(int (*fn)(void *), void * arg, unsigned long flags); |
diff --git a/arch/openrisc/include/asm/ptrace.h b/arch/openrisc/include/asm/ptrace.h index e612ce4512c7..4651a737591d 100644 --- a/arch/openrisc/include/asm/ptrace.h +++ b/arch/openrisc/include/asm/ptrace.h | |||
@@ -73,9 +73,13 @@ struct pt_regs { | |||
73 | }; | 73 | }; |
74 | }; | 74 | }; |
75 | long pc; | 75 | long pc; |
76 | /* For restarting system calls: | ||
77 | * Set to syscall number for syscall exceptions, | ||
78 | * -1 for all other exceptions. | ||
79 | */ | ||
76 | long orig_gpr11; /* For restarting system calls */ | 80 | long orig_gpr11; /* For restarting system calls */ |
77 | long syscallno; /* Syscall number (used by strace) */ | ||
78 | long dummy; /* Cheap alignment fix */ | 81 | long dummy; /* Cheap alignment fix */ |
82 | long dummy2; /* Cheap alignment fix */ | ||
79 | }; | 83 | }; |
80 | 84 | ||
81 | /* TODO: Rename this to REDZONE because that's what it is */ | 85 | /* TODO: Rename this to REDZONE because that's what it is */ |
diff --git a/arch/openrisc/include/asm/syscall.h b/arch/openrisc/include/asm/syscall.h index 9f0337055d26..b752bb67891d 100644 --- a/arch/openrisc/include/asm/syscall.h +++ b/arch/openrisc/include/asm/syscall.h | |||
@@ -25,7 +25,7 @@ | |||
25 | static inline int | 25 | static inline int |
26 | syscall_get_nr(struct task_struct *task, struct pt_regs *regs) | 26 | syscall_get_nr(struct task_struct *task, struct pt_regs *regs) |
27 | { | 27 | { |
28 | return regs->syscallno ? regs->syscallno : -1; | 28 | return regs->orig_gpr11; |
29 | } | 29 | } |
30 | 30 | ||
31 | static inline void | 31 | static inline void |
@@ -50,10 +50,7 @@ static inline void | |||
50 | syscall_set_return_value(struct task_struct *task, struct pt_regs *regs, | 50 | syscall_set_return_value(struct task_struct *task, struct pt_regs *regs, |
51 | int error, long val) | 51 | int error, long val) |
52 | { | 52 | { |
53 | if (error) | 53 | regs->gpr[11] = (long) error ?: val; |
54 | regs->gpr[11] = -error; | ||
55 | else | ||
56 | regs->gpr[11] = val; | ||
57 | } | 54 | } |
58 | 55 | ||
59 | static inline void | 56 | static inline void |
diff --git a/arch/openrisc/include/asm/uaccess.h b/arch/openrisc/include/asm/uaccess.h index c310e45b538e..f5abaa0ffc38 100644 --- a/arch/openrisc/include/asm/uaccess.h +++ b/arch/openrisc/include/asm/uaccess.h | |||
@@ -26,7 +26,6 @@ | |||
26 | #include <linux/thread_info.h> | 26 | #include <linux/thread_info.h> |
27 | #include <linux/prefetch.h> | 27 | #include <linux/prefetch.h> |
28 | #include <linux/string.h> | 28 | #include <linux/string.h> |
29 | #include <linux/thread_info.h> | ||
30 | #include <asm/page.h> | 29 | #include <asm/page.h> |
31 | 30 | ||
32 | #define VERIFY_READ 0 | 31 | #define VERIFY_READ 0 |