Re: [PATCH] serial: sh-sci: Initialize spinlock for uart console

From: Lad, Prabhakar
Date: Thu Jul 02 2020 - 07:42:32 EST


Hi Geert,

On Thu, Jul 2, 2020 at 11:49 AM Lad, Prabhakar
<prabhakar.csengg@xxxxxxxxx> wrote:
>
> Hi Geert,
>
> On Thu, Jul 2, 2020 at 10:23 AM Geert Uytterhoeven <geert@xxxxxxxxxxxxxx> wrote:
> >
> > Hi Prabhakar,
> >
> > On Wed, Jul 1, 2020 at 7:28 PM Lad, Prabhakar
> > <prabhakar.csengg@xxxxxxxxx> wrote:
> > > On Wed, Jul 1, 2020 at 6:17 PM Geert Uytterhoeven <geert@xxxxxxxxxxxxxx> wrote:
> > > > On Wed, Jul 1, 2020 at 5:42 PM Lad Prabhakar
> > > > <prabhakar.mahadev-lad.rj@xxxxxxxxxxxxxx> wrote:
> > > > > serial core expects the spinlock to be initialized by the controller
> > > > > driver for serial console, this patch makes sure the spinlock is
> > > > > initialized, fixing the below issue:
> > > > >
> > > > > [ 0.865928] BUG: spinlock bad magic on CPU#0, swapper/0/1
> > > > > [ 0.865945] lock: sci_ports+0x0/0x4c80, .magic: 00000000, .owner: <none>/-1, .owner_cpu: 0
> > > > > [ 0.865955] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 5.8.0-rc1+ #112
> > > > > [ 0.865961] Hardware name: HopeRun HiHope RZ/G2H with sub board (DT)
> > > > > [ 0.865968] Call trace:
> > > > > [ 0.865979] dump_backtrace+0x0/0x1d8
> > > > > [ 0.865985] show_stack+0x14/0x20
> > > > > [ 0.865996] dump_stack+0xe8/0x130
> > > > > [ 0.866006] spin_dump+0x6c/0x88
> > > > > [ 0.866012] do_raw_spin_lock+0xb0/0xf8
> > > > > [ 0.866023] _raw_spin_lock_irqsave+0x80/0xa0
> > > > > [ 0.866032] uart_add_one_port+0x3a4/0x4e0
> > > > > [ 0.866039] sci_probe+0x504/0x7c8
> > > > > [ 0.866048] platform_drv_probe+0x50/0xa0
> > > > > [ 0.866059] really_probe+0xdc/0x330
> > > > > [ 0.866066] driver_probe_device+0x58/0xb8
> > > > > [ 0.866072] device_driver_attach+0x6c/0x90
> > > > > [ 0.866078] __driver_attach+0x88/0xd0
> > > > > [ 0.866085] bus_for_each_dev+0x74/0xc8
> > > > > [ 0.866091] driver_attach+0x20/0x28
> > > > > [ 0.866098] bus_add_driver+0x14c/0x1f8
> > > > > [ 0.866104] driver_register+0x60/0x110
> > > > > [ 0.866109] __platform_driver_register+0x40/0x48
> > > > > [ 0.866119] sci_init+0x2c/0x34
> > > > > [ 0.866127] do_one_initcall+0x88/0x428
> > > > > [ 0.866137] kernel_init_freeable+0x2c0/0x328
> > > > > [ 0.866143] kernel_init+0x10/0x108
> > > > > [ 0.866150] ret_from_fork+0x10/0x18
> > > >
> > > > Interesting...
> > > >
> > > > How can I reproduce that? I do have CONFIG_DEBUG_SPINLOCK=y.
> > > > I'm wondering why haven't we seen this before...
> > > >
> > > I have attached .config for your reference.
> >
> > Thank you!
> >
> > I gave it a try with v5.8-rc1 on Salvator-XS with R-Car H3 ES2.0.
> > However, I couldn't reproduce the issue.
> > Does it happen on that specific board only? Is this serdev-related?
> > Note that I had to disable CONFIG_EXTRA_FIRMWARE, as I don't have the
> > firmware blobs it referenced. Do I need them to trigger the issue?
> > As the .config has a few non-upstream options, do you have any patches
> > applied that might impact the issue?
> >
> Can't think of any patches that might cause an issue, most of it are
> just the DT's and config additions. Nor do firmware blobs should
> affect it. I'll try and reproduce it on M3N and get back to you.
>
I did manage to replicate this issue on M3N (v5.8-rc3 tag with no
modifications), I have attached the config file and also the boot log
without this patch for your reference, after applying this patch I no
more see this issue.

Cheers,
--Prabhakar

> Cheers,
> --Prabhakar
>
> > Thanks again!
> >
> > Gr{oetje,eeting}s,
> >
> > Geert
> >
> > --
> > Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx
> >
> > In personal conversations with technical people, I call myself a hacker. But
> > when I'm talking to journalists I just say "programmer" or something like that.
> > -- Linus Torvalds
U-Boot 2018.09-dirty (Jun 02 2020 - 18:35:29 +0100)

CPU: Renesas Electronics R8A77965 rev 1.1
Model: Renesas Salvator-X board based on r8a77965
DRAM: 1.9 GiB
Bank #0: 0x048000000 - 0x0bfffffff, 1.9 GiB

