diff options
Diffstat (limited to 'arch/arm/mm')
-rw-r--r-- | arch/arm/mm/alignment.c | 44 |
1 files changed, 22 insertions, 22 deletions
diff --git a/arch/arm/mm/alignment.c b/arch/arm/mm/alignment.c index f35e69e9c65c..705c98921c37 100644 --- a/arch/arm/mm/alignment.c +++ b/arch/arm/mm/alignment.c | |||
@@ -111,7 +111,7 @@ proc_alignment_read(char *page, char **start, off_t off, int count, int *eof, | |||
111 | } | 111 | } |
112 | 112 | ||
113 | static int proc_alignment_write(struct file *file, const char __user *buffer, | 113 | static int proc_alignment_write(struct file *file, const char __user *buffer, |
114 | unsigned long count, void *data) | 114 | unsigned long count, void *data) |
115 | { | 115 | { |
116 | char mode; | 116 | char mode; |
117 | 117 | ||
@@ -119,7 +119,7 @@ static int proc_alignment_write(struct file *file, const char __user *buffer, | |||
119 | if (get_user(mode, buffer)) | 119 | if (get_user(mode, buffer)) |
120 | return -EFAULT; | 120 | return -EFAULT; |
121 | if (mode >= '0' && mode <= '5') | 121 | if (mode >= '0' && mode <= '5') |
122 | ai_usermode = mode - '0'; | 122 | ai_usermode = mode - '0'; |
123 | } | 123 | } |
124 | return count; | 124 | return count; |
125 | } | 125 | } |
@@ -262,7 +262,7 @@ union offset_union { | |||
262 | goto fault; \ | 262 | goto fault; \ |
263 | } while (0) | 263 | } while (0) |
264 | 264 | ||
265 | #define put32_unaligned_check(val,addr) \ | 265 | #define put32_unaligned_check(val,addr) \ |
266 | __put32_unaligned_check("strb", val, addr) | 266 | __put32_unaligned_check("strb", val, addr) |
267 | 267 | ||
268 | #define put32t_unaligned_check(val,addr) \ | 268 | #define put32t_unaligned_check(val,addr) \ |
@@ -306,19 +306,19 @@ do_alignment_ldrhstrh(unsigned long addr, unsigned long instr, struct pt_regs *r | |||
306 | return TYPE_LDST; | 306 | return TYPE_LDST; |
307 | 307 | ||
308 | user: | 308 | user: |
309 | if (LDST_L_BIT(instr)) { | 309 | if (LDST_L_BIT(instr)) { |
310 | unsigned long val; | 310 | unsigned long val; |
311 | get16t_unaligned_check(val, addr); | 311 | get16t_unaligned_check(val, addr); |
312 | 312 | ||
313 | /* signed half-word? */ | 313 | /* signed half-word? */ |
314 | if (instr & 0x40) | 314 | if (instr & 0x40) |
315 | val = (signed long)((signed short) val); | 315 | val = (signed long)((signed short) val); |
316 | 316 | ||
317 | regs->uregs[rd] = val; | 317 | regs->uregs[rd] = val; |
318 | } else | 318 | } else |
319 | put16t_unaligned_check(regs->uregs[rd], addr); | 319 | put16t_unaligned_check(regs->uregs[rd], addr); |
320 | 320 | ||
321 | return TYPE_LDST; | 321 | return TYPE_LDST; |
322 | 322 | ||
323 | fault: | 323 | fault: |
324 | return TYPE_FAULT; | 324 | return TYPE_FAULT; |
@@ -342,11 +342,11 @@ do_alignment_ldrdstrd(unsigned long addr, unsigned long instr, | |||
342 | unsigned long val; | 342 | unsigned long val; |
343 | get32_unaligned_check(val, addr); | 343 | get32_unaligned_check(val, addr); |
344 | regs->uregs[rd] = val; | 344 | regs->uregs[rd] = val; |
345 | get32_unaligned_check(val, addr+4); | 345 | get32_unaligned_check(val, addr + 4); |
346 | regs->uregs[rd+1] = val; | 346 | regs->uregs[rd + 1] = val; |
347 | } else { | 347 | } else { |
348 | put32_unaligned_check(regs->uregs[rd], addr); | 348 | put32_unaligned_check(regs->uregs[rd], addr); |
349 | put32_unaligned_check(regs->uregs[rd+1], addr+4); | 349 | put32_unaligned_check(regs->uregs[rd + 1], addr + 4); |
350 | } | 350 | } |
351 | 351 | ||
352 | return TYPE_LDST; | 352 | return TYPE_LDST; |
@@ -356,11 +356,11 @@ do_alignment_ldrdstrd(unsigned long addr, unsigned long instr, | |||
356 | unsigned long val; | 356 | unsigned long val; |
357 | get32t_unaligned_check(val, addr); | 357 | get32t_unaligned_check(val, addr); |
358 | regs->uregs[rd] = val; | 358 | regs->uregs[rd] = val; |
359 | get32t_unaligned_check(val, addr+4); | 359 | get32t_unaligned_check(val, addr + 4); |
360 | regs->uregs[rd+1] = val; | 360 | regs->uregs[rd + 1] = val; |
361 | } else { | 361 | } else { |
362 | put32t_unaligned_check(regs->uregs[rd], addr); | 362 | put32t_unaligned_check(regs->uregs[rd], addr); |
363 | put32t_unaligned_check(regs->uregs[rd+1], addr+4); | 363 | put32t_unaligned_check(regs->uregs[rd + 1], addr + 4); |
364 | } | 364 | } |
365 | 365 | ||
366 | return TYPE_LDST; | 366 | return TYPE_LDST; |
@@ -443,7 +443,7 @@ do_alignment_ldmstm(unsigned long addr, unsigned long instr, struct pt_regs *reg | |||
443 | if (LDST_P_EQ_U(instr)) /* U = P */ | 443 | if (LDST_P_EQ_U(instr)) /* U = P */ |
444 | eaddr += 4; | 444 | eaddr += 4; |
445 | 445 | ||
446 | /* | 446 | /* |
447 | * For alignment faults on the ARM922T/ARM920T the MMU makes | 447 | * For alignment faults on the ARM922T/ARM920T the MMU makes |
448 | * the FSR (and hence addr) equal to the updated base address | 448 | * the FSR (and hence addr) equal to the updated base address |
449 | * of the multiple access rather than the restored value. | 449 | * of the multiple access rather than the restored value. |
@@ -570,7 +570,7 @@ thumb2arm(u16 tinstr) | |||
570 | /* 6.5.1 Format 3: */ | 570 | /* 6.5.1 Format 3: */ |
571 | case 0x4800 >> 11: /* 7.1.28 LDR(3) */ | 571 | case 0x4800 >> 11: /* 7.1.28 LDR(3) */ |
572 | /* NOTE: This case is not technically possible. We're | 572 | /* NOTE: This case is not technically possible. We're |
573 | * loading 32-bit memory data via PC relative | 573 | * loading 32-bit memory data via PC relative |
574 | * addressing mode. So we can and should eliminate | 574 | * addressing mode. So we can and should eliminate |
575 | * this case. But I'll leave it here for now. | 575 | * this case. But I'll leave it here for now. |
576 | */ | 576 | */ |
@@ -642,7 +642,7 @@ do_alignment(unsigned long addr, unsigned int fsr, struct pt_regs *regs) | |||
642 | 642 | ||
643 | if (fault) { | 643 | if (fault) { |
644 | type = TYPE_FAULT; | 644 | type = TYPE_FAULT; |
645 | goto bad_or_fault; | 645 | goto bad_or_fault; |
646 | } | 646 | } |
647 | 647 | ||
648 | if (user_mode(regs)) | 648 | if (user_mode(regs)) |