Kernel 4.8

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

Kernel 4.8

Post by xeno74 »

Hi All,

The merge window has been opened this week and it was added a lot of new source code for the future kernel 4.8.

I compiled the latest Git kernel yesterday. The kernel boots and works but unfortunately I got some error messages about the i2c-pasemi:

Code: Select all

[    3.553461] i2c /dev entries driver
[    3.554462] couldn't get idr
[    3.554463] ------------[ cut here ]------------
[    3.554474] WARNING: CPU: 0 PID: 1 at drivers/i2c/i2c-core.c:1789 .__i2c_add_numbered_adapter+0x80/0xc0
[    3.554477] Modules linked in:
[    3.554482] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.8.0_a1_A-EON_AmigaONE_X1000_Nemo-05906-g194dc87-dirty #1
[    3.554485] task: c00000026d116d80 ti: c00000026d120000 task.ti: c00000026d120000
[    3.554487] NIP: c0000000007f1b70 LR: c0000000007f1b6c CTR: 0000000000000000
[    3.554490] REGS: c00000026d123370 TRAP: 0700   Not tainted (4.8.0_a1_A-EON_AmigaONE_X1000_Nemo-05906-g194dc87-dirty)
[    3.554502] MSR: 9000000002029032 <SF,HV,VEC,EE,ME,IR,DR,RI>  CR: 42870d22  XER: 20000000
[    3.554540] SOFTE: 1
               GPR00: c0000000007f1b6c c00000026d1235f0 c0000000017bc600 0000000000000010
               GPR04: 0000000000000001 0000000000000000 0000000000000010 c0000000018ec600
               GPR08: 2067657420696472 0000000000000000 0000000000000000 0000000000000030
               GPR12: 2067657420696472 c00000000ffff000 c000000000009b10 0000000000000000
               GPR16: 0000000000000000 0000000000000000 0000000000000000 0000000000000000
               GPR20: 0000000000000000 0000000000000000 0000000000000000 0000000000000000
               GPR24: 0000000000000000 c0000000016c86d8 c000000001555110 0000000000000000
               GPR28: c000000001629ec8 c000000001628fc0 ffffffffffffffe4 c00000026b16f408
