Kernel 4.14

AmigaOne X5000 platform specific issues related to Linux only.
Post Reply
User avatar
xeno74
Posts: 9349
Joined: Fri Mar 23, 2012 7:58 am

Kernel 4.14

Post by xeno74 »

Hi Everyone,

The merge window is open for the future kernel 4.14. A lot of source code has been added for the kernel 4.14 to the Linux git.

Here is the first alpha for the X5000 and X1000.

New:
Download: vmlinux-4.14-alpha1-AmigaOne_X1000_X5000.tar.gz

Image

Please test it.

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

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

Re: Kernel 4.14

Post by xeno74 »

Hi All,

Here is the second alpha with the first PowerPC updates for the X5000 and X1000.

New:
Download: vmlinux-4.14-alpha2-AmigaOne_X1000_X5000.tar.gz

Image

Please test it.

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

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

Re: Kernel 4.14

Post by xeno74 »

Hi All,

I tested the alpha2 on my AmigaOne X5000 today. Unfortunately the hardware 3D acceleration doesn't work anymore. I tested it with ubuntu MATE 16.04.3 LTS and with the MATE PowerPC Remix 2017. On my AmigaOne X1000, the hardware 3D acceleration works without any problems. It also works with the first alpha on my AmigaOne X5000. Maybe a new bug came with the first PowerPC updates. I reduced the RAM to 3.5GB but without any success.

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

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

Re: Kernel 4.14

Post by xeno74 »

Hi All,

I was able to remove the first PowerPC updates.

Code: Select all

git revert bac65d9d87b383471d8d29128319508d71b74180 -m 1

Code: Select all

[master 5fd2e41] Revert "Merge tag 'powerpc-4.14-1' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux"
After that I compiled a new alpha2 without the first PowerPC updates.

Download: uImage-4.14-alpha2-without-powerpc-updates

Please test the hardware 3D acceleration.

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

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

Re: Kernel 4.14

Post by xeno74 »

Hi All,

I tested the alpha2 without the first PowerPC updates today and the hardware 3D acceleration works again on my AmigaOne X5000. :-) That means, there is a bug in the first PowerPC updates somewhere.

Please help me to find the bug in the first PowerPC updates.

Please note: The hardware 3D acceleration works without any problems on my AmigaOne X1000. This bug only affects the AmigaOne X5000.

Screenshot of ubuntu MATE 16.04.3 LTS PowerPC with the alpha2-2 of kernel 4.14 on my A-EON AmigaOne X5000/020:

Image

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

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

Re: Kernel 4.14

Post by xeno74 »

Hi All,

I try to figure out what the problem is. Here are the first results.

Kernel 4.14 alpha2 with the first PowerPC updates on ubuntu MATE 16.04.3 LTS PowerPC.

Code: Select all

export LIBGL_DEBUG=verbose

Code: Select all

gdb glxgears

Code: Select all

run
Output:

Code: Select all

Starting program: /usr/bin/glxgears 
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/powerpc-linux-gnu/libthread_db.so.1".
libGL: OpenDriver: trying /usr/lib/powerpc-linux-gnu/dri/tls/r600_dri.so
libGL: OpenDriver: trying /usr/lib/powerpc-linux-gnu/dri/r600_dri.so
[New Thread 0xf7fbd450 (LWP 7135)]
libGL: Can't open configuration file /home/amigaone/.drirc: No such file or directory.
libGL: Can't open configuration file /home/amigaone/.drirc: No such file or directory.
libGL: Using DRI2 for screen 0

Thread 1 "glxgears" received signal SIGBUS, Bus error.
memset () at ../sysdeps/powerpc/powerpc32/memset.S:293
293	../sysdeps/powerpc/powerpc32/memset.S: No such file or directory.

Code: Select all

bt
Output:

Code: Select all

