Kernel 5.1

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

Re: Kernel 5.1

Post by xeno74 »

I was able to activate CONFIG_SPARSEMEM in the kernel configuration. But does the X1000 need this option?

-- Christian
xeno74 wrote:Error during compiling the RC2:

Code: Select all

  CC      arch/powerpc/mm/slb.o
In file included from ./arch/powerpc/include/asm/book3s/64/mmu.h:39:0,
                 from ./arch/powerpc/include/asm/mmu.h:360,
                 from ./arch/powerpc/include/asm/lppaca.h:36,
                 from ./arch/powerpc/include/asm/paca.h:21,
                 from ./arch/powerpc/include/asm/current.h:16,
                 from ./include/linux/thread_info.h:21,
                 from ./include/asm-generic/preempt.h:5,
                 from ./arch/powerpc/include/generated/asm/preempt.h:1,
                 from ./include/linux/preempt.h:78,
                 from ./include/linux/spinlock.h:51,
                 from ./include/linux/mmzone.h:8,
                 from ./include/linux/gfp.h:6,
                 from ./include/linux/mm.h:10,
                 from ./arch/powerpc/include/asm/cacheflush.h:12,
                 from ./arch/powerpc/include/asm/asm-prototypes.h:16,
                 from arch/powerpc/mm/slb.c:17:
./arch/powerpc/include/asm/book3s/64/mmu-hash.h:584:6: warning: "MAX_PHYSMEM_BITS" is not defined [-Wundef]
 #if (MAX_PHYSMEM_BITS > MAX_EA_BITS_PER_CONTEXT)
      ^
arch/powerpc/mm/slb.c: In function 'slb_allocate_kernel':
arch/powerpc/mm/slb.c:697:37: error: 'MAX_PHYSMEM_BITS' undeclared (first use in this function)
   if ((ea & ~REGION_MASK) > (1UL << MAX_PHYSMEM_BITS))
                                     ^
arch/powerpc/mm/slb.c:697:37: note: each undeclared identifier is reported only once for each function it appears in
scripts/Makefile.build:278: recipe for target 'arch/powerpc/mm/slb.o' failed
make[3]: *** [arch/powerpc/mm/slb.o] Error 1
scripts/Makefile.build:489: recipe for target 'arch/powerpc/mm' failed
make[2]: *** [arch/powerpc/mm] Error 2
/home/christian/Downloads/a/Makefile:1046: recipe for target 'arch/powerpc' failed
make[1]: *** [arch/powerpc] Error 2
Makefile:170: recipe for target 'sub-make' failed
make: *** [sub-make] Error 2
The variable MAX_PHYSMEM_BITS isn't defined. The problem is in the last PowerPC fixes 5.1-3.
Commit log wrote:powerpc/mm: Only define MAX_PHYSMEM_BITS in SPARSEMEM configurations
Problematic fix:

Code: Select all

diff --git a/arch/powerpc/include/asm/mmu.h b/arch/powerpc/include/asm/mmu.h
index d34ad1657d7b..598cdcdd1355 100644
--- a/arch/powerpc/include/asm/mmu.h
+++ b/arch/powerpc/include/asm/mmu.h
@@ -352,7 +352,7 @@ static inline bool strict_kernel_rwx_enabled(void)
 #if defined(CONFIG_SPARSEMEM_VMEMMAP) && defined(CONFIG_SPARSEMEM_EXTREME) &&	\
 	defined (CONFIG_PPC_64K_PAGES)
 #define MAX_PHYSMEM_BITS        51
-#else
+#elif defined(CONFIG_SPARSEMEM)
 #define MAX_PHYSMEM_BITS        46
 #endif
The first if statement isn't successfull because the variables CONFIG_SPARSEMEM_EXTREME and CONFIG_PPC_64K_PAGES aren't activated in our kernel configuration. Therefore we need MAX_PHYSMEM_BITS 46 for our Nemo board. Unfortunately CONFIG_SPARSEMEM doesn't exist in the kernel source code so we can't activate it in the kernel config.

I replaced #elif defined(CONFIG_SPARSEMEM) with #else and after that the compiling of the RC2 works again.

I reported this issue to the Linuxppc-dev mailing list today. Link: PowerPC fixes 5.1-3: CONFIG_SPARSEMEM doesn't exist in the kernel source code
http://www.amigalinux.org
http://www.supertuxkart-amiga.de

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

Re: Kernel 5.1

Post by xeno74 »

Hi All,

I released the RC2 of kernel 5.1 today.

New:
It also includes:
  • X1000: compressed kernel (zImage) and uncompressed kernel (vmlinux)
Issues:
Download: linux-image-5.1-rc2-X1000_X5000.tar.gz

Screenshot of Fienix PowerPC with Compiz and with the RC2 of kernel 5.1:

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: 9375
Joined: Fri Mar 23, 2012 7:58 am

Re: Kernel 5.1

Post by xeno74 »

FYI:
Andreas Schwab wrote: On Mär 25 2019, Michael Ellerman <mpe at ellerman.id.au> wrote:

> So I'm inclined to just switch to always using SPARSEMEM on 64-bit
> Book3S, because that's what's well tested and we hardly need more code
> paths to test. Unless anyone has a strong objection, I haven't actually
> benchmarked FLATMEM vs SPARSEMEM on a G5.

Configuring with SPARSEMEM saves about 32Mb of memory.

Andreas.
Link to the thread: powerpc/mm: Only define MAX_PHYSMEM_BITS in SPARSEMEM configurations

There is a RC2 kernel config with SPARSEMEM support for our X1000 in the RC2 package.
http://www.amigalinux.org
http://www.supertuxkart-amiga.de

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

Re: Kernel 5.1

Post by xeno74 »

