From: Wolfgang Denk Date: Sun, 12 May 2013 20:20:46 +0200 Subject: [U-Boot] [PATCH 2/2 v12] Introduced btrfs file-system with btrload command In-Reply-To: <81c88340404a46b9a36590eded5e3c77@codethink.co.uk> References: <1367660512-10489-1-git-send-email-adnan9901@yahoo.com> <1367660512-10489-3-git-send-email-adnan9901@yahoo.com> <20130505072819.5DDBA380E6C@gemini.denx.de> <5186723E.2080503@ti.com> <20130505151509.4D9E5380E6D@gemini.denx.de> <518BB8C7.3090704@codethink.co.uk> <20130509214352.92D213811AF@gemini.denx.de> <81c88340404a46b9a36590eded5e3c77@codethink.co.uk> Message-ID: <20130512182046.C2C58384B74@gemini.denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Dear Adnan Ali, In message <81c88340404a46b9a36590eded5e3c77@codethink.co.uk> you wrote: > > >> > - Compare the code for crc32c_cal() in the patch with the > >> definition > >> > of DO_CRC(x) in "lib/crc32.c" - to me, it appears to be the > >> same for > >> > little endian code (it is redundant?), but different for big > >> endian > >> > systems - which raises the question if this code has ever been > >> > tested on a BE machine? > >> My code uses lib/crc32.c and i have only tested it on > >> mx53loco manchine. > > > > I tend to believe thatit will not work on a big endian system, then. > Sorry I meant to say my code uses lib/crc32_c.c. The lib/crc32.c > is main line so you think main line code is not for big endian. > What can i say. What exactly do you mean by "my code uses lib/crc32_c.c? I was referring to the crc32c_cal() funciton in your patch. It is this function where I think it will fail on BE systems. > >> > - The code claims to be derived from "Linux kernel > >> crypto/crc32c.c"; > >> > but I cannot find such code in that file. > >> I think yes but part of part from syslinux. I have also added > >> SHA1 of commit so don't know. > > > > Please provide an exact reference where this code is coming from. > Just clone syslinux and code is in ~/syslinux/core/fs/btrfs/crc32c.h The pelase fix the comment, and provide exact reference (commit ID etc. as described at bullet # 4 at [1]) for that code. [1] http://www.denx.de/wiki/view/U-Boot/Patches#Attributing_Code_Copyrights_Sign > >> > - The implementation of crc32c_cal() suffers from a few other problems > >> > (like not triggering the watchdog, which will cause problems on > >> > systems that use one). > >> I think that is true as its not using main line crc32 code. > > > > We probably should do that, then. > To use that code probably i need to create static crc32 table. Indeed. This should also reduce boot time. Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de Real computer scientists don't comment their code. The identifiers are so long they can't afford the disk space.