(gdb) bt
#0  memset () at ../sysdeps/powerpc/powerpc32/memset.S:293
#1  0x0efad840 in ?? () from /usr/lib/powerpc-linux-gnu/dri/r600_dri.so
#2  0x0f3966f8 in ?? () from /usr/lib/powerpc-linux-gnu/dri/r600_dri.so
#3  0x0ef84334 in ?? () from /usr/lib/powerpc-linux-gnu/dri/r600_dri.so
#4  0x0f1fb4d0 in ?? () from /usr/lib/powerpc-linux-gnu/dri/r600_dri.so
#5  0x0f38d1dc in ?? () from /usr/lib/powerpc-linux-gnu/dri/r600_dri.so
#6  0x0f390a10 in ?? () from /usr/lib/powerpc-linux-gnu/dri/r600_dri.so
#7  0x0f39cd28 in ?? () from /usr/lib/powerpc-linux-gnu/dri/r600_dri.so
#8  0x0f39d56c in ?? () from /usr/lib/powerpc-linux-gnu/dri/r600_dri.so
#9  0x0f390150 in ?? () from /usr/lib/powerpc-linux-gnu/dri/r600_dri.so
#10 0x0f1fe9bc in ?? () from /usr/lib/powerpc-linux-gnu/dri/r600_dri.so
#11 0x0eef0a24 in ?? () from /usr/lib/powerpc-linux-gnu/dri/r600_dri.so
#12 0x0eee92c0 in ?? () from /usr/lib/powerpc-linux-gnu/dri/r600_dri.so
#13 0x0ed9fd54 in ?? () from /usr/lib/powerpc-linux-gnu/dri/r600_dri.so
#14 0x0eda0928 in ?? () from /usr/lib/powerpc-linux-gnu/dri/r600_dri.so
#15 0x0eee8ab8 in ?? () from /usr/lib/powerpc-linux-gnu/dri/r600_dri.so
#16 0x0eee7414 in ?? () from /usr/lib/powerpc-linux-gnu/dri/r600_dri.so
#17 0x0ffb46b8 in ?? () from /usr/lib/powerpc-linux-gnu/mesa/libGL.so.1
#18 0x0ff7c174 in glXMakeCurrentReadSGI ()
   from /usr/lib/powerpc-linux-gnu/mesa/libGL.so.1
#19 0x10001090 in ?? ()
#20 0x0fb78854 in generic_start_main (main=0x10000eb0, argc=1, 
    argv=0xffffe1b4, auxvec=0xffffe29c, init=<optimised out>, 
---Type <return> to continue, or q <return> to quit---
    rtld_fini=<optimised out>, stack_end=<optimised out>, fini=<optimised out>)
    at ../csu/libc-start.c:291
#21 0x0fb78a1c in __libc_start_main (argc=<optimised out>, 
    argv=<optimised out>, ev=<optimised out>, auxvec=<optimised out>, 
    rtld_fini=<optimised out>, stinfo=<optimised out>, 
    stack_on_entry=<optimised out>)
    at ../sysdeps/unix/sysv/linux/powerpc/libc-start.c:116
#22 0x00000000 in ?? ()
Cheers,
Christian
http://www.amigalinux.org
http://www.supertuxkart-amiga.de

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

Re: Kernel 4.14

Post by xeno74 »

Hi All,

I informed the Linux PPC developers about the issue with the hardware 3D acceleration today. I hope they can help us. I will continue to try to figure out what the problem is.

Please note: The hardware 3D acceleration works without any problems on my AmigaOne X1000. This bug only affects the AmigaOne X5000.

Cheers,
Christian
On 11 September 2017 at 10:33AM, Christian Zigotzky wrote to the linuxppc-dev mailing list wrote:
Hi All,

I tested the latest Git kernel version with the new PowerPC updates 4.14-1 [0][1] on my Varisys Cyrus Plus board (A-EON AmigaOne X5000) [2][3] with a Qoriq P5020 PowerPC CPU from NXP yesterday. Unfortunately the hardware 3D acceleration doesn't work anymore since the PowerPC updates 4.14-1 [0]. I tested it with ubuntu MATE 16.04.3 LTS PowerPC (64-bit kernel and 32-bit userland) and with the MATE PowerPC Remix 2017 (64-bit kernel and 32-bit userland) [4]. I reduced the RAM to 3.5GB via kernel boot arguments but without any success. (mem=3500M)

On my Varisys Nemo board (A-EON AmigaOne X1000) [5], the hardware 3D acceleration works without any problems with the new PowerPC updates 4.14-1 [0][1]. It also works with the Git version from Thu Sep 07, 2017 6:29 pm [6] on my Varisys Cyrus Plus board (A-EON AmigaOne X5000) [2][3]. (without the PowerPC updates 4.14-1 [0])

I was able to remove the first PowerPC updates.

git revert bac65d9d87b383471d8d29128319508d71b74180 -m 1

Output: [master 5fd2e41] Revert "Merge tag 'powerpc-4.14-1' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux"

After that I compiled a new Git kernel version without the first PowerPC updates [7]. I tested this version yesterday and the hardware 3D acceleration works again on my Varisys Cyrus Plus board. That means, there is a bug in the first PowerPC updates.