MMC: sd@ee100000: 0, sd@ee140000: 1, sd@ee160000: 2
Loading Environment from MMC... OK
In: serial@e6e88000
Out: serial@e6e88000
Err: serial@e6e88000
Net: eth0: ethernet@e6800000
Hit any key to stop autoboot: 0
=>
=>
=> pri
autoload=no
baudrate=115200
bootargs=ip=192.168.1.31 rw root=/dev/nfs nfsroot=192.168.1.30:/tftpboot/rcarGen3/
bootargs-avb=consoleblank=0 ip=192.168.1.75:192.168.1.30::::eth0 root=/dev/nfs rw nfsroot=192.168.1.30:/tftpboot/M3N-Sal-X
bootargs-nfs=rw root=/dev/nfs nfsroot=192.168.1.30:/tftpboot/M3N-Sal-X ip=192.168.1.71
bootargs-sd=rw root=/dev/mmcblk1p1 rootwait
bootargs-usb=rw root=/dev/sda2 rootwait
bootcmd=run pra_bootcmd
bootcmd-nfs=tftp 0x48080000 M3N-Sal-X/boot/Image;tftp 0x48000000 M3N-Sal-X/boot/dtb;booti 0x48080000 - 0x48000000
bootcmd-sd=ext4load mmc 0:1 0x48080000 boot/Image;ext4load mmc 0:1 0x48000000 /boot/Image-r8a77965-salvator-xs.dtb;booti 0x48080000 - 0x4800000
bootcmd_usb=usb start; run bootcmd_usb1; run bootcmd_usb2; usb stop; booti 0x48080000 - 0x48000000
bootcmd_usb1=fatload usb 0 0x48080000 Image.bin
bootcmd_usb2=fatload usb 0 0x48000000 Image.dtb
bootdelay=3
bootmode=android
debug_enable=1
ethact=ethernet@e6800000
ethaddr=2e:09:0a:02:EB:D7
fdt_high=0xffffffffffffffff
fdtcontroladdr=bfe0acc8
fileaddr=40040000
filesize=2adf0
gatewayip=192.168.10.1
initrd_high=0xffffffffffffffff
ipaddr=192.168.10.120
loadaddr=0x58000000
netmask=255.255.255.0
platform=r8a77965
pra_bootargs=setenv bootargs console=ttySC0,115200n8 ignore_loglevel ip=dhcp rw root=/dev/nfs nfsroot=192.168.10.1:/mnt/m3n,proto=tcp,vers=3
pra_bootcmd=dhcp;run pra_bootargs;tftpboot 0x4A080000 pcie/Image.gz;tftpboot 0x48000000 pcie/r8a77965-salvator-xs.dtb;unzip 0x4A080000 0x48080000;booti 0x48080000 - 0x48000000
pra_rtos_p1=dhcp;tftpboot 0x40040000 cr7_os.bin && dcache flush;
pra_rtos_p2=mw.l 0xf1120004 0xff;mw.l 0xe6160070 ${fileaddr};setexpr.l cr7bar_val ${fileaddr} + 0x10;mw.l 0xe6160070 ${cr7bar_val};
pra_rtos_p3=mw.l 0xe6150904 0xa5a50000;mw.l 0xe618024c 0x1;sleep 2;
pra_rtos_p4=mw.l 0xe61500b0 0x00400000;mw.l 0xe6150948 0x00400000;md 0x43330000;
product=salvator
recovery=setenv bootmode recovery; run bootcmd;
serialno=2756
serverip=192.168.10.1
stderr=serial@e6e88000
stdin=serial@e6e88000
stdout=serial@e6e88000
usb_loadimage=fatload usb 0 0x48080000 Image.bin; fatload usb 0 0x48000000 Image.dtb
ver=U-Boot 2018.09-dirty (Jun 02 2020 - 18:35:29 +0100)

Environment size: 2171/131068 bytes
=> boot
BOOTP broadcast 1
BOOTP broadcast 2
BOOTP broadcast 3
DHCP client bound to address 192.168.10.120 (1205 ms)
Using ethernet@e6800000 device
TFTP from server 192.168.10.1; our IP address is 192.168.10.120
Filename 'pcie/Image.gz'.
Load address: 0x4a080000
Loading: T #################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
##############################
1000 KiB/s
done
Bytes transferred = 9019548 (89a09c hex)
Using ethernet@e6800000 device
TFTP from server 192.168.10.1; our IP address is 192.168.10.120
Filename 'pcie/r8a77965-salvator-xs.dtb'.
Load address: 0x48000000
Loading: #####
1.9 MiB/s
done
Bytes transferred = 59299 (e7a3 hex)
Uncompressed size: 22518272 = 0x1579A00
## Flattened Device Tree blob at 48000000
Booting using the fdt blob at 0x48000000
Using Device Tree in place at 0000000048000000, end 00000000480117a2

Starting kernel ...

