diff mbox series

arm: Enable SYS_THUMB_BUILD on AT91

Message ID 20231105022742.632175-1-seanga2@gmail.com
State Accepted
Commit a9a73799731807cca117d234c4338b710db3cfdd
Delegated to: Eugen Hristev
Headers show
Series arm: Enable SYS_THUMB_BUILD on AT91 | expand

Commit Message

Sean Anderson Nov. 5, 2023, 2:27 a.m. UTC
Several AT91 boards are quite close to their SPL size limit. For example,
sama5d27_wlsom1_ek_mmc is just 173 bytes short of its limit and doesn't
even fit with older GCCs.

All AT91 processors should have thumb support. Enable SYS_THUMB_BUILD. This
shrinks SPL by around 30%.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
---
This has been BUILD TESTED ONLY!

 arch/arm/Kconfig | 1 +
 1 file changed, 1 insertion(+)

Comments

Tom Rini Nov. 16, 2023, 6:47 p.m. UTC | #1
On Sat, Nov 04, 2023 at 10:27:42PM -0400, Sean Anderson wrote:

> Several AT91 boards are quite close to their SPL size limit. For example,
> sama5d27_wlsom1_ek_mmc is just 173 bytes short of its limit and doesn't
> even fit with older GCCs.
> 
> All AT91 processors should have thumb support. Enable SYS_THUMB_BUILD. This
> shrinks SPL by around 30%.
> 
> Signed-off-by: Sean Anderson <seanga2@gmail.com>
> ---
> This has been BUILD TESTED ONLY!

We in turn need this for Sean's other cleanup series to go in. Is this
OK? Would it be safer if it was only for CPU_V7A ? I do have
recollections of thumb being sometimes buggy prior to v7a cores. Thanks!
Eugen Hristev Nov. 16, 2023, 8:42 p.m. UTC | #2
On 11/16/23 20:47, Tom Rini wrote:
> On Sat, Nov 04, 2023 at 10:27:42PM -0400, Sean Anderson wrote:
> 
>> Several AT91 boards are quite close to their SPL size limit. For example,
>> sama5d27_wlsom1_ek_mmc is just 173 bytes short of its limit and doesn't
>> even fit with older GCCs.
>>
>> All AT91 processors should have thumb support. Enable SYS_THUMB_BUILD. This
>> shrinks SPL by around 30%.
>>
>> Signed-off-by: Sean Anderson <seanga2@gmail.com>
>> ---
>> This has been BUILD TESTED ONLY!
> 
> We in turn need this for Sean's other cleanup series to go in. Is this
> OK? Would it be safer if it was only for CPU_V7A ? I do have
> recollections of thumb being sometimes buggy prior to v7a cores. Thanks!
> 

Hi Tom,

I would like this to be tested on a few boards at least. There are 
boards with Cortex A5, A7 and ARM926 which are important, one of each of 
them and booting Linux should be enough I think.
Nicolas, Aubin ? I remember you guys have also a CI tool that is fairly 
easy to use if you just push a branch/commit.

+ Mihai as well.

Eugen
Mihai Sain Nov. 17, 2023, 9:15 a.m. UTC | #3
Hi Eugen,

I built new binaries with CONFIG_SYS_THUMB_BUILD=y for sam9x60_curiosity, sama5d29_curiosity, sama7g5ek and new sam9x75_curiosity board.
I used the latest u-boot/master branch for this test.
I noticed that the file size of the binaries have beed reduced with aprox 150KiB due to CONFIG_SYS_THUMB_BUILD=y.
After flashing the new binaries on these boards I can confirm that on all boards the linux kernel was booted properly from mmc, qspi-flash, nand-flash and usb.
I tested using bootm and bootz commands.

Best regards,
Mihai Sain

--------------------------------------------------------------------

On 11/16/23 20:47, Tom Rini wrote:
> On Sat, Nov 04, 2023 at 10:27:42PM -0400, Sean Anderson wrote:
>
>> Several AT91 boards are quite close to their SPL size limit. For 
>> example, sama5d27_wlsom1_ek_mmc is just 173 bytes short of its limit 
>> and doesn't even fit with older GCCs.
>>
>> All AT91 processors should have thumb support. Enable 
>> SYS_THUMB_BUILD. This shrinks SPL by around 30%.
>>
>> Signed-off-by: Sean Anderson <seanga2@gmail.com>
>> ---
>> This has been BUILD TESTED ONLY!
>
> We in turn need this for Sean's other cleanup series to go in. Is this 
> OK? Would it be safer if it was only for CPU_V7A ? I do have 
> recollections of thumb being sometimes buggy prior to v7a cores. Thanks!
>

Hi Tom,