[    3.554545] NIP [c0000000007f1b70] .__i2c_add_numbered_adapter+0x80/0xc0
[    3.554549] LR [c0000000007f1b6c] .__i2c_add_numbered_adapter+0x7c/0xc0
[    3.554551] Call Trace:
[    3.554557] [c00000026d1235f0] [c0000000007f1b6c] .__i2c_add_numbered_adapter+0x7c/0xc0 (unreliable)
[    3.554563] [c00000026d123680] [c0000000007f4b58] .pasemi_smb_probe+0x12c/0x188
[    3.554569] [c00000026d123710] [c0000000004b0fb0] .pci_device_probe+0x90/0x100
[    3.554576] [c00000026d1237a0] [c0000000006d3c10] .driver_probe_device+0x15c/0x2c8
[    3.554581] [c00000026d123840] [c0000000006d3e2c] .__driver_attach+0xb0/0xe0
[    3.554586] [c00000026d1238d0] [c0000000006d1920] .bus_for_each_dev+0xac/0xc0
[    3.554591] [c00000026d123970] [c0000000006d35ac] .driver_attach+0x34/0x40
[    3.554597] [c00000026d1239f0] [c0000000006d2ff4] .bus_add_driver+0x104/0x244
[    3.554602] [c00000026d123a90] [c0000000006d4758] .driver_register+0xc0/0x110
[    3.554608] [c00000026d123b20] [c0000000004b06f4] .__pci_register_driver+0x58/0x64
[    3.554615] [c00000026d123bb0] [c00000000153134c] .pasemi_smb_driver_init+0x24/0x38
[    3.554621] [c00000026d123c20] [c0000000000094ac] .do_one_initcall+0xd8/0x174
[    3.554626] [c00000026d123d00] [c0000000014eed98] .kernel_init_freeable+0x188/0x244
[    3.554632] [c00000026d123db0] [c000000000009b30] .kernel_init+0x20/0x130
[    3.554638] [c00000026d123e30] [c000000000007ee8] .ret_from_kernel_thread+0x58/0x70
[    3.554639] Instruction dump:
[    3.554648] 4bc8bac5 60000000 7c7e1b78 7fa3eb78 482e7ce1 60000000 2f9e0000 409c002c
[    3.554657] 3c62ffc8 3863aaca 482eb255 60000000 <0fe00000> 2f9effe4 3860fff0 419e002c
[    3.554661] ---[ end trace cac6a75782ca269c ]---
[    3.554673] i2c-pasemi: probe of 0000:00:1c.0 failed with error -16
[    3.554724] couldn't get idr
[    3.554725] ------------[ cut here ]------------
[    3.554733] WARNING: CPU: 0 PID: 1 at drivers/i2c/i2c-core.c:1789 .__i2c_add_numbered_adapter+0x80/0xc0
[    3.554735] Modules linked in:
[    3.554739] CPU: 0 PID: 1 Comm: swapper/0 Tainted: G W 4.8.0_a1_A-EON_AmigaONE_X1000_Nemo-05906-g194dc87-dirty #1
[    3.554742] task: c00000026d116d80 ti: c00000026d120000 task.ti: c00000026d120000
[    3.554744] NIP: c0000000007f1b70 LR: c0000000007f1b6c CTR: 0000000000000000
[    3.554747] REGS: c00000026d123370 TRAP: 0700   Tainted: G        W (4.8.0_a1_A-EON_AmigaONE_X1000_Nemo-05906-g194dc87-dirty)
[    3.554758] MSR: 9000000002029032 <SF,HV,VEC,EE,ME,IR,DR,RI>  CR: 42870d22  XER: 20000000
[    3.554795] SOFTE: 1
               GPR00: c0000000007f1b6c c00000026d1235f0 c0000000017bc600 0000000000000010
               GPR04: 0000000000000001 0000000000000000 0000000000000010 c0000000018ec600
               GPR08: 2067657420696472 0000000000000000 0000000000000000 0000000000000030
               GPR12: 2067657420696472 c00000000ffff000 c000000000009b10 0000000000000000
               GPR16: 0000000000000000 0000000000000000 0000000000000000 0000000000000000
               GPR20: 0000000000000000 0000000000000000 0000000000000000 0000000000000000
               GPR24: 0000000000000000 c0000000016c86d8 c000000001555110 0000000000000000
               GPR28: c000000001629ec8 c000000001628fc0 ffffffffffffffe4 c00000026b16f408
