Re: [PATCH u-boot v4 01/36] regmap: fix a serious pointer casting bug

2021-05-20 Thread Simon Glass
Hi Marek, On Thu, 20 May 2021 at 05:25, Marek Behún wrote: > > There is a serious bug in regmap_read() and regmap_write() functions > where an uint pointer is cast to (void *) which is then cast to (u8 *), > (u16 *), (u32 *) or (u64 *), depending on register width of the map. > > For example give

Re: [PATCH 1/5] lib/vsprintf.c: make sure vsnprintf() never returns a negative value

2021-05-20 Thread Simon Glass
Hi Rasmus, On Thu, 20 May 2021 at 04:05, Rasmus Villemoes wrote: > > Most callers (or callers of callers, etc.) of vsnprintf() are not > prepared for it to return a negative value. > > The only case where that can currently happen is %pD, and it's IMO > more user-friendly to produce some output t

Re: [PATCH 2/5] lib/vsprintf.c: implement printf() in terms of vprintf()

2021-05-20 Thread Simon Glass
On Thu, 20 May 2021 at 04:05, Rasmus Villemoes wrote: > > This saves some code, both in terms of #LOC and .text size, and it is > also the normal convention that foo(...) is implemented in terms of > vfoo(). > > Signed-off-by: Rasmus Villemoes > --- > lib/vsprintf.c | 10 +- > 1 file cha

Re: [PATCH u-boot v4 03/36] treewide: Convert macro and uses of __section(foo) to __section("foo")

2021-05-20 Thread Simon Glass
On Thu, 20 May 2021 at 05:25, Marek Behún wrote: > > This commit does the same thing as Linux commit 33def8498fdd. > > Use a more generic form for __section that requires quotes to avoid > complications with clang and gcc differences. > > Remove the quote operator # from compiler_attributes.h __se

Re: [PATCH u-boot v4 13/36] build: use thin archives instead of incremental linking

2021-05-20 Thread Simon Glass
On Thu, 20 May 2021 at 05:25, Marek Behún wrote: > > Currently we use incremental linking (ld -r) to link several object > files from one directory into one built-in.o object file containing the > linked code from that directory (and its subdirectories). > > Linux has, some time ago, moved to thin

Re: [PATCH u-boot v4 35/36] ARM: don't use --gc-sections with LTO when using private libgcc

2021-05-20 Thread Simon Glass
On Thu, 20 May 2021 at 05:25, Marek Behún wrote: > > When using LTO, we can throw away the --gc-sections flag, but only if > using private libgcc. > > When using system's libgcc, --gc-sections is still needed, otherwise > linking will fail due to undefined references to libc's symbols. > > Signed-

Re: [PATCH 4/5] lib/vsprintf.c: remove unused ip6_addr_string()

2021-05-20 Thread Simon Glass
On Thu, 20 May 2021 at 04:05, Rasmus Villemoes wrote: > > There's currently no user of %p[iI]6, so including ip6_addr_string() > in the image is a waste of bytes. It's easy enough to have the > compiler elide it without removing the code completely. > > The closest I can find to anybody "handling"

Re: [PATCH u-boot v4 14/36] build: support building with Link Time Optimizations

2021-05-20 Thread Simon Glass
On Thu, 20 May 2021 at 05:25, Marek Behún wrote: > > Add plumbing for building U-Boot with Link Time Optimizations. > > When building with LTO, $(PLATFORM_LIBS) has to be in --whole-archive / > --no-whole-archive group, otherwise some functions declared in assembly > may not be resolved and linkin

Re: [PATCH u-boot v4 22/36] ARM: fix LTO build for some thumb-interwork cases

2021-05-20 Thread Simon Glass
On Thu, 20 May 2021 at 05:25, Marek Behún wrote: > > Fix LTO build for some thumb-interwork usecases (such as for > da850evm_defconfig), where inline assmebly such as assembly > mrc p15,0,r2,c1,c0,0 > causes the compiler to fail during LTO linking with > Error: selected processor does not su

Re: [PATCH u-boot v4 33/36] ARM: make LTO available

2021-05-20 Thread Simon Glass
On Thu, 20 May 2021 at 05:25, Marek Behún wrote: > > Make LTO available for ARM architecture. > > Signed-off-by: Marek Behún > --- > arch/Kconfig | 1 + > arch/arm/lib/Makefile | 2 ++ > 2 files changed, 3 insertions(+) > Reviewed-by: Simon Glass

