From: Detlev Zundel Date: Tue, 29 Jun 2010 14:41:34 +0200 Subject: [U-Boot] [PATCH] MPC512x: workaround data corruption for unaligned local bus accesses In-Reply-To: <20100629120945.2A8A614EBF8@gemini.denx.de> (Wolfgang Denk's message of "Tue, 29 Jun 2010 14:09:45 +0200") References: <1277251931-12994-1-git-send-email-wd@denx.de> <1277804892-453-1-git-send-email-wd@denx.de> <20100629120945.2A8A614EBF8@gemini.denx.de> Message-ID: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi Wolfgang, >> The only thing I wonder is the filename 'memcpy_mpc5200.c' as the code >> doesn't really have any 5200 specifics in it. What about > > As far as I understand this behaviour is specific to the MPC512x and > MPC5200 processors; I did not notice it on other cores yet. > Unfortunately we do not have a generic name that includes these > processors (5xxx is taken by something else). I believe that other architectures may also suffer from such unaligned byte copies, but maybe in those cases 'memcpy' already takes car of that, I don't know. The point I wanted to make is that the file in question has no powerpc specific code in it at all. >> 'memcpy_align32wrap' or something likew that to express the more general >> nature of the code? > > I could not come up with a better name... What is "align32wrap" > supposed to mean? It was meant to mean somehow to express the fact that for some condition the original memcpy was called and for some conditions not - hence "wrap". The condition which was passed on to the original memcpy is connected to correct 32 bit alignment, hence the proposal. >> If one thinks further along this line, why not move the wrapper to lib/? > > Please re-check what my patch does - exactly that: > >> arch/powerpc/{cpu/mpc5xxx => lib}/memcpy_mpc5200.c | 0 Actually I was aiming for "lib" outside of any architecure for the reason noted above. But as I said, this is only place for improvement, I surely will not nak the patch ;) Cheers Detlev -- System going down at 1:45 this afternoon for disk crashing. -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-40 Fax: (+49)-8142-66989-80 Email: dzu at denx.de