Kernel 4.2

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

Re: Kernel 4.2

Post by xeno74 »

Hi All,

It was something wrong with my last bisect. I did another bisect. I evaluated the one "sometimes boots" with good.

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 b953c0d234bc72e8489d3bf51a276c5c4ec85345 (Linux 4.1)

git bisect bad d770e558e21961ad6cfdf0ff7df0eb5d7d4f0754 (Linux 4.2-rc1)

Output:

Bisecting: 6261 revisions left to test after this (roughly 13 steps)
[4570a37169d4b44d316f40b2ccc681dc93fedc7b] Merge tag 'sound-4.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound

----

git bisect bad

Output:

Bisecting: 3295 revisions left to test after this (roughly 12 steps)
[4e241557fc1cb560bd9e77ca1b4a9352732a5427] Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm

----

git bisect bad

Output:

Bisecting: 1625 revisions left to test after this (roughly 11 steps)
[44d21c3f3a2ef2f58b18bda64c52c99e723f3f4a] Merge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6

----

git bisect bad

Output:

Bisecting: 712 revisions left to test after this (roughly 10 steps)
[e75c73ad64478c12b3a44b86a3e7f62a4f65b93e] Merge branch 'x86-fpu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

----

git bisect good

Output:

Bisecting: 343 revisions left to test after this (roughly 9 steps)
[43224b96af3154cedd7220f7b90094905f07ac78] Merge branch 'timers-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

----

git bisect good

Output:

Bisecting: 171 revisions left to test after this (roughly 8 steps)
[056c04ba8bbad4c563c05306cc8a8c66e713f280] crypto: seqiv - Fix module unload/reload crash

----

git bisect good

Output:

Bisecting: 85 revisions left to test after this (roughly 7 steps)
[edf18b9108f5025f9e83b2c167c9122954acbc62] crypto: api - Add CRYPTO_MINALIGN_ATTR to struct crypto_alg

----

git bisect good

Output:

Bisecting: 41 revisions left to test after this (roughly 6 steps)
[407a2c720556e8e340e06f6a7174f5d6d80cf9ea] Merge branch 'irq-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

----

It didn't boot with the following error messages:

Oops: Kernel access of bad area, sig: 11 [#1]

.sb600_8259_cascade+0x4c/0xac (unreliable)
.kmem_cache_alloc+0x5c/0x1c4 (unreliable)

----

git bisect bad

Output:

Bisecting: 21 revisions left to test after this (roughly 5 steps)
[3b0f95be143bea1aa47beb20134ef82e4e4068dc] irq: Add irq_set_chained_handler_and_data()

----

git bisect good

Output:

Bisecting: 12 revisions left to test after this (roughly 4 steps)
[62a993df31f795d87bcb4c6cb005d36f32f6ad55] irqchip: atmel-aic5: Add sama5d2 support

----

git bisect good

Output:

Bisecting: 6 revisions left to test after this (roughly 3 steps)
[a614a610ac9b28f195d790d25be72d26f345c53a] genirq: Remove bogus restriction in irq_move_mask_irq()

----

It didn't boot with the following error messages:

Oops: Kernel access of bad area, sig: 11 [#1]

.sb600_8259_cascade+0x4c/0xac (unreliable)
.__kernfs_new_node+0x54/0xd8 (unreliable)

----

git bisect bad

Output:

Bisecting: 2 revisions left to test after this (roughly 2 steps)
[0d0b4c866bcce647f40d73efe5e90aeeb079050a] genirq: Introduce struct irq_common_data to host shared irq data

----

It didn't boot with the following error messages:

Oops: Kernel access of bad area, sig: 11 [#1]

.sb600_8259_cascade+0x4c/0xac (unreliable)
.schedule+0x74/0x9c (unreliable)

----

git bisect bad

Output:

Bisecting: 0 revisions left to test after this (roughly 1 step)
[77ed42f18edd486e9994ccd1f174076309a6343f] genirq: Prevent crash in irq_move_irq()

----

git bisect good

Output:
0d0b4c866bcce647f40d73efe5e90aeeb079050a is the first bad commit
commit 0d0b4c866bcce647f40d73efe5e90aeeb079050a
Author: Jiang Liu <jiang.liu@linux.intel.com>
Date:   Mon Jun 1 16:05:12 2015 +0800

    genirq: Introduce struct irq_common_data to host shared irq data

    With the introduction of hierarchy irqdomain, struct irq_data becomes
    per-chip instead of per-irq and there may be multiple irq_datas
    associated with the same irq. Some per-irq data stored in struct
    irq_data now may get duplicated into multiple irq_datas, and causes
    inconsistent view.

    So introduce struct irq_common_data to host per-irq common data and to
    achieve consistent view among irq_chips.

    Signed-off-by: Jiang Liu <jiang.liu@linux.intel.com>
    Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
    Cc: Tony Luck <tony.luck@intel.com>
    Cc: Bjorn Helgaas <bhelgaas@google.com>
    Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
    Cc: Randy Dunlap <rdunlap@infradead.org>
    Cc: Yinghai Lu <yinghai@kernel.org>
    Cc: Borislav Petkov <bp@alien8.de>
    Cc: Jason Cooper <jason@lakedaemon.net>
    Cc: Kevin Cernekee <cernekee@gmail.com>
    Cc: Arnd Bergmann <arnd@arndb.de>
    Cc: Marc Zyngier <marc.zyngier@arm.com>
    Link: http://lkml.kernel.org/r/1433145945-789-4-git-send-email-jiang.liu@linux.intel.com
    Signed-off-by: Thomas Gleixner <tglx@linutronix.de>

:040000 040000 4cb60e0b1d4beb046834e75c66b5d0a0613935b9 df0b465b70ec087560482267cca2d9ff54d92c49 M    include
:040000 040000 3808922cd797449f8f9b33300064a2ff1727f3a6 25a75bf65be0ba9e397151de0ed1beb1695fddb2 M    kernel

----
Rgds,

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

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

Re: Kernel 4.2

Post by xeno74 »

Further information:

The first bad commit: http://git.kernel.org/cgit/linux/kernel ... eeb079050a

Linuxppc-dev mailing list thread: https://lists.ozlabs.org/pipermail/linu ... 30717.html
http://www.amigalinux.org
http://www.supertuxkart-amiga.de

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

Re: Kernel 4.2

Post by xeno74 »

Hi All,

The first bad commit: http://git.kernel.org/cgit/linux/kernel ... eeb079050a

I replaced the following irq files with the old kernel 4.1 irq files:

Code: Select all

~/Downloads/linux-4.2/linux-4.2-nemo$ cp /home/christian/Downloads/linux-4.1/linux-4.1/include/linux/irq.h include/linux/irq.h
~/Downloads/linux-4.2/linux-4.2-nemo$ cp /home/christian/Downloads/linux-4.1/linux-4.1/include/linux/irqdesc.h include/linux/irqdesc.h
~/Downloads/linux-4.2/linux-4.2-nemo$ cp /home/christian/Downloads/linux-4.1/linux-4.1/kernel/irq/internals.h kernel/irq/internals.h
~/Downloads/linux-4.2/linux-4.2-nemo$ cp /home/christian/Downloads/linux-4.1/linux-4.1/kernel/irq/irqdesc.c kernel/irq/irqdesc.c
~/Downloads/linux-4.2/linux-4.2-nemo$ cp /home/christian/Downloads/linux-4.1/linux-4.1/kernel/irq/irqdomain.c kernel/irq/irqdomain.c
~/Downloads/linux-4.2/linux-4.2-nemo$ cp /home/christian/Downloads/linux-4.1/linux-4.1/kernel/irq/manage.c kernel/irq/manage.c
~/Downloads/linux-4.2/linux-4.2-nemo$ cp /home/christian/Downloads/linux-4.1/linux-4.1/kernel/irq/proc.c kernel/irq/proc.c
I compiled the RC1 of kernel 4.2 with these old irq source code files today. I'm happy it boots. :-)
Kernel_4.2_RC1_AMIGA_one_X1000.png
Rgds,

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

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

Re: Kernel 4.2

Post by xeno74 »

I've created a new Nemo patch for the kernel 4.2 recently.

Download:
nemo_4.2-3.patch.zip
(12.49 KiB) Downloaded 245 times
New:
  • Patches for the irq system
  • New patch for probe.c because of code changes
probe.c

Code: Select all

diff -rupN linux-4.2/drivers/pci/probe.c linux-4.2-nemo/drivers/pci/probe.c
--- linux-4.2/drivers/pci/probe.c	2015-07-05 20:01:52.000000000 +0200
+++ linux-4.2-nemo/drivers/pci/probe.c	2015-07-10 09:09:12.175656510 +0200
@@ -363,7 +363,11 @@ static void pci_read_bridge_io(struct pc
 		limit |= ((unsigned long) io_limit_hi << 16);
 	}
 
-	if (base <= limit) {
+       if (base <= limit
+       #ifdef CONFIG_PPC_PASEMI_SB600
+               || child->busn_res.start == 5
+       #endif
+              ) {
 		res->flags = (io_base_lo & PCI_IO_RANGE_TYPE_MASK) | IORESOURCE_IO;
 		region.start = base;
 		region.end = limit + io_granularity - 1;
@@ -1645,11 +1649,14 @@ static int only_one_child(struct pci_bus
 
 	if (!parent || !pci_is_pcie(parent))
 		return 0;
+	#ifndef CONFIG_PPC_PASEMI_SB600
+	// SB600 has non-zero devices on non-root bus.
 	if (pci_pcie_type(parent) == PCI_EXP_TYPE_ROOT_PORT)
 		return 1;
 	if (parent->has_secondary_link &&
 	    !pci_has_flag(PCI_SCAN_ALL_PCIE_DEVS))
 		return 1;
+	#endif
 	return 0;
 } 
patch -p0 < nemo_4.2-3.patch

Code: Select all

patching file linux-4.2/arch/powerpc/kernel/head_64.S
patching file linux-4.2/arch/powerpc/kernel/pci-common.c
patching file linux-4.2/arch/powerpc/kernel/setup-common.c
patching file linux-4.2/arch/powerpc/platforms/pasemi/iommu.c
patching file linux-4.2/arch/powerpc/platforms/pasemi/Kconfig
patching file linux-4.2/arch/powerpc/platforms/pasemi/pci.c
patching file linux-4.2/arch/powerpc/platforms/pasemi/setup.c
patching file linux-4.2/arch/powerpc/sysdev/i8259.c
patching file linux-4.2/arch/powerpc/sysdev/mpic.c
patching file linux-4.2/drivers/ata/libata-sff.c
patching file linux-4.2/drivers/ata/pata_atiixp.c
patching file linux-4.2/drivers/ata/pata_of_platform.c
patching file linux-4.2/drivers/gpu/drm/radeon/radeon_pm.c
patching file linux-4.2/drivers/pci/pci.c
patching file linux-4.2/drivers/pci/probe.c
patching file linux-4.2/drivers/rtc/rtc-cmos.c
patching file linux-4.2/include/linux/irqdesc.h
patching file linux-4.2/include/linux/irq.h
patching file linux-4.2/kernel/irq/internals.h
patching file linux-4.2/kernel/irq/irqdesc.c
patching file linux-4.2/kernel/irq/irqdomain.c
patching file linux-4.2/kernel/irq/manage.c
patching file linux-4.2/kernel/irq/proc.c
patching file linux-4.2/sound/pci/hda/patch_sigmatel.c
http://www.amigalinux.org
http://www.supertuxkart-amiga.de

Running Linux on AmigaONEs can require some tinkering.
zzd10h
Posts: 546
Joined: Sun Sep 16, 2012 5:40 am
Location: France

Re: Kernel 4.2

Post by zzd10h »

I can't test for now, but Bravo !
http://apps.amistore.net/zTools
X1000 - AmigaOS 4.1.6 / 4.1 FE
User avatar
xeno74
Posts: 9385
Joined: Fri Mar 23, 2012 7:58 am

Re: Kernel 4.2

Post by xeno74 »

zzd10h wrote:I can't test for now, but Bravo !
Thank you.

@All

I have released the RC1 of kernel 4.2 recently.

Download: vmlinux-4.2-rc1-AMIGA_one_X1000.tar.bz2

New:

Torvalds' release announcement

Linux 4.2-rc1 Released: One Of The Biggest Ones Ever - phoronix

You May Want To Wait On Trying Out The Linux 4.2 Kernel - phoronix

Could you please test this kernel? Thanks in advance. :-)
http://www.amigalinux.org
http://www.supertuxkart-amiga.de

Running Linux on AmigaONEs can require some tinkering.
User avatar
musa
Posts: 714
Joined: Tue Aug 23, 2011 7:58 pm

Re: Kernel 4.2

Post by musa »

xeno74 wrote:
zzd10h wrote:I can't test for now, but Bravo !
Thank you.

@All

I have released the RC1 of kernel 4.2 recently.

Download: vmlinux-4.2-rc1-AMIGA_one_X1000.tar.bz2

New:

Torvalds' release announcement

Linux 4.2-rc1 Released: One Of The Biggest Ones Ever - phoronix

You May Want To Wait On Trying Out The Linux 4.2 Kernel - phoronix

Could you please test this kernel? Thanks in advance. :-)
Hi Christian
Tested Mate 15:04 and booting normally
Congratulations, you've done a fantastic job well done
I test debian and ubuntu 15.10 later
Skærmbillede-7.png
AmigaX1000
User avatar
musa
Posts: 714
Joined: Tue Aug 23, 2011 7:58 pm

Re: Kernel 4.2

Post by musa »

XUbuntu 15.10 and debian 8 is boot to
AmigaX1000
User avatar
xeno74
Posts: 9385
Joined: Fri Mar 23, 2012 7:58 am

Re: Kernel 4.2

Post by xeno74 »

Thank you for testing!
http://www.amigalinux.org
http://www.supertuxkart-amiga.de

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

Re: Kernel 4.2

Post by xeno74 »

New Nemo patch for the RC2:
nemo_4.2-4.patch.zip
(12.42 KiB) Downloaded 276 times
http://www.amigalinux.org
http://www.supertuxkart-amiga.de

Running Linux on AmigaONEs can require some tinkering.
Post Reply