Re: [PATCH u-boot v4 34/36] ARM: don't use -ffunction-sections/-fdata-sections with LTO build

2021-05-20 Thread Simon Glass
On Thu, 20 May 2021 at 05:25, Marek Behún wrote: > > When building with LTO, using -ffunction-sections/-fdata-sections is not > useful anymore. > > Signed-off-by: Marek Behún > --- > arch/arm/config.mk | 8 ++-- > 1 file changed, 6 insertions(+), 2 deletions(-) > Reviewed-by: Simon Glass

Re: [PATCH u-boot v4 31/36] armv8: SPL: discard relocation information

2021-05-20 Thread Simon Glass
On Thu, 20 May 2021 at 05:25, Marek Behún wrote: > > For some reason when building SPL for ARMv8 with LTO, the relocation > information is not discarded. > > Discard it explicitly in the linker script. > > This fixes LTO build for imx8mm_venice_defconfig. > > Signed-off-by: Marek Behún > --- > a

Re: [PATCH 3/5] lib/vsprintf.c: remove stale comment

2021-05-20 Thread Simon Glass
On Thu, 20 May 2021 at 04:05, Rasmus Villemoes wrote: > > U-Boot doesn't support %pS/%pF or any other kind of kallsyms-like > lookups. Remove the comment. > > Signed-off-by: Rasmus Villemoes > --- > lib/vsprintf.c | 3 --- > 1 file changed, 3 deletions(-) Reviewed-by: Simon Glass

Re: [PATCH u-boot v4 20/36] ARM: global_data: make set_gd() work for armv5 and armv6

2021-05-20 Thread Simon Glass
On Thu, 20 May 2021 at 05:25, Marek Behún wrote: > > The Thumb instruction `ldr` is able to move high registers only from > armv7. For armv5 and armv6 we have to use `mov`. > > Signed-off-by: Marek Behún > --- > arch/arm/include/asm/global_data.h | 4 +++- > 1 file changed, 3 insertions(+), 1 de

Re: [PATCH u-boot v4 17/36] sandbox: use sections instead of symbols for getopt array boundaries

2021-05-20 Thread Simon Glass
On Thu, 20 May 2021 at 05:25, Marek Behún wrote: > > In style of linked lists, instead of declaring symbols for boundaries > of getopt options array in the linker script, declare corresponding > sections and retrieve the boundaries via static inline functions. > > Without this clang's LTO produces

Re: [PATCH u-boot v4 15/36] build: link with --build-id=none

2021-05-20 Thread Simon Glass
On Thu, 20 May 2021 at 05:25, Marek Behún wrote: > > Some toolchains are compiled so that they pass a --build-id=something > parameter to the linker implicitly. > > This causes U-Boot LTO linking to fail with something like: > ld: section .note.gnu.build-id LMA ... overlaps section .text LMA ...

Re: [PATCH 06/18] image: Drop IMAGE_ENABLE_SHA1

2021-05-20 Thread Simon Glass
Hi Alex, On Wed, 19 May 2021 at 20:41, Alex G. wrote: > > > > On 5/19/21 4:55 PM, Simon Glass wrote: > > Hi Alex, > > > > On Wed, 19 May 2021 at 11:44, Alex G wrote: > >> > >> > >> > >> On 5/19/21 11:36 AM, Simon Glass wrote: > >>> Hi Alexandru, > >>> > >>> On Mon, 17 May 2021 at 10:38, Alexandr

Re: [PATCH u-boot v4 21/36] ARM: make gd a function call for LTO and set via set_gd()

2021-05-20 Thread Simon Glass
On Thu, 20 May 2021 at 05:25, Marek Behún wrote: > > On ARM, the gd pointer is stored in registers r9 / x18. For this the > -ffixed-r9 / -ffixed-x18 flag is used when compiling, but using global > register variables causes errors when building with LTO, and these > errors are very difficult to ove

Re: [PATCH u-boot v4 28/36] ARM: fix LTO for seaboard

