linux-omap.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* OMAP4460 cpufreq crashes
@ 2021-05-06 15:35 Florian Boor
  2021-05-07  5:47 ` Tony Lindgren
  0 siblings, 1 reply; 5+ messages in thread
From: Florian Boor @ 2021-05-06 15:35 UTC (permalink / raw)
  To: linux-omap

[-- Attachment #1: Type: text/plain, Size: 1437 bytes --]

Hi all,

I recently spent some time with an OMAP4460 based Variscite VAR-STK-OM44 and
latest Linux releases and latest linux-omap Git. The evaluation kit runs pretty
well unless I try to enable cpufeq. This causes a crash with quite random
backtraces right on boot within a few seconds after entering userspace.

It turned out that this happens when the board switches to 920MHz. Commenting
out this operating point in the devicetree fixes this issue... but limits
performance quite a lot.

I did some research and I'd say its related to problems with voltage regulation.
I can watch the scaling driver changing the clock but for some reason the
voltage does not seem to get adjusted.
Might this behaviour be related to the OMAP infrastructure changes?

There are some messages at boot which might be related:

twl: not initialized
[    2.148742] twl6030_uv_to_vsel:OUT OF RANGE! non mapped vsel for 1375000 Vs
max 1316660
[    2.156799] twl6030_uv_to_vsel:OUT OF RANGE! non mapped vsel for 1375000 Vs
max 1316660
...

There is a little patch around that changes the initialisation order which makes
this messages go away but does not fix the odd behaviour. So maybe this is just
a cosmetic issue and the actual problem is somewhere else.

I have some kernel experience but not that much with the latest OMAP development
and therefore would be happy about some pointers what might be wrong. A boot log
is attached.

Greetings

Florian



[-- Attachment #2: log-fixes.txt --]
[-- Type: text/plain, Size: 18040 bytes --]

[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 5.12.0-rc2 (fuchs@corey) (arm-poky-linux-gnueabi-gcc (GCC) 8.3.0, GNU ld (GNU Bin
utils) 2.32.0.20190204) #36 SMP Wed May 5 16:54:13 CEST 2021
[    0.000000] CPU: ARMv7 Processor [412fc09a] revision 10 (ARMv7), cr=10c5387d
[    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[    0.000000] OF: fdt: Machine model: Variscite VAR-DVK-OM44
[    0.000000] Memory policy: Data cache writealloc
[    0.000000] cma: Reserved 16 MiB at 0xbf000000
[    0.000000] OMAP4: Map 0xafe00000 to (ptrval) for dram barrier
[    0.000000] Zone ranges:
[    0.000000]   Normal   [mem 0x0000000080000000-0x00000000afdfffff]
[    0.000000]   HighMem  [mem 0x00000000afe00000-0x00000000bfffffff]
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000080000000-0x00000000afdfffff]
[    0.000000]   node   0: [mem 0x00000000b0000000-0x00000000bfffffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000080000000-0x00000000bfffffff]
[    0.000000] OMAP4460 ES1.1
[    0.000000] percpu: Embedded 20 pages/cpu s49612 r8192 d24116 u81920
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 259908
[    0.000000] Kernel command line: rootwait root=/dev/mmcblk0p3 mem=1G@0x80000000 rw console=ttyO2,115200n8 f
bcon=map:0 vt.global_cursor_default=0 splash plymouth.ignore-serial-consoles consoleblank=0 omapfb.vram=0:4M f
bcon=rotate:3 loglevel=7
[    0.000000] Dentry cache hash table entries: 131072 (order: 7, 524288 bytes, linear)
[    0.000000] Inode-cache hash table entries: 65536 (order: 6, 262144 bytes, linear)
[    0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
[    0.000000] Memory: 1005028K/1046528K available (9216K kernel code, 1028K rwdata, 2224K rodata, 1024K init,
 246K bss, 25116K reserved, 16384K cma-reserved, 245760K highmem)
[    0.000000] rcu: Hierarchical RCU implementation.
[    0.000000] rcu:     RCU event tracing is enabled.
[    0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 10 jiffies.
[    0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
[    0.000000] L2C: platform modifies aux control register: 0x0e070000 -> 0x3e470000
[    0.000000] L2C: DT/platform modifies aux control register: 0x0e070000 -> 0x3e470000
[    0.000000] L2C-310 enabling early BRESP for Cortex-A9
[    0.000000] OMAP L2C310: ROM does not support power control setting
[    0.000000] L2C-310 dynamic clock gating disabled, standby mode disabled
[    0.000000] L2C-310 cache controller enabled, 16 ways, 1024 kB
[    0.000000] L2C-310: CACHE_ID 0x410000c7, AUX_CTRL 0x4e470000
[    0.000000] random: get_random_bytes called from start_kernel+0x340/0x58c with crng_init=0
[    0.000000] OMAP clocksource: 32k_counter at 32768 Hz
[    0.000000] clocksource: 32k_counter: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 58327039986419 
ns
[    0.000000] sched_clock: 32 bits at 32kHz, resolution 30517ns, wraps every 65535999984741ns
[    0.001190] TI gptimer clockevent: always-on 32768 Hz at /ocp/interconnect@4a300000/segment@10000/target-mo
dule@8000
[    0.004425] Console: colour dummy device 80x30
[    0.004455] WARNING: Your 'console=ttyO2' has been replaced by 'ttyS2'
[    0.004486] This ensures that you still see kernel messages. Please
[    0.004486] update your kernel commandline.
[    0.004516] Calibrating delay loop... 1397.55 BogoMIPS (lpj=6987776)
[    0.089874] pid_max: default: 32768 minimum: 301
[    0.090057] LSM: Security Framework initializing
[    0.090148] Mount-cache hash table entries: 2048 (order: 1, 8192 bytes, linear)
[    0.090179] Mountpoint-cache hash table entries: 2048 (order: 1, 8192 bytes, linear)
[    0.091094] CPU: Testing write buffer coherency: ok
[    0.091156] CPU0: Spectre v2: using BPIALL workaround
[    0.091339] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
[    0.091979] Setting up static identity map for 0x80100000 - 0x80100078
[    0.092163] rcu: Hierarchical SRCU implementation.
[    0.092651] smp: Bringing up secondary CPUs ...
[    0.179840] CPU1: thread -1, cpu 1, socket 0, mpidr 80000001
[    0.179870] CPU1: Spectre v2: using BPIALL workaround
[    0.180053] smp: Brought up 1 node, 2 CPUs
[    0.180053] SMP: Total of 2 processors activated (2795.11 BogoMIPS).
[    0.180084] CPU: All CPU(s) started in SVC mode.
[    0.180633] devtmpfs: initialized
[    0.197998] VFP support v0.3: implementor 41 architecture 3 part 30 variant 9 rev 4
[    0.198303] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 n
s
[    0.198333] futex hash table entries: 512 (order: 3, 32768 bytes, linear)
[    0.199798] pinctrl core: initialized pinctrl subsystem
[    0.201049] NET: Registered protocol family 16
[    0.203857] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.205505] omap_hwmod: l3_main_3 using broken dt data from ocp
[    0.206817] omap_hwmod: l3_main_2 using broken dt data from ocp
[    0.216949] audit: initializing netlink subsys (disabled)
[    0.217163] audit: type=2000 audit(0.210:1): state=initialized audit_enabled=0 res=1
[    0.217773] thermal_sys: Registered thermal governor 'fair_share'
[    0.217773] thermal_sys: Registered thermal governor 'step_wise'
[    0.217803] thermal_sys: Registered thermal governor 'user_space'
[    0.218414] cpuidle: using governor menu
[    0.273864] No ATAGs?
[    0.273956] hw-breakpoint: found 5 (+1 reserved) breakpoint and 1 watchpoint registers.
[    0.273986] hw-breakpoint: maximum watchpoint size is 4 bytes.
[    0.284484] Kprobes globally optimized
[    0.294738] iommu: Default domain type: Translated 
[    0.296386] vgaarb: loaded
[    0.296813] SCSI subsystem initialized
[    0.297607] pps_core: LinuxPPS API ver. 1 registered
[    0.297637] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[    0.297668] PTP clock support registered
[    0.298858] clocksource: Switched to clocksource 32k_counter
[    0.333892] VFS: Disk quotas dquot_6.6.0
[    0.333984] VFS: Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[    0.343597] NET: Registered protocol family 2
[    1.085723] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 6144 bytes, linear)
[    1.085754] TCP established hash table entries: 8192 (order: 3, 32768 bytes, linear)
[    1.085876] TCP bind hash table entries: 8192 (order: 4, 65536 bytes, linear)
[    1.086029] TCP: Hash tables configured (established 8192 bind 8192)
[    1.086120] UDP hash table entries: 512 (order: 2, 16384 bytes, linear)
[    1.086212] UDP-Lite hash table entries: 512 (order: 2, 16384 bytes, linear)
[    1.086425] NET: Registered protocol family 1
[    1.087097] RPC: Registered named UNIX socket transport module.
[    1.087127] RPC: Registered udp transport module.
[    1.087127] RPC: Registered tcp transport module.
[    1.087158] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    1.087158] PCI: CLS 0 bytes, default 64
[    1.088470] hw perfevents: no interrupt-affinity property for /pmu, guessing.
[    1.088714] hw perfevents: enabled with armv7_cortex_a9 PMU driver, 7 counters available
[    1.090423] Initialise system trusted keyrings
[    1.090637] workingset: timestamp_bits=14 max_order=18 bucket_order=4
[    1.091613] NFS: Registering the id_resolver key type
[    1.091644] Key type id_resolver registered
[    1.091674] Key type id_legacy registered
[    1.091705] jffs2: version 2.2. (NAND) (SUMMARY)  �© 2001-2006 Red Hat, Inc.
[    1.092010] Key type asymmetric registered
[    1.092041] Asymmetric key parser 'x509' registered
[    1.092102] bounce: pool size: 64 pages
[    1.092132] io scheduler mq-deadline registered
[    1.092163] io scheduler kyber registered
[    1.096710] OMAP GPIO hardware version 0.1
[    1.117218] omap-dma-engine 4a056000.dma-controller: OMAP DMA engine driver (LinkedList1/2/3 supported)
[    1.156768] ti-sysc 480b2000.target-module: OCP softreset timed out
[    1.166900] ti-sysc 480b2000.target-module: OCP softreset timed out
[    1.176635] pinctrl-single 4a31e040.pinmux: 28 pins, size 56
[    1.177551] pinctrl-single 4a100040.pinmux: 203 pins, size 406
[    1.186523] Serial: 8250/16550 driver, 6 ports, IRQ sharing enabled
[    1.190185] 48020000.serial: ttyS2 at MMIO 0x48020000 (irq = 115, base_baud = 3000000) is a 8250
[    1.938537] printk: console [ttyS2] enabled
[    1.943878] 4806a000.serial: ttyS0 at MMIO 0x4806a000 (irq = 126, base_baud = 3000000) is a 8250
[    1.953765] 4806c000.serial: ttyS1 at MMIO 0x4806c000 (irq = 127, base_baud = 3000000) is a 8250
[    1.973327] brd: module loaded
[    1.984527] loop: module loaded
[    1.990234] mtdoops: mtd device (mtddev=name/number) must be supplied
[    2.000793] libphy: Fixed MDIO Bus: probed
[    2.006042] ks8851 spi0.0: supply vdd-io not found, using dummy regulator
[    2.013092] ks8851 spi0.0: supply vdd not found, using dummy regulator
[    2.019744] ks8851 spi0.0: message enable is 0
[    2.025390] libphy: ks8851_eth_mii: probed
[    2.032318] ks8851 spi0.0 eth0: revision 1, MAC 8a:b7:37:b4:26:5a, IRQ 142, no EEPROM
[    2.042846] i2c /dev entries driver
[    2.050201] cpufreq: cpufreq_online: CPU0: Running at unlisted initial frequency: 699977 KHz, changing to: 
700000 KHz
[    2.062072] sdhci: Secure Digital Host Controller Interface driver
[    2.068298] sdhci: Copyright(c) Pierre Ossman
[    2.073516] sdhci-pltfm: SDHCI platform and OF driver helper
[    2.079986] ledtrig-cpu: registered to indicate activity on CPUs
[    2.087066] omap_gpio 48059000.gpio: Could not set line 14 debounce to 200000 microseconds (-22)
[    2.095947] omap_hsmmc 480d5000.mmc: Got CD GPIO
[    2.102294] Initializing XFRM netlink socket
[    2.106719] NET: Registered protocol family 10
[    2.111999] Segment Routing with IPv6
[    2.115753] sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
[    2.122222] NET: Registered protocol family 17
[    2.126678] NET: Registered protocol family 15
[    2.131225] Key type dns_resolver registered
[    2.135711] ThumbEE CPU extension supported.
[    2.140045] Registering SWP/SWPB emulation handler
[    2.145477] twl: not initialized
[    2.148742] twl6030_uv_to_vsel:OUT OF RANGE! non mapped vsel for 1375000 Vs max 1316660
[    2.156799] twl6030_uv_to_vsel:OUT OF RANGE! non mapped vsel for 1375000 Vs max 1316660
[    2.164886] twl6030_uv_to_vsel:OUT OF RANGE! non mapped vsel for 1375000 Vs max 1316660
[    2.172943] twl6030_uv_to_vsel:OUT OF RANGE! non mapped vsel for 1375000 Vs max 1316660
[    2.180999] twl6030_uv_to_vsel:OUT OF RANGE! non mapped vsel for 1375000 Vs max 1316660
[    2.189056] twl6030_uv_to_vsel:OUT OF RANGE! non mapped vsel for 1375000 Vs max 1316660
[    2.197082] twl6030_uv_to_vsel:OUT OF RANGE! non mapped vsel for 1410000 Vs max 1316660
[    2.205169] Power Management for TI OMAP4+ devices.
[    2.210083] OMAP4 PM: u-boot >= v2012.07 is required for full PM support
[    2.216918] SmartReflex Class3 initialized
[    2.221588] Loading compiled-in X.509 certificates
[    2.245117] smartreflex 4a0d9000.smartreflex: omap_sr_probe: SmartReflex driver initialized
[    2.254058] smartreflex 4a0db000.smartreflex: omap_sr_probe: SmartReflex driver initialized
[    2.262695] smartreflex 4a0dd000.smartreflex: omap_sr_probe: SmartReflex driver initialized
[    2.286987] omap-iommu 4a066000.mmu: 4a066000.mmu registered
[    2.295410] omap_i2c 48060000.i2c: bus 2 rev0.11 at 400 kHz
[    2.302673] Skipping twl internal clock init and using bootloader value (unknown osc rate)
[    2.347900] hw-breakpoint: Failed to enable monitor mode on CPU 0.
[    2.354705] hw-breakpoint: CPU 0 failed to disable vector catch
[    2.360717] twl 0-0048: PIH (irq 150) nested IRQs
[    2.373687] VUSIM: Bringing 1800000uV into 3000000-3000000uV
[    2.388641] omap_i2c 48070000.i2c: bus 0 rev0.11 at 400 kHz
[    2.395385] omap_i2c 48350000.i2c: bus 3 rev0.11 at 400 kHz
[    2.402099] omap-iommu 55082000.mmu: 55082000.mmu registered
[    2.421203] l4_secure_cm:clk:0038:0: failed to disable
[    2.509338] mmc0: host does not support reading read-only switch, assuming write-enable
[    2.523101] mmc0: new high speed SDHC card at address aaaa
[    2.523925] Waiting for root device /dev/mmcblk0p3...
[    2.534210] mmcblk0: mmc0:aaaa SC32G 29.7 GiB 
[    2.541137] omap_hsmmc 480d1000.mmc: card claims to support voltages below defined range
[    2.549743]  mmcblk0: p1 p2 p3 p4
[    2.558837] random: fast init done
[    2.564270] mmc3: new SDIO card at address 0001
[    2.569396] EXT4-fs (mmcblk0p3): mounting ext3 file system using the ext4 subsystem
[    2.712829] EXT4-fs (mmcblk0p3): recovery complete
[    2.720123] EXT4-fs (mmcblk0p3): mounted filesystem with ordered data mode. Opts: (null). Quota mode: none.
[    2.729949] VFS: Mounted root (ext3 filesystem) on device 179:3.
[    2.746856] devtmpfs: mounted
[    2.750061] Freeing unused kernel memory: 1024K
[    2.755645] Run /sbin/init as init process
Mount failed for selinuxfs on /sys/fs/selinux:  No such file or directory
[    3.062561] random: init: uninitialized urandom read (12 bytes read)
[    3.211273] 8<--- cut here ---
[    3.211273] Unable to handle kernel NULL pointer dereference at virtual address 00000010
[    3.222534] pgd = (ptrval)
[    3.222534] [00000010] *pgd=00000000
[    3.228881] Internal error: Oops: 5 [#1] SMP ARM
[    3.228942] Modules linked in:
[    3.228942] CPU: 0 PID: 71 Comm: kworker/0:1H Not tainted 5.12.0-rc2 #36
[    3.238891] Hardware name: Generic OMAP4 (Flattened Device Tree)
[    3.249420] Workqueue: kblockd blk_mq_run_work_fn
[    3.254150] PC is at arm_dma_unmap_sg+0x34/0x74
[    3.254150] LR is at arm_dma_unmap_sg+0x58/0x74
[    3.258850] pc : [<c01161bc>]    lr : [<c01161e0>]    psr: 80000113
[    3.269561] sp : c202fd88  ip : 00000000  fp : 00000000
[    3.274810] r10: 00000002  r9 : 00000004  r8 : c1487810
[    3.274810] r7 : c0a019b8  r6 : c01166ec  r5 : 00002e84  r4 : 00000000
[    3.274810] r3 : efdb5772  r2 : 40020891  r1 : efdb5770  r0 : 00000000
[    3.289031] Flags: Nzcv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment none
[    3.289031] Control: 10c5387d  Table: 8207804a  DAC: 00000051
[    3.301025] Process kworker/0:1H (pid: 71, stack limit = 0x(ptrval))
[    3.308837] Stack: (0xc202fd88 to 0xc2030000)
[    3.316864] fd80:                   00000000 00000080 00000080 c17e6b7c 00000000 00000000
[    3.318847] fda0: c1364800 c1321800 c1364800 c1364800 00000002 c07acfbc 00000000 00000000
[    3.328857] fdc0: c1364800 c1321808 c17e6a00 c079ea5c c17e6ca8 c1321808 00000000 c1364800
[    3.338836] fde0: c1321800 c07a1998 20660000 00000001 c17e6a00 c0e051c8 0000000c c1321808
[    3.349731] fe00: c17e6c00 c1321810 c16ef000 00000000 c13218e0 c1364800 00000002 c07a22d4
[    3.349731] fe20: c07a21a0 c17e6c30 c202feac c1785c00 00000002 c1785c00 c1784a70 c17e6c00
[    3.358856] fe40: 00000000 c050287c 00000000 00000000 00000000 c17e6e00 c17e6e40 c04f24ec
[    3.368835] fe60: c17e6e00 c202fe64 c202fe64 c17e6c00 c1761600 c0e051c8 00000006 00000003
[    3.378845] fe80: c202feac c1785c00 00000000 c1784a70 c1785c04 00000000 00000000 c0507aa4
[    3.390808] fea0: ef49c5c0 00000080 c0f04b00 c17e7030 c17e6e30 c13778c0 c2164100 c0e051c8
[    3.393280] fec0: ef49c580 c1785c00 00000001 c1785c04 c202feec 00000000 00000000 c0efa0e0
[    3.406860] fee0: ffffe000 c0507eb8 00000000 c202feec c202feec c0e051c8 c1511c80 c1785c00
[    3.415466] ff00: c1785c00 ef49c380 ff7d9e00 c0508098 00000001 c04ffb5c c1785c40 c1511c80
[    3.423675] ff20: ef49c380 c0153480 c1377840 ef49c380 00000008 c1511c80 c1511c94 ef49c380
[    3.423675] ff40: 00000008 ef49c398 c0e03d00 ef49c380 ffffe000 c01537e8 ffffe000 c01537bc
[    3.438842] ff60: c1511c80 00000000 c17f3d00 c1370180 c202e000 c01537bc c1511c80 c1101ebc
[    3.438842] ff80: c17f3d24 c015b2b0 00000001 c1370180 c015b180 00000000 00000000 00000000
[    3.455474] ffa0: 00000000 00000000 00000000 c0100170 00000000 00000000 00000000 00000000
[    3.455474] ffc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[    3.455474] ffe0: 00000000 00000000 00000000 00000000 00000013 00000000 00000000 00000000
[    3.475616] [<c01161bc>] (arm_dma_unmap_sg) from [<c07acfbc>] (omap_hsmmc_post_req+0x58/0x64)
[    3.482055] [<c07acfbc>] (omap_hsmmc_post_req) from [<c079ea5c>] (mmc_blk_mq_post_req+0x30/0xb4)
[    3.495605] [<c079ea5c>] (mmc_blk_mq_post_req) from [<c07a1998>] (mmc_blk_mq_issue_rq+0x340/0x8ec)
[    3.498840] [<c07a1998>] (mmc_blk_mq_issue_rq) from [<c07a22d4>] (mmc_mq_queue_rq+0x134/0x284)
[    3.508850] [<c07a22d4>] (mmc_mq_queue_rq) from [<c050287c>] (blk_mq_dispatch_rq_list+0xf8/0x860)
[    3.525207] [<c050287c>] (blk_mq_dispatch_rq_list) from [<c0507aa4>] (__blk_mq_do_dispatch_sched+0x160/0x2a
4)
[    3.532470] [<c0507aa4>] (__blk_mq_do_dispatch_sched) from [<c0507eb8>] (__blk_mq_sched_dispatch_requests+0
x178/0x1b0)
[    3.545196] [<c0507eb8>] (__blk_mq_sched_dispatch_requests) from [<c0508098>] (blk_mq_sched_dispatch_reques
ts+0x34/0x5c)
[    3.556854] [<c0508098>] (blk_mq_sched_dispatch_requests) from [<c04ffb5c>] (__blk_mq_run_hw_queue+0x4c/0xa
4)
[    3.560852] [<c04ffb5c>] (__blk_mq_run_hw_queue) from [<c0153480>] (process_one_work+0x228/0x564)
[    3.560852] [<c0153480>] (process_one_work) from [<c01537e8>] (worker_thread+0x2c/0x5d0)
[    3.583892] [<c01537e8>] (worker_thread) from [<c015b2b0>] (kthread+0x130/0x144)
[    3.591339] [<c015b2b0>] (kthread) from [<c0100170>] (ret_from_fork+0x14/0x24)
[    3.591339] Exception stack(0xc202ffb0 to 0xc202fff8)
[    3.598846] ffa0:                                     00000000 00000000 00000000 00000000
[    3.608856] ffc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[    3.618835] ffe0: 00000000 00000000 00000000 00000000 00000013 00000000
[    3.620117] Code: da00000f e1a04001 e1a0a003 e3a05000 (e5942010) 
[    3.632904] ---[ end trace 6007797f0442435a ]---


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: OMAP4460 cpufreq crashes
  2021-05-06 15:35 OMAP4460 cpufreq crashes Florian Boor
@ 2021-05-07  5:47 ` Tony Lindgren
  2021-05-10 11:13   ` Florian Boor
  0 siblings, 1 reply; 5+ messages in thread
From: Tony Lindgren @ 2021-05-07  5:47 UTC (permalink / raw)
  To: Florian Boor; +Cc: linux-omap

Hi,

* Florian Boor <florian.boor@kernelconcepts.de> [210506 16:11]:
> Hi all,
> 
> I recently spent some time with an OMAP4460 based Variscite VAR-STK-OM44 and
> latest Linux releases and latest linux-omap Git. The evaluation kit runs pretty
> well unless I try to enable cpufeq. This causes a crash with quite random
> backtraces right on boot within a few seconds after entering userspace.
> 
> It turned out that this happens when the board switches to 920MHz. Commenting
> out this operating point in the devicetree fixes this issue... but limits
> performance quite a lot.

Hmm OK, sounds like the voltages might be wrong.

I don't have one of these boards, but would be glad to add one to my rack
though if it can boot with NFSroot. If somebody happens to have a spare
evaluation kit around in the corner to send me, please let me know :)

> I did some research and I'd say its related to problems with voltage regulation.
> I can watch the scaling driver changing the clock but for some reason the
> voltage does not seem to get adjusted.
> Might this behaviour be related to the OMAP infrastructure changes?
> 
> There are some messages at boot which might be related:
> 
> twl: not initialized
> [    2.148742] twl6030_uv_to_vsel:OUT OF RANGE! non mapped vsel for 1375000 Vs
> max 1316660
> [    2.156799] twl6030_uv_to_vsel:OUT OF RANGE! non mapped vsel for 1375000 Vs
> max 1316660
> ...

I'm seeing these too on duovero 4430, not sure how long that these have been
happening but probably several years. We should just fix these and all the other
annoying errors that show up with dmesg -l err,warn.

The experimental patch below makes the warnings go away, but I'm not sure if
it's the right fix. Maybe give it a try and see if at least the warnings go away?

> There is a little patch around that changes the initialisation order which makes
> this messages go away but does not fix the odd behaviour. So maybe this is just
> a cosmetic issue and the actual problem is somewhere else.

Sorry I recall some discussion on the twl init problems, but don't remember the
details. Do you have some link for the patch and discussion?

Regards,

Tony

8< ------------------------
diff --git a/arch/arm/mach-omap2/vc44xx_data.c b/arch/arm/mach-omap2/vc44xx_data.c
--- a/arch/arm/mach-omap2/vc44xx_data.c
+++ b/arch/arm/mach-omap2/vc44xx_data.c
@@ -88,8 +88,8 @@ struct omap_vc_channel omap4_vc_core = {
 /*
  * Voltage levels for different operating modes: on, sleep, retention and off
  */
-#define OMAP4_ON_VOLTAGE_UV			1375000
-#define OMAP4_ONLP_VOLTAGE_UV			1375000
+#define OMAP4_ON_VOLTAGE_UV			1316660
+#define OMAP4_ONLP_VOLTAGE_UV			1316660
 #define OMAP4_RET_VOLTAGE_UV			837500
 #define OMAP4_OFF_VOLTAGE_UV			0
 
diff --git a/arch/arm/mach-omap2/voltage.h b/arch/arm/mach-omap2/voltage.h
--- a/arch/arm/mach-omap2/voltage.h
+++ b/arch/arm/mach-omap2/voltage.h
@@ -99,7 +99,7 @@ struct voltagedomain {
 #define OMAP3630_VP2_VLIMITTO_VDDMAX	1200000
 
 #define OMAP4_VP_MPU_VLIMITTO_VDDMIN	830000
-#define OMAP4_VP_MPU_VLIMITTO_VDDMAX	1410000
+#define OMAP4_VP_MPU_VLIMITTO_VDDMAX	1316660
 #define OMAP4_VP_IVA_VLIMITTO_VDDMIN	830000
 #define OMAP4_VP_IVA_VLIMITTO_VDDMAX	1260000
 #define OMAP4_VP_CORE_VLIMITTO_VDDMIN	830000
-- 
2.31.1

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: OMAP4460 cpufreq crashes
  2021-05-07  5:47 ` Tony Lindgren