Please test the alpha5, RC1, and the RC2 on your X1000.
http://www.amigalinux.org
http://www.supertuxkart-amiga.de

Running Linux on AmigaONEs can require some tinkering.
User avatar
tbreeden
Posts: 160
Joined: Sat Jun 18, 2011 12:57 am
Location: Charlottesville, VA, USA
Contact:

Re: Kernel 5.1

Post by tbreeden »

Re: Kernel 5.1
Please test the alpha5, RC1, and the RC2 on your X1000.
I just tested all three just now and see no problems.

Programs run were glxgears, firefox, artic fox, swriter, GIMP, Inkscape, Extreme Tux Racer.

tom
Screenshot from 2019-03-30 02-00-03.png
User avatar
xeno74
Posts: 9375
Joined: Fri Mar 23, 2012 7:58 am

Re: Kernel 5.1

Post by xeno74 »

tbreeden wrote: I just tested all three just now and see no problems.

Programs run were glxgears, firefox, artic fox, swriter, GIMP, Inkscape, Extreme Tux Racer.

tom
Hi Tom,

Many thanks for testing the latest 5.1 kernels! :-)

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

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

Re: Kernel 5.1

Post by xeno74 »

Hi All,

Here is the RC3 of kernel 5.1 for testing.

New:
It also includes:
  • X1000: compressed kernel (zImage) and uncompressed kernel (vmlinux)
Issues:

I figured out, that the VLC player doesn't play videos anymore since the RC2 of kernel 5.1. VLC plays videos with the RC1 of kernel 5.1 without any problems. The issue is between the RC1 and the RC2.

I tested the VLC 3.0.4 on Fienix and VLC 2.2.2 on ubuntu MATE 16.04.6 LTS.

Please test the VLC and ViewTube with the RC3 of kernel 5.1.


Download: linux-image-5.1-rc3-X1000_X5000.tar.gz

Screenshot of Fienix PowerPC with Compiz and with the RC3 of kernel 5.1:

Image

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

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

Re: Kernel 5.1

Post by xeno74 »

Hi All,

VLC error messages with the RC3:

Code: Select all

[100ea580] ts demux warning: first packet for pid=1104 cc=0xe
[100ea580] ts demux warning: first packet for pid=1102 cc=0x4
[100ea580] ts demux warning: first packet for pid=1101 cc=0x8
[10109218] core decoder warning: can't get output picture
[10109218] avcodec decoder warning: disabling direct rendering
[10109218] core decoder warning: can't get output picture
I created a bug report because of the VLC issue with the kernel 5.1-rc2 and higher today.

Link to the bug report: Bug 110304 - VLC doesn't play videos anymore since the RC2 of kernel 5.1 -- bugs.freedesktop.org
Michel Dänzer wrote: None of them directly affect the radeon driver.

It's quite likely that this is a PPC specific issue. Your best bet is bisecting between rc1 and rc2.

I haven't seen any other similar reports.
I was able to remove the PowerPC fixes 5.1-4 and 5.1-3 with the following commands:

Code: Select all

git revert 6536c5f2c8cf79db0d37e79afcdb227dc854509c -m 1
Output:
[master 4b4a8cf] Revert "Merge tag 'powerpc-5.1-4' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux"

Code: Select all

git revert a5ed1e96cafde5ba48638f486bfca0685dc6ddc9 -m 1
[master 0c70b7b] Revert "Merge tag 'powerpc-5.1-3' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux"
The removing of the PowerPC fixes 5.1-4 and 5.1-3 has solved the VLC issue.

The problematic code is definitely in the PowerPC fixes 5.1-3.

I created a new kernel package without the PowerPC fixes for testing.

Download: linux-image-5.1-rc3-2-X1000_X5000.tar.gz

Please test the RC3 and the RC3-2 with the VLC.

I posted my results to the Linuxppc-dev mailing list today. Link: VLC doesn't play videos anymore since the PowerPC fixes 5.1-3

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

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

Re: Kernel 5.1

Post by xeno74 »

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

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

Re: Kernel 5.1

Post by xeno74 »

Hi All,

I have found the problematic patch. :-) The following patch from the PowerPC fixes 5.1-3 is responsible for the VLC issue.

Code: Select all

diff --git a/arch/powerpc/include/asm/vdso_datapage.h b/arch/powerpc/include/asm/vdso_datapage.h
index 1afe90ade595..bbc06bd72b1f 100644
--- a/arch/powerpc/include/asm/vdso_datapage.h
+++ b/arch/powerpc/include/asm/vdso_datapage.h
@@ -82,10 +82,10 @@ struct vdso_data {
 	__u32 icache_block_size;		/* L1 i-cache block size     */
 	__u32 dcache_log_block_size;		/* L1 d-cache log block size */
 	__u32 icache_log_block_size;		/* L1 i-cache log block size */
-	__s32 wtom_clock_sec;			/* Wall to monotonic clock */
-	__s32 wtom_clock_nsec;
-	struct timespec stamp_xtime;	/* xtime as at tb_orig_stamp */
-	__u32 stamp_sec_fraction;	/* fractional seconds of stamp_xtime */
+	__u32 stamp_sec_fraction;		/* fractional seconds of stamp_xtime */
+	__s32 wtom_clock_nsec;			/* Wall to monotonic clock nsec */
+	__s64 wtom_clock_sec;			/* Wall to monotonic clock sec */
+	struct timespec stamp_xtime;		/* xtime as at tb_orig_stamp */
    	__u32 syscall_map_64[SYSCALL_MAP_SIZE]; /* map of syscalls  */
    	__u32 syscall_map_32[SYSCALL_MAP_SIZE]; /* map of syscalls */
 };
Link: arch/powerpc/include/asm/vdso_datapage.h

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

Running Linux on AmigaONEs can require some tinkering.
Post Reply