I would like this to be tested on a few boards at least. There are boards with Cortex A5, A7 and ARM926 which are important, one of each of them and booting Linux should be enough I think.
Nicolas, Aubin ? I remember you guys have also a CI tool that is fairly easy to use if you just push a branch/commit.

+ Mihai as well.

Eugen
Eugen Hristev Nov. 17, 2023, 11:58 a.m. UTC | #4
On 11/17/23 11:15, Mihai.Sain@microchip.com wrote:
> Hi Eugen,
> 
> I built new binaries with CONFIG_SYS_THUMB_BUILD=y for sam9x60_curiosity, sama5d29_curiosity, sama7g5ek and new sam9x75_curiosity board.
> I used the latest u-boot/master branch for this test.
> I noticed that the file size of the binaries have beed reduced with aprox 150KiB due to CONFIG_SYS_THUMB_BUILD=y.
> After flashing the new binaries on these boards I can confirm that on all boards the linux kernel was booted properly from mmc, qspi-flash, nand-flash and usb.
> I tested using bootm and bootz commands.

Thank you Mihai,

Tom, Sean, are you okay with this going in the next merge window ?
It is definitely not a fix, so that would be the best.

Eugen

> 
> Best regards,
> Mihai Sain
> 
> --------------------------------------------------------------------
> 
> On 11/16/23 20:47, Tom Rini wrote:
>> On Sat, Nov 04, 2023 at 10:27:42PM -0400, Sean Anderson wrote:
>>
>>> Several AT91 boards are quite close to their SPL size limit. For
>>> example, sama5d27_wlsom1_ek_mmc is just 173 bytes short of its limit
>>> and doesn't even fit with older GCCs.
>>>
>>> All AT91 processors should have thumb support. Enable
>>> SYS_THUMB_BUILD. This shrinks SPL by around 30%.
>>>
>>> Signed-off-by: Sean Anderson <seanga2@gmail.com>
>>> ---
>>> This has been BUILD TESTED ONLY!
>>
>> We in turn need this for Sean's other cleanup series to go in. Is this
>> OK? Would it be safer if it was only for CPU_V7A ? I do have
>> recollections of thumb being sometimes buggy prior to v7a cores. Thanks!
>>
> 
> Hi Tom,
> 
> I would like this to be tested on a few boards at least. There are boards with Cortex A5, A7 and ARM926 which are important, one of each of them and booting Linux should be enough I think.
> Nicolas, Aubin ? I remember you guys have also a CI tool that is fairly easy to use if you just push a branch/commit.
> 
> + Mihai as well.
> 
> Eugen
Tom Rini Nov. 17, 2023, 1:30 p.m. UTC | #5
On Fri, Nov 17, 2023 at 01:58:35PM +0200, Eugen Hristev wrote:
> On 11/17/23 11:15, Mihai.Sain@microchip.com wrote:
> > Hi Eugen,
> > 
> > I built new binaries with CONFIG_SYS_THUMB_BUILD=y for sam9x60_curiosity, sama5d29_curiosity, sama7g5ek and new sam9x75_curiosity board.
> > I used the latest u-boot/master branch for this test.
> > I noticed that the file size of the binaries have beed reduced with aprox 150KiB due to CONFIG_SYS_THUMB_BUILD=y.
> > After flashing the new binaries on these boards I can confirm that on all boards the linux kernel was booted properly from mmc, qspi-flash, nand-flash and usb.
> > I tested using bootm and bootz commands.
> 
> Thank you Mihai,
> 
> Tom, Sean, are you okay with this going in the next merge window ?
> It is definitely not a fix, so that would be the best.

Thanks. I was looking at this for a series to go in to -next at this
point, so v2024.04 release.
Tom Rini Nov. 17, 2023, 1:40 p.m. UTC | #6
On Sat, 04 Nov 2023 22:27:42 -0400, Sean Anderson wrote:

> Several AT91 boards are quite close to their SPL size limit. For example,
> sama5d27_wlsom1_ek_mmc is just 173 bytes short of its limit and doesn't
> even fit with older GCCs.
> 
> All AT91 processors should have thumb support. Enable SYS_THUMB_BUILD. This
> shrinks SPL by around 30%.
> 
> [...]

Applied to u-boot/next, thanks!
Eugen Hristev Nov. 17, 2023, 1:45 p.m. UTC | #7
On 11/17/23 15:40, Tom Rini wrote:
> On Sat, 04 Nov 2023 22:27:42 -0400, Sean Anderson wrote:
> 
>> Several AT91 boards are quite close to their SPL size limit. For example,
>> sama5d27_wlsom1_ek_mmc is just 173 bytes short of its limit and doesn't
>> even fit with older GCCs.
>>
>> All AT91 processors should have thumb support. Enable SYS_THUMB_BUILD. This
>> shrinks SPL by around 30%.
>>
>> [...]
> 
> Applied to u-boot/next, thanks!
> 