2021-05-20 Thread Simon Glass
On Thu, 20 May 2021 at 05:25, Marek Behún wrote: > > When seaboard_defconfig is compiled with LTO, the compiler complains > about some instructions not being supported in ARM mode. > > This is caused by arch/arm/mach-tegra/tegra20/warmboot_avp.c having > different CFLAGS declared in Makefile. This

Re: [PATCH u-boot v4 05/36] test/py: improve regular expression for ut subtest symbol matcher

2021-05-20 Thread Simon Glass
On Thu, 20 May 2021 at 05:25, Marek Behún wrote: > > Improve the regular expression that matches unittest symbols in > u-boot.sym. > > Currently we do not enforce no prefix in symbol string, but with the > soon to come change in linker lists declaring lists and entries with the > __ADDRESSABLE mac

Re: [PATCH u-boot v4 02/36] checkpatch: require quotes around section name in the __section() macro

2021-05-20 Thread Simon Glass
On Thu, 20 May 2021 at 05:25, Marek Behún wrote: > > This is how Linux does this now, see Linux commit 339f29d91acf. > > Signed-off-by: Marek Behún > --- > scripts/checkpatch.pl | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Reviewed-by: Simon Glass

Re: [PATCH] spl: Kconfig: Use tabs instead of space for alignment

2021-05-20 Thread Simon Glass
On Thu, 20 May 2021 at 05:08, Michal Simek wrote: > > A lot of entries were using spaces instead of tab for alignment that's why > it is good to fix it to use the same style everywhere. > > Signed-off-by: Michal Simek > --- > > common/spl/Kconfig | 24 > 1 file changed,

Re: [PATCH u-boot v4 06/36] string: make memcpy(), memset(), memcmp() and memmove() visible for LTO

2021-05-20 Thread Simon Glass
On Thu, 20 May 2021 at 05:25, Marek Behún wrote: > > It seems that sometimes (happening on ARM64, for example with > turris_mox_defconfig) GCC, when linking with LTO, changes the symbol > names of some functions, for example lib/string.c's memcpy() function to > memcpy.isra.0. > > This is a proble

Re: [PATCH 5/5] common/log.c: use vscnprintf() in log_dispatch()

2021-05-20 Thread Simon Glass
On Thu, 20 May 2021 at 04:05, Rasmus Villemoes wrote: > > We have to use the *printf variant which returns the strlen() of the > resulting string, not the > how-much-would-have-been-printed-given-enough-space, in order to use > that value to inspect the last character in the string. > > Signed-off

Re: [BUG] Re: [PATCH v2 2/2] mmc: mmc-uclass: Use dev_seq() to read aliases node's index

2021-05-20 Thread Heinrich Schuchardt
On 20.05.21 18:55, Andre Przywara wrote: > On Thu, 20 May 2021 18:32:38 +0200 > Heinrich Schuchardt wrote: > > Hi Heinrich, > >> On 25.03.21 08:18, Aswath Govindraju wrote: >>> Use dev_seq() to read aliases node's index and pass it as device number >>> for creating bulk device. >>> >>> Suggested-b

Re: [PATCH u-boot v4 36/36] ARM: enable LTO for some boards

2021-05-20 Thread Adam Ford
On Thu, May 20, 2021 at 6:25 AM Marek Behún wrote: > > Enable LTO for some boards that were tested by people on U-Boot Mailing > List. > > Signed-off-by: Marek Behún > Tested-by: Adam Ford > Tested-by: Pali Rohár > Tested-by: Tim Harvey Since the imx8mm beacon boards and the imx8mm venice boa

[PATCH] test: Fix filesystem tests always being skipped

2021-05-20 Thread Alper Nebi Yasak
Commit 1ba21bb06b08 ("test: Don't unmount not (yet) mounted system") fixes an issue in the filesystem tests where the test setup may fail to mount an image and still attempt to unmount it. However, the commit unintentionally breaks the test setups in two ways. The newly created unmounted filesyste

Re: [PATCH 1/1] test: revert Don't unmount not (yet) mounted system

2021-05-20 Thread Alper Nebi Yasak
On 17/05/2021 17:06, Andy Shevchenko wrote: > I would like to be helpful here and when I have time, I'll look at it > closer if nobody beats me up to it. Currently I checked the reason why > we skip them in my scenario: > short test summary info > ==

Re: [PATCH u-boot v4 01/36] regmap: fix a serious pointer casting bug

