Kernel 5.15

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

Re: Kernel 5.15

Post by xeno74 »

Hi Hypex,
Wolfram wrote: As Sven correctly switched from %lx to %p, this is intended behaviour.
Run 'i2cdetect' as root to see the values again.
Please run “sudo su“ before you run “i2cdetect -l“.

Thanks,
Christian
Last edited by xeno74 on Mon Oct 04, 2021 11:23 am, edited 1 time in total.
http://www.amigalinux.org
http://www.supertuxkart-amiga.de

Running Linux on AmigaONEs can require some tinkering.
User avatar
Hypex
Beta Tester
Beta Tester
Posts: 645
Joined: Mon Dec 20, 2010 2:23 pm
Location: Vic. Australia.

Re: Kernel 5.15

Post by Hypex »

xeno74 wrote: Sun Oct 03, 2021 7:13 pm Sven can credit you with a Tested-by tag if you want.

Cheers,
Christian
Sure, I don't mind.

Also, testing RC4 now, looking good. I2C output normal. :-)
User avatar
xeno74
Posts: 9349
Joined: Fri Mar 23, 2012 7:58 am

Re: Kernel 5.15

Post by xeno74 »

Hypex wrote: Mon Oct 04, 2021 11:21 am Also, testing RC4 now, looking good. I2C output normal. :-)
Fantastic! Did you run ‘i2cdetect -l‘ as root (sudo su)?
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 5.15

Post by xeno74 »

xeno74 wrote: Mon Oct 04, 2021 10:08 am
Hypex wrote: Mon Oct 04, 2021 9:42 am Thanks. There is an error in the archive. There is a vmlinux5.14 file but it looks for be the right version.

Code: Select all

