From mboxrd@z Thu Jan 1 00:00:00 1970 From: Albert ARIBAUD Date: Thu, 03 Mar 2011 08:07:06 +0100 Subject: [U-Boot] [PATCH V2] arm: Use optimized memcpy and memset from linux In-Reply-To: <1296038757-11800-1-git-send-email-weisserm@arcor.de> References: <1295884607-9044-1-git-send-email-weisserm@arcor.de> <1296038757-11800-1-git-send-email-weisserm@arcor.de> Message-ID: <4D6F3E1A.6030708@free.fr> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi Matthias, Le 26/01/2011 11:45, Matthias Weisser a ?crit : > Using optimized versions of memset and memcpy from linux brings a quite > noticeable speed (x2 or better) improvement for these two functions. > > Here are some numbers for test done with jadecpu > > | HEAD(1)| HEAD(1)| HEAD(2)| HEAD(2)| > | | +patch | | +patch | > ---------------------------+--------+--------+--------+--------+ > Reset to prompt | 438ms | 330ms | 228ms | 120ms | > | | | | | > TFTP a 3MB img | 4782ms | 3428ms | 3245ms | 2820ms | > | | | | | > FATLOAD USB a 3MB img* | 8515ms | 8510ms | ------ | ------ | > | | | | | > BOOTM LZO img in RAM | 3473ms | 3168ms | 592ms | 592ms | > where CRC is | 615ms | 615ms | 54ms | 54ms | > uncompress | 2460ms | 2462ms | 450ms | 451ms | > final boot_elf | 376ms | 68ms | 65ms | 65ms | > | | | | | > BOOTM LZO img in FLASH | 3207ms | 2902ms | 1050ms | 1050ms | > where CRC is | 600ms | 600ms | 135ms | 135ms | > uncompress | 2209ms | 2211ms | 828ms | 828ms | > | | | | | > Copy 1.4MB from NOR to RAM | 134ms | 72ms | 120ms | 70ms | > > (1) No dcache > (2) dcache enabled in board_init > *Does not work when dcache is on > > Size impact: > > C version: > text data bss dec hex filename > 202862 18912 266456 488230 77326 u-boot > > ASM version: > text data bss dec hex filename > 203798 18912 266288 488998 77626 u-boot > 222712 u-boot.bin > > Changes since V1: > - Made the usage of these functions optional be CONFIG_USE_ARCH_MEM > - Usage of PLD instruction on all architectures supporting it > - Added a README entry > - Minor style fixes > > Signed-off-by: Matthias Weisser > --- Sorry for leaving this patch alone for so long. Can you please just repost a (rebased) V3 with the history below the cut line so that it does not appear in the commit message? As it is not a fix but was tested on two different ARM archs, I think I'll add it to master rather than next so that it goes into mainline without delay. Amicalement, -- Albert.