diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-04-03 13:12:05 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-04-03 13:12:05 -0400 |
| commit | 464662b91614188b4af9df51baaa0d6b3d89a15f (patch) | |
| tree | 0257f83b14d1bf2fac072d66bfbe60023d7fc372 | |
| parent | 1e649afde3708012daf43ff91730595e30e6f3bb (diff) | |
| parent | 0dd90aa9d6222e12201f05c0058e8741b7f66474 (diff) | |
Merge branch 'next' of git://git.monstr.eu/linux-2.6-microblaze
Pull arch/microblaze fixes from Michal Simek.
* 'next' of git://git.monstr.eu/linux-2.6-microblaze:
microblaze: Fix ret_from_fork declaration
microblaze: Do not use tlb_skip in early_printk
microblaze: Add missing headers caused by disintegration asm/system.h
microblaze: Fix stack usage in PAGE_SIZE copy_tofrom_user
microblaze: Fix tlb_skip variable on noMMU system
microblaze: Fix __futex_atomic_op macro register usage
| -rw-r--r-- | arch/microblaze/include/asm/cmpxchg.h | 2 | ||||
| -rw-r--r-- | arch/microblaze/include/asm/futex.h | 2 | ||||
| -rw-r--r-- | arch/microblaze/include/asm/processor.h | 4 | ||||
| -rw-r--r-- | arch/microblaze/kernel/early_printk.c | 2 | ||||
| -rw-r--r-- | arch/microblaze/kernel/setup.c | 2 | ||||
| -rw-r--r-- | arch/microblaze/kernel/unwind.c | 1 | ||||
| -rw-r--r-- | arch/microblaze/lib/uaccess_old.S | 98 |
7 files changed, 72 insertions, 39 deletions
diff --git a/arch/microblaze/include/asm/cmpxchg.h b/arch/microblaze/include/asm/cmpxchg.h index 0094859abd9b..538afc0ab9f3 100644 --- a/arch/microblaze/include/asm/cmpxchg.h +++ b/arch/microblaze/include/asm/cmpxchg.h | |||
| @@ -1,6 +1,8 @@ | |||
| 1 | #ifndef _ASM_MICROBLAZE_CMPXCHG_H | 1 | #ifndef _ASM_MICROBLAZE_CMPXCHG_H |
| 2 | #define _ASM_MICROBLAZE_CMPXCHG_H | 2 | #define _ASM_MICROBLAZE_CMPXCHG_H |
| 3 | 3 | ||
| 4 | #include <linux/irqflags.h> | ||
| 5 | |||
| 4 | void __bad_xchg(volatile void *ptr, int size); | 6 | void __bad_xchg(volatile void *ptr, int size); |
| 5 | 7 | ||
| 6 | static inline unsigned long __xchg(unsigned long x, volatile void *ptr, | 8 | static inline unsigned long __xchg(unsigned long x, volatile void *ptr, |
diff --git a/arch/microblaze/include/asm/futex.h b/arch/microblaze/include/asm/futex.h index b0526d2716fa..ff8cde159d9a 100644 --- a/arch/microblaze/include/asm/futex.h +++ b/arch/microblaze/include/asm/futex.h | |||
| @@ -24,7 +24,7 @@ | |||
| 24 | .word 1b,4b,2b,4b; \ | 24 | .word 1b,4b,2b,4b; \ |
| 25 | .previous;" \ | 25 | .previous;" \ |
| 26 | : "=&r" (oldval), "=&r" (ret) \ | 26 | : "=&r" (oldval), "=&r" (ret) \ |
| 27 | : "b" (uaddr), "i" (-EFAULT), "r" (oparg) \ | 27 | : "r" (uaddr), "i" (-EFAULT), "r" (oparg) \ |
| 28 | ); \ | 28 | ); \ |
| 29 | }) | 29 | }) |
| 30 | 30 | ||
diff --git a/arch/microblaze/include/asm/processor.h b/arch/microblaze/include/asm/processor.h index 510a8e1c16ba..bffb54527299 100644 --- a/arch/microblaze/include/asm/processor.h +++ b/arch/microblaze/include/asm/processor.h | |||
| @@ -31,6 +31,8 @@ extern const struct seq_operations cpuinfo_op; | |||
| 31 | /* Do necessary setup to start up a newly executed thread. */ | 31 | /* Do necessary setup to start up a newly executed thread. */ |
| 32 | void start_thread(struct pt_regs *regs, unsigned long pc, unsigned long usp); | 32 | void start_thread(struct pt_regs *regs, unsigned long pc, unsigned long usp); |
| 33 | 33 | ||
| 34 | extern void ret_from_fork(void); | ||
| 35 | |||
| 34 | # endif /* __ASSEMBLY__ */ | 36 | # endif /* __ASSEMBLY__ */ |
| 35 | 37 | ||
| 36 | # ifndef CONFIG_MMU | 38 | # ifndef CONFIG_MMU |
| @@ -143,8 +145,6 @@ static inline void exit_thread(void) | |||
| 143 | 145 | ||
| 144 | unsigned long get_wchan(struct task_struct *p); | 146 | unsigned long get_wchan(struct task_struct *p); |
| 145 | 147 | ||
| 146 | extern void ret_from_fork(void); | ||
| 147 | |||
| 148 | /* The size allocated for kernel stacks. This _must_ be a power of two! */ | 148 | /* The size allocated for kernel stacks. This _must_ be a power of two! */ |
| 149 | # define KERNEL_STACK_SIZE 0x2000 | 149 | # define KERNEL_STACK_SIZE 0x2000 |
| 150 | 150 | ||
diff --git a/arch/microblaze/kernel/early_printk.c b/arch/microblaze/kernel/early_printk.c index ec485876d0d0..aba1f9a97d5d 100644 --- a/arch/microblaze/kernel/early_printk.c +++ b/arch/microblaze/kernel/early_printk.c | |||
| @@ -176,6 +176,7 @@ void __init remap_early_printk(void) | |||
| 176 | base_addr = (u32) ioremap(base_addr, PAGE_SIZE); | 176 | base_addr = (u32) ioremap(base_addr, PAGE_SIZE); |
| 177 | printk(KERN_CONT "0x%x\n", base_addr); | 177 | printk(KERN_CONT "0x%x\n", base_addr); |
| 178 | 178 | ||
| 179 | #ifdef CONFIG_MMU | ||
| 179 | /* | 180 | /* |
| 180 | * Early console is on the top of skipped TLB entries | 181 | * Early console is on the top of skipped TLB entries |
| 181 | * decrease tlb_skip size ensure that hardcoded TLB entry will be | 182 | * decrease tlb_skip size ensure that hardcoded TLB entry will be |
| @@ -189,6 +190,7 @@ void __init remap_early_printk(void) | |||
| 189 | * cmp rX, orig_base_addr | 190 | * cmp rX, orig_base_addr |
| 190 | */ | 191 | */ |
| 191 | tlb_skip -= 1; | 192 | tlb_skip -= 1; |
| 193 | #endif | ||
| 192 | } | 194 | } |
| 193 | 195 | ||
| 194 | void __init disable_early_printk(void) | 196 | void __init disable_early_printk(void) |
diff --git a/arch/microblaze/kernel/setup.c b/arch/microblaze/kernel/setup.c index 71af974aa24a..16d8dfd9094b 100644 --- a/arch/microblaze/kernel/setup.c +++ b/arch/microblaze/kernel/setup.c | |||
| @@ -206,6 +206,7 @@ static int microblaze_debugfs_init(void) | |||
| 206 | } | 206 | } |
| 207 | arch_initcall(microblaze_debugfs_init); | 207 | arch_initcall(microblaze_debugfs_init); |
| 208 | 208 | ||
| 209 | # ifdef CONFIG_MMU | ||
| 209 | static int __init debugfs_tlb(void) | 210 | static int __init debugfs_tlb(void) |
| 210 | { | 211 | { |
| 211 | struct dentry *d; | 212 | struct dentry *d; |
| @@ -218,6 +219,7 @@ static int __init debugfs_tlb(void) | |||
| 218 | return -ENOMEM; | 219 | return -ENOMEM; |
| 219 | } | 220 | } |
| 220 | device_initcall(debugfs_tlb); | 221 | device_initcall(debugfs_tlb); |
| 222 | # endif | ||
| 221 | #endif | 223 | #endif |
| 222 | 224 | ||
| 223 | static int dflt_bus_notify(struct notifier_block *nb, | 225 | static int dflt_bus_notify(struct notifier_block *nb, |
diff --git a/arch/microblaze/kernel/unwind.c b/arch/microblaze/kernel/unwind.c index 9781a528cfc9..6be4ae3c3351 100644 --- a/arch/microblaze/kernel/unwind.c +++ b/arch/microblaze/kernel/unwind.c | |||
| @@ -24,6 +24,7 @@ | |||
| 24 | #include <asm/sections.h> | 24 | #include <asm/sections.h> |
| 25 | #include <asm/exceptions.h> | 25 | #include <asm/exceptions.h> |
| 26 | #include <asm/unwind.h> | 26 | #include <asm/unwind.h> |
| 27 | #include <asm/switch_to.h> | ||
| 27 | 28 | ||
| 28 | struct stack_trace; | 29 | struct stack_trace; |
| 29 | 30 | ||
diff --git a/arch/microblaze/lib/uaccess_old.S b/arch/microblaze/lib/uaccess_old.S index f037266cdaf3..f085995ee848 100644 --- a/arch/microblaze/lib/uaccess_old.S +++ b/arch/microblaze/lib/uaccess_old.S | |||
| @@ -122,22 +122,22 @@ __strnlen_user: | |||
| 122 | 15: swi r24, r5, 0x0018 + offset; \ | 122 | 15: swi r24, r5, 0x0018 + offset; \ |
| 123 | 16: swi r25, r5, 0x001C + offset; \ | 123 | 16: swi r25, r5, 0x001C + offset; \ |
| 124 | .section __ex_table,"a"; \ | 124 | .section __ex_table,"a"; \ |
| 125 | .word 1b, 0f; \ | 125 | .word 1b, 33f; \ |
| 126 | .word 2b, 0f; \ | 126 | .word 2b, 33f; \ |
| 127 | .word 3b, 0f; \ | 127 | .word 3b, 33f; \ |
| 128 | .word 4b, 0f; \ | 128 | .word 4b, 33f; \ |
| 129 | .word 5b, 0f; \ | 129 | .word 5b, 33f; \ |
| 130 | .word 6b, 0f; \ | 130 | .word 6b, 33f; \ |
| 131 | .word 7b, 0f; \ | 131 | .word 7b, 33f; \ |
| 132 | .word 8b, 0f; \ | 132 | .word 8b, 33f; \ |
| 133 | .word 9b, 0f; \ | 133 | .word 9b, 33f; \ |
| 134 | .word 10b, 0f; \ | 134 | .word 10b, 33f; \ |
| 135 | .word 11b, 0f; \ | 135 | .word 11b, 33f; \ |
| 136 | .word 12b, 0f; \ | 136 | .word 12b, 33f; \ |
| 137 | .word 13b, 0f; \ | 137 | .word 13b, 33f; \ |
| 138 | .word 14b, 0f; \ | 138 | .word 14b, 33f; \ |
| 139 | .word 15b, 0f; \ | 139 | .word 15b, 33f; \ |
| 140 | .word 16b, 0f; \ | 140 | .word 16b, 33f; \ |
| 141 | .text | 141 | .text |
| 142 | 142 | ||
| 143 | #define COPY_80(offset) \ | 143 | #define COPY_80(offset) \ |
| @@ -190,14 +190,17 @@ w2: sw r4, r5, r3 | |||
| 190 | 190 | ||
| 191 | .align 4 /* Alignment is important to keep icache happy */ | 191 | .align 4 /* Alignment is important to keep icache happy */ |
| 192 | page: /* Create room on stack and save registers for storign values */ | 192 | page: /* Create room on stack and save registers for storign values */ |
| 193 | addik r1, r1, -32 | 193 | addik r1, r1, -40 |
| 194 | swi r19, r1, 4 | 194 | swi r5, r1, 0 |
| 195 | swi r20, r1, 8 | 195 | swi r6, r1, 4 |
| 196 | swi r21, r1, 12 | 196 | swi r7, r1, 8 |
| 197 | swi r22, r1, 16 | 197 | swi r19, r1, 12 |
| 198 | swi r23, r1, 20 | 198 | swi r20, r1, 16 |
| 199 | swi r24, r1, 24 | 199 | swi r21, r1, 20 |
| 200 | swi r25, r1, 28 | 200 | swi r22, r1, 24 |
| 201 | swi r23, r1, 28 | ||
| 202 | swi r24, r1, 32 | ||
| 203 | swi r25, r1, 36 | ||
| 201 | loop: /* r4, r19, r20, r21, r22, r23, r24, r25 are used for storing values */ | 204 | loop: /* r4, r19, r20, r21, r22, r23, r24, r25 are used for storing values */ |
| 202 | /* Loop unrolling to get performance boost */ | 205 | /* Loop unrolling to get performance boost */ |
| 203 | COPY_80(0x000); | 206 | COPY_80(0x000); |
| @@ -205,21 +208,44 @@ loop: /* r4, r19, r20, r21, r22, r23, r24, r25 are used for storing values */ | |||
| 205 | COPY_80(0x100); | 208 | COPY_80(0x100); |
| 206 | COPY_80(0x180); | 209 | COPY_80(0x180); |
| 207 | /* copy loop */ | 210 | /* copy loop */ |
| 208 | addik r6, r6, 0x200 | 211 | addik r6, r6, 0x200 |
| 209 | addik r7, r7, -0x200 | 212 | addik r7, r7, -0x200 |
| 210 | bneid r7, loop | 213 | bneid r7, loop |
| 211 | addik r5, r5, 0x200 | 214 | addik r5, r5, 0x200 |
| 215 | |||
| 212 | /* Restore register content */ | 216 | /* Restore register content */ |
| 213 | lwi r19, r1, 4 | 217 | lwi r5, r1, 0 |
| 214 | lwi r20, r1, 8 | 218 | lwi r6, r1, 4 |
| 215 | lwi r21, r1, 12 | 219 | lwi r7, r1, 8 |
| 216 | lwi r22, r1, 16 | 220 | lwi r19, r1, 12 |
| 217 | lwi r23, r1, 20 | 221 | lwi r20, r1, 16 |
| 218 | lwi r24, r1, 24 | 222 | lwi r21, r1, 20 |
| 219 | lwi r25, r1, 28 | 223 | lwi r22, r1, 24 |
| 220 | addik r1, r1, 32 | 224 | lwi r23, r1, 28 |
| 225 | lwi r24, r1, 32 | ||
| 226 | lwi r25, r1, 36 | ||
| 227 | addik r1, r1, 40 | ||
| 221 | /* return back */ | 228 | /* return back */ |
| 229 | addik r3, r0, 0 | ||
| 230 | rtsd r15, 8 | ||
| 231 | nop | ||
| 232 | |||
| 233 | /* Fault case - return temp count */ | ||
| 234 | 33: | ||
| 222 | addik r3, r7, 0 | 235 | addik r3, r7, 0 |
| 236 | /* Restore register content */ | ||
| 237 | lwi r5, r1, 0 | ||
| 238 | lwi r6, r1, 4 | ||
| 239 | lwi r7, r1, 8 | ||
| 240 | lwi r19, r1, 12 | ||
| 241 | lwi r20, r1, 16 | ||
| 242 | lwi r21, r1, 20 | ||
| 243 | lwi r22, r1, 24 | ||
| 244 | lwi r23, r1, 28 | ||
| 245 | lwi r24, r1, 32 | ||
| 246 | lwi r25, r1, 36 | ||
| 247 | addik r1, r1, 40 | ||
| 248 | /* return back */ | ||
| 223 | rtsd r15, 8 | 249 | rtsd r15, 8 |
| 224 | nop | 250 | nop |
| 225 | 251 | ||