ienix@Fienix:~$ grep -a "Linux version 5" '/home/fienix/Downloads/vmlinux-5.14' 
Linux version 5.15.0-rc4_A-EON_X1000_Nemo (christian@cc-build-machine.a-eon.tld) (powerpc-linux-gnu-gcc (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0, GNU ld (GNU Binutils for Ubuntu) 2.30) #1 SMP PREEMPT Mon Oct 4 05:30:46 CEST 2021
It was my fault. It is the correct kernel with unfortunately the wrong name. It was to early in the morning for compiling a kernel.

Thanks
Hypex,

I uploaded the RC4 again with the correct name for the X1000 vmlinux file.

Download: linux-image-5.15-rc4-X1000_X5000.tar.gz

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

Running Linux on AmigaONEs can require some tinkering.
User avatar
Hypex
Beta Tester
Beta Tester
Posts: 645
Joined: Mon Dec 20, 2010 2:23 pm
Location: Vic. Australia.

Re: Kernel 5.15

Post by Hypex »

xeno74 wrote: Mon Oct 04, 2021 11:29 amIt was my fault. It is the correct kernel with unfortunately the wrong name. It was to early in the morning for compiling a kernel.
Ah that was it. :-D

How automated is your system?
Fantastic! Did you run ‘i2cdetect -l‘ as root (sudo su)?
Yes, my results are the same. Strangely, when I tried to run as "su" it couldn't find the i2cdetect command.

The ptrval looks to be caused by using pointer specifier. But it hashes the result. Though I don't know why it only happens on the dirty kernel if it's a printk(). Is the printk() in some i2c driver code?

https://www.kernel.org/doc/html/latest/ ... n-pointers
User avatar
xeno74
Posts: 9349
Joined: Fri Mar 23, 2012 7:58 am

Re: Kernel 5.15

Post by xeno74 »

Hypex wrote: Tue Oct 05, 2021 4:02 pm Yes, my results are the same.
I see. Thank you for testing!
Hypex wrote: Tue Oct 05, 2021 4:02 pm The ptrval looks to be caused by using pointer specifier. But it hashes the result. Though I don't know why it only happens on the dirty kernel if it's a printk(). Is the printk() in some i2c driver code?
Here are the answers because of ptrval:
Arnd wrote: I think the address could just get removed here, as this is clearly not helpful.
port number, which is somewhat useful for identifying the device, now
it's either the pointless string, or the virtual address that the
device is mapped to, which is not helpful either and potentially leaks information about kernel
internal structures.

Arnd
Sven wrote: Yeah, now that I'm looking at it again it doesn't make much sense to
include it there. Maybe just dev_name(smbus->dev) instead of the address?


Sven
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 5.15

Post by xeno74 »

FYI: [X1000] i2c-pasemi for Linux on Apple Silicon (M1)
I²C driver (i2c-pasemiin review): The M1 borrows its I²C hardware from… none other than the PA Semi PWRficient PA6T-1682M, used in the AmigaOne X1000! Turns out there is some clear PA Semi legacy in these chips! Linux already has a driver for this hardware, but on the PowerPC chips it is a PCI device, while on the M1 it is a platform device. Sven has submitted a patch series to decouple the existing driver from the PCI part and add platform device support. It’s currently being tested by the folks with AmigaOne hardware to make sure nothing broke along the way, and should be ready to merge after that. This hardware is used to talk to things like the audio amplifier chips and the USB-C port controllers.
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 5.15

Post by xeno74 »

Sven has released the v2 patchset of the modified i2c pasemi driver.

Link: patchwork.ozlabs.org

Mbox: https://patchwork.ozlabs.org/series/266104/mbox/

Code: Select all

$ wget -O mbox https://patchwork.ozlabs.org/series/266104/mbox/
$ git am mbox
This time it doesn't work with this kind of patching. I had to apply every patch.

Code: Select all

$ patch -p0 < pas_pci_init_v2.patch
patching file a/arch/powerpc/platforms/pasemi/pci.c
patching file a/arch/powerpc/platforms/pasemi/setup.c
$ patch -p0 < v2-01-11-dt-bindings-i2c-Add-Apple-I2C-controller-bindings.patch 
patching file b/Documentation/devicetree/bindings/i2c/apple,i2c.yaml
patching file a/MAINTAINERS
Hunk #1 succeeded at 1719 with fuzz 2 (offset -16 lines).
$ patch -p0 < v2-02-11-i2c-pasemi-Use-io-read-write-32.patch
patching file a/drivers/i2c/busses/i2c-pasemi.c
$ patch -p0 < v2-03-11-i2c-pasemi-Use-dev_name-instead-of-port-number.patch 
patching file a/drivers/i2c/busses/i2c-pasemi.c
$ patch -p0 < v2-04-11-i2c-pasemi-Remove-usage-of-pci_dev.patch 
patching file a/drivers/i2c/busses/i2c-pasemi.c
$ patch -p0 < v2-05-11-i2c-pasemi-Split-off-common-probing-code.patch 
patching file a/drivers/i2c/busses/i2c-pasemi.c
$ patch -p0 < v2-06-11-i2c-pasemi-Split-pci-driver-to-its-own-file.patch 
patching file a/drivers/i2c/busses/Makefile
patching file b/drivers/i2c/busses/i2c-pasemi-core.c (renamed from a/drivers/i2c/busses/i2c-pasemi.c)
patching file b/drivers/i2c/busses/i2c-pasemi-core.h
patching file b/drivers/i2c/busses/i2c-pasemi-pci.c
$ patch -p0 < v2-07-11-i2c-pasemi-Move-common-reset-code-to-own-function.patch 
patching file b/drivers/i2c/busses/i2c-pasemi-core.c
$ patch -p0 < v2-08-11-i2c-pasemi-Allow-to-configure-bus-frequency.patch 
patching file b/drivers/i2c/busses/i2c-pasemi-core.c
patching file b/drivers/i2c/busses/i2c-pasemi-core.h
patching file b/drivers/i2c/busses/i2c-pasemi-pci.c
$ patch -p0 < v2-09-11-i2c-pasemi-Refactor-_probe-to-use-devm_.patch 
patching file b/drivers/i2c/busses/i2c-pasemi-core.c
patching file b/drivers/i2c/busses/i2c-pasemi-core.h
patching file b/drivers/i2c/busses/i2c-pasemi-pci.c
$ patch -p0 < v2-10-11-i2c-pasemi-Add-Apple-platform-driver.patch 
patching file a/MAINTAINERS
Hunk #1 succeeded at 1723 with fuzz 1 (offset -17 lines).
patching file a/drivers/i2c/busses/Kconfig
Hunk #1 succeeded at 856 (offset -3 lines).
patching file a/drivers/i2c/busses/Makefile
patching file b/drivers/i2c/busses/i2c-pasemi-platform.c
$ patch -p0 < v2-11-11-i2c-pasemi-Set-enable-bit-for-Apple-variant-1.patch 
patching file b/drivers/i2c/busses/i2c-pasemi-core.c
patching file b/drivers/i2c/busses/i2c-pasemi-core.h
patching file b/drivers/i2c/busses/i2c-pasemi-pci.c
I compiled a new RC4 with the v2 i2c modifications.

Download: linux-image-5.15-rc4-2-X1000.tar.gz

Please test it.

Thanks
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 5.15

Post by xeno74 »

Hi All,

I successfully tested the RC4-2 with the v2 i2c modifications.

lscpu

Code: Select all

Architektur:               ppc64
  CPU Operationsmodus:     32-bit, 64-bit
  Byte-Reihenfolge:        Big Endian
CPU(s):                    2
  Liste der Online-CPU(s): 0,1
Modellname:                PA6T, altivec supported
  Modell:                  1.2 (pvr 0090 0102)
  Thread(s) pro Kern:      1
  Kern(e) pro Sockel:      2
  Sockel:                  1
Caches (Gesamtsumme):      
  L1d:                     128 KiB (2 Instanzen)
  L1i:                     128 KiB (2 Instanzen)
Schwachstellen:            
  Itlb multihit:           Not affected
  L1tf:                    Vulnerable
  Mds:                     Not affected
  Meltdown:                Vulnerable
  Spec store bypass:       Vulnerable
  Spectre v1:              Mitigation; __user pointer sanitization
  Spectre v2:              Vulnerable
  Srbds:                   Not affected
  Tsx async abort:         Not affected
i2cdetect -l

Code: Select all

i2c-3	i2c       	Radeon i2c bit bus 0x93         	I2C adapter
i2c-10	i2c       	PA Semi SMBus adapter (0000:00:1c.0)	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-13	i2c       	bt878 #0 [sw]                   	I2C adapter
i2c-4	i2c       	Radeon i2c bit bus 0x94         	I2C adapter
i2c-11	i2c       	PA Semi SMBus adapter (0000:00:1c.1)	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
i2c-12	i2c       	PA Semi SMBus adapter (0000:00:1c.2)	I2C adapter
dmesg | grep -i i2c

Code: Select all

[    5.769430] i2c_dev: i2c /dev entries driver
[    6.096621] i2c i2c-10: Detected TI TMP423 chip at 0x4c
lspci | grep -i smbus

Code: Select all

00:1c.0 SMBus: PA Semi, Inc PWRficient SMBus Controller (rev 01)
00:1c.1 SMBus: PA Semi, Inc PWRficient SMBus Controller (rev 01)
00:1c.2 SMBus: PA Semi, Inc PWRficient SMBus Controller (rev 01)
05:14.0 SMBus: Advanced Micro Devices, Inc. [AMD/ATI] SBx00 SMBus Controller (rev 14)
@Hypex
Could you also please test the RC4-2?

@Darren
Do you agree with the new i2c patches?

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

Running Linux on AmigaONEs can require some tinkering.
User avatar
Hypex
Beta Tester
Beta Tester
Posts: 645
Joined: Mon Dec 20, 2010 2:23 pm
Location: Vic. Australia.

Re: Kernel 5.15

Post by Hypex »

RC4 V2 is working fine over here. I can't run lspci as it doesn't exist on my Fienix. The CPU vulnerabilities are concerning.
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 PA Semi SMBus adapter (0000:00:1c.0) I2C adapter
i2c-9 i2c PA Semi SMBus adapter (0000:00:1c.1) I2C adapter
i2c-10 i2c PA Semi SMBus adapter (0000:00:1c.2) I2C adapter
Post Reply