Kernel 4.7

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

Kernel 4.7

Post by xeno74 »

Hi All,

The first alpha of kernel 4.7 is available for testing. :-)

New:

- Phoronix articles, reviews and news stories covering Linux 4.7
- Linux Git log

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

openSUSE Tumbleweed PPC64 with the alpha1 of kernel 4.7:

Image

Cheers,

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

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

Re: Kernel 4.7

Post by xeno74 »

The alpha2 is available for testing.

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

The alpha2 with openSUSE Tumbleweed PPC64:

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

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

Re: Kernel 4.7

Post by xeno74 »

The old kernel 4.6 Nemo patch doesn't work anymore. I created a new Nemo patch for the alpha3 today. :-)

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

Re: Kernel 4.7

Post by xeno74 »

Hi All,

A new alpha version is available. :-)

New:
Download: vmlinux-4.7-alpha3-AmigaONE_X1000.tar.gz

Please test the alpha3.

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

Re: Kernel 4.7

Post by xeno74 »

Hi All,

I tried to compile the alpha4 today.

I got the following error message during the building process:

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

_PAGE_GUARDED is used in our Nemo patch:

Code: Select all

+
+
+#ifdef CONFIG_PPC_PASEMI_SB600
+                       /* Workaround for lack of device tree. New for kernel 3.17: range.cpu_addr instead of cpu_addr and range.size instead of size Ch. Zigotzky */
+                       if (primary) {
+                               __ioremap_at(range.cpu_addr, (void *)ISA_IO_BASE,
+                               range.size, _PAGE_NO_CACHE|_PAGE_GUARDED);
+                       hose->io_base_virt = (void *)_IO_BASE;
+               /* _IO_BASE needs unsigned long long for the kernel 3.17 Ch. Zigotzky */
+                       printk("Initialised io_base_virt 0x%lx _IO_BASE 0x%llx\n", (unsigned long)hose->io_base_virt, (unsigned long long)_IO_BASE);
+                    }
+#endif
+

It was deleted with the PowerPC updates powerpc-4.7-1 on 2016-05-20 17:12:41 (GMT).

Code: Select all

diff --git a/arch/powerpc/include/asm/book3s/64/hash.h b/arch/powerpc/include/asm/book3s/64/hash.h
index d0ee6fc..f61cad3 100644
--- a/arch/powerpc/include/asm/book3s/64/hash.h
+++ b/arch/powerpc/include/asm/book3s/64/hash.h
@@ -13,48 +13,12 @@
  * We could create separate kernel read-only if we used the 3 PP bits
  * combinations that newer processors provide but we currently don't.
  */
-#define _PAGE_BIT_SWAP_TYPE    0
-
-#define _PAGE_EXEC        0x00001 /* execute permission */
-#define _PAGE_RW        0x00002 /* read & write access allowed */
-#define _PAGE_READ        0x00004    /* read access allowed */
-#define _PAGE_USER        0x00008 /* page may be accessed by userspace */
-#define _PAGE_GUARDED        0x00010 /* G: guarded (side-effect) page */
I modify the line

Code: Select all

range.size, _PAGE_NO_CACHE|_PAGE_GUARDED);
to

Code: Select all

range.size, pgprot_val(pgprot_noncached(__pgprot(0))));
After that it compiled without any problems 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.
User avatar
xeno74
Posts: 9348
Joined: Fri Mar 23, 2012 7:58 am

Re: Kernel 4.7

Post by xeno74 »

Hi All,

I deleted our device tree patch from the Nemo patch and after that I compiled the kernel again. Unfortunately the kernel doesn't boot from CFE.

Cheers,

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

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

Re: Kernel 4.7

Post by xeno74 »

I removed the variable _PAGE_GUARDED from the Nemo patch. It compiled but nevertheless the kernel doesn't boot.

The last message from CFE:

Code: Select all

Booting Linux via __start()...
http://www.amigalinux.org
http://www.supertuxkart-amiga.de

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

Re: Kernel 4.7

Post by xeno74 »

Hi All,

I added #define _PAGE_GUARDED 0x00010 /* G: guarded (side-effect) page */ to our Nemo patch.

Code: Select all

    +
    +
    +#ifdef CONFIG_PPC_PASEMI_SB600
    +                       #define _PAGE_GUARDED        0x00010 /* G: guarded (side-effect) page */
    +                       if (primary) {
    +                               __ioremap_at(range.cpu_addr, (void *)ISA_IO_BASE,
    +                               range.size, _PAGE_NO_CACHE|_PAGE_GUARDED);
    +                       hose->io_base_virt = (void *)_IO_BASE;
    +               /* _IO_BASE needs unsigned long long for the kernel 3.17 Ch. Zigotzky */
    +                       printk("Initialised io_base_virt 0x%lx _IO_BASE 0x%llx\n", (unsigned long)hose->io_base_virt, (unsigned long long)_IO_BASE);
    +                    }
    +#endif
    +
It compiled but it doesn't boot either.

After Booting Linux via __start()... it happens nothing.

Cheers,

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

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

Re: Kernel 4.7

Post by xeno74 »

I have found range.size in the old pSeries PCI code as well.

Link: pSeries_pci.c
http://www.amigalinux.org
http://www.supertuxkart-amiga.de

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

Re: Kernel 4.7

Post by xeno74 »

FYI:
Benjamin Herrenschmidt wrote: On Mon, 2016-05-23 at 06:38 +0200, Christian Zigotzky wrote:

>
>
> Hi All,
>
> You removed PAGE_GUARDED in the commit
>
> https://git.kernel.org/cgit/linux/kerne ... 9cdffd44a6
>
> We use
>
> range.size, _PAGE_NO_CACHE|_PAGE_GUARDED);
>
> This doesn't work anymore. What can we use instead?
>
>

You should just use pgprot_noncached()

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

Running Linux on AmigaONEs can require some tinkering.
Post Reply