* [PATCH] ARM: Make sure CPU_ARM940T kernel can be built.
@ 2025-09-25 21:33 Franz-Josef Haider
2025-09-30 12:09 ` Linus Walleij
0 siblings, 1 reply; 8+ messages in thread
From: Franz-Josef Haider @ 2025-09-25 21:33 UTC (permalink / raw)
To: linux
Cc: ardb, rmk+kernel, ebiggers, nathan, linus.walleij, rostedt, kees,
dave, fj.haider, linux-arm-kernel, linux-kernel, trivial
From 33ce5a26ef08199625bc5bb01a176047bfacff91 Mon Sep 17 00:00:00 2001
From: Franz-Josef Haider <fj.haider@outlook.com>
Date: Thu, 25 Sep 2025 22:14:07 +0300
Subject: [PATCH] ARM: Make sure CPU_ARM940T kernel can be built.
Fixes build for this cpu type.
Signed-off-by: Franz-Josef Haider <fj.haider@outlook.com>
---
arch/arm/Kconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index b1f3df39ed40..a498c9aae50e 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -322,7 +322,7 @@ config MMU
support by paged memory management. If unsure, say 'Y'.
config ARM_SINGLE_ARMV7M
- def_bool !MMU
+ def_bool !MMU && !CPU_ARM940T
select ARM_NVIC
select CPU_V7M
select NO_IOPORT_MAP
--
2.51.0
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] ARM: Make sure CPU_ARM940T kernel can be built.
2025-09-25 21:33 [PATCH] ARM: Make sure CPU_ARM940T kernel can be built Franz-Josef Haider
@ 2025-09-30 12:09 ` Linus Walleij
2025-10-01 16:04 ` Franz-Josef Haider
0 siblings, 1 reply; 8+ messages in thread
From: Linus Walleij @ 2025-09-30 12:09 UTC (permalink / raw)
To: Franz-Josef Haider
Cc: linux, ardb, rmk+kernel, ebiggers, nathan, rostedt, kees, dave,
linux-arm-kernel, linux-kernel, trivial
On Thu, Sep 25, 2025 at 11:33 PM Franz-Josef Haider
<fj.haider@outlook.com> wrote:
> From 33ce5a26ef08199625bc5bb01a176047bfacff91 Mon Sep 17 00:00:00 2001
> From: Franz-Josef Haider <fj.haider@outlook.com>
> Date: Thu, 25 Sep 2025 22:14:07 +0300
> Subject: [PATCH] ARM: Make sure CPU_ARM940T kernel can be built.
>
> Fixes build for this cpu type.
>
> Signed-off-by: Franz-Josef Haider <fj.haider@outlook.com>
Please elaborate a bit on this change in the commit message.
1. What were you trying to do.
2. What stopped you from doing what you wanted to do.
3. Why did you do this change to the kernel to do what you wanted
to do.
Should it not be:
!CPU_ARM740T && !CPU_ARM946E && !CPU_ARM940T
?
Yours,
Linus Walleij
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] ARM: Make sure CPU_ARM940T kernel can be built.
2025-09-30 12:09 ` Linus Walleij
@ 2025-10-01 16:04 ` Franz-Josef Haider
2025-10-01 19:14 ` Linus Walleij
2025-10-01 20:52 ` Arnd Bergmann
0 siblings, 2 replies; 8+ messages in thread
From: Franz-Josef Haider @ 2025-10-01 16:04 UTC (permalink / raw)
To: Linus Walleij
Cc: linux, ardb, rmk+kernel, ebiggers, nathan, rostedt, kees, dave,
linux-arm-kernel, linux-kernel, trivial
On 9/30/25 15:09, Linus Walleij wrote:
> On Thu, Sep 25, 2025 at 11:33 PM Franz-Josef Haider
> <fj.haider@outlook.com> wrote:
>
>> From 33ce5a26ef08199625bc5bb01a176047bfacff91 Mon Sep 17 00:00:00 2001
>> From: Franz-Josef Haider <fj.haider@outlook.com>
>> Date: Thu, 25 Sep 2025 22:14:07 +0300
>> Subject: [PATCH] ARM: Make sure CPU_ARM940T kernel can be built.
>>
>> Fixes build for this cpu type.
>>
>> Signed-off-by: Franz-Josef Haider <fj.haider@outlook.com>
> Please elaborate a bit on this change in the commit message.
>
> 1. What were you trying to do.
>
> 2. What stopped you from doing what you wanted to do.
>
> 3. Why did you do this change to the kernel to do what you wanted
> to do.
>
> Should it not be:
> !CPU_ARM740T && !CPU_ARM946E && !CPU_ARM940T
> ?
>
> Yours,
> Linus Walleij
Hello, I have done this change because when trying to "select CPU_ARM940T" from a Kconfig for a device with arm940t cpu, the build ends up failing with errors like
arch/arm/lib/ashldi3.S: Assembler messages:
arch/arm/lib/ashldi3.S:44: Error: cannot honor width suffix -- `rsb ip,r2,#32'
arch/arm/lib/ashldi3.S:45: Error: thumb conditional instruction should be in IT block -- `movmi r1,r1,lsl r2'
arch/arm/lib/ashldi3.S:46: Error: thumb conditional instruction should be in IT block -- `movpl r1,r0,lsl r3'
arch/arm/lib/ashldi3.S:48: Error: thumb conditional instruction should be in IT block -- `lsrmi r3,r0,ip'
arch/arm/lib/ashldi3.S:49: Error: thumb conditional instruction should be in IT block -- `orrmi r1,r1,r3'
arch/arm/lib/ashldi3.S:50: Error: cannot honor width suffix -- `mov r0,r0,lsl r2'
arch/arm/lib/ashldi3.S:43: Error: immediate value out of range
make[3]: *** [scripts/Makefile.build:430: arch/arm/lib/ashldi3.o] Error 1
make[2]: *** [scripts/Makefile.build:556: arch/arm/lib] Error 2
make[2]: *** Waiting for unfinished jobs....
With the change I am able to build a kernel which runs on a device with arm940t cpu (with the patch "ARM: Add missing mmu flags entry to arm940 proc info." which I've submitted as well. And with the necessary mach files etc).
I can elaborate on this in the commit message and also adjust the condition to include the other CPU types you mentioned.
Best regards and thank you,
Franz-Josef
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] ARM: Make sure CPU_ARM940T kernel can be built.
2025-10-01 16:04 ` Franz-Josef Haider
@ 2025-10-01 19:14 ` Linus Walleij
2025-10-01 20:52 ` Arnd Bergmann
1 sibling, 0 replies; 8+ messages in thread
From: Linus Walleij @ 2025-10-01 19:14 UTC (permalink / raw)
To: Franz-Josef Haider, Arnd Bergmann
Cc: linux, ardb, rmk+kernel, ebiggers, nathan, rostedt, kees, dave,
linux-arm-kernel, linux-kernel, trivial
On Wed, Oct 1, 2025 at 6:04 PM Franz-Josef Haider <fj.haider@outlook.com> wrote:
> Hello, I have done this change because when trying to "select CPU_ARM940T" from a Kconfig for a device with arm940t cpu, the build ends up failing with errors like
> arch/arm/lib/ashldi3.S: Assembler messages:
> arch/arm/lib/ashldi3.S:44: Error: cannot honor width suffix -- `rsb ip,r2,#32'
> arch/arm/lib/ashldi3.S:45: Error: thumb conditional instruction should be in IT block -- `movmi r1,r1,lsl r2'
> arch/arm/lib/ashldi3.S:46: Error: thumb conditional instruction should be in IT block -- `movpl r1,r0,lsl r3'
> arch/arm/lib/ashldi3.S:48: Error: thumb conditional instruction should be in IT block -- `lsrmi r3,r0,ip'
> arch/arm/lib/ashldi3.S:49: Error: thumb conditional instruction should be in IT block -- `orrmi r1,r1,r3'
> arch/arm/lib/ashldi3.S:50: Error: cannot honor width suffix -- `mov r0,r0,lsl r2'
> arch/arm/lib/ashldi3.S:43: Error: immediate value out of range
> make[3]: *** [scripts/Makefile.build:430: arch/arm/lib/ashldi3.o] Error 1
> make[2]: *** [scripts/Makefile.build:556: arch/arm/lib] Error 2
> make[2]: *** Waiting for unfinished jobs....
> With the change I am able to build a kernel which runs on a device with arm940t cpu (with the patch "ARM: Add missing mmu flags entry to arm940 proc info." which I've submitted as well. And with the necessary mach files etc).
>
> I can elaborate on this in the commit message and also adjust the condition to include the other CPU types you mentioned.
Yes please, thanks a lot Franz-Josef!
Also add:
Cc: stable@vger.kernel.org
in the bottom of the patch so this goes into stable.
Then eventually submit the patch to Russell's patch tracker when
we have reviewed it.
We (ARM SoC maintainers) are interested on what kind of system this is.
We really need to know if there are actively maintained ARM940t boards,
and with you posting this it seems the answer is yes, so please tell us
a bit about this device and what you're using it for.
Yours,
Linus Walleij
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] ARM: Make sure CPU_ARM940T kernel can be built.
2025-10-01 16:04 ` Franz-Josef Haider
2025-10-01 19:14 ` Linus Walleij
@ 2025-10-01 20:52 ` Arnd Bergmann
2025-10-02 15:34 ` Franz-Josef Haider
1 sibling, 1 reply; 8+ messages in thread
From: Arnd Bergmann @ 2025-10-01 20:52 UTC (permalink / raw)
To: Franz-Josef Haider, Linus Walleij
Cc: Russell King, Ard Biesheuvel, Russell King, Eric Biggers,
Nathan Chancellor, Steven Rostedt, Kees Cook, Dave Vasilevsky,
linux-arm-kernel, linux-kernel, trivial
On Wed, Oct 1, 2025, at 18:04, Franz-Josef Haider wrote:
> On 9/30/25 15:09, Linus Walleij wrote:
>> On Thu, Sep 25, 2025 at 11:33 PM Franz-Josef Haider <fj.haider@outlook.com> wrote:
>>
>>> From 33ce5a26ef08199625bc5bb01a176047bfacff91 Mon Sep 17 00:00:00 2001
>>> From: Franz-Josef Haider <fj.haider@outlook.com>
>
> Hello, I have done this change because when trying to "select
> CPU_ARM940T" from a Kconfig for a device with arm940t cpu, the build
> ends up failing with errors like
> arch/arm/lib/ashldi3.S: Assembler messages:
> arch/arm/lib/ashldi3.S:44: Error: cannot honor width suffix
> -- `rsb ip,r2,#32'
>
> With the change I am able to build a kernel which runs on a device with
> arm940t cpu (with the patch "ARM: Add missing mmu flags entry to arm940
> proc info." which I've submitted as well. And with the necessary mach
> files etc).
>
> I can elaborate on this in the commit message and also adjust the
> condition to include the other CPU types you mentioned.
Hi Franz-Josef,
We removed support for ARMv4T NOMMU a couple of years ago in
commit 2f618d5ef5dd ("ARM: remove support for NOMMU ARMv4/v5"),
in order to simplify the Kconfig CPU selection.
Adding a new platform in turn means you'll have to add that
infrastructure we skipped back then, and the dependency here
is only a very small part of that.
Do you have a public git tree with the rest of your patches?
Arnd
^ permalink raw reply [flat|nested] 8+ messages in thread* Re: [PATCH] ARM: Make sure CPU_ARM940T kernel can be built.
2025-10-01 20:52 ` Arnd Bergmann
@ 2025-10-02 15:34 ` Franz-Josef Haider
2025-10-02 23:02 ` Arnd Bergmann
0 siblings, 1 reply; 8+ messages in thread
From: Franz-Josef Haider @ 2025-10-02 15:34 UTC (permalink / raw)
To: Arnd Bergmann, Linus Walleij
Cc: Russell King, Ard Biesheuvel, Russell King, Eric Biggers,
Nathan Chancellor, Steven Rostedt, Kees Cook, Dave Vasilevsky,
linux-arm-kernel, linux-kernel, trivial
On 10/1/25 23:52, Arnd Bergmann wrote:
> On Wed, Oct 1, 2025, at 18:04, Franz-Josef Haider wrote:
>> On 9/30/25 15:09, Linus Walleij wrote:
>>> On Thu, Sep 25, 2025 at 11:33 PM Franz-Josef Haider <fj.haider@outlook.com> wrote:
>>>
>>>> From 33ce5a26ef08199625bc5bb01a176047bfacff91 Mon Sep 17 00:00:00 2001
>>>> From: Franz-Josef Haider <fj.haider@outlook.com>
>> Hello, I have done this change because when trying to "select
>> CPU_ARM940T" from a Kconfig for a device with arm940t cpu, the build
>> ends up failing with errors like
>> arch/arm/lib/ashldi3.S: Assembler messages:
>> arch/arm/lib/ashldi3.S:44: Error: cannot honor width suffix
>> -- `rsb ip,r2,#32'
>>
>> With the change I am able to build a kernel which runs on a device with
>> arm940t cpu (with the patch "ARM: Add missing mmu flags entry to arm940
>> proc info." which I've submitted as well. And with the necessary mach
>> files etc).
>>
>> I can elaborate on this in the commit message and also adjust the
>> condition to include the other CPU types you mentioned.
> Hi Franz-Josef,
>
> We removed support for ARMv4T NOMMU a couple of years ago in
> commit 2f618d5ef5dd ("ARM: remove support for NOMMU ARMv4/v5"),
> in order to simplify the Kconfig CPU selection.
>
> Adding a new platform in turn means you'll have to add that
> infrastructure we skipped back then, and the dependency here
> is only a very small part of that.
>
> Do you have a public git tree with the rest of your patches?
>
> Arnd
Hi,
Ok if the support for ARMv4T NOMMU has been removed, then maybe we can leave this as resolved.
It's actually just for a hobby project, nothing important. I just thought these two patches might be helpful to other people who encounter a similar issue on similar cpus, but if the support for ARMv4T NOMMU has been dropped then there is no point maybe.
Here are the patches for 6.2 in any case but it's very much a hacky WIP, and there is some stuff in there that's not needed anymore on top of later commits. https://github.com/krnlyng/linux-ipod/commits/n2g-wip
I also have a version on top of a recent (~29 SEPT 2025) commit locally if that is interesting too.
Best regards and thanks,
Franz-Josef
^ permalink raw reply [flat|nested] 8+ messages in thread* Re: [PATCH] ARM: Make sure CPU_ARM940T kernel can be built.
2025-10-02 15:34 ` Franz-Josef Haider
@ 2025-10-02 23:02 ` Arnd Bergmann
2025-10-24 13:51 ` Franz-Josef Haider
0 siblings, 1 reply; 8+ messages in thread
From: Arnd Bergmann @ 2025-10-02 23:02 UTC (permalink / raw)
To: Franz-Josef Haider, Linus Walleij
Cc: Russell King, Ard Biesheuvel, Russell King, Eric Biggers,
Nathan Chancellor, Steven Rostedt, Kees Cook, Dave Vasilevsky,
linux-arm-kernel, linux-kernel, trivial
On Thu, Oct 2, 2025, at 17:34, Franz-Josef Haider wrote:
> On 10/1/25 23:52, Arnd Bergmann wrote:
>
> Ok if the support for ARMv4T NOMMU has been removed, then maybe we can
> leave this as resolved.
>
> It's actually just for a hobby project, nothing important. I just
> thought these two patches might be helpful to other people who
> encounter a similar issue on similar cpus, but if the support for
> ARMv4T NOMMU has been dropped then there is no point maybe.
>
> Here are the patches for 6.2 in any case but it's very much a hacky
> WIP, and there is some stuff in there that's not needed anymore on top
> of later commits. https://github.com/krnlyng/linux-ipod/commits/n2g-wip
> I also have a version on top of a recent (~29 SEPT 2025) commit locally
> if that is interesting too.
Looking at your tree, I find that the ARMv4T NOMMU support is not
even that bad to put back, especially since commit 84fc86360623
("ARM: make ARCH_MULTIPLATFORM user-visible") made it possible to
add a 'depends on !ARCH_MULTIPLATFORM' in the platform specific
code.
I still think that this specific oneline patch is not helpful,
but the other one you sent is technically still a correct fix
and we should either merge that or drop the remnants of the
ARM740T/940T/946E code now that we know it's broken.
Similarly, the later ARM1176 based code that you based your
patches on does look worth cleaning up and merging if there are
still users.
For the specific s5l870x (arm940) SoC support, I see what you
mean with missing cleanups, but more importantly I think that
we will want to drop nommu support from arch/arm/ in a few years
as the remaining users all tend to fall into a similar class
as yours where the developers work on them for the fun of it
but without anyone else depending on it to run on the latest
kernels. Since there is a significant cost in continuing to
test and fix the special cases for nommu support overall, I
would prefer to draw the line at S5L8720 support and not merge
S5L8702 or earlier.
Arnd
^ permalink raw reply [flat|nested] 8+ messages in thread* Re: [PATCH] ARM: Make sure CPU_ARM940T kernel can be built.
2025-10-02 23:02 ` Arnd Bergmann
@ 2025-10-24 13:51 ` Franz-Josef Haider
0 siblings, 0 replies; 8+ messages in thread
From: Franz-Josef Haider @ 2025-10-24 13:51 UTC (permalink / raw)
To: Arnd Bergmann, Linus Walleij
Cc: Russell King, Ard Biesheuvel, Russell King, Eric Biggers,
Nathan Chancellor, Steven Rostedt, Kees Cook, Dave Vasilevsky,
linux-arm-kernel, linux-kernel, trivial
On 10/3/25 02:02, Arnd Bergmann wrote:
> On Thu, Oct 2, 2025, at 17:34, Franz-Josef Haider wrote:
>> On 10/1/25 23:52, Arnd Bergmann wrote:
>>
>> Ok if the support for ARMv4T NOMMU has been removed, then maybe we can
>> leave this as resolved.
>>
>> It's actually just for a hobby project, nothing important. I just
>> thought these two patches might be helpful to other people who
>> encounter a similar issue on similar cpus, but if the support for
>> ARMv4T NOMMU has been dropped then there is no point maybe.
>>
>> Here are the patches for 6.2 in any case but it's very much a hacky
>> WIP, and there is some stuff in there that's not needed anymore on top
>> of later commits. https://github.com/krnlyng/linux-ipod/commits/n2g-wip
>> I also have a version on top of a recent (~29 SEPT 2025) commit locally
>> if that is interesting too.
>
> Looking at your tree, I find that the ARMv4T NOMMU support is not
> even that bad to put back, especially since commit 84fc86360623
> ("ARM: make ARCH_MULTIPLATFORM user-visible") made it possible to
> add a 'depends on !ARCH_MULTIPLATFORM' in the platform specific
> code.
>
> I still think that this specific oneline patch is not helpful,
> but the other one you sent is technically still a correct fix
> and we should either merge that or drop the remnants of the
> ARM740T/940T/946E code now that we know it's broken.
>
> Similarly, the later ARM1176 based code that you based your
> patches on does look worth cleaning up and merging if there are
> still users.
>
> For the specific s5l870x (arm940) SoC support, I see what you
> mean with missing cleanups, but more importantly I think that
> we will want to drop nommu support from arch/arm/ in a few years
> as the remaining users all tend to fall into a similar class
> as yours where the developers work on them for the fun of it
> but without anyone else depending on it to run on the latest
> kernels. Since there is a significant cost in continuing to
> test and fix the special cases for nommu support overall, I
> would prefer to draw the line at S5L8720 support and not merge
> S5L8702 or earlier.
>
> Arnd
Ok, I think it would make sense to merge the other patch just for correctness sake or drop the ARM940T code entirely, but ofc it's not my decision to make.
I will ask the person who did the S5L8720 parts whether they want to cleanup&upstream the changes (I only did the S5L8702 parts).
Thanks and best regards,
Franz-Josef
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2025-10-24 13:50 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-09-25 21:33 [PATCH] ARM: Make sure CPU_ARM940T kernel can be built Franz-Josef Haider
2025-09-30 12:09 ` Linus Walleij
2025-10-01 16:04 ` Franz-Josef Haider
2025-10-01 19:14 ` Linus Walleij
2025-10-01 20:52 ` Arnd Bergmann
2025-10-02 15:34 ` Franz-Josef Haider
2025-10-02 23:02 ` Arnd Bergmann
2025-10-24 13:51 ` Franz-Josef Haider
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®