2021-05-20 Thread Marek Behun
> I don't see a changelog here but this is v4. Are you using patman? Changelog is in cover letter. Unfortunately I am not using patman yet. Marek

Re: [PATCH 1/1] test: revert Don't unmount not (yet) mounted system

2021-05-20 Thread Alper Nebi Yasak
On 17/05/2021 16:21, Heinrich Schuchardt wrote: > If you are asked for a sudo password, you have not install libguestfs. > > Please, install the missing package. This also might have ended up not in PATH like mkfs.* weren't in mine, does e.g. "guestmount --version" work from your shell?

Re: [PATCH 1/1] test: revert Don't unmount not (yet) mounted system

2021-05-20 Thread Heinrich Schuchardt
Am 20. Mai 2021 21:33:42 MESZ schrieb Alper Nebi Yasak : >On 17/05/2021 16:21, Heinrich Schuchardt wrote: >> If you are asked for a sudo password, you have not install >libguestfs. >> >> Please, install the missing package. > >This also might have ended up not in PATH like mkfs.* weren't in mine,

Re: [PATCH 06/18] image: Drop IMAGE_ENABLE_SHA1

2021-05-20 Thread Alex G.
On 5/20/21 12:52 PM, Simon Glass wrote: Hi Alex, On Wed, 19 May 2021 at 20:41, Alex G. wrote: On 5/19/21 4:55 PM, Simon Glass wrote: Hi Alex, On Wed, 19 May 2021 at 11:44, Alex G wrote: On 5/19/21 11:36 AM, Simon Glass wrote: Hi Alexandru, On Mon, 17 May 2021 at 10:38, Alexandru

Re: [PATCH 06/18] image: Drop IMAGE_ENABLE_SHA1

2021-05-20 Thread Simon Glass
Hi Alex, On Thu, 20 May 2021 at 17:13, Alex G. wrote: > > > > On 5/20/21 12:52 PM, Simon Glass wrote: > > Hi Alex, > > > > On Wed, 19 May 2021 at 20:41, Alex G. wrote: > >> > >> > >> > >> On 5/19/21 4:55 PM, Simon Glass wrote: > >>> Hi Alex, > >>> > >>> On Wed, 19 May 2021 at 11:44, Alex G wrot

Re: [PATCH 06/18] image: Drop IMAGE_ENABLE_SHA1

2021-05-20 Thread Alex G.
On 5/20/21 6:17 PM, Simon Glass wrote: Hi Alex, On Thu, 20 May 2021 at 17:13, Alex G. wrote: On 5/20/21 12:52 PM, Simon Glass wrote: Hi Alex, On Wed, 19 May 2021 at 20:41, Alex G. wrote: On 5/19/21 4:55 PM, Simon Glass wrote: Hi Alex, On Wed, 19 May 2021 at 11:44, Alex G wrote:

[PATCH] configs: ls2088aqds: fix synchronous exception

2021-05-20 Thread Biwen Li
From: Biwen Li IFC NOR flash base address of ls2088a is 0x85000, and env crc offset size is 0x50, so fix the macro CONFIG_ENV_ADDR to fix synchronous exception(access illegal address) Fixes: 59071804c1 ("configs: ls2080a: Correct ENV_ADDR value") Signed-off-by: Biwen Li --- configs/ls2

Re: [PATCH] configs: ls2088aqds: fix synchronous exception

2021-05-20 Thread Bin Meng
On Fri, May 21, 2021 at 12:16 PM Biwen Li wrote: > > From: Biwen Li > > IFC NOR flash base address of ls2088a is 0x85000, beyond 4GiB? > and env crc offset size is 0x50, so fix the macro > CONFIG_ENV_ADDR to fix synchronous exception(access illegal address) > > Fixes: 59071804c1 ("confi

RE: [PATCH] configs: ls2088aqds: fix synchronous exception

2021-05-20 Thread Biwen Li (OSS)
> -Original Message- > From: Bin Meng > Sent: 2021年5月21日 13:35 > To: Biwen Li (OSS) > Cc: Priyanka Jain ; U-Boot Mailing List > ; Biwen Li > Subject: Re: [PATCH] configs: ls2088aqds: fix synchronous exception > > On Fri, May 21, 2021 at 12:16 PM Biwen Li wrote: > > > > From: Biwen Li

<    1   2