[    3.554800] NIP [c0000000007f1b70] .__i2c_add_numbered_adapter+0x80/0xc0
[    3.554805] LR [c0000000007f1b6c] .__i2c_add_numbered_adapter+0x7c/0xc0
[    3.554806] Call Trace:
[    3.554812] [c00000026d1235f0] [c0000000007f1b6c] .__i2c_add_numbered_adapter+0x7c/0xc0 (unreliable)
[    3.554818] [c00000026d123680] [c0000000007f4b58] .pasemi_smb_probe+0x12c/0x188
[    3.554823] [c00000026d123710] [c0000000004b0fb0] .pci_device_probe+0x90/0x100
[    3.554829] [c00000026d1237a0] [c0000000006d3c10] .driver_probe_device+0x15c/0x2c8
[    3.554834] [c00000026d123840] [c0000000006d3e2c] .__driver_attach+0xb0/0xe0
[    3.554839] [c00000026d1238d0] [c0000000006d1920] .bus_for_each_dev+0xac/0xc0
[    3.554844] [c00000026d123970] [c0000000006d35ac] .driver_attach+0x34/0x40
[    3.554850] [c00000026d1239f0] [c0000000006d2ff4] .bus_add_driver+0x104/0x244
[    3.554855] [c00000026d123a90] [c0000000006d4758] .driver_register+0xc0/0x110
[    3.554861] [c00000026d123b20] [c0000000004b06f4] .__pci_register_driver+0x58/0x64
[    3.554867] [c00000026d123bb0] [c00000000153134c] .pasemi_smb_driver_init+0x24/0x38
[    3.554873] [c00000026d123c20] [c0000000000094ac] .do_one_initcall+0xd8/0x174
[    3.554878] [c00000026d123d00] [c0000000014eed98] .kernel_init_freeable+0x188/0x244
[    3.554883] [c00000026d123db0] [c000000000009b30] .kernel_init+0x20/0x130
[    3.554889] [c00000026d123e30] [c000000000007ee8] .ret_from_kernel_thread+0x58/0x70
[    3.554891] Instruction dump:
[    3.554899] 4bc8bac5 60000000 7c7e1b78 7fa3eb78 482e7ce1 60000000 2f9e0000 409c002c
[    3.554907] 3c62ffc8 3863aaca 482eb255 60000000 <0fe00000> 2f9effe4 3860fff0 419e002c
[    3.554909] ---[ end trace cac6a75782ca269d ]---
[    3.554919] i2c-pasemi: probe of 0000:00:1c.1 failed with error -16
[    3.554968] couldn't get idr
[    3.554969] ------------[ cut here ]------------
[    3.554977] WARNING: CPU: 0 PID: 1 at drivers/i2c/i2c-core.c:1789 .__i2c_add_numbered_adapter+0x80/0xc0
[    3.554979] Modules linked in:
[    3.554983] CPU: 0 PID: 1 Comm: swapper/0 Tainted: G W 4.8.0_a1_A-EON_AmigaONE_X1000_Nemo-05906-g194dc87-dirty #1
[    3.554986] task: c00000026d116d80 ti: c00000026d120000 task.ti: c00000026d120000
[    3.554988] NIP: c0000000007f1b70 LR: c0000000007f1b6c CTR: 0000000000000000
[    3.554991] REGS: c00000026d123370 TRAP: 0700   Tainted: G        W (4.8.0_a1_A-EON_AmigaONE_X1000_Nemo-05906-g194dc87-dirty)
[    3.555001] MSR: 9000000002029032 <SF,HV,VEC,EE,ME,IR,DR,RI>  CR: 42870d22  XER: 20000000
[    3.555038] SOFTE: 1
               GPR00: c0000000007f1b6c c00000026d1235f0 c0000000017bc600 0000000000000010
               GPR04: 0000000000000001 0000000000000000 0000000000000010 c0000000018ec600
               GPR08: 2067657420696472 0000000000000000 0000000000000000 0000000000000030
               GPR12: 2067657420696472 c00000000ffff000 c000000000009b10 0000000000000000
               GPR16: 0000000000000000 0000000000000000 0000000000000000 0000000000000000
               GPR20: 0000000000000000 0000000000000000 0000000000000000 0000000000000000
               GPR24: 0000000000000000 c0000000016c86d8 c000000001555110 0000000000000000
               GPR28: c000000001629ec8 c000000001628fc0 ffffffffffffffe4 c00000026b16f408
[    3.555043] NIP [c0000000007f1b70] .__i2c_add_numbered_adapter+0x80/0xc0
[    3.555047] LR [c0000000007f1b6c] .__i2c_add_numbered_adapter+0x7c/0xc0
[    3.555048] Call Trace:
[    3.555055] [c00000026d1235f0] [c0000000007f1b6c] .__i2c_add_numbered_adapter+0x7c/0xc0 (unreliable)
[    3.555060] [c00000026d123680] [c0000000007f4b58] .pasemi_smb_probe+0x12c/0x188
[    3.555065] [c00000026d123710] [c0000000004b0fb0] .pci_device_probe+0x90/0x100
[    3.555071] [c00000026d1237a0] [c0000000006d3c10] .driver_probe_device+0x15c/0x2c8
[    3.555076] [c00000026d123840] [c0000000006d3e2c] .__driver_attach+0xb0/0xe0
[    3.555082] [c00000026d1238d0] [c0000000006d1920] .bus_for_each_dev+0xac/0xc0
[    3.555087] [c00000026d123970] [c0000000006d35ac] .driver_attach+0x34/0x40
[    3.555092] [c00000026d1239f0] [c0000000006d2ff4] .bus_add_driver+0x104/0x244
[    3.555097] [c00000026d123a90] [c0000000006d4758] .driver_register+0xc0/0x110
[    3.555103] [c00000026d123b20] [c0000000004b06f4] .__pci_register_driver+0x58/0x64
[    3.555109] [c00000026d123bb0] [c00000000153134c] .pasemi_smb_driver_init+0x24/0x38
[    3.555115] [c00000026d123c20] [c0000000000094ac] .do_one_initcall+0xd8/0x174
[    3.555120] [c00000026d123d00] [c0000000014eed98] .kernel_init_freeable+0x188/0x244
[    3.555126] [c00000026d123db0] [c000000000009b30] .kernel_init+0x20/0x130
[    3.555131] [c00000026d123e30] [c000000000007ee8] .ret_from_kernel_thread+0x58/0x70
[    3.555133] Instruction dump:
[    3.555141] 4bc8bac5 60000000 7c7e1b78 7fa3eb78 482e7ce1 60000000 2f9e0000 409c002c
[    3.555149] 3c62ffc8 3863aaca 482eb255 60000000 <0fe00000> 2f9effe4 3860fff0 419e002c
[    3.555151] ---[ end trace cac6a75782ca269e ]---
[    3.555161] i2c-pasemi: probe of 0000:00:1c.2 failed with error -16
The commit Merge branch 'i2c/for-4.8' is the problem.