I tried to figure out what the problem is yesterday. Here are the results.

export LIBGL_DEBUG=verbose

gdb glxgears

run

Output:

Starting program: /usr/bin/glxgears
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/powerpc-linux-gnu/libthread_db.so.1".
libGL: OpenDriver: trying /usr/lib/powerpc-linux-gnu/dri/tls/r600_dri.so
libGL: OpenDriver: trying /usr/lib/powerpc-linux-gnu/dri/r600_dri.so
[New Thread 0xf7fbd450 (LWP 7135)]
libGL: Can't open configuration file /home/amigaone/.drirc: No such file or directory.
libGL: Can't open configuration file /home/amigaone/.drirc: No such file or directory.
libGL: Using DRI2 for screen 0

Thread 1 "glxgears" received signal SIGBUS, Bus error.
memset () at ../sysdeps/powerpc/powerpc32/memset.S:293
293 ../sysdeps/powerpc/powerpc32/memset.S: No such file or directory.

----------

bt

Output:

#0 memset () at ../sysdeps/powerpc/powerpc32/memset.S:293
#1 0x0efad840 in ?? () from /usr/lib/powerpc-linux-gnu/dri/r600_dri.so
#2 0x0f3966f8 in ?? () from /usr/lib/powerpc-linux-gnu/dri/r600_dri.so
#3 0x0ef84334 in ?? () from /usr/lib/powerpc-linux-gnu/dri/r600_dri.so
#4 0x0f1fb4d0 in ?? () from /usr/lib/powerpc-linux-gnu/dri/r600_dri.so
#5 0x0f38d1dc in ?? () from /usr/lib/powerpc-linux-gnu/dri/r600_dri.so
#6 0x0f390a10 in ?? () from /usr/lib/powerpc-linux-gnu/dri/r600_dri.so
#7 0x0f39cd28 in ?? () from /usr/lib/powerpc-linux-gnu/dri/r600_dri.so
#8 0x0f39d56c in ?? () from /usr/lib/powerpc-linux-gnu/dri/r600_dri.so
#9 0x0f390150 in ?? () from /usr/lib/powerpc-linux-gnu/dri/r600_dri.so
#10 0x0f1fe9bc in ?? () from /usr/lib/powerpc-linux-gnu/dri/r600_dri.so
#11 0x0eef0a24 in ?? () from /usr/lib/powerpc-linux-gnu/dri/r600_dri.so
#12 0x0eee92c0 in ?? () from /usr/lib/powerpc-linux-gnu/dri/r600_dri.so
#13 0x0ed9fd54 in ?? () from /usr/lib/powerpc-linux-gnu/dri/r600_dri.so
#14 0x0eda0928 in ?? () from /usr/lib/powerpc-linux-gnu/dri/r600_dri.so
#15 0x0eee8ab8 in ?? () from /usr/lib/powerpc-linux-gnu/dri/r600_dri.so
#16 0x0eee7414 in ?? () from /usr/lib/powerpc-linux-gnu/dri/r600_dri.so
#17 0x0ffb46b8 in ?? () from /usr/lib/powerpc-linux-gnu/mesa/libGL.so.1
#18 0x0ff7c174 in glXMakeCurrentReadSGI ()
from /usr/lib/powerpc-linux-gnu/mesa/libGL.so.1
#19 0x10001090 in ?? ()
#20 0x0fb78854 in generic_start_main (main=0x10000eb0, argc=1,
argv=0xffffe1b4, auxvec=0xffffe29c, init=<optimised out>,
---Type <return> to continue, or q <return> to quit---
rtld_fini=<optimised out>, stack_end=<optimised out>, fini=<optimised out>)
at ../csu/libc-start.c:291
#21 0x0fb78a1c in __libc_start_main (argc=<optimised out>,
argv=<optimised out>, ev=<optimised out>, auxvec=<optimised out>,
rtld_fini=<optimised out>, stinfo=<optimised out>,
stack_on_entry=<optimised out>)
at ../sysdeps/unix/sysv/linux/powerpc/libc-start.c:116
#22 0x00000000 in ?? ()

----------

Mesa is trying to access memory that the CPU cannot physically address. This problem didn't exist before the first PowerPC updates. This bug only affects my Varisys Cyrus Plus board (A-EON AmigaOne X5000) [2][3] with a Qoriq P5020 PowerPC CPU from NXP.