[ 0.000000] Booting Linux on physical CPU 0x0000000000 [0x411fd073]
[ 0.000000] Linux version 5.8.0-rc3 (prasmi@prasmi) (aarch64-linux-gnu-gcc (Linaro GCC 7.5-2019.12) 7.5.0, GNU ld (Linaro_Binutils-2019.12) 2.28.2.20170706) #2 SMP PREEMPT Thu Jul 2 12:31:58 BST 2020
[ 0.000000] Machine model: Renesas Salvator-X 2nd version board based on r8a77965
[ 0.000000] printk: debug: ignoring loglevel setting.
[ 0.000000] efi: UEFI not found.
[ 0.000000] cma: Reserved 128 MiB at 0x00000000b8000000
[ 0.000000] Zone ranges:
[ 0.000000] DMA [mem 0x0000000048000000-0x000000007fffffff]
[ 0.000000] DMA32 [mem 0x0000000080000000-0x00000000bfffffff]
[ 0.000000] Normal empty
[ 0.000000] Movable zone start for each node
[ 0.000000] Early memory node ranges
[ 0.000000] node 0: [mem 0x0000000048000000-0x00000000bfffffff]
[ 0.000000] Initmem setup node 0 [mem 0x0000000048000000-0x00000000bfffffff]
[ 0.000000] On node 0 totalpages: 491520
[ 0.000000] DMA zone: 3584 pages used for memmap
[ 0.000000] DMA zone: 0 pages reserved
[ 0.000000] DMA zone: 229376 pages, LIFO batch:63
[ 0.000000] DMA32 zone: 4096 pages used for memmap
[ 0.000000] DMA32 zone: 262144 pages, LIFO batch:63
[ 0.000000] psci: probing for conduit method from DT.
[ 0.000000] psci: PSCIv1.1 detected in firmware.
[ 0.000000] psci: Using standard PSCI v0.2 function IDs
[ 0.000000] psci: Trusted OS resident on physical CPU 0x0
[ 0.000000] psci: SMC Calling Convention v1.1
[ 0.000000] percpu: Embedded 32 pages/cpu s91408 r8192 d31472 u131072
[ 0.000000] pcpu-alloc: s91408 r8192 d31472 u131072 alloc=32*4096
[ 0.000000] pcpu-alloc: [0] 0 [0] 1
[ 0.000000] Detected PIPT I-cache on CPU0
[ 0.000000] CPU features: detected: EL2 vector hardening
[ 0.000000] Speculative Store Bypass Disable mitigation not required
[ 0.000000] CPU features: detected: ARM errata 1165522, 1319367, or 1530923
[ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: 483840
[ 0.000000] Kernel command line: console=ttySC0,115200n8 ignore_loglevel ip=dhcp rw root=/dev/nfs nfsroot=192.168.10.1:/mnt/m3n,proto=tcp,vers=3
[ 0.000000] Dentry cache hash table entries: 262144 (order: 9, 2097152 bytes, linear)
[ 0.000000] Inode-cache hash table entries: 131072 (order: 8, 1048576 bytes, linear)
[ 0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
[ 0.000000] software IO TLB: mapped [mem 0x7bfff000-0x7ffff000] (64MB)
[ 0.000000] Memory: 1695688K/1966080K available (12412K kernel code, 1574K rwdata, 4876K rodata, 3072K init, 10993K bss, 139320K reserved, 131072K cma-reserved)
[ 0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=2, Nodes=1
[ 0.000000] Running RCU self tests
[ 0.000000] rcu: Preemptible hierarchical RCU implementation.
[ 0.000000] rcu: RCU event tracing is enabled.
[ 0.000000] rcu: RCU lockdep checking is enabled.
[ 0.000000] rcu: RCU restricting CPUs from NR_CPUS=8 to nr_cpu_ids=2.
[ 0.000000] Trampoline variant of Tasks RCU enabled.
[ 0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 25 jiffies.
[ 0.000000] rcu: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=2
[ 0.000000] NR_IRQS: 64, nr_irqs: 64, preallocated irqs: 0
[ 0.000000] random: get_random_bytes called from start_kernel+0x378/0x50c with crng_init=0
[ 0.000000] arch_timer: cp15 timer(s) running at 8.32MHz (virt).
[ 0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x1eb398c07, max_idle_ns: 440795202503 ns
[ 0.000004] sched_clock: 56 bits at 8MHz, resolution 120ns, wraps every 2199023255503ns
[ 0.000168] Console: colour dummy device 80x25
[ 0.000187] Lock dependency validator: Copyright (c) 2006 Red Hat, Inc., Ingo Molnar
[ 0.000196] ... MAX_LOCKDEP_SUBCLASSES: 8
[ 0.000205] ... MAX_LOCK_DEPTH: 48
[ 0.000212] ... MAX_LOCKDEP_KEYS: 8192
[ 0.000221] ... CLASSHASH_SIZE: 4096
[ 0.000229] ... MAX_LOCKDEP_ENTRIES: 32768
[ 0.000237] ... MAX_LOCKDEP_CHAINS: 65536
[ 0.000245] ... CHAINHASH_SIZE: 32768
[ 0.000253] memory used by lock dependency info: 6301 kB
[ 0.000261] memory used for stack traces: 4224 kB
[ 0.000270] per task-struct memory footprint: 1920 bytes
[ 0.000317] Calibrating delay loop (skipped), value calculated using timer frequency.. 16.64 BogoMIPS (lpj=33280)
[ 0.000331] pid_max: default: 32768 minimum: 301
[ 0.000546] Mount-cache hash table entries: 4096 (order: 3, 32768 bytes, linear)
[ 0.000568] Mountpoint-cache hash table entries: 4096 (order: 3, 32768 bytes, linear)
[ 0.003672] rcu: Hierarchical SRCU implementation.
[ 0.004947] Detected Renesas R-Car Gen3 r8a77965 ES1.1
[ 0.005585] EFI services will not be available.
[ 0.005958] smp: Bringing up secondary CPUs ...
[ 0.007153] Detected PIPT I-cache on CPU1
[ 0.007211] CPU1: Booted secondary processor 0x0000000001 [0x411fd073]
[ 0.007566] smp: Brought up 1 node, 2 CPUs
[ 0.007584] SMP: Total of 2 processors activated.
[ 0.007595] CPU features: detected: 32-bit EL0 Support
[ 0.007605] CPU features: detected: CRC32 instructions
[ 0.007614] CPU features: detected: 32-bit EL1 Support
[ 0.008519] CPU: All CPU(s) started at EL1
[ 0.008560] alternatives: patching kernel code
[ 0.010097] devtmpfs: initialized
[ 0.031127] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns
[ 0.031162] futex hash table entries: 512 (order: 4, 65536 bytes, linear)
[ 0.033196] pinctrl core: initialized pinctrl subsystem
[ 0.034664] thermal_sys: Registered thermal governor 'step_wise'
[ 0.035943] DMI not present or invalid.
[ 0.036534] NET: Registered protocol family 16
[ 0.038811] DMA: preallocated 256 KiB GFP_KERNEL pool for atomic allocations
[ 0.038966] DMA: preallocated 256 KiB GFP_KERNEL|GFP_DMA pool for atomic allocations
[ 0.039184] DMA: preallocated 256 KiB GFP_KERNEL|GFP_DMA32 pool for atomic allocations
[ 0.039332] audit: initializing netlink subsys (disabled)
[ 0.039698] audit: type=2000 audit(0.036:1): state=initialized audit_enabled=0 res=1
[ 0.040706] cpuidle: using governor menu
[ 0.040893] hw-breakpoint: found 6 breakpoint and 4 watchpoint registers.
[ 0.040994] ASID allocator initialised with 65536 entries
[ 0.096626] sh-pfc e6060000.pin-controller: r8a77965_pfc support registered
[ 0.110019] HugeTLB registered 1.00 GiB page size, pre-allocated 0 pages
[ 0.110037] HugeTLB registered 32.0 MiB page size, pre-allocated 0 pages
[ 0.110047] HugeTLB registered 2.00 MiB page size, pre-allocated 0 pages
[ 0.110057] HugeTLB registered 64.0 KiB page size, pre-allocated 0 pages
[ 0.113267] cryptd: max_cpu_qlen set to 1000
[ 0.122767] iommu: Default domain type: Translated
[ 0.123250] vgaarb: loaded
[ 0.123831] SCSI subsystem initialized
[ 0.124245] libata version 3.00 loaded.
[ 0.124857] usbcore: registered new interface driver usbfs
[ 0.124939] usbcore: registered new interface driver hub
[ 0.125064] usbcore: registered new device driver usb
[ 0.135530] i2c-sh_mobile e60b0000.i2c: I2C adapter 7, bus speed 400000 Hz
[ 0.136206] mc: Linux media interface: v0.10
[ 0.136261] videodev: Linux video capture interface: v2.00
[ 0.136386] pps_core: LinuxPPS API ver. 1 registered
[ 0.136396] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@xxxxxxxx>
[ 0.136421] PTP clock support registered
[ 0.137607] Advanced Linux Sound Architecture Driver Initialized.
[ 0.138593] Bluetooth: Core ver 2.22
[ 0.138696] NET: Registered protocol family 31
[ 0.138706] Bluetooth: HCI device and connection manager initialized
[ 0.138740] Bluetooth: HCI socket layer initialized
[ 0.138755] Bluetooth: L2CAP socket layer initialized
[ 0.138803] Bluetooth: SCO socket layer initialized
[ 0.139407] clocksource: Switched to clocksource arch_sys_counter
[ 0.632713] VFS: Disk quotas dquot_6.6.0
[ 0.632807] VFS: Dquot-cache hash table entries: 512 (order 0, 4096 bytes)
[ 0.645002] NET: Registered protocol family 2
[ 0.645766] tcp_listen_portaddr_hash hash table entries: 1024 (order: 4, 81920 bytes, linear)
[ 0.645915] TCP established hash table entries: 16384 (order: 5, 131072 bytes, linear)
[ 0.646201] TCP bind hash table entries: 16384 (order: 8, 1179648 bytes, linear)
[ 0.648167] TCP: Hash tables configured (established 16384 bind 16384)
[ 0.648509] UDP hash table entries: 1024 (order: 5, 163840 bytes, linear)
[ 0.648802] UDP-Lite hash table entries: 1024 (order: 5, 163840 bytes, linear)
[ 0.649316] NET: Registered protocol family 1
[ 0.650537] RPC: Registered named UNIX socket transport module.
[ 0.650566] RPC: Registered udp transport module.
[ 0.650576] RPC: Registered tcp transport module.
[ 0.650586] RPC: Registered tcp NFSv4.1 backchannel transport module.
[ 0.651238] PCI: CLS 0 bytes, default 64
[ 0.652546] hw perfevents: enabled with armv8_cortex_a57 PMU driver, 7 counters available
[ 0.653231] kvm [1]: HYP mode not available
[ 0.660078] Initialise system trusted keyrings
[ 0.660419] workingset: timestamp_bits=46 max_order=19 bucket_order=0
[ 0.674978] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[ 0.676513] NFS: Registering the id_resolver key type
[ 0.676578] Key type id_resolver registered
[ 0.676604] Key type id_legacy registered
[ 0.676631] nfs4filelayout_init: NFSv4 File Layout Driver Registering...
[ 0.704607] Key type asymmetric registered
[ 0.704671] Asymmetric key parser 'x509' registered
[ 0.704756] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 245)
[ 0.704791] io scheduler mq-deadline registered
[ 0.704802] io scheduler kyber registered
[ 0.713424] gpio_rcar e6050000.gpio: driving 16 GPIOs
[ 0.714024] gpio_rcar e6051000.gpio: driving 29 GPIOs
[ 0.714566] gpio_rcar e6052000.gpio: driving 15 GPIOs
[ 0.715127] gpio_rcar e6053000.gpio: driving 16 GPIOs
[ 0.715836] gpio_rcar e6054000.gpio: driving 18 GPIOs
[ 0.716419] gpio_rcar e6055000.gpio: driving 26 GPIOs
[ 0.716952] gpio_rcar e6055400.gpio: driving 32 GPIOs
[ 0.717467] gpio_rcar e6055800.gpio: driving 4 GPIOs
[ 0.719499] rcar-pcie fe000000.pcie: host bridge /soc/pcie@fe000000 ranges:
[ 0.719566] rcar-pcie fe000000.pcie: IO 0x00fe100000..0x00fe1fffff -> 0x0000000000
[ 0.719666] rcar-pcie fe000000.pcie: MEM 0x00fe200000..0x00fe3fffff -> 0x00fe200000
[ 0.719716] rcar-pcie fe000000.pcie: MEM 0x0030000000..0x0037ffffff -> 0x0030000000
[ 0.719748] rcar-pcie fe000000.pcie: MEM 0x0038000000..0x003fffffff -> 0x0038000000
[ 0.719787] rcar-pcie fe000000.pcie: IB MEM 0x0040000000..0x00bfffffff -> 0x0040000000
[ 0.791351] rcar-pcie fe000000.pcie: PCIe link down
[ 0.792081] rcar-pcie ee800000.pcie: host bridge /soc/pcie@ee800000 ranges:
[ 0.792140] rcar-pcie ee800000.pcie: IO 0x00ee900000..0x00ee9fffff -> 0x0000000000
[ 0.792193] rcar-pcie ee800000.pcie: MEM 0x00eea00000..0x00eebfffff -> 0x00eea00000
[ 0.792242] rcar-pcie ee800000.pcie: MEM 0x00c0000000..0x00c7ffffff -> 0x00c0000000
[ 0.792273] rcar-pcie ee800000.pcie: MEM 0x00c8000000..0x00cfffffff -> 0x00c8000000
[ 0.792312] rcar-pcie ee800000.pcie: IB MEM 0x0040000000..0x00bfffffff -> 0x0040000000
[ 0.859600] rcar-pcie ee800000.pcie: PCIe link down
[ 0.947853] SuperH (H)SCI(F) driver initialized
[ 0.948931] e6550000.serial: ttySC1 at MMIO 0xe6550000 (irq = 28, base_baud = 0) is a hscif
[ 0.950766] e6e88000.serial: ttySC0 at MMIO 0xe6e88000 (irq = 111, base_baud = 0) is a scif
[ 0.950824] BUG: spinlock bad magic on CPU#0, swapper/0/1
[ 0.950845] lock: sci_ports+0x0/0x4c80, .magic: 00000000, .owner: <none>/-1, .owner_cpu: 0
[ 0.950854] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 5.8.0-rc3 #2
[ 0.950860] Hardware name: Renesas Salvator-X 2nd version board based on r8a77965 (DT)
[ 0.950867] Call trace:
[ 0.950878] dump_backtrace+0x0/0x1d8
[ 0.950884] show_stack+0x14/0x20
[ 0.950894] dump_stack+0xe8/0x130
[ 0.950904] spin_dump+0x6c/0x88
[ 0.950910] do_raw_spin_lock+0xb0/0xf8
[ 0.950921] _raw_spin_lock_irqsave+0x80/0xa0
[ 0.950931] uart_add_one_port+0x3a4/0x4e0
[ 0.950938] sci_probe+0x504/0x7c8
[ 0.950947] platform_drv_probe+0x50/0xa0
[ 0.950953] really_probe+0xdc/0x330
[ 0.950960] driver_probe_device+0x58/0xb8
[ 0.950965] device_driver_attach+0x6c/0x90
[ 0.950971] __driver_attach+0x88/0xd0
[ 0.950979] bus_for_each_dev+0x74/0xc8
[ 0.950984] driver_attach+0x20/0x28
[ 0.950991] bus_add_driver+0x14c/0x1f8
[ 0.950996] driver_register+0x60/0x110
[ 0.951002] __platform_driver_register+0x40/0x48
[ 0.951011] sci_init+0x2c/0x34
[ 0.951018] do_one_initcall+0x88/0x428
[ 0.951027] kernel_init_freeable+0x2c0/0x328
[ 0.951035] kernel_init+0x10/0x108
[ 0.951041] ret_from_fork+0x10/0x18
[ 2.112208] printk: console [ttySC0] enabled
[ 2.120325] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
[ 2.127927] rcar-dw-hdmi fead0000.hdmi: Detected HDMI TX controller v2.01a with HDCP (DWC HDMI 2.0 TX PHY)
[ 2.138093] rcar-dw-hdmi fead0000.hdmi: registered DesignWare HDMI I2C bus driver
[ 2.159023] loop: module loaded
[ 2.164216] scsi host0: sata_rcar
[ 2.167881] ata1: SATA max UDMA/133 irq 161
[ 2.173965] libphy: Fixed MDIO Bus: probed
[ 2.178589] tun: Universal TUN/TAP device driver, 1.6
[ 2.183952] CAN device driver interface
[ 2.189812] VFIO - User Level meta-driver version: 0.3
[ 2.195254] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[ 2.201805] ehci-pci: EHCI PCI platform driver
[ 2.206300] ehci-platform: EHCI generic platform driver
[ 2.212273] ehci-platform ee0a0100.usb: EHCI Host Controller
[ 2.217988] ehci-platform ee0a0100.usb: new USB bus registered, assigned bus number 1
[ 2.225945] ehci-platform ee0a0100.usb: irq 157, io mem 0xee0a0100
[ 2.247416] ehci-platform ee0a0100.usb: USB 2.0 started, EHCI 1.10
[ 2.254356] hub 1-0:1.0: USB hub found
[ 2.258159] hub 1-0:1.0: 1 port detected
[ 2.262676] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[ 2.268930] ohci-pci: OHCI PCI platform driver
[ 2.273441] ohci-platform: OHCI generic platform driver
[ 2.279364] ohci-platform ee0a0000.usb: Generic Platform OHCI controller
[ 2.286101] ohci-platform ee0a0000.usb: new USB bus registered, assigned bus number 2
[ 2.294047] ohci-platform ee0a0000.usb: irq 157, io mem 0xee0a0000
[ 2.390718] hub 2-0:1.0: USB hub found
[ 2.394523] hub 2-0:1.0: 1 port detected
[ 2.399715] xhci-hcd ee000000.usb: xHCI Host Controller
[ 2.405025] xhci-hcd ee000000.usb: new USB bus registered, assigned bus number 3
[ 2.412572] xhci-hcd ee000000.usb: Direct firmware load for r8a779x_usb3_v3.dlmem failed with error -2
[ 2.421930] xhci-hcd ee000000.usb: can't setup: -2
[ 2.426742] xhci-hcd ee000000.usb: USB bus 3 deregistered
[ 2.432241] xhci-hcd: probe of ee000000.usb failed with error -2
[ 2.438573] usbcore: registered new interface driver usb-storage
[ 2.445424] renesas_usbhs e6590000.usb: host probed
[ 2.450334] renesas_usbhs e6590000.usb: no transceiver found
[ 2.456144] renesas_usbhs e6590000.usb: gadget probed
[ 2.461441] renesas_usbhs e6590000.usb: probed
[ 2.467138] renesas_usb3 ee020000.usb: probed with phy
[ 2.473154] i2c /dev entries driver
[ 2.490882] cs2000-cp 2-004f: revision - C1
[ 2.495180] i2c-rcar e6510000.i2c: probed
[ 2.500185] pca953x 4-0020: supply vcc not found, using dummy regulator
[ 2.506974] pca953x 4-0020: using no AI
[ 2.511732] gpio-355 (PCIE/SATA switch): hogged as output/low
[ 2.525192] random: fast init done
[ 2.528967] i2c-rcar e66d8000.i2c: probed
[ 2.533851] adv748x 4-0070: Endpoint /soc/i2c@e66d8000/video-receiver@70/port@7/endpoint on port 7
[ 2.542892] adv748x 4-0070: Endpoint /soc/i2c@e66d8000/video-receiver@70/port@8/endpoint on port 8
[ 2.551903] adv748x 4-0070: Endpoint /soc/i2c@e66d8000/video-receiver@70/port@a/endpoint on port 10
[ 2.560989] adv748x 4-0070: Endpoint /soc/i2c@e66d8000/video-receiver@70/port@b/endpoint on port 11
[ 2.570522] adv748x 4-0070: chip found @ 0xe0 revision 2143
[ 2.587428] ata1: link resume succeeded after 1 retries
[ 2.624027] rcar_fdp1 fe940000.fdp1: Device registered as /dev/video0
[ 2.641412] rcar-csi2 fea80000.csi2: 1 lanes found
[ 2.646767] rcar-csi2 feaa0000.csi2: 4 lanes found
[ 2.656549] rcar-vin e6ef0000.video: Device registered as video11
[ 2.662850] rcar-vin e6ef1000.video: Device registered as video12
[ 2.669133] rcar-vin e6ef2000.video: Device registered as video13
[ 2.675351] rcar-vin e6ef3000.video: Device registered as video14
[ 2.681574] rcar-vin e6ef4000.video: Device registered as video15
[ 2.687801] rcar-vin e6ef5000.video: Device registered as video16
[ 2.694021] rcar-vin e6ef6000.video: Device registered as video17
[ 2.697195] ata1: SATA link down (SStatus 0 SControl 300)
[ 2.705591] rcar-vin e6ef7000.video: Device registered as video18
[ 2.717572] rcar_gen3_thermal e6198000.thermal: TSC0: Loaded 1 trip points
[ 2.728742] rcar_gen3_thermal e6198000.thermal: TSC1: Loaded 1 trip points
[ 2.739851] rcar_gen3_thermal e6198000.thermal: TSC2: Loaded 2 trip points
[ 2.747981] Bluetooth: HCI UART driver ver 2.3
[ 2.752491] Bluetooth: HCI UART protocol H4 registered
[ 2.757667] Bluetooth: HCI UART protocol LL registered
[ 2.764057] cpufreq: cpufreq_online: CPU0: Running at unlisted freq: 1497600 KHz
[ 2.771546] cpufreq: cpufreq_online: CPU0: Unlisted initial frequency changed to: 1500000 KHz
[ 2.782967] ledtrig-cpu: registered to indicate activity on CPUs
[ 2.789297] ccree e6601000.crypto: ARM CryptoCell 630P Driver: HW version 0xAF400001/0xDCC63000, Driver version 5.0
[ 2.803948] ccree e6601000.crypto: ARM ccree device initialized
[ 2.810940] usbcore: registered new interface driver usbhid
[ 2.816581] usbhid: USB HID core driver
[ 2.849500] rcar_sound ec500000.sound: probed
[ 2.854411] NET: Registered protocol family 17
[ 2.858900] can: controller area network core (rev 20170425 abi 9)
[ 2.865225] NET: Registered protocol family 29
[ 2.869690] can: raw protocol (rev 20170425)
[ 2.874000] can: broadcast manager protocol (rev 20170425 t)
[ 2.879682] can: netlink gateway (rev 20190810) max_hops=1
[ 2.885391] Key type dns_resolver registered
[ 2.890035] registered taskstats version 1
[ 2.894163] Loading compiled-in X.509 certificates
[ 2.925377] renesas_irqc e61c0000.interrupt-controller: driving 6 irqs
[ 2.937438] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
[ 2.946132] [drm] Initialized rcar-du 1.0.0 20130110 for feb00000.display on minor 0
[ 2.953907] [drm] Device feb00000.display probed
[ 3.014717] Console: switching to colour frame buffer device 128x48
[ 3.037450] rcar-du feb00000.display: fb0: rcar-dudrmfb frame buffer device
[ 3.045605] bd9571mwv 7-0030: Device: BD9571MWV rev. 4
[ 3.083439] ehci-platform ee080100.usb: EHCI Host Controller
[ 3.089147] ehci-platform ee080100.usb: new USB bus registered, assigned bus number 3
[ 3.097080] ehci-platform ee080100.usb: irq 156, io mem 0xee080100
[ 3.115412] ehci-platform ee080100.usb: USB 2.0 started, EHCI 1.10
[ 3.122344] hub 3-0:1.0: USB hub found
[ 3.126148] hub 3-0:1.0: 1 port detected
[ 3.130911] ohci-platform ee080000.usb: Generic Platform OHCI controller
[ 3.137652] ohci-platform ee080000.usb: new USB bus registered, assigned bus number 4
[ 3.145608] ohci-platform ee080000.usb: irq 156, io mem 0xee080000
[ 3.242650] hub 4-0:1.0: USB hub found
[ 3.246464] hub 4-0:1.0: 1 port detected
[ 3.254009] asoc-audio-graph-card sound: ak4613-hifi <-> rsnd-dai.0 mapping ok
[ 3.261651] asoc-audio-graph-card sound: i2s-hifi <-> rsnd-dai.1 mapping ok
[ 3.268815] asoc-audio-graph-card sound: ASoC: no DMI vendor name!
[ 3.280999] rcar-dmac e6700000.dma-controller: deferred probe timeout, ignoring dependency
[ 3.293421] rcar-dmac e7300000.dma-controller: deferred probe timeout, ignoring dependency
[ 3.305873] rcar-dmac e7310000.dma-controller: deferred probe timeout, ignoring dependency
[ 3.318781] ravb e6800000.ethernet: deferred probe timeout, ignoring dependency
[ 3.327100] libphy: ravb_mii: probed
[ 3.332392] ravb e6800000.ethernet eth0: Base address at 0xe6800000, 2e:09:0a:02:eb:d7, IRQ 108.
[ 3.341926] renesas_sdhi_internal_dmac ee100000.sd: deferred probe timeout, ignoring dependency
[ 3.350900] renesas_sdhi_internal_dmac ee100000.sd: Got CD GPIO
[ 3.356892] renesas_sdhi_internal_dmac ee100000.sd: Got WP GPIO
[ 3.411993] renesas_sdhi_internal_dmac ee100000.sd: mmc0 base at 0x00000000ee100000, max clock rate 200 MHz
[ 3.422617] renesas_sdhi_internal_dmac ee140000.sd: deferred probe timeout, ignoring dependency
[ 3.480428] renesas_sdhi_internal_dmac ee140000.sd: mmc1 base at 0x00000000ee140000, max clock rate 200 MHz
[ 3.490874] renesas_sdhi_internal_dmac ee160000.sd: deferred probe timeout, ignoring dependency
[ 3.499821] renesas_sdhi_internal_dmac ee160000.sd: Got CD GPIO
[ 3.505798] renesas_sdhi_internal_dmac ee160000.sd: Got WP GPIO
[ 3.559624] renesas_sdhi_internal_dmac ee160000.sd: mmc2 base at 0x00000000ee160000, max clock rate 200 MHz
[ 3.571907] input: keys as /devices/platform/keys/input/input0
[ 3.621925] Micrel KSZ9031 Gigabit PHY e6800000.ethernet-ffffffff:00: attached PHY driver [Micrel KSZ9031 Gigabit PHY] (mii_bus:phy_addr=e6800000.ethernet-ffffffff:00, irq=197)
[ 3.657244] mmc1: new HS400 MMC card at address 0001
[ 3.662870] mmcblk1: mmc1:0001 BGSD3R 29.1 GiB
[ 3.667623] mmcblk1boot0: mmc1:0001 BGSD3R partition 1 16.0 MiB
[ 3.673725] mmcblk1boot1: mmc1:0001 BGSD3R partition 2 16.0 MiB
[ 3.679870] mmcblk1rpmb: mmc1:0001 BGSD3R partition 3 4.00 MiB, chardev (243:0)
[ 3.690208] mmcblk1: p1 p2 p3 p4 p5 p6 p7 p8 p9 p10 p11 p12 p13 p14 p15 p16 p17 p18
[ 7.038101] ravb e6800000.ethernet eth0: Link is Up - 1Gbps/Full - flow control off
[ 7.059414] Sending DHCP requests .., OK
[ 10.071371] IP-Config: Got DHCP answer from 192.168.10.1, my address is 192.168.10.120
[ 10.079311] IP-Config: Complete:
[ 10.082553] device=eth0, hwaddr=2e:09:0a:02:eb:d7, ipaddr=192.168.10.120, mask=255.255.255.0, gw=192.168.10.1
[ 10.092907] host=192.168.10.120, domain=example.org, nis-domain=(none)
[ 10.099876] bootserver=192.168.10.1, rootserver=192.168.10.1, rootpath=
[ 10.099879] nameserver0=192.168.10.1
[ 10.111146] cfg80211: Loading compiled-in X.509 certificates for regulatory database
[ 10.120261] cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7'
[ 10.126935] platform regulatory.0: Direct firmware load for regulatory.db failed with error -2
[ 10.127827] ALSA device list:
[ 10.135660] cfg80211: failed to load regulatory.db
[ 10.138528] #0: rcar-sound
[ 10.158090] VFS: Mounted root (nfs filesystem) on device 0:20.
[ 10.164795] devtmpfs: mounted
[ 10.169371] Freeing unused kernel memory: 3072K
[ 10.199504] Run /sbin/init as init process
[ 10.203635] with arguments:
[ 10.206599] /sbin/init
[ 10.209316] with environment:
[ 10.212471] HOME=/
[ 10.214828] TERM=linux
[ 10.475093] systemd[1]: System time before build time, advancing clock.
[ 10.531802] systemd[1]: systemd 234 running in system mode. (+PAM -AUDIT -SELINUX +IMA -APPARMOR +SMACK +SYSVINIT +UTMP -LIBCRYPTSETUP -GCRYPT -GNUTLS +ACL +XZ -LZ4 -SECCOMP +BLKID -ELFUTILS +KMOD -IDN2 )
[ 10.553213] systemd[1]: Detected architecture arm64.

Welcome to Poky (Yocto Project Reference Distro) 2.4.3 (rocko)!

[ 10.581888] systemd[1]: Set hostname to <salvator-x>.
[ 11.310228] random: systemd: uninitialized urandom read (16 bytes read)
[ 11.317470] systemd[1]: Started Dispatch Password Requests to Console Directory Watch.
[ OK ] Started Dispatch Password Requests to Console Directory Watch.
[ 11.347576] random: systemd: uninitialized urandom read (16 bytes read)
[ 11.355440] systemd[1]: Listening on Syslog Socket.
[ OK ] Listening on Syslog Socket.
[ 11.379554] random: systemd: uninitialized urandom read (16 bytes read)
[ 11.386418] systemd[1]: Listening on Journal Socket.
[ OK ] Listening on Journal Socket.
[ 11.407806] systemd[1]: Started Forward Password Requests to Wall Directory Watch.
[ OK ] Started Forward Password Requests to Wall Directory Watch.
[ 11.431520] systemd[1]: Reached target Paths.
[ OK ] Reached target Paths.
[ 11.451510] systemd[1]: Reached target Swap.
[ OK ] Reached target Swap.
[ 11.467626] systemd[1]: Listening on udev Kernel Socket.
[ OK ] Listening on udev Kernel Socket.
[ OK ] Listening on udev Control Socket.
[ OK ] Listening on Journal Audit Socket.
[ OK ] Listening on /dev/initctl Compatibility Named Pipe.
[ OK ] Created slice System Slice.
Mounting Huge Pages File System...
Starting Load Kernel Modules...
Mounting Kernel Debug File System...
Mounting Temporary Directory (/tmp)...
Starting Remount Root and Kernel File Systems...
[ OK ] Created slice system-getty.slice.
[ OK ] Listening on Journal Socket (/dev/log).
[ OK ] Reached target Remote File Systems.
[ OK ] Listening on Network Service Netlink Socket.
Mounting POSIX Message Queue File System...
[ OK ] Created slice User and Session Slice.
[ OK ] Reached target Slices.
Starting Journal Service...
[ OK ] Created slice system-serial\x2dgetty.slice.
[ OK ] Mounted Kernel Debug File System.
[ OK ] Mounted POSIX Message Queue File System.
[ OK ] Mounted Huge Pages File System.
[ OK ] Mounted Temporary Directory (/tmp).
[FAILED] Failed to start Load Kernel Modules.
See 'systemctl status systemd-modules-load.service' for details.
[ OK ] Started Remount Root and Kernel File Systems.
[ OK ] Started Journal Service.
Starting Create Static Device Nodes in /dev...
Starting udev Coldplug all Devices...
Starting Flush Journal to Persistent Storage...
Starting Apply Kernel Variables...
Mounting Kernel Configuration File System...
[ OK ] Mounted Kernel Configuration File System.
[ OK ] Started Create Static Device Nodes in /dev.
[ OK ] Started Apply Kernel Variables.
[ 12.177467] systemd-journald[261]: Received request to flush runtime journal from PID 1
[ OK ] Reached target Local File Systems (Pre).
Mounting /var/volatile...
Starting udev Kernel Device Manager...
[ OK ] Mounted /var/volatile.
[ OK ] Started Flush Journal to Persistent Storage.
Starting Load/Save Random Seed...
[ OK ] Reached target Local File Systems.
Starting Create Volatile Files and Directories...
[ OK ] Started Load/Save Random Seed.
[ OK ] Started udev Kernel Device Manager.
[ OK ] Started Create Volatile Files and Directories.
Starting Update UTMP about System Boot/Shutdown...
[ OK ] Started Update UTMP about System Boot/Shutdown.
[ OK ] Created slice system-systemd\x2dbacklight.slice.
Starting Load/Save Screen Backlightïïâightness of backlight:backlight...
[ OK ] Started udev Coldplug all Devices.
[ OK ] Started Load/Save Screen Backlight Brightness of backlight:backlight.
[ OK ] Reached target System Initialization.
[ 13.178807] random: crng init done
[ 13.182216] random: 7 urandom warning(s) missed due to ratelimiting
[ OK ] Listening on Avahi mDNS/DNS-SD Stack Activation Socket.
[ OK ] Listening on RPCbind Server Activation Socket.
Starting Network Service...
[ OK ] Started dnf-automatic-install timer.
[ OK ] Started dnf-automatic-download timer.
[ OK ] Started Daily Cleanup of Temporary Directories.
[ OK ] Started dnf-automatic-notifyonly timer.
[ OK ] Started dnf makecache timer.
[ OK ] Reached target Timers.
[ OK ] Listening on dropbear.socket.
[ OK ] Listening on D-Bus System Message Bus Socket.
[ OK ] Reached target Sockets.
[ OK ] Reached target Basic System.
Starting Save/Restore Sound Card State...
[ OK ] Reached target Containers.
Starting pvrinit.service...
Starting PowerVR consumer services...
[ OK ] Started Kernel Logging Service.
[ OK ] Started optee services.
[ OK ] Started D-Bus System Message Bus.
[ 13.621925] rcar_sound ec500000.sound: Can't update kctrl when idle
Starting Avahi mDNS/DNS-SD Stack...
Starting Login Service...
[ OK ] Started System Logging Service.
[ OK ] Started Network Service.
[ OK ] Started Save/Restore Sound Card State.
[ OK ] Started pvrinit.service.
[ OK ] Started PowerVR consumer services.
[ OK ] Found device /dev/ttySC0.
[ OK ] Started Avahi mDNS/DNS-SD Stack.
[ OK ] Reached target Network.
Starting Permit User Sessions...
Starting Network Name Resolution...
[ OK ] Started Login Service.
[ OK ] Started Permit User Sessions.
[ OK ] Started Network Name Resolution.
[ OK ] Reached target Host and Network Name Lookups.
[ OK ] Started Serial Getty on ttySC0.
[ OK ] Started Getty on tty1.
[ OK ] Reached target Login Prompts.
[ OK ] Reached target Multi-User System.
Starting Update UTMP about System Runlevel Changes...
[ OK ] Started Weston Wayland compositor.
[ 15.193707] rcar_sound ec500000.sound: Can't update kctrl when idle
[ OK ] Started Update UTMP about System Runlevel Changes.
[ 20.118778] audit: type=1006 audit(1564589493.640:2): pid=406 uid=0 old-auid=4294967295 auid=0 tty=(none) old-ses=4294967295 ses=1 res=1
[ 20.132560] audit: type=1300 audit(1564589493.640:2): arch=c00000b7 syscall=64 success=yes exit=1 a0=7 a1=ffffc743e208 a2=1 a3=0 items=0 ppid=1 pid=406 auid=0 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgi)
[ 20.158356] audit: type=1327 audit(1564589493.640:2): proctitle="(systemd)"

Poky (Yocto Project Reference Distro) 2.4.3 salvator-x ttySC0

salvator-x login: root
Last login: Wed Jul 31 16:11:28 UTC 2019 on tty2
[ 22.867896] audit: type=1006 audit(1564589496.392:3): pid=416 uid=0 old-auid=4294967295 auid=0 tty=(none) old-ses=4294967295 ses=2 res=1
[ 22.881527] audit: type=1300 audit(1564589496.392:3): arch=c00000b7 syscall=64 success=yes exit=1 a0=7 a1=ffffc743e208 a2=1 a3=0 items=0 ppid=1 pid=416 auid=0 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgi)
[ 22.910599] audit: type=1327 audit(1564589496.392:3): proctitle="(systemd)"
root@salvator-x:~#
root@salvator-x:~# uname -ra
Linux salvator-x 5.8.0-rc3 #2 SMP PREEMPT Thu Jul 2 12:31:58 BST 2020 aarch64 aarch64 aarch64 GNU/Linux
root@salvator-x:~#
root@salvator-x:~#
root@salvator-x:~# [ 41.951446] SDHI0 Vcc: disabling
[ 41.954682] SDHI3 Vcc: disabling
[ 41.958107] SDHI0 VccQ: disabling
[ 41.961523] SDHI3 VccQ: disabling

CTRL-A Z for help | 115200 8N1 | NOR | Minicom 2.7.1 | VT102 | Offline | ttyUSB0

Attachment: serial_config
Description: Binary data