I reverted the i2c commit with:

Code: Select all

git revert 66304207cd341045df34195b4a8d422075bff513 -m 1
Output:

Code: Select all

31 files changed, 550 insertions(+), 1416 deletions(-)
By the way, Darren released a new patch for supporting the "hybrid" iommu/direct DMA on P.A. Semi boards.

Further information: PATCH pasemi: Fix coherent_dma_mask for dma engine -- Linux on PowerPC Developers Mail List

I replaced the iommu.c part of the Nemo patch with the new source code from Darren's DMA patch. After that I successfully patched the latest Git kernel with this new Nemo patch 4.8-1.

Code: Select all

patch -p0 < nemo_4.8-1.patch
Then I was able to compile it. It boots without the error messages about the i2c-pasemi. Fantastic! :-)

Here is the download: vmlinux-4.8-alpha1-AmigaONE_X1000.tar.gz

Further information:
Screenshot of ubuntu MATE 16.10 PPC with Mesa 12.0.1, DRM 2.45.0, and with the kernel 4.8 alpha1:

Image

Please test the alpha1

Cheers,

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

Running Linux on AmigaONEs can require some tinkering.
User avatar
Srtest
Posts: 240
Joined: Wed Jun 11, 2014 5:06 pm

Re: Kernel 4.8

Post by Srtest »

