New kernels

AmigaOne X1000 platform specific issues related to Linux only.
User avatar
xeno74
Posts: 9324
Joined: Fri Mar 23, 2012 7:58 am

Re: New kernels

Post by xeno74 »

FYI because of the issue with detecting of ATA disks:
Marc Zyngier wrote: Can you please give the following hack a go and post the result
(including the full dmesg)?

Thanks,

M.

Code: Select all

index 32be5a03951f..8cf0cc9b7caf 100644
--- a/drivers/of/irq.c
+++ b/drivers/of/irq.c
@@ -156,14 +156,15 @@ int of_irq_parse_raw(const __be32 *addr, struct of_phandle_args *out_irq)
 
 	/* Now start the actual "proper" walk of the interrupt tree */
 	while (ipar != NULL) {
+		bool intc = of_property_read_bool(ipar, "interrupt-controller");
+
 		/*
 		 * Now check if cursor is an interrupt-controller and
 		 * if it is then we are done, unless there is an
 		 * interrupt-map which takes precedence.
 		 */
 		imap = of_get_property(ipar, "interrupt-map", &imaplen);
-		if (imap == NULL &&
-		    of_property_read_bool(ipar, "interrupt-controller")) {
+		if (imap == NULL && intc) {
 			pr_debug(" -> got it !\n");
 			return 0;
 		}
@@ -244,8 +245,14 @@ int of_irq_parse_raw(const __be32 *addr, struct of_phandle_args *out_irq)
 
 			pr_debug(" -> imaplen=%d\n", imaplen);
 		}
-		if (!match)
+		if (!match) {
+			if (intc) {
+				pr_info("%pOF interrupt-map failed, using interrupt-controller\n", ipar);
+				return 0;
+			}
+
 			goto fail;
+		}
 
 		/*
 		 * Successfully parsed an interrrupt-map translation; copy new
The detecting of the ATA disks works with this patch! :-)

if (imap == NULL && intc) // If the return value isn't NULL then there isn't an interrupt-map. That means, this part was successful (&&) and "intc" will evaluated (Testing of interrupt-controller).

dmesg: https://pastebin.com/WXQsKrbb

Here is the alpha6 of kernel 5.16 with this patch: vmlinux-5.16-a6-2. You can use it with the kernel modules from the alpha6 package.

I reported the result to the kernel developers today.

Link: [PASEMI] Nemo board doesn't recognize any ATA disks with the pci-v5.16 updates
http://www.amigalinux.org
http://www.supertuxkart-amiga.de

Running Linux on AmigaONEs can require some tinkering.
User avatar
xeno74
Posts: 9324
Joined: Fri Mar 23, 2012 7:58 am

Re: New kernels

Post by xeno74 »

Marc Zyngier has released a new patch because of the issue with detecting of ATA disks.

Link: [PATCH] of/irq: Don't ignore interrupt-controller when interrupt-map failed
http://www.amigalinux.org
http://www.supertuxkart-amiga.de

Running Linux on AmigaONEs can require some tinkering.
User avatar
xeno74
Posts: 9324
Joined: Fri Mar 23, 2012 7:58 am

Re: New kernels

Post by xeno74 »

FYI:

Code: Select all

[irqchip: irq/irqchip-fixes] of/irq: Don't ignore interrupt-controller when interrupt-map failed

The following commit has been merged into the irq/irqchip-fixes branch of irqchip:

Commit-ID:     10a20b34d735fb4a4af067919b9c0a1c870dac99
Gitweb:        https://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms/10a20b34d735fb4a4af067919b9c0a1c870dac99
Author:        Marc Zyngier <maz@kernel.org>
AuthorDate:    Fri, 12 Nov 2021 14:10:39 
Committer:     Marc Zyngier <maz@kernel.org>
CommitterDate: Fri, 12 Nov 2021 16:10:00 

of/irq: Don't ignore interrupt-controller when interrupt-map failed

Since 041284181226 ("of/irq: Allow matching of an interrupt-map local
to an interrupt controller"), the irq code favors using an interrupt-map
over a interrupt-controller property if both are available, while the
earlier behaviour was to ignore the interrupt-map altogether.

However, we now end-up with the opposite behaviour, which is to
ignore the interrupt-controller property even if the interrupt-map
fails to match its input. This new behaviour breaks the AmigaOne
X1000 machine, which ships with an extremely "creative" (read:
broken) device tree.

Fix this by allowing the interrupt-controller property to be selected
when interrupt-map fails to match anything.

Fixes: 041284181226 ("of/irq: Allow matching of an interrupt-map local to an interrupt controller")
Reported-by: Christian Zigotzky <chzigotzky@xenosoft.de>
Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/78308692-02e6-9544-4035-3171a8e1e6d4@xenosoft.de
Link: https://lore.kernel.org/r/20211112143644.434995-1-maz@kernel.org
Cc: Bjorn Helgaas <bhelgaas@google.com>
---
drivers/of/irq.c | 19 ++++++++++++++++---
1 file changed, 16 insertions(+), 3 deletions(-)

diff --git a/drivers/of/irq.c b/drivers/of/irq.c
index 32be5a0..b10f015 100644
--- a/drivers/of/irq.c
+++ b/drivers/of/irq.c
@@ -161,9 +161,10 @@ int of_irq_parse_raw(const __be32 *addr, struct of_phandle_args *out_irq)
        * if it is then we are done, unless there is an
        * interrupt-map which takes precedence.
        */
+        bool intc = of_property_read_bool(ipar, "interrupt-controller");
+
       imap = of_get_property(ipar, "interrupt-map", &imaplen);
-        if (imap == NULL &&
-            of_property_read_bool(ipar, "interrupt-controller")) {
+        if (imap == NULL && intc) {
           pr_debug(" -> got it !\n");
           return 0;
       }
@@ -244,8 +245,20 @@ int of_irq_parse_raw(const __be32 *addr, struct of_phandle_args *out_irq)

           pr_debug(" -> imaplen=%d\n", imaplen);
       }
-        if (!match)
+        if (!match) {
+            if (intc) {
+                /*
+                 * The PASEMI Nemo is a known offender, so
+                 * let's only warn for anyone else.
+                 */
+                WARN(!IS_ENABLED(CONFIG_PPC_PASEMI),
+                     "%pOF interrupt-map failed, using interrupt-controller\n",
+                     ipar);
+                return 0;
+            }
+
           goto fail;
+        }

       /*
        * Successfully parsed an interrrupt-map translation; copy new
http://www.amigalinux.org
http://www.supertuxkart-amiga.de

Running Linux on AmigaONEs can require some tinkering.
User avatar
xeno74
Posts: 9324
Joined: Fri Mar 23, 2012 7:58 am

Re: New kernels

Post by xeno74 »

http://www.amigalinux.org
http://www.supertuxkart-amiga.de

Running Linux on AmigaONEs can require some tinkering.
User avatar
xeno74
Posts: 9324
Joined: Fri Mar 23, 2012 7:58 am

Re: New kernels

Post by xeno74 »

Hi All,

I am happy to announce the RC2 of kernel 5.16 for the X1000 and X5000.

New:
Download: linux-image-5.16-rc2-X1000_X5000.tar.gz

Image

Please test the kernels.

Thanks,
Christian
http://www.amigalinux.org
http://www.supertuxkart-amiga.de

Running Linux on AmigaONEs can require some tinkering.
User avatar
xeno74
Posts: 9324
Joined: Fri Mar 23, 2012 7:58 am

Re: New kernels

Post by xeno74 »

The RC3 is still in testing. I will release it at the weekend.
http://www.amigalinux.org
http://www.supertuxkart-amiga.de

Running Linux on AmigaONEs can require some tinkering.
User avatar
Hypex
Beta Tester
Beta Tester
Posts: 645
Joined: Mon Dec 20, 2010 2:23 pm
Location: Vic. Australia.

Re: New kernels

Post by Hypex »

Tested RC1 through RC3 of 5.16. Kernel works fine but there is a sound issue. There is a note from kernel after detecting the sound chip, which it appears to locate fine, but then says it can't probe any codecs.

I tested sound from Fienix and it's silent. I checked Sound and it only showed my Radeon sound and doesn't detect my X1000 sound.

I'd post the boot log but have no idea where it is! I think I'm lost because of systemd. There is no /var/log/kernel.log or whatever it is called and the Log app doesn't help as it only shows basic stuff.
User avatar
xeno74
Posts: 9324
Joined: Fri Mar 23, 2012 7:58 am

Re: New kernels

Post by xeno74 »

Hypex wrote: Wed Dec 01, 2021 10:25 am Tested RC1 through RC3 of 5.16. Kernel works fine
Great! Thanks a lot for testing! :-)
Hypex wrote: Wed Dec 01, 2021 10:25 am but there is a sound issue.
Have you copied the kernel modules directories to /lib/modules yet?
http://www.amigalinux.org
http://www.supertuxkart-amiga.de

Running Linux on AmigaONEs can require some tinkering.
User avatar
xeno74
Posts: 9324
Joined: Fri Mar 23, 2012 7:58 am

Re: New kernels

Post by xeno74 »

Hi All,

It's testing time. :-)

I released the RC3 of kernel 5.16 for testing today.

New:
Download: linux-image-5.16-rc3-X1000_X5000.tar.gz

Image

Please test the kernels.

Thanks,
Christian
http://www.amigalinux.org
http://www.supertuxkart-amiga.de

Running Linux on AmigaONEs can require some tinkering.
User avatar
Hypex
Beta Tester
Beta Tester
Posts: 645
Joined: Mon Dec 20, 2010 2:23 pm
Location: Vic. Australia.

Re: New kernels

Post by Hypex »

xeno74 wrote: Wed Dec 01, 2021 5:02 pm Have you copied the kernel modules directories to /lib/modules yet?
Yes, they are copied using my boot manager. I checked and the kernel folder is there. I wouldn't expect the system to boot otherwise.

It could be my Fienix. I'm used to things not working. Things like printing and other standard services I'm used to on other Linux just don't work. And the software for it isn't in the channel as standard. I thought it was just a Fienix thing since I copied the whole 4GB image when I installed it to HDD, or whatever the size is, so the full Fienix should be on my system.
Post Reply