so I'd assume that it would go through at91 tree.
Tom Rini Nov. 17, 2023, 1:46 p.m. UTC | #8
On Fri, Nov 17, 2023 at 03:45:02PM +0200, Eugen Hristev wrote:
> On 11/17/23 15:40, Tom Rini wrote:
> > On Sat, 04 Nov 2023 22:27:42 -0400, Sean Anderson wrote:
> > 
> > > Several AT91 boards are quite close to their SPL size limit. For example,
> > > sama5d27_wlsom1_ek_mmc is just 173 bytes short of its limit and doesn't
> > > even fit with older GCCs.
> > > 
> > > All AT91 processors should have thumb support. Enable SYS_THUMB_BUILD. This
> > > shrinks SPL by around 30%.
> > > 
> > > [...]
> > 
> > Applied to u-boot/next, thanks!
> > 
> 
> so I'd assume that it would go through at91 tree.

Ah, sorry. Since it was blocking two other series from coming in and you
had gotten it tested I had assumed I could pull it to -next now to
unblock that work.
Eugen Hristev Nov. 17, 2023, 1:49 p.m. UTC | #9
On 11/17/23 15:46, Tom Rini wrote:
> On Fri, Nov 17, 2023 at 03:45:02PM +0200, Eugen Hristev wrote:
>> On 11/17/23 15:40, Tom Rini wrote:
>>> On Sat, 04 Nov 2023 22:27:42 -0400, Sean Anderson wrote:
>>>
>>>> Several AT91 boards are quite close to their SPL size limit. For example,
>>>> sama5d27_wlsom1_ek_mmc is just 173 bytes short of its limit and doesn't
>>>> even fit with older GCCs.
>>>>
>>>> All AT91 processors should have thumb support. Enable SYS_THUMB_BUILD. This
>>>> shrinks SPL by around 30%.
>>>>
>>>> [...]
>>>
>>> Applied to u-boot/next, thanks!
>>>
>>
>> so I'd assume that it would go through at91 tree.
> 
> Ah, sorry. Since it was blocking two other series from coming in and you
> had gotten it tested I had assumed I could pull it to -next now to
> unblock that work.
> 

This is yet another time at91 patches get applied directly. Maybe you do 
not really need an at91 maintainer ?
Tom Rini Nov. 17, 2023, 2:03 p.m. UTC | #10
On Fri, Nov 17, 2023 at 03:49:57PM +0200, Eugen Hristev wrote:
> On 11/17/23 15:46, Tom Rini wrote:
> > On Fri, Nov 17, 2023 at 03:45:02PM +0200, Eugen Hristev wrote:
> > > On 11/17/23 15:40, Tom Rini wrote:
> > > > On Sat, 04 Nov 2023 22:27:42 -0400, Sean Anderson wrote:
> > > > 
> > > > > Several AT91 boards are quite close to their SPL size limit. For example,
> > > > > sama5d27_wlsom1_ek_mmc is just 173 bytes short of its limit and doesn't
> > > > > even fit with older GCCs.
> > > > > 
> > > > > All AT91 processors should have thumb support. Enable SYS_THUMB_BUILD. This
> > > > > shrinks SPL by around 30%.
> > > > > 
> > > > > [...]
> > > > 
> > > > Applied to u-boot/next, thanks!
> > > > 
> > > 
> > > so I'd assume that it would go through at91 tree.
> > 
> > Ah, sorry. Since it was blocking two other series from coming in and you
> > had gotten it tested I had assumed I could pull it to -next now to
> > unblock that work.
> 
> This is yet another time at91 patches get applied directly. Maybe you do not
> really need an at91 maintainer ?

U-Boot does not tend to have the strict sub-tree breakdown that the
kernel does. Given what happened last time I was hoping that reaching
out and then that you were able to have the changes tested would be
sufficient for changes going to -next, rather than the current release.
In future I will just wait for changes to come via the at91 tree, like I
do for some other areas where the overall custodian prefers to have a
more strict policy. Sorry.
diff mbox series

Patch

diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index d812685c984..a589cee395d 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -568,6 +568,7 @@  config ARCH_AT91
 	select GPIO_EXTRA_HEADER
 	select SPL_BOARD_INIT if SPL && !TARGET_SMARTWEB
 	select SPL_SEPARATE_BSS if SPL
+	imply SYS_THUMB_BUILD
 
 config ARCH_DAVINCI
 	bool "TI DaVinci"