Could you please help me to find the bug in the first PowerPC updates? Maybe my kernel config isn't correct [8]. I've seen a lot of memory patches in the first PowerPC updates but I don't know which one is the problematic patch. I need your help because you have a better knowledge about the memory patches.

Thanks,
Christian


[0] https://git.kernel.org/pub/scm/linux/ke ... 8d71b74180
[1] http://www.xenosoft.de/vmlinux-4.14-alp ... 000.tar.gz
[2] http://www.amigaos.net/hardware/133/amigaone-x5000
[3] http://wiki.amiga.org/index.php?title=AmigaONE_X5000
[4] http://forum.hyperion-entertainment.biz ... =80#p41611
[5] https://en.wikipedia.org/wiki/AmigaOne_X1000
[6] http://www.xenosoft.de/vmlinux-4.14-alp ... 000.tar.gz
[7] http://www.xenosoft.de/uImage-4.14-alph ... pc-updates
[8] http://www.xenosoft.de/cyrus-4.14-alpha2.config
Link to the thread in the Linuxppc-dev archives
http://www.amigalinux.org
http://www.supertuxkart-amiga.de

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

Re: Kernel 4.14

Post by xeno74 »

Michael Ellerman wrote: Can you try Linus' mainline, with just the following commit reverted:

31bfdb036f12 ("powerpc: Use instruction emulation infrastructure to handle alignment faults")

So just:

$ git revert 31bfdb036f12

cheers

Code: Select all

git clone git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git a
cd a

git revert 31bfdb036f12

Output:

Code: Select all

[master 6e4e90d] Revert "powerpc: Use instruction emulation infrastructure to handle alignment faults"

3 files changed, 777 insertions(+), 34 deletions(-)
Modified:

Code: Select all

arch/powerpc/Kconfig
arch/powerpc/kernel/align.c
arch/powerpc/lib/Makefile
cd ..

patch -p0 < cyrus_4.14-1.patch

Code: Select all

patching file a/arch/powerpc/boot/dts/fsl/cyrus_p5020.dts
patching file a/arch/powerpc/platforms/85xx/corenet_generic.c
cd a

mv cyrus-4.14-alpha2.config .config

yes "" | make oldconfig

make uImage

It works! :-)

I have tested it with ubuntu MATE 16.04.3 LTS PowerPC (Mesa 17.0.7 with an AMD Radeon HD4870) and with the MATE PowerPC Remix 2017 (Mesa 17.0.1 with an AMD Radeon HD4870).

The problematic commit is: powerpc: Use instruction emulation infrastructure to handle alignment faults
http://www.amigalinux.org
http://www.supertuxkart-amiga.de

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

Re: Kernel 4.14

Post by xeno74 »

Hi All,

I released the alpha3 for the X5000 and X1000 today. The hardware 3D acceleration works again on the AmigaOne X5000 because I have removed the problematic instruction emulation patch.

New:
Download: vmlinux-4.14-alpha3-AmigaOne_X1000_X5000.tar.gz

Screenshot of ubuntu MATE 16.04.3 LTS PowerPC with the alpha3 of kernel 4.14 with access to my OSX server:

Image

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

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

Re: Kernel 4.14

Post by xeno74 »

Good news! :)
Paul Mackerras wrote: This fixes the emulation of the dcbz instruction in the alignment
interrupt handler. The error was that we were comparing just the
instruction type field of op.type rather than the whole thing,
and therefore the comparison "type != CACHEOP + DCBZ" was always
true.

Fixes: 31bfdb036f12 ("powerpc: Use instruction emulation infrastructure to handle alignment faults")
Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
---
arch/powerpc/kernel/align.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/powerpc/kernel/align.c b/arch/powerpc/kernel/align.c
index 26b9994d27ee..43ef25156480 100644
--- a/arch/powerpc/kernel/align.c
+++ b/arch/powerpc/kernel/align.c
@@ -341,7 +341,7 @@ int fix_alignment(struct pt_regs *regs)

type = op.type & INSTR_TYPE_MASK;
if (!OP_IS_LOAD_STORE(type)) {
- if (type != CACHEOP + DCBZ)
+ if (op.type != CACHEOP + DCBZ)
return -EINVAL;
PPC_WARN_ALIGNMENT(dcbz, regs);
r = emulate_dcbz(op.ea, regs);
--
2.11.0
http://www.amigalinux.org
http://www.supertuxkart-amiga.de

Running Linux on AmigaONEs can require some tinkering.
Post Reply