Please read the second user posting here (comment #102): https://www.phoronix.com/forums/forum/l ... pus/page11 | and fifth posting on the same page (comment #105).

If you will follow along these suggestions I'll be volunteering to test it.
User avatar
xeno74
Posts: 9349
Joined: Fri Mar 23, 2012 7:58 am

Re: Kernel 4.8

Post by xeno74 »

Srtest wrote:Please read the second user posting here (comment #102): https://www.phoronix.com/forums/forum/l ... pus/page11 | and fifth posting on the same page (comment #105).

If you will follow along these suggestions I'll be volunteering to test it.
Thank you! :-)

By the way, I posted the problem with the i2c-pasemi on the Linux PPC mailing list.

Link: [pasemi] problem with i2c-pasemi

Information about our I2C/SMBus busses:

Code: Select all

00:1c.0 SMBus: PA Semi, Inc PWRficient SMBus Controller (rev 01)
	Control: I/O+ Mem- BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
	Status: Cap- 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
	Interrupt: pin A routed to IRQ 70
	Region 0: I/O ports at 7f0200 [size=64]

00:1c.1 SMBus: PA Semi, Inc PWRficient SMBus Controller (rev 01)
	Control: I/O+ Mem- BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
	Status: Cap- 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
	Interrupt: pin A routed to IRQ 71
	Region 0: I/O ports at 7f0240 [size=64]

00:1c.2 SMBus: PA Semi, Inc PWRficient SMBus Controller (rev 01)
	Control: I/O+ Mem- BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
	Status: Cap- 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
	Interrupt: pin A routed to IRQ 72
	Region 0: I/O ports at 7f0280 [size=64]

Code: Select all

SMbus Controllers
The CPU provides 3 SMbus controllers, and these are used to connect up various SMbus and
I2C devices. The number of SMbusses is expanded to 7 via a 1:4 multiplexer on SMbus 1.

SMbus 0 is connected to the 4 DIMM sockets to support Serial Presence Detect (SPD). It is also connected to a standard 24LC128 EEPROM, and a temperature sensor (Texas Instruments TMP423). This sensor is connected to the CPU on-die temperature diodes for the 2 cores and SOC (main logic).
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.8

Post by xeno74 »

i2cdetect -l

Code: Select all

i2c-0	i2c       	Radeon i2c bit bus 0x90         	I2C adapter
i2c-1	i2c       	Radeon i2c bit bus 0x91         	I2C adapter
i2c-2	i2c       	Radeon i2c bit bus 0x92         	I2C adapter
i2c-3	i2c       	Radeon i2c bit bus 0x93         	I2C adapter
i2c-4	i2c       	Radeon i2c bit bus 0x94         	I2C adapter
i2c-5	i2c       	Radeon i2c bit bus 0x95         	I2C adapter
i2c-6	i2c       	Radeon i2c bit bus 0x96         	I2C adapter
i2c-7	i2c       	Radeon i2c bit bus 0x97         	I2C adapter
i2c-8	i2c       	card0-DP-1                      	I2C adapter
i2c-9	i2c       	card0-DP-2                      	I2C adapter
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.8

Post by xeno74 »

Hi All,

I tried to compile the latest Git kernel today. It boots but Xorg doesn't work anymore. :-(

Code: Select all

[    41.210] (++) using VT number 7

[    41.341] (II) [KMS] Kernel modesetting enabled.
[    41.341] (EE) No devices detected.
[    41.341] (EE) 
Fatal server error:
[    41.341] (EE) no screens found(EE) 
[    41.341] (EE) 
I didn't revert the i2c commit. Here is the output of i2cdetect -l with the i2c commit:

Code: Select all

i2c-3   i2c             Radeon i2c bit bus 0x93                 I2C adapter
i2c-1   i2c             Radeon i2c bit bus 0x91                 I2C adapter
i2c-8   i2c             card0-DP-1                              I2C adapter
i2c-6   i2c             Radeon i2c bit bus 0x96                 I2C adapter
i2c-4   i2c             Radeon i2c bit bus 0x94                 I2C adapter
i2c-2   i2c             Radeon i2c bit bus 0x92                 I2C adapter
i2c-0   i2c             Radeon i2c bit bus 0x90                 I2C adapter
i2c-9   i2c             card0-DP-2                              I2C adapter
i2c-7   i2c             Radeon i2c bit bus 0x97                 I2C adapter
i2c-5   i2c             Radeon i2c bit bus 0x95                 I2C adapter
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.8

Post by xeno74 »

Hi All,

I compiled it without the i2c commit but Xorg doesn't start.

Maybe the commit powerpc-4.8-1 is the problem.

There are a lot of patches for PASEMI source code files.

Link: powerpc-4.8-1

Maybe this is the problem:

- pasemi: Remove IOBMAP allocation from platform probe()

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.8

Post by xeno74 »

Hi All,

I reverted the following patch:

- pasemi: Remove IOBMAP allocation from platform probe()

After that I compiled the kernel again. Unfortunately the kernel doesn't boot.

The last message from CFE:

Code: Select all

Booting Linux via __start()...
Cheers,

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

Running Linux on AmigaONEs can require some tinkering.
User avatar
Srtest
Posts: 240
Joined: Wed Jun 11, 2014 5:06 pm

Re: Kernel 4.8

Post by Srtest »

Maybe the Xorg issue is related to the DMA part they added so maybe it stems from a config value with DMA.

Another thing about Xorg can be the recent upgrade to systemd 231 which nearly destroyed my installation and with luck and chroot I was able to downgrade.
User avatar
xeno74
Posts: 9349
Joined: Fri Mar 23, 2012 7:58 am

Re: Kernel 4.8

Post by xeno74 »

Srtest wrote:Maybe the Xorg issue is related to the DMA part they added so maybe it stems from a config value with DMA.

Another thing about Xorg can be the recent upgrade to systemd 231 which nearly destroyed my installation and with luck and chroot I was able to downgrade.
Thank you for the hint!

I reverted the commit powerpc-4.8-1 and Xorg works. The commit powerpc-4.8-1 is the problem.

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.8

Post by xeno74 »

Here is the alpha2 without the i2c and powerpc commits: vmlinux-4.8-alpha2-AmigaONE_X1000.tar.gz
http://www.amigalinux.org
http://www.supertuxkart-amiga.de

Running Linux on AmigaONEs can require some tinkering.
Post Reply