@ 2021-05-10 11:13   ` Florian Boor
  2021-06-04 13:31     ` Florian Boor
  0 siblings, 1 reply; 5+ messages in thread
From: Florian Boor @ 2021-05-10 11:13 UTC (permalink / raw)
  To: Tony Lindgren; +Cc: linux-omap

Hi,

Am 07.05.21 um 07:47 schrieb Tony Lindgren:
> Hmm OK, sounds like the voltages might be wrong.

sounds like my guess wasn't that wrong.

> I don't have one of these boards, but would be glad to add one to my rack
> though if it can boot with NFSroot. If somebody happens to have a spare
> evaluation kit around in the corner to send me, please let me know :)

I have only one currently but I'll keep it in mind any my eyes open.

> The experimental patch below makes the warnings go away, but I'm not sure if
> it's the right fix. Maybe give it a try and see if at least the warnings go away?

The range warnings go away on the 4460 as well. The warning 'twl: not
initialized' of course is still there. Still need add the patch for it again and
test.

Another effect I have noticed is that the system seems to be a little bit more
'stable' now. Which means it does get a little bit further before crashing. I
even managed to get to the login prompt one time...

>> There is a little patch around that changes the initialisation order which makes
>> this messages go away but does not fix the odd behaviour. So maybe this is just
>> a cosmetic issue and the actual problem is somewhere else.
> 
> Sorry I recall some discussion on the twl init problems, but don't remember the
> details. Do you have some link for the patch and discussion?

Here it is:
https://marc.info/?l=linux-omap&m=156462292406719&w=2

Greetings

Florian

-- 
The dream of yesterday                  Florian Boor
is the hope of today                    Tel: +49(0) 271-338857-15
and the reality of tomorrow.		Fax: +49(0) 271-338857-29
[Robert Hutchings Goddard, 1904]        florian.boor@kernelconcepts.de
                                        http://www.kernelconcepts.de/en

kernel concepts GmbH
Hauptstraße 16
57074 Siegen
Deutschland
Geschäftsführer: Ole Reinhardt
HR Siegen, HR B 9613

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: OMAP4460 cpufreq crashes
  2021-05-10 11:13   ` Florian Boor
@ 2021-06-04 13:31     ` Florian Boor
  2021-06-05  5:11       ` Tony Lindgren
  0 siblings, 1 reply; 5+ messages in thread
From: Florian Boor @ 2021-06-04 13:31 UTC (permalink / raw)
  To: Tony Lindgren; +Cc: linux-omap

[-- Attachment #1: Type: text/plain, Size: 1291 bytes --]

Hi,

Am 10.05.21 um 13:13 schrieb Florian Boor:
> Am 07.05.21 um 07:47 schrieb Tony Lindgren:
>> Hmm OK, sounds like the voltages might be wrong.
> 
> sounds like my guess wasn't that wrong.

I did some more research and for me it more and more looks like we are missing
the voltage transitions on frequency change completely.

I added some debug output in omap_vp_forceupdate_scale() and
omap_vc_bypass_scale() and enabled debug output that shows the CPU clock
requency changes. Patch and log are attached.

The interesting stuff starts in line 123 where the first frequency change happens.

Maybe I'm missing something and looking in the wrong place, but if voltage
really never gets adapted on some devices then in the best case the device only
wastes power...

I wonder if this affects all OMAP4460 or the Variscite one only.

Greetings

Florian


-- 
The dream of yesterday                  Florian Boor
is the hope of today                    Tel: +49(0) 271-338857-15
and the reality of tomorrow.		Fax: +49(0) 271-338857-29
[Robert Hutchings Goddard, 1904]        florian.boor@kernelconcepts.de
                                        http://www.kernelconcepts.de/en

kernel concepts GmbH
Hauptstraße 16
57074 Siegen
Deutschland
Geschäftsführer: Ole Reinhardt
HR Siegen, HR B 9613

[-- Attachment #2: 0001-Debug-Add-instrumentation-for-OMAP4-voltage-changes.patch --]
[-- Type: text/x-patch, Size: 1898 bytes --]

From 978e096731fb720e7d059bdcfba70352dbeb6100 Mon Sep 17 00:00:00 2001
From: Florian Boor <florian@kernelconcepts.de>
Date: Fri, 4 Jun 2021 14:34:55 +0200
Subject: [PATCH] Debug: Add instrumentation for OMAP4 voltage changes

---
 arch/arm/mach-omap2/vc.c | 5 +++++
 arch/arm/mach-omap2/vp.c | 7 +++++++
 2 files changed, 12 insertions(+)

diff --git a/arch/arm/mach-omap2/vc.c b/arch/arm/mach-omap2/vc.c
index 86f1ac4c2412..f4a73e467c15 100644
--- a/arch/arm/mach-omap2/vc.c
+++ b/arch/arm/mach-omap2/vc.c
@@ -200,6 +200,8 @@ int omap_vc_bypass_scale(struct voltagedomain *voltdm,
 	u8 target_vsel, current_vsel;
 	int ret;
 
+	pr_warn("%s: Scaling vdd_%s to %ul\n", __func__, voltdm->name, target_volt);
+
 	ret = omap_vc_pre_scale(voltdm, target_volt, &target_vsel, &current_vsel);
 	if (ret)
 		return ret;
@@ -236,6 +238,9 @@ int omap_vc_bypass_scale(struct voltagedomain *voltdm,
 	}
 
 	omap_vc_post_scale(voltdm, target_volt, target_vsel, current_vsel);
+
+	pr_warn("%s: Success scaling vdd_%s to %ul\n", __func__, voltdm->name, target_volt);
+
 	return 0;
 }
 
diff --git a/arch/arm/mach-omap2/vp.c b/arch/arm/mach-omap2/vp.c
index a709655b978c..399b1b751173 100644
--- a/arch/arm/mach-omap2/vp.c
+++ b/arch/arm/mach-omap2/vp.c
@@ -126,6 +126,10 @@ int omap_vp_forceupdate_scale(struct voltagedomain *voltdm,
 	u8 target_vsel, current_vsel;
 	int ret, timeout = 0;
 
+	pr_warn("%s: vdd_%s Scaling to %ul \n",
+			__func__, voltdm->name, target_volt);
+
+
 	ret = omap_vc_pre_scale(voltdm, target_volt, &target_vsel, &current_vsel);
 	if (ret)
 		return ret;
@@ -184,6 +188,9 @@ int omap_vp_forceupdate_scale(struct voltagedomain *voltdm,
 	/* Clear force bit */
 	voltdm->write(vpconfig, vp->vpconfig);
 
+	pr_warn("%s: vdd_%s Success scaling to %ul \n",
+			__func__, voltdm->name, target_volt);
+
 	return 0;
 }
 
-- 
2.25.1


[-- Attachment #3: log-cpufreq-debug-1.txt --]
[-- Type: text/plain, Size: 24869 bytes --]

[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 5.13.0-rc1-00001-gce1e74a53856-dirty (fuchs@corey) (arm-poky-linux-gnueabi-gcc (GCC) 8.3.0
, GNU ld (GNU Binutils) 2.32.0.20190204) #43 SMP Fri Jun 4 14:22:12 CEST 2021
[    0.000000] CPU: ARMv7 Processor [412fc09a] revision 10 (ARMv7), cr=10c5387d
[    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[    0.000000] OF: fdt: Machine model: Variscite VAR-DVK-OM44
[    0.000000] Memory policy: Data cache writealloc
[    0.000000] cma: Reserved 16 MiB at 0xbf000000
[    0.000000] OMAP4: Map 0xafe00000 to (ptrval) for dram barrier
[    0.000000] Zone ranges:
[    0.000000]   Normal   [mem 0x0000000080000000-0x00000000afdfffff]
[    0.000000]   HighMem  [mem 0x00000000afe00000-0x00000000bfffffff]
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000080000000-0x00000000afdfffff]
[    0.000000]   node   0: [mem 0x00000000b0000000-0x00000000bfffffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000080000000-0x00000000bfffffff]
[    0.000000] OMAP4460 ES1.1
[    0.000000] percpu: Embedded 20 pages/cpu s49996 r8192 d23732 u81920
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 259908
[    0.000000] Kernel command line: rootwait root=/dev/mmcblk0p3 mem=1G@0x80000000 rw console=ttyO2,115200n8 fbcon=map:
0 vt.global_cursor_default=0 splash plymouth.ignore-serial-consoles consoleblank=0 omapfb.vram=0:4M fbcon=rotate:3 logl
evel=7
[    0.000000] Dentry cache hash table entries: 131072 (order: 7, 524288 bytes, linear)
[    0.000000] Inode-cache hash table entries: 65536 (order: 6, 262144 bytes, linear)
[    0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
[    0.000000] Memory: 1005040K/1046528K available (9216K kernel code, 1018K rwdata, 2244K rodata, 1024K init, 244K bss
, 25104K reserved, 16384K cma-reserved, 245760K highmem)
[    0.000000] trace event string verifier disabled
[    0.000000] rcu: Hierarchical RCU implementation.
[    0.000000] rcu:     RCU event tracing is enabled.
[    0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 10 jiffies.
[    0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
[    0.000000] L2C: platform modifies aux control register: 0x0e070000 -> 0x3e470000
[    0.000000] L2C: DT/platform modifies aux control register: 0x0e070000 -> 0x3e470000
[    0.000000] L2C-310 enabling early BRESP for Cortex-A9
[    0.000000] OMAP L2C310: ROM does not support power control setting
[    0.000000] L2C-310 dynamic clock gating disabled, standby mode disabled
[    0.000000] L2C-310 cache controller enabled, 16 ways, 1024 kB
[    0.000000] L2C-310: CACHE_ID 0x410000c7, AUX_CTRL 0x4e470000
[    0.000000] random: get_random_bytes called from start_kernel+0x344/0x58c with crng_init=0
[    0.000000] OMAP clocksource: 32k_counter at 32768 Hz
[    0.000000] clocksource: 32k_counter: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 58327039986419 ns
[    0.000000] sched_clock: 32 bits at 32kHz, resolution 30517ns, wraps every 65535999984741ns
[    0.001190] TI gptimer clockevent: always-on 32768 Hz at /ocp/interconnect@4a300000/segment@10000/target-module@8000
[    0.004547] Console: colour dummy device 80x30
[    0.004577] WARNING: Your 'console=ttyO2' has been replaced by 'ttyS2'
[    0.004577] This ensures that you still see kernel messages. Please
[    0.004608] update your kernel commandline.
[    0.004638] Calibrating delay loop... 1397.55 BogoMIPS (lpj=6987776)
[    0.089874] pid_max: default: 32768 minimum: 301
[    0.090057] LSM: Security Framework initializing
[    0.090148] Mount-cache hash table entries: 2048 (order: 1, 8192 bytes, linear)
[    0.090179] Mountpoint-cache hash table entries: 2048 (order: 1, 8192 bytes, linear)
[    0.091064] CPU: Testing write buffer coherency: ok
[    0.091125] CPU0: Spectre v2: using BPIALL workaround
[    0.091339] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
[    0.091949] Setting up static identity map for 0x80100000 - 0x80100078
[    0.092132] rcu: Hierarchical SRCU implementation.
[    0.092620] smp: Bringing up secondary CPUs ...
[    0.179840] CPU1: thread -1, cpu 1, socket 0, mpidr 80000001
[    0.179870] CPU1: Spectre v2: using BPIALL workaround
[    0.180053] smp: Brought up 1 node, 2 CPUs
[    0.180053] SMP: Total of 2 processors activated (2795.11 BogoMIPS).
[    0.180084] CPU: All CPU(s) started in SVC mode.
[    0.180603] devtmpfs: initialized
[    0.197631] VFP support v0.3: implementor 41 architecture 3 part 30 variant 9 rev 4
[    0.197875] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.197906] futex hash table entries: 512 (order: 3, 32768 bytes, linear)
[    0.199371] pinctrl core: initialized pinctrl subsystem
[    0.200561] NET: Registered protocol family 16
[    0.203430] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.204040] audit: initializing netlink subsys (disabled)
[    0.204223] audit: type=2000 audit(0.200:1): state=initialized audit_enabled=0 res=1
[    0.204772] thermal_sys: Registered thermal governor 'fair_share'
[    0.204803] thermal_sys: Registered thermal governor 'step_wise'
[    0.204803] thermal_sys: Registered thermal governor 'user_space'
[    0.205474] cpuidle: using governor menu
[    0.230194] No ATAGs?
[    0.230316] hw-breakpoint: found 5 (+1 reserved) breakpoint and 1 watchpoint registers.
[    0.230316] hw-breakpoint: maximum watchpoint size is 4 bytes.
[    0.240356] Kprobes globally optimized
[    0.245849] iommu: Default domain type: Translated 
[    0.246917] vgaarb: loaded
[    0.247314] SCSI subsystem initialized
[    0.247802] pps_core: LinuxPPS API ver. 1 registered
[    0.247802] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[    0.247833] PTP clock support registered
[    0.249023] clocksource: Switched to clocksource 32k_counter
[    0.281951] VFS: Disk quotas dquot_6.6.0
[    0.282073] VFS: Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[    0.291259] NET: Registered protocol family 2
[    0.291473] IP idents hash table entries: 16384 (order: 5, 131072 bytes, linear)
[    0.292999] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 6144 bytes, linear)
[    0.293029] TCP established hash table entries: 8192 (order: 3, 32768 bytes, linear)
[    0.293151] TCP bind hash table entries: 8192 (order: 4, 65536 bytes, linear)
[    0.293273] TCP: Hash tables configured (established 8192 bind 8192)
[    0.293395] UDP hash table entries: 512 (order: 2, 16384 bytes, linear)
[    0.293487] UDP-Lite hash table entries: 512 (order: 2, 16384 bytes, linear)
[    0.293701] NET: Registered protocol family 1
[    0.294494] RPC: Registered named UNIX socket transport module.
[    0.294525] RPC: Registered udp transport module.
[    0.294525] RPC: Registered tcp transport module.
[    0.294555] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    0.294555] PCI: CLS 0 bytes, default 64
[    0.296051] Initialise system trusted keyrings
[    0.296325] workingset: timestamp_bits=14 max_order=18 bucket_order=4
[    1.038482] NFS: Registering the id_resolver key type
[    1.038513] Key type id_resolver registered
[    1.038543] Key type id_legacy registered
[    1.038574] jffs2: version 2.2. (NAND) (SUMMARY)  �© 2001-2006 Red Hat, Inc.
[    1.038879] Key type asymmetric registered
[    1.038909] Asymmetric key parser 'x509' registered
[    1.038970] bounce: pool size: 64 pages
[    1.039154] io scheduler mq-deadline registered
[    1.039154] io scheduler kyber registered
[    1.043426] Serial: 8250/16550 driver, 6 ports, IRQ sharing enabled
[    1.054290] brd: module loaded
[    1.062103] loop: module loaded
[    1.062896] mtdoops: mtd device (mtddev=name/number) must be supplied
[    1.064147] libphy: Fixed MDIO Bus: probed
[    1.065216] i2c /dev entries driver
[    1.066040] cpufreq: notification 0 of frequency transition to 700000 kHz
[    1.066436] cpufreq: notification 1 of frequency transition to 700000 kHz
[    1.066467] cpufreq: cpufreq_online: CPU0: Running at unlisted initial frequency: 699977 KHz, changing to: 700000 KHz
[    1.067016] sdhci: Secure Digital Host Controller Interface driver
[    1.067047] sdhci: Copyright(c) Pierre Ossman
[    1.067260] sdhci-pltfm: SDHCI platform and OF driver helper
[    1.067474] cpufreq: notification 0 of frequency transition to 920000 kHz
[    1.067504] ledtrig-cpu: registered to indicate activity on CPUs
[    1.067687] cpufreq: notification 1 of frequency transition to 920000 kHz
[    1.067993] Initializing XFRM netlink socket
[    1.068145] NET: Registered protocol family 10
[    1.068939] Segment Routing with IPv6
[    1.069061] sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
[    1.069549] NET: Registered protocol family 17
[    1.069580] NET: Registered protocol family 15
[    1.069641] Key type dns_resolver registered
[    1.069854] ThumbEE CPU extension supported.
[    1.069854] Registering SWP/SWPB emulation handler
[    1.069885] SmartReflex Class3 initialized
[    1.070281] Loading compiled-in X.509 certificates
[    1.093811] OMAP GPIO hardware version 0.1
[    1.097656] pinctrl-single 4a31e040.pinmux: 28 pins, size 56
[    1.116699] omap-dma-engine 4a056000.dma-controller: OMAP DMA engine driver (LinkedList1/2/3 supported)
[    1.122100] omap-iommu 4a066000.mmu: 4a066000.mmu registered
[    1.132110] pinctrl-single 4a100040.pinmux: 203 pins, size 406
[    1.138580] 48020000.serial: ttyS2 at MMIO 0x48020000 (irq = 110, base_baud = 3000000) is a 8250
[    1.997680] printk: console [ttyS2] enabled
[    2.015472] omap_i2c 48060000.i2c: bus 2 rev0.11 at 400 kHz
[    2.022796] 4806a000.serial: ttyS0 at MMIO 0x4806a000 (irq = 121, base_baud = 3000000) is a 8250
[    2.033569] 4806c000.serial: ttyS1 at MMIO 0x4806c000 (irq = 122, base_baud = 3000000) is a 8250
[    2.046081] Skipping twl internal clock init and using bootloader value (unknown osc rate)
[    2.079040] cpufreq: notification 0 of frequency transition to 350000 kHz
[    2.086547] cpufreq: notification 1 of frequency transition to 350000 kHz
[    2.094238] twl 0-0048: PIH (irq 124) nested IRQs
[    2.099243] cpufreq: notification 0 of frequency transition to 700000 kHz
[    2.106567] cpufreq: notification 1 of frequency transition to 700000 kHz
[    2.119140] VUSIM: Bringing 1800000uV into 3000000-3000000uV
[    2.124877] cpufreq: notification 0 of frequency transition to 920000 kHz
[    2.131927] cpufreq: notification 1 of frequency transition to 920000 kHz
[    2.147796] omap_i2c 48070000.i2c: bus 0 rev0.11 at 400 kHz
[    2.160644] ks8851 spi0.0: supply vdd-io not found, using dummy regulator
[    2.167602] ks8851 spi0.0: supply vdd not found, using dummy regulator
[    2.174224] ks8851 spi0.0: message enable is 0
[    2.179687] libphy: ks8851_eth_mii: probed
[    2.186584] ks8851 spi0.0 eth0: revision 1, MAC 5e:22:ed:4c:97:5d, IRQ 137, no EEPROM
[    2.209075] ti-sysc 480b2000.target-module: OCP softreset timed out
[    2.225463] ti-sysc 480b2000.target-module: OCP softreset timed out
[    2.236968] omap_gpio 48059000.gpio: Could not set line 14 debounce to 200000 microseconds (-22)
[    2.245849] omap_hsmmc 480d5000.mmc: Got CD GPIO
[    2.251464] omap_i2c 48350000.i2c: bus 3 rev0.11 at 400 kHz
[    2.262481] cpufreq: notification 0 of frequency transition to 700000 kHz
[    2.269714] cpufreq: notification 1 of frequency transition to 700000 kHz
[    2.286743] cpufreq: notification 0 of frequency transition to 920000 kHz
[    2.293823] cpufreq: notification 1 of frequency transition to 920000 kHz
[    2.301666] armv7-pmu ocp:target-module@54000000:pmu: hw perfevents: no interrupt-affinity property, guessing.
[    2.312103] hw perfevents: enabled with armv7_cortex_a9 PMU driver, 7 counters available
[    2.321258] omap-iommu 55082000.mmu: 55082000.mmu registered
[    2.335937] platform 58000000.dss: Fixing up cyclic dependency with display
[    2.348327] mmc0: host does not support reading read-only switch, assuming write-enable
[    2.356964] cpufreq: notification 0 of frequency transition to 700000 kHz
[    2.364196] cpufreq: notification 1 of frequency transition to 700000 kHz
[    2.371490] mmc0: new high speed SDHC card at address aaaa
[    2.371765] Power Management for TI OMAP4+ devices.
[    2.377319] cpufreq: notification 0 of frequency transition to 920000 kHz
[    2.381958] OMAP4 PM: u-boot >= v2012.07 is required for full PM support
[    2.395507] cpufreq: notification 1 of frequency transition to 920000 kHz
[    2.395782] mmcblk0: mmc0:aaaa SC32G 29.7 GiB 
[    2.407989] l4_secure_cm:clk:0038:0: failed to disable
[    2.413848] smartreflex 4a0d9000.smartreflex: omap_sr_probe: SmartReflex driver initialized
[    2.422576] smartreflex 4a0db000.smartreflex: omap_sr_probe: SmartReflex driver initialized
[    2.431243] smartreflex 4a0dd000.smartreflex: omap_sr_probe: SmartReflex driver initialized
[    2.441253]  mmcblk0: p1 p2 p3 p4
[    2.459411] hw-breakpoint: Failed to enable monitor mode on CPU 0.
[    2.465881] cpufreq: notification 0 of frequency transition to 350000 kHz
[    2.468933] EXT4-fs (mmcblk0p3): mounting ext3 file system using the ext4 subsystem
[    2.480407] cpufreq: notification 1 of frequency transition to 350000 kHz
[    2.485870] cpufreq: notification 0 of frequency transition to 920000 kHz
[    2.494476] cpufreq: notification 1 of frequency transition to 920000 kHz
[    2.506317] omap_hsmmc 480d1000.mmc: card claims to support voltages below defined range
[    2.521453] random: fast init done
[    2.526611] cpufreq: notification 0 of frequency transition to 700000 kHz
[    2.533447] cpufreq: notification 1 of frequency transition to 700000 kHz
[    2.543853] mmc3: new SDIO card at address 0001
[    2.553314] EXT4-fs (mmcblk0p3): mounted filesystem with ordered data mode. Opts: (null). Quota mode: none.
[    2.563293] VFS: Mounted root (ext3 filesystem) on device 179:3.
[    2.569061] cpufreq: notification 0 of frequency transition to 920000 kHz
[    2.569488] cpufreq: notification 1 of frequency transition to 920000 kHz
[    2.590240] cpufreq: notification 0 of frequency transition to 700000 kHz
[    2.590240] devtmpfs: mounted
[    2.600067] cpufreq: notification 1 of frequency transition to 700000 kHz
[    2.607116] Freeing unused kernel memory: 1024K
[    2.613037] cpufreq: notification 0 of frequency transition to 920000 kHz
[    2.620086] cpufreq: notification 1 of frequency transition to 920000 kHz
[    2.626068] Run /sbin/init as init process
[    2.631896] cpufreq: notification 0 of frequency transition to 700000 kHz
[    2.638732] cpufreq: notification 1 of frequency transition to 700000 kHz
[    2.647369] hw-breakpoint: CPU 0 failed to disable vector catch
[    2.677124] cpufreq: notification 0 of frequency transition to 350000 kHz
[    2.684753] cpufreq: notification 1 of frequency transition to 350000 kHz
[    2.700164] cpufreq: notification 0 of frequency transition to 920000 kHz
[    2.707275] cpufreq: notification 1 of frequency transition to 920000 kHz
[    2.722137] cpufreq: notification 0 of frequency transition to 700000 kHz
[    2.729339] cpufreq: notification 1 of frequency transition to 700000 kHz
[    2.866821] cpufreq: notification 0 of frequency transition to 350000 kHz
[    2.874450] cpufreq: notification 1 of frequency transition to 350000 kHz
Mount failed for selinuxfs on /sys/fs/selinux:  No such file or directory
[    2.889038] cpufreq: notification 0 of frequency transition to 920000 kHz
[    2.896697] cpufreq: notification 1 of frequency transition to 920000 kHz
[    2.909057] cpufreq: notification 0 of frequency transition to 700000 kHz
[    2.915832] cpufreq: notification 1 of frequency transition to 700000 kHz
[    2.997985] random: init: uninitialized urandom read (12 bytes read)
[    3.052734] cpufreq: notification 0 of frequency transition to 350000 kHz
[    3.060363] cpufreq: notification 1 of frequency transition to 350000 kHz
[    3.074523] cpufreq: notification 0 of frequency transition to 920000 kHz
[    3.081573] cpufreq: notification 1 of frequency transition to 920000 kHz
[    3.094543] cpufreq: notification 0 of frequency transition to 700000 kHz
[    3.101470] cpufreq: notification 1 of frequency transition to 700000 kHz
[    3.177551] cpufreq: notification 0 of frequency transition to 920000 kHz
[    3.184722] cpufreq: notification 1 of frequency transition to 920000 kHz
[    3.198242] cpufreq: notification 0 of frequency transition to 700000 kHz
[    3.205474] cpufreq: notification 1 of frequency transition to 700000 kHz
[    3.218078] cpufreq: notification 0 of frequency transition to 920000 kHz
[    3.225219] cpufreq: notification 1 of frequency transition to 920000 kHz
[    3.250488] init: hwclock main process (78) terminated with status 1
[    3.259521] cpufreq: notification 0 of frequency transition to 700000 kHz
[    3.266937] cpufreq: notification 1 of frequency transition to 700000 kHz
[    3.279205] cpufreq: notification 0 of frequency transition to 920000 kHz
[    3.286132] cpufreq: notification 1 of frequency transition to 920000 kHz
[    3.294830] init: ureadahead main process (79) terminated with status 5
[    3.322021] cpufreq: notification 0 of frequency transition to 700000 kHz
[    3.329193] cpufreq: notification 1 of frequency transition to 700000 kHz
[    3.378814] random: mountall: uninitialized urandom read (12 bytes read)
[    3.385742] cpufreq: notification 0 of frequency transition to 920000 kHz
[    3.392669] cpufreq: notification 1 of frequency transition to 920000 kHz
[    3.488861] cpufreq: notification 0 of frequency transition to 700000 kHz
[    3.496093] cpufreq: notification 1 of frequency transition to 700000 kHz
[    3.509124] cpufreq: notification 0 of frequency transition to 920000 kHz
[    3.516174] cpufreq: notification 1 of frequency transition to 920000 kHz
[    3.529388] cpufreq: notification 0 of frequency transition to 700000 kHz
[    3.536560] cpufreq: notification 1 of frequency transition to 700000 kHz
[    3.569854] cpufreq: notification 0 of frequency transition to 350000 kHz
[    3.577423] cpufreq: notification 1 of frequency transition to 350000 kHz
[    3.590026] cpufreq: notification 0 of frequency transition to 920000 kHz
[    3.590270] cpufreq: notification 1 of frequency transition to 920000 kHz
[    3.610412] cpufreq: notification 0 of frequency transition to 700000 kHz
[    3.617584] cpufreq: notification 1 of frequency transition to 700000 kHz
[    3.650939] cpufreq: notification 0 of frequency transition to 350000 kHz
[    3.658508] cpufreq: notification 1 of frequency transition to 350000 kHz
[    3.670989] cpufreq: notification 0 of frequency transition to 700000 kHz
[    3.678314] cpufreq: notification 1 of frequency transition to 700000 kHz
[    3.899078] cpufreq: notification 0 of frequency transition to 920000 kHz
[    3.906127] cpufreq: notification 1 of frequency transition to 920000 kHz
[    3.939483] cpufreq: notification 0 of frequency transition to 700000 kHz
[    3.946716] cpufreq: notification 1 of frequency transition to 700000 kHz
[    3.959320] cpufreq: notification 0 of frequency transition to 920000 kHz
[    3.966033] cpufreq: notification 1 of frequency transition to 920000 kHz
[    4.186645] cpufreq: notification 0 of frequency transition to 700000 kHz
[    4.193847] cpufreq: notification 1 of frequency transition to 700000 kHz
[    4.208190] cpufreq: notification 0 of frequency transition to 920000 kHz
[    4.215362] cpufreq: notification 1 of frequency transition to 920000 kHz
[    4.231018] cpufreq: notification 0 of frequency transition to 700000 kHz
[    4.238281] cpufreq: notification 1 of frequency transition to 700000 kHz
[    4.249237] cpufreq: notification 0 of frequency transition to 920000 kHz
[    4.256286] cpufreq: notification 1 of frequency transition to 920000 kHz
[    4.291687] cpufreq: notification 0 of frequency transition to 700000 kHz
[    4.298889] cpufreq: notification 1 of frequency transition to 700000 kHz
[    4.312591] cpufreq: notification 0 of frequency transition to 920000 kHz
[    4.319488] cpufreq: notification 1 of frequency transition to 920000 kHz
[    4.352722] cpufreq: notification 0 of frequency transition to 700000 kHz
[    4.360046] cpufreq: notification 1 of frequency transition to 700000 kHz
[    4.374328] cpufreq: notification 0 of frequency transition to 920000 kHz
[    4.381225] cpufreq: notification 1 of frequency transition to 920000 kHz
[    4.539855] 8<--- cut here ---
[    4.542938] Unable to handle kernel paging request at virtual address 2e723027
[    4.550201] pgd = (ptrval)
[    4.550201] [2e723027] *pgd=00000000
[    4.556518] Internal error: Oops: 5 [#1] SMP ARM
[    4.556518] Modules linked in:
[    4.564239] CPU: 0 PID: 201 Comm: sh Not tainted 5.13.0-rc1-00001-gce1e74a53856-dirty #43
[    4.564239] Hardware name: Generic OMAP4 (Flattened Device Tree)
[    4.578491] PC is at __mod_zone_page_state+0x2c/0xc4
[    4.583496] LR is at 0x2e723000
[    4.583496] pc : [<c0281224>]    lr : [<2e723000>]    psr: 80070093
[    4.583496] sp : c2445e8c  ip : 00000027  fp : ef49ae48
[    4.592956] r10: 00000008  r9 : 00000000  r8 : efdbbf60
[    4.602935] r7 : 00000001  r6 : c0e05640  r5 : ffffe000  r4 : 00000027
[    4.603729] r3 : 00000000  r2 : 00000001  r1 : 00000002  r0 : c0efe926
[    4.614257] Flags: Nzcv  IRQs off  FIQs on  Mode SVC_32  ISA ARM  Segment none
[    4.623748] Control: 10c5387d  Table: 8243c04a  DAC: 00000051
[    4.628997] Register r0 information: non-slab/vmalloc memory
[    4.629608] Register r1 information: non-paged memory
[    4.639007] Register r2 information: non-paged memory
[    4.640380] Register r3 information: NULL pointer
[    4.650177] Register r4 information: non-paged memory
[    4.650177] Register r5 information: non-paged memory
[    4.657623] Register r6 information: non-slab/vmalloc memory
[    4.660369] Register r7 information: non-paged memory
[    4.669006] Register r8 information: non-slab/vmalloc memory
[    4.669006] Register r9 information: NULL pointer
[    4.669006] Register r10 information: non-paged memory
[    4.669006] Register r11 information: non-slab/vmalloc memory
[    4.692474] Register r12 information: non-paged memory
[    4.692474] Process sh (pid: 201, stack limit = 0x(ptrval))
[    4.699005] Stack: (0xc2445e8c to 0xc2446000)
[    4.699005] 5e80:                            efdbbf5c c10aa600 00000001 00000001 c026df5c
[    4.715850] 5ea0: efdbbf5c c0efe5a6 00000002 ef49ae44 60070013 c0e051c8 00002017 00000000
[    4.715850] 5ec0: c0e05640 0048c67c 0048c694 c23e1000 c2268a00 0000000b be9c1a54 c026e404
[    4.729003] 5ee0: c210f0c0 c20a0000 0048c67c c026e4b4 c210f0c0 c02a2c30 00000000 c23e1000
[    4.739013] 5f00: 00020020 00000000 00000001 00000100 00000001 c0e051c8 c2268a00 c2268a00
[    4.739013] 5f20: ffffe000 c02e3e5c 00000000 c02e3c68 00000000 c0e051c8 c20a0000 00000000
[    4.748992] 5f40: 0048c67c c0e051c8 c23e1000 c20a0000 00000000 c0133960 c2268a00 ffffff9c
[    4.765136] 5f60: 0048c67c c02e2dc8 fffffffe c02e44cc 0048c67c 0048c694 0048c6bc 0000000b
[    4.765136] 5f80: c0100284 c2444000 0000000b c02e52fc 00000000 0048c6bc 0000000b 0048c67c
[    4.774902] 5fa0: 0048c6bc c0100080 0048c67c 0048c6bc 0048c6bc 0048c67c 0048c694 00000000
[    4.782867] 5fc0: 0048c67c 0048c6bc 0048c6bc 0000000b 00000002 be9c1834 0048c694 be9c1a54
[    4.782867] 5fe0: 0000000b be9c180c b6ea3c13 b6e47926 a0070030 0048c6bc 00000000 00000000
[    4.806274] [<c0281224>] (__mod_zone_page_state) from [<c026df5c>] (__pagevec_lru_add+0xd0/0x3b4)
[    4.811737] [<c026df5c>] (__pagevec_lru_add) from [<c026e404>] (lru_add_drain_cpu+0x98/0x130)
[    4.811737] [<c026e404>] (lru_add_drain_cpu) from [<c026e4b4>] (lru_add_drain+0x18/0x1c)
[    4.831939] [<c026e4b4>] (lru_add_drain) from [<c02a2c30>] (exit_mmap+0x9c/0x1d4)
[    4.839477] [<c02a2c30>] (exit_mmap) from [<c0133960>] (mmput+0x4c/0x110)
[    4.839477] [<c0133960>] (mmput) from [<c02e2dc8>] (free_bprm+0x24/0xc0)
[    4.839477] [<c02e2dc8>] (free_bprm) from [<c02e44cc>] (do_execveat_common+0x160/0x16c)
[    4.839477] [<c02e44cc>] (do_execveat_common) from [<c02e52fc>] (sys_execve+0x30/0x38)
[    4.861114] [<c02e52fc>] (sys_execve) from [<c0100080>] (ret_fast_syscall+0x0/0x58)
[    4.876770] Exception stack(0xc2445fa8 to 0xc2445ff0)
[    4.880889] 5fa0:                   0048c67c 0048c6bc 0048c6bc 0048c67c 0048c694 00000000
[    4.889007] 5fc0: 0048c67c 0048c6bc 0048c6bc 0000000b 00000002 be9c1834 0048c694 be9c1a54
[    4.898284] 5fe0: 0000000b be9c180c b6ea3c13 b6e47926
[    4.898284] Code: e796e10c e283c025 e08cc001 e1a0400c (e19e70d4) 
[    4.903381] ---[ end trace e56eb2137d7cdc43 ]---


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: OMAP4460 cpufreq crashes
  2021-06-04 13:31     ` Florian Boor
@ 2021-06-05  5:11       ` Tony Lindgren
  0 siblings, 0 replies; 5+ messages in thread
From: Tony Lindgren @ 2021-06-05  5:11 UTC (permalink / raw)
  To: Florian Boor; +Cc: linux-omap

Hi,

* Florian Boor <florian.boor@kernelconcepts.de> [210604 13:31]:
> Hi,
> 
> Am 10.05.21 um 13:13 schrieb Florian Boor:
> > Am 07.05.21 um 07:47 schrieb Tony Lindgren:
> >> Hmm OK, sounds like the voltages might be wrong.
> > 
> > sounds like my guess wasn't that wrong.
> 
> I did some more research and for me it more and more looks like we are missing
> the voltage transitions on frequency change completely.
> 
> I added some debug output in omap_vp_forceupdate_scale() and
> omap_vc_bypass_scale() and enabled debug output that shows the CPU clock
> requency changes. Patch and log are attached.
> 
> The interesting stuff starts in line 123 where the first frequency change happens.
> 
> Maybe I'm missing something and looking in the wrong place, but if voltage
> really never gets adapted on some devices then in the best case the device only
> wastes power...

Yup.. Sounds like the Variscite board boots at some lower opp than
what is configured for the kernel in dts. So the immediate fix would
be to either limit the max speed, or ensure voltdm_scale() gets
called on init.

> I wonder if this affects all OMAP4460 or the Variscite one only.

This affects all omap4/5 at least as we're missing the cpufreq-dt to
voltage domain support like you pointed out. See the last effort to add
kernel support for voltage domains at [0] below for more details.

I think the way to proceed here would be initially add a regulator
usable as cpu-supply for cpufreq-dt that gets the voltdm_scale() as
a platform_data pointer and parses the device tree provides opps
for supported voltages. Then eventually the legacy platform code
for voltage domains can be moved to device drivers.

Regards,

Tony

[0] https://lore.kernel.org/lkml/1392755543-28335-1-git-send-email-nm@ti.com/

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-06-05  5:11 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-06 15:35 OMAP4460 cpufreq crashes Florian Boor
2021-05-07  5:47 ` Tony Lindgren
2021-05-10 11:13   ` Florian Boor
2021-06-04 13:31     ` Florian Boor
2021-06-05  5:11       ` Tony Lindgren

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).