[prev in list] [next in list] [prev in thread] [next in thread] 

List:       linux-arm-kernel
Subject:    Re: Pointer Alignment and Typecasts in MTD Code
From:       csj () agfeo ! de
Date:       2002-09-26 14:15:30
[Download RAW message or body]




On Thu, Sep 26, 2002 at 03:46:45PM +0200, csj@agfeo.de wrote:
>> OK, I finally found out that my problem resulted from a bug in the
>> 2.4.17rmk5 alignment handler that has been fixed in later versions.
>
>Huh?  I'm not aware of any "bugs" having been fixed.
>
>I did change it so you _had_ to enable the alignment handler for jffs2
>so I'm confused about what you're vaguely referring to.

Here is the patch against 2.4.17rmk5 that fixed my problem. In 2.4.19rmk2
this already seems to be fixed.

--- fault-armv.c.orig    Thu Sep 26 15:51:47 2002
+++ fault-armv.c    Thu Sep 26 15:07:34 2002
@@ -325,7 +325,7 @@
     if (LDST_L_BIT(instr)) {
          unsigned int val;
          get32_unaligned_check(val, addr);
-         val = regs->uregs[rd];
+         regs->uregs[rd] = val;
     } else
          put32_unaligned_check(regs->uregs[rd], addr);
     return TYPE_LDST;
@@ -334,7 +334,7 @@
     if (LDST_L_BIT(instr)) {
          unsigned int val;
          get32t_unaligned_check(val, addr);
-         val = regs->uregs[rd];
+         regs->uregs[rd] = val;
     } else
          put32t_unaligned_check(regs->uregs[rd], addr);
     return TYPE_LDST;




-------------------------------------------------------------------
Subscription options: http://lists.arm.linux.org.uk/mailman/listinfo/linux-arm-kernel
FAQ/Etiquette:       http://www.arm.linux.org.uk/armlinux/mailinglists.php

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic