Kernel 4.7

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

Re: Kernel 4.7

Post by xeno74 »

Hi All,

I was able to update the local git kernel directory with git pull without the commit powerpc-4.7-1.

Code: Select all

git pull

Code: Select all

remote: Counting objects: 27, done.
remote: Compressing objects: 100% (27/27), done.
remote: Total 27 (delta 10), reused 0 (delta 0)
Entpacke Objekte: 100% (27/27), Fertig.
Von git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux
   1a695a9..b02b1fb  master     -> origin/master
Merge made by the 'recursive' strategy.
 drivers/scsi/aacraid/aacraid.h       |  5 +++++
 drivers/scsi/aacraid/linit.c         | 11 ++++++-----
 drivers/scsi/mpt3sas/mpt3sas_scsih.c |  3 ++-
 drivers/scsi/scsi_lib.c              |  7 +++++--
 drivers/scsi/sd.c                    |  9 +++++++--
 5 files changed, 25 insertions(+), 10 deletions(-)
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 4.7

Post by xeno74 »

Hi All,

I found the following kernel config option:

Code: Select all

Radix MMU Support (PPC_RADIX_MMU) [Y/n/?] (NEW)
I deactivated this option because maybe it solves our problem.

I compiled the RC1 of kernel 4.7 without this option and with

Code: Select all

__ioremap_at(range.cpu_addr, (void *)ISA_IO_BASE,
                               range.size, pgprot_val(pgprot_noncached(__pgprot(0))));
Unfortunately it doesn't boot.

Rgds,

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 4.7

Post by xeno74 »

The commit powerpc-4.7-2 was released yesterday.

There is a conflict in my local kernel git directory if I use git pull because I have reverted the commit powerpc-4.7-1.

The commit powerpc-4.7-2 needs the commit powerpc-4.7-1.

I created a new local kernel git directory for the RC2 with:

Code: Select all

git clone git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git linux-git-without-powerpc-commits
After that I reverted the two commits:

powerpc-4.7-2:

Code: Select all

git revert 5306d766f15e72bc79c61d88f77e5a6b1fcc0e68 -m 1
powerpc-4.7-1:

Code: Select all

git revert c04a5880299eab3da8c10547db96ea9cdffd44a6 -m 1
Afterwards I successfully tested our latest Nemo patch 4.7-1 with the following commands:

Code: Select all

cp -R linux-git-without-powerpc-commits linux-4.7

Code: Select all

patch -p0 < nemo_4.7-1.patch
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 4.7

Post by xeno74 »

I compiled the latest git version of kernel 4.7 with all PowerPC commits. Maybe the latest commit powerpc-4.7-2 solved the boot issues. Our latest Nemo patch 4.7-1 works without any problems with the latest git version.

I got the following error message:

Code: Select all

arch/powerpc/kernel/pci-common.c: In function ‘pci_process_bridge_OF_ranges’:
arch/powerpc/kernel/pci-common.c:732:59: error: ‘_PAGE_GUARDED’ undeclared (first use in this function)
                                range.size, _PAGE_NO_CACHE|_PAGE_GUARDED);
                                                           ^
arch/powerpc/kernel/pci-common.c:732:59: note: each undeclared identifier is reported only once for each function it appears in
make[1]: *** [arch/powerpc/kernel/pci-common.o] Fehler 1
make: *** [arch/powerpc/kernel] Fehler 2
I replaced

Code: Select all

__ioremap_at(range.cpu_addr, (void *)ISA_IO_BASE,
                               range.size, _PAGE_NO_CACHE|_PAGE_GUARDED);
with

Code: Select all

__ioremap_at(range.cpu_addr, (void *)ISA_IO_BASE,
                               range.size, pgprot_val(pgprot_noncached(__pgprot(0))));
After that it compiled.

Unfortunately it doesn't boot. :-(
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 4.7

Post by xeno74 »

I think Darren's guess is correct. It isn't a problem in the pci code. I replaced the file head_64.S that Darren mentioned with the one from the kernel 4.6 and it compiled but unfortunately it doesn't boot. We know head_64.S is one file for the early boot phase but I think there are some other files.

I am not a fan of reverting the PowerPC commits but there are some other new things in the new kernel e.g. DRM 2.45.0 which are very interesting for the Nemo board.

Tomorrow, I will release the RC2 without the PowerPC commits because of the new DRM 2.45.0.
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 4.7

Post by xeno74 »

Hi All,

I released the RC2 of kernel 4.7 today.

New:
Note: I compiled the RC2 without the new PowerPC code because this code doesn't work with our Nemo board. The new PowerPC code for the kernel 4.7 doesn't bring any improvements for our Nemo board. With the RC2 we have the opportunity, to use other new exciting features like the new DRM 2.45.0 for our Nemo board.

Download: vmlinux-4.7-rc2-AmigaONE_X1000.tar.gz

Please test the RC2.

Thanks in advance,

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 4.7

Post by xeno74 »

We try to solve the boot issue with the Linux PowerPC kernel developers together: https://lists.ozlabs.org/pipermail/linuxppc-dev/2016-June/143862.html
http://www.amigalinux.org
http://www.supertuxkart-amiga.de

Running Linux on AmigaONEs can require some tinkering.
User avatar
mechanic
Posts: 510
Joined: Sat Jun 25, 2011 9:22 pm

Re: Kernel 4.7

Post by mechanic »

Just some info for 4.7rc2.

It boots and runs fine for Deb7 and Mintppc11.
On Deb8, it boots but has problems with Xorg.

----------------------------------------------------
len@AmigaOneX1000:~$ glxgears
libGL error: No matching fbConfigs or visuals found
libGL error: failed to load driver: r600
libGL error: No matching fbConfigs or visuals found
libGL error: failed to load driver: swrast
Error: couldn't get an RGB, Double-buffered visual
len@AmigaOneX1000:~$
-----------------------------------------------------


Name Iceweasel
Version 38.8.0
Build ID 20160426225641
Update History
User Agent Mozilla/5.0 (X11; Linux ppc64; rv:38.0) Gecko/20100101 Firefox/38.0 Iceweasel/38.8.0
Profile Directory
Enabled Plugins about:plugins
Build Configuration about:buildconfig
Memory Use about:memory
Multiprocess Windows 0/1 (default: false)
Extensions
Name Version Enabled ID
Graphics
Adapter Description GLXtest process failed (exited with status 1): No visuals found
GPU Accelerated Windows 0/1 Basic Blocked for your graphics driver version. Try updating your graphics driver to version <Anything with EXT_texture_from_pixmap support> or newer.
WebGL Renderer Blocked for your graphics card because of unresolved driver issues.
windowLayerManagerRemote false
AzureCanvasBackend cairo
AzureContentBackend cairo
AzureFallbackCanvasBackend none
AzureSkiaAccelerated 0

Perhaps not all the problems are kernel related. :?:
A-Eon A1X1000 ATI HD6850, Creative SB1570 PCIe, RTL8139 net PCI.
User avatar
xeno74
Posts: 9375
Joined: Fri Mar 23, 2012 7:58 am

Re: Kernel 4.7

Post by xeno74 »

mechanic wrote:Just some info for 4.7rc2.

It boots and runs fine for Deb7 and Mintppc11.
On Deb8, it boots but has problems with Xorg.
Many thanks for testing. Does Xorg work with the kernel 4.6.1?

@All

range.size, pgprot_val(pgprot_noncached(__pgprot(0)))); isn't the problem. It works.

I found it out with bisect today. The following commit could be the problem:

powerpc/mm/radix: Add checks in slice code to catch radix usage (764041e0f43cc7846f6d8eb246d65b53cc06c764)
764041e0f43cc7846f6d8eb246d65b53cc06c764 is the first bad commit
commit 764041e0f43cc7846f6d8eb246d65b53cc06c764
Author: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Date: Fri Apr 29 23:26:09 2016 +1000

powerpc/mm/radix: Add checks in slice code to catch radix usage

Radix doesn't need slice support. Catch incorrect usage of slice code
when radix is enabled.

Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Git log:

Code: Select all

git clone git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git linux-git

git bisect start

git bisect good 8ffb4103f5e28d7e7890ed4774d8e009f253f56e

git bisect bad 1a695a905c18548062509178b98bc91e67510864 (Linux 4.7-rc1)

Output:

Bisecting: 6333 revisions left to test after this (roughly 13 steps)
[4741526b83c5d3a3d661d1896f9e7414c5730bcb] mm, page_alloc: restore the original nodemask if the fast path allocation failed

----

git bisect good (Linux AmigaoneX1000 4.6.0_A-EON_AmigaONE_X1000_Nemo-05145-g4741526-dirty #1 SMP Mon Jun 6 14:35:01 CEST 2016 ppc64 GNU/Linux)

Output:

Bisecting: 3014 revisions left to test after this (roughly 12 steps)
[2f37dd131c5d3a2eac21cd5baf80658b1b02a8ac] Merge tag 'staging-4.7-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging

----

I had to replace

__ioremap_at(range.cpu_addr, (void *)ISA_IO_BASE,
                               range.size, _PAGE_NO_CACHE|_PAGE_GUARDED);

with

__ioremap_at(range.cpu_addr, (void *)ISA_IO_BASE,
                               range.size, pgprot_val(pgprot_noncached(__pgprot(0))));


in the file "pci-common.c". After that it compiled but it doesn't boot so "git bisect bad"

Output:

Bisecting: 1693 revisions left to test after this (roughly 11 steps)
[54cf809b9512be95f53ed4a5e3b631d1ac42f0fa] locking,qspinlock: Fix spin_is_locked() and spin_unlock_wait()

----

I had to replace

__ioremap_at(range.cpu_addr, (void *)ISA_IO_BASE,
                               range.size, _PAGE_NO_CACHE|_PAGE_GUARDED);

with

__ioremap_at(range.cpu_addr, (void *)ISA_IO_BASE,
                               range.size, pgprot_val(pgprot_noncached(__pgprot(0))));


in the file "pci-common.c". After that it compiled but it doesn't boot so "git bisect bad"

Output:

Bisecting: 721 revisions left to test after this (roughly 10 steps)
[f4c80d5a16eb4b08a0d9ade154af1ebdc63f5752] Merge tag 'sound-4.7-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound

----

git bisect good (Linux AmigaoneX1000 4.6.0_A-EON_AmigaONE_X1000_Nemo-05931-gf4c80d5-dirty #1 SMP Mon Jun 6 19:13:42 CEST 2016 ppc64 GNU/Linux)

Output:

Bisecting: 324 revisions left to test after this (roughly 9 steps)
[c04a5880299eab3da8c10547db96ea9cdffd44a6] Merge tag 'powerpc-4.7-1' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux

----

I had to replace

__ioremap_at(range.cpu_addr, (void *)ISA_IO_BASE,
                               range.size, _PAGE_NO_CACHE|_PAGE_GUARDED);

with

__ioremap_at(range.cpu_addr, (void *)ISA_IO_BASE,
                               range.size, pgprot_val(pgprot_noncached(__pgprot(0))));


in the file "pci-common.c". After that it compiled but it doesn't boot so "git bisect bad"

Output:

Bisecting: 186 revisions left to test after this (roughly 8 steps)
[e9ad9b9bd3a3b95c89a29b2a197476e662db4233] Merge tag 'docs-for-linus' of git://git.lwn.net/linux

----

git bisect good (Linux AmigaoneX1000 4.6.0_A-EON_AmigaONE_X1000_Nemo-06141-ge9ad9b9-dirty #1 SMP Tue Jun 7 08:32:33 CEST 2016 ppc64 GNU/Linux)

Bisecting: 93 revisions left to test after this (roughly 7 steps)
[0e5b5ba17ac33a05d9f4a48b5eb8b5e30f2274d7] cxl: Remove duplicate #defines

----

I had to replace

__ioremap_at(range.cpu_addr, (void *)ISA_IO_BASE,
                               range.size, _PAGE_NO_CACHE|_PAGE_GUARDED);

with

__ioremap_at(range.cpu_addr, (void *)ISA_IO_BASE,
                               range.size, pgprot_val(pgprot_noncached(__pgprot(0))));


in the file "pci-common.c". After that it compiled but it doesn't boot so "git bisect bad"

Output:

Bisecting: 46 revisions left to test after this (roughly 6 steps)
[764041e0f43cc7846f6d8eb246d65b53cc06c764] powerpc/mm/radix: Add checks in slice code to catch radix usage

----

It doesn't boot. Booting Linux via __start()... didn't appear in the CFE.

git bisect bad

Output:

Bisecting: 22 revisions left to test after this (roughly 5 steps)
[2e8735198af0392d9032a356ee6c82686afca779] powerpc/mm: Move common pte bits and accessors to book3s/64/pgtable.h

----

I had to replace

__ioremap_at(range.cpu_addr, (void *)ISA_IO_BASE,
                               range.size, _PAGE_NO_CACHE|_PAGE_GUARDED);

with

__ioremap_at(range.cpu_addr, (void *)ISA_IO_BASE,
                               range.size, pgprot_val(pgprot_noncached(__pgprot(0))));


in the file "pci-common.c". After that it compiled and booted with "range.size, pgprot_val(pgprot_noncached(__pgprot(0))));". That means, "range.size, pgprot_val(pgprot_noncached(__pgprot(0))));" isn't the problem. :-)

git bisect good (Linux AmigaoneX1000 4.6.0-rc3_A-EON_AmigaONE_X1000_Nemo-00067-g2e87351-dirty #1 SMP Tue Jun 7 15:29:19 CEST 2016 ppc64 GNU/Linux)

Output:

Bisecting: 11 revisions left to test after this (roughly 4 steps)
[2bfd65e45e877fb5704730244da67c748d28a1b8] powerpc/mm/radix: Add radix callbacks for early init routines

----

I had to replace

__ioremap_at(range.cpu_addr, (void *)ISA_IO_BASE,
                               range.size, _PAGE_NO_CACHE|_PAGE_GUARDED);

with

__ioremap_at(range.cpu_addr, (void *)ISA_IO_BASE,
                               range.size, pgprot_val(pgprot_noncached(__pgprot(0))));


in the file "pci-common.c". After that it compiled and it also booted with "range.size, pgprot_val(pgprot_noncached(__pgprot(0))));"!

git bisect good (Linux AmigaoneX1000 4.6.0-rc3_A-EON_AmigaONE_X1000_Nemo-00078-g2bfd65e-dirty #1 SMP Tue Jun 7 16:50:47 CEST 2016 ppc64 GNU/Linux)

Output:

Bisecting: 5 revisions left to test after this (roughly 3 steps)
[676012a66f651a98808459bc8ab75661828ed96f] powerpc/mm: Hash abstraction for tlbflush routines

----

I had to replace

__ioremap_at(range.cpu_addr, (void *)ISA_IO_BASE,
                               range.size, _PAGE_NO_CACHE|_PAGE_GUARDED);

with

__ioremap_at(range.cpu_addr, (void *)ISA_IO_BASE,
                               range.size, pgprot_val(pgprot_noncached(__pgprot(0))));


in the file "pci-common.c". After that it compiled and it also booted with "range.size, pgprot_val(pgprot_noncached(__pgprot(0))));"!

git bisect good (Linux AmigaoneX1000 4.6.0-rc3_A-EON_AmigaONE_X1000_Nemo-00084-g676012a-dirty #1 SMP Tue Jun 7 19:03:59 CEST 2016 ppc64 GNU/Linux)

Output:

Bisecting: 2 revisions left to test after this (roughly 2 steps)
[a8ed87c92adf1fd45142323e04f15b522117d575] powerpc/mm/radix: Add MMU_FTR_RADIX

----

I had to replace

__ioremap_at(range.cpu_addr, (void *)ISA_IO_BASE,
                               range.size, _PAGE_NO_CACHE|_PAGE_GUARDED);

with

__ioremap_at(range.cpu_addr, (void *)ISA_IO_BASE,
                               range.size, pgprot_val(pgprot_noncached(__pgprot(0))));


in the file "pci-common.c". After that it compiled and it also booted with "range.size, pgprot_val(pgprot_noncached(__pgprot(0))));"!

git bisect good (Linux AmigaoneX1000 4.6.0-rc3_A-EON_AmigaONE_X1000_Nemo-00087-ga8ed87c-dirty #1 SMP Tue Jun 7 20:25:11 CEST 2016 ppc64 GNU/Linux)

Output:

Bisecting: 0 revisions left to test after this (roughly 1 step)
[d8c476eeb697c9aac46b390e9cbd7af7032814f1] powerpc/mm/radix: Isolate hash table function from pseries guest code

----

I had to replace

__ioremap_at(range.cpu_addr, (void *)ISA_IO_BASE,
                               range.size, _PAGE_NO_CACHE|_PAGE_GUARDED);

with

__ioremap_at(range.cpu_addr, (void *)ISA_IO_BASE,
                               range.size, pgprot_val(pgprot_noncached(__pgprot(0))));


in the file "pci-common.c". After that it compiled and it also booted with "range.size, pgprot_val(pgprot_noncached(__pgprot(0))));"!

git bisect good (Linux AmigaoneX1000 4.6.0-rc3_A-EON_AmigaONE_X1000_Nemo-00089-gd8c476e-dirty #1 SMP Tue Jun 7 21:53:24 CEST 2016 ppc64 GNU/Linux)

Output:

764041e0f43cc7846f6d8eb246d65b53cc06c764 is the first bad commit
commit 764041e0f43cc7846f6d8eb246d65b53cc06c764
Author: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Date:   Fri Apr 29 23:26:09 2016 +1000

    powerpc/mm/radix: Add checks in slice code to catch radix usage
    
    Radix doesn't need slice support. Catch incorrect usage of slice code
    when radix is enabled.
    
    Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
    Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>

:040000 040000 e66f81f989a42a4de238a49a2191f787ae65d4a2 6b7b4380d14db00d9aae28b5990e5dd8d6cf23a0 M	arch
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 4.7

Post by xeno74 »

Hi All,

I replaced the file slice.c with the old one from kernel 4.6. It compiled but unfortunately it doesn't boot.

Cheers,

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

Running Linux on AmigaONEs can require some tinkering.
Post Reply