[OpenWrt-Devel] [PATCH] ath79: switch to kernel 5.4

mail at adrianschmutzler.de mail at adrianschmutzler.de
Fri Apr 3 15:41:30 EDT 2020


Hi,

> -----Original Message-----
> From: openwrt-devel [mailto:openwrt-devel-bounces at lists.openwrt.org]
> On Behalf Of Bjørn Mork
> Sent: Freitag, 3. April 2020 16:12
> To: Russell Senior <russell at personaltelco.net>
> Cc: openwrt-devel <openwrt-devel at lists.openwrt.org>; David Bauer
> <mail at david-bauer.net>; Magnus Kroken <mkroken at gmail.com>
> Subject: Re: [OpenWrt-Devel] [PATCH] ath79: switch to kernel 5.4
> 
> Russell Senior <russell at personaltelco.net> writes:
> 
> > FYI: https://bugs.openwrt.org/index.php?do=details&task_id=2928
> 
> Thanks a lot!
> 
> AP is now revived *with* v5.4 built with gcc-8.4.0.

So, this is sorted out?

If further testing is required, I have a Unifi AC Mesh and several TP-Link devices at hand (but only limited time for testing).
I might also try what happens on tiny ...

Best

Adrian

> 
> Hauke already did all the hevy debugging work.  I assumed that if
> 
>  http://git.kernel.org/linus/9012d011660ea5cf2a623e1de207a2bc0ca6936d
> 
> broke this, then a simple quickfix would be to disable
> CONFIG_OPTIMIZE_INLINING
> 
> But looking at that dsp stuff, I noticed that there was a pair of suspicious-
> looking inlined (or not after v5.4...) functions.  So without understanding
> much of this, I just tested once with the attached patch.
> And it boots:
> 
> 
> root at unifiac2:~# dmesg
> [    0.000000] Linux version 5.4.28 (bjorn at canardo) (gcc version 8.4.0
> (OpenWrt GCC 8.4.0 r12793-fcd14017007d)) #0 Fri Apr 3 13:28:57 2020
> [    0.000000] printk: bootconsole [early0] enabled
> [    0.000000] CPU0 revision is: 00019750 (MIPS 74Kc)
> [    0.000000] MIPS: machine is Ubiquiti UniFi-AC-PRO
> [    0.000000] SoC: Qualcomm Atheros QCA956X ver 1 rev 0
> [    0.000000] Initrd not found or empty - disabling initrd
> [    0.000000] Primary instruction cache 64kB, VIPT, 4-way, linesize 32 bytes.
> [    0.000000] Primary data cache 32kB, 4-way, VIPT, cache aliases, linesize 32
> bytes
> [    0.000000] Zone ranges:
> [    0.000000]   Normal   [mem 0x0000000000000000-0x0000000007ffffff]
> [    0.000000] Movable zone start for each node
> [    0.000000] Early memory node ranges
> [    0.000000]   node   0: [mem 0x0000000000000000-0x0000000007ffffff]
> [    0.000000] Initmem setup node 0 [mem 0x0000000000000000-
> 0x0000000007ffffff]
> [    0.000000] On node 0 totalpages: 32768
> [    0.000000]   Normal zone: 256 pages used for memmap
> [    0.000000]   Normal zone: 0 pages reserved
> [    0.000000]   Normal zone: 32768 pages, LIFO batch:7
> [    0.000000] pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768
> [    0.000000] pcpu-alloc: [0] 0
> [    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 32512
> [    0.000000] Kernel command line: console=ttyS0,115200n8
> rootfstype=squashfs,jffs2
> [    0.000000] Dentry cache hash table entries: 16384 (order: 4, 65536 bytes,
> linear)
> [    0.000000] Inode-cache hash table entries: 8192 (order: 3, 32768 bytes,
> linear)
> [    0.000000] Writing ErrCtl register=00000000
> [    0.000000] Readback ErrCtl register=00000000
> [    0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
> [    0.000000] Memory: 122844K/131072K available (4405K kernel code, 167K
> rwdata, 1044K rodata, 1224K init, 190K bss, 8228K reserved, 0K cma-reserved)
> [    0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
> [    0.000000] NR_IRQS: 51
> [    0.000000] random: get_random_bytes called from
> start_kernel+0x324/0x4ec with crng_init=0
> [    0.000000] CPU clock: 775.000 MHz
> [    0.000000] clocksource: MIPS: mask: 0xffffffff max_cycles: 0xffffffff,
> max_idle_ns: 4932285024 ns
> [    0.000007] sched_clock: 32 bits at 387MHz, resolution 2ns, wraps every
> 5541893118ns
> [    0.008208] Calibrating delay loop... 385.02 BogoMIPS (lpj=770048)
> [    0.046712] pid_max: default: 32768 minimum: 301
> [    0.051701] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes,
> linear)
> [    0.059411] Mountpoint-cache hash table entries: 1024 (order: 0, 4096
> bytes, linear)
> [    0.070685] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff,
> max_idle_ns: 7645041785100000 ns
> [    0.080993] futex hash table entries: 256 (order: -1, 3072 bytes, linear)
> [    0.088207] pinctrl core: initialized pinctrl subsystem
> [    0.094602] NET: Registered protocol family 16
> [    0.105912] PCI host bridge /ahb/pcie-controller at 18250000 ranges:
> [    0.112386]  MEM 0x0000000012000000..0x0000000013ffffff
> [    0.117899]   IO 0x0000000000000000..0x0000000000000000
> [    0.140712] PCI host bridge to bus 0000:00
> [    0.145080] pci_bus 0000:00: root bus resource [mem 0x12000000-0x13ffffff]
> [    0.152334] pci_bus 0000:00: root bus resource [io  0x0000]
> [    0.158208] pci_bus 0000:00: root bus resource [??? 0x00000000 flags 0x0]
> [    0.165361] pci_bus 0000:00: No busn resource found for root bus, will use
> [bus 00-ff]
> [    0.173740] pci 0000:00:00.0: [168c:003c] type 00 class 0x028000
> [    0.180117] pci 0000:00:00.0: reg 0x10: [mem 0x00000000-0x001fffff 64bit]
> [    0.187313] pci 0000:00:00.0: reg 0x30: [mem 0x00000000-0x0000ffff pref]
> [    0.194443] pci 0000:00:00.0: supports D1
> [    0.198666] pci 0000:00:00.0: PME# supported from D0 D1 D3hot
> [    0.205572] pci_bus 0000:00: busn_res: [bus 00-ff] end is updated to 00
> [    0.212582] pci 0000:00:00.0: BAR 0: assigned [mem 0x12000000-0x121fffff
> 64bit]
> [    0.220302] pci 0000:00:00.0: BAR 6: assigned [mem 0x12200000-0x1220ffff
> pref]
> [    0.230375] clocksource: Switched to clocksource MIPS
> [    0.236702] NET: Registered protocol family 2
> [    0.241970] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 4096
> bytes, linear)
> [    0.250838] TCP established hash table entries: 1024 (order: 0, 4096 bytes,
> linear)
> [    0.258931] TCP bind hash table entries: 1024 (order: 0, 4096 bytes, linear)
> [    0.266381] TCP: Hash tables configured (established 1024 bind 1024)
> [    0.273210] UDP hash table entries: 256 (order: 0, 4096 bytes, linear)
> [    0.280149] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes, linear)
> [    0.287752] NET: Registered protocol family 1
> [    0.292419] PCI: CLS 0 bytes, default 32
> [    0.299540] workingset: timestamp_bits=30 max_order=15 bucket_order=0
> [    0.311223] squashfs: version 4.0 (2009/01/31) Phillip Lougher
> [    0.317409] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME)
> (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
> [    0.337003] ar7200-usb-phy usb-phy: phy reset is missing
> [    0.344102] pinctrl-single 1804002c.pinmux: 544 pins, size 68
> [    0.351204] Serial: 8250/16550 driver, 1 ports, IRQ sharing disabled
> [    0.358621] printk: console [ttyS0] disabled
> [    0.363192] 18020000.uart: ttyS0 at MMIO 0x18020000 (irq = 9, base_baud =
> 1562500) is a 16550A
> [    0.372301] printk: console [ttyS0] enabled
> [    0.381366] printk: bootconsole [early0] disabled
> [    0.397604] spi-nor spi0.0: mx25l12805d (16384 Kbytes)
> [    0.403010] 7 fixed-partitions partitions found on MTD device spi0.0
> [    0.409582] Creating 7 MTD partitions on "spi0.0":
> [    0.414542] 0x000000000000-0x000000060000 : "u-boot"
> [    0.420474] 0x000000060000-0x000000070000 : "u-boot-env"
> [    0.426848] 0x000000070000-0x000000800000 : "firmware"
> [    0.435796] 2 uimage-fw partitions found on MTD device firmware
> [    0.441955] Creating 2 MTD partitions on "firmware":
> [    0.447106] 0x000000000000-0x0000001d0000 : "kernel"
> [    0.452989] 0x0000001d0000-0x000000790000 : "rootfs"
> [    0.458944] mtd: device 4 (rootfs) set to be root filesystem
> [    0.466320] 1 squashfs-split partitions found on MTD device rootfs
> [    0.472762] 0x0000004f0000-0x000000790000 : "rootfs_data"
> [    0.479165] 0x000000800000-0x000000f90000 : "ubnt-airos"
> [    0.485471] 0x000000f90000-0x000000fb0000 : "bs"
> [    0.491082] 0x000000fb0000-0x000000ff0000 : "cfg"
> [    0.496783] 0x000000ff0000-0x000001000000 : "art"
> [    0.504304] libphy: Fixed MDIO Bus: probed
> [    1.154734] libphy: ag71xx_mdio: probed
> [    1.161760] switch0: Atheros AR8337 rev. 2 switch registered on mdio.0
> [    1.170368] random: fast init done
> [    1.753854] ag71xx 19000000.eth: connected to PHY at mdio.0:00
> [uid=004dd036, driver=Atheros AR8216/AR8236/AR8316]
> [    1.765106] eth0: Atheros AG71xx at 0xb9000000, irq 4, mode: mii
> [    1.773224] NET: Registered protocol family 10
> [    1.781640] Segment Routing with IPv6
> [    1.785573] NET: Registered protocol family 17
> [    1.790237] 8021q: 802.1Q VLAN Support v1.8
> [    1.800499] VFS: Mounted root (squashfs filesystem) readonly on device
> 31:4.
> [    1.814541] Freeing unused kernel memory: 1224K
> [    1.819239] This architecture does not have kernel memory protection.
> [    1.825892] Run /sbin/init as init process
> [    2.360115] init: Console is alive
> [    2.363923] init: - watchdog -
> [    3.538161] kmodloader: loading kernel modules from /etc/modules-
> boot.d/*
> [    3.650743] usbcore: registered new interface driver usbfs
> [    3.656513] usbcore: registered new interface driver hub
> [    3.662094] usbcore: registered new device driver usb
> [    3.672789] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
> [    3.680931] ehci-fsl: Freescale EHCI Host controller driver
> [    3.688060] ehci-platform: EHCI generic platform driver
> [    3.693721] ehci-platform 1b000000.usb: EHCI Host Controller
> [    3.699634] ehci-platform 1b000000.usb: new USB bus registered, assigned
> bus number 1
> [    3.707831] ehci-platform 1b000000.usb: irq 13, io mem 0x1b000000
> [    3.726390] ehci-platform 1b000000.usb: USB 2.0 started, EHCI 1.00
> [    3.733503] hub 1-0:1.0: USB hub found
> [    3.737779] hub 1-0:1.0: 1 port detected
> [    3.744311] kmodloader: done loading kernel modules from /etc/modules-
> boot.d/*
> [    3.762200] init: - preinit -
> [    4.875572] random: jshn: uninitialized urandom read (4 bytes read)
> [    5.113916] random: jshn: uninitialized urandom read (4 bytes read)
> [    5.208572] random: jshn: uninitialized urandom read (4 bytes read)
> [    6.279170] Atheros AR8216/AR8236/AR8316 mdio.0:00: Port 2 is up
> [    6.287409] eth0: link up (1000Mbps/Full duplex)
> [    6.305638] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
> [    6.320732] IPv6: ADDRCONF(NETDEV_CHANGE): eth0.1: link becomes
> ready
> [    6.362054] urandom_read: 4 callbacks suppressed
> [    6.362061] random: procd: uninitialized urandom read (4 bytes read)
> [   10.527444] jffs2: notice: (517) jffs2_build_xattr_subsystem: complete
> building xattr subsystem, 35 of xdatum (29 unchecked, 2 orphan) and 40 of
> xref (2 dead, 0 orphan) found.
> [   10.545400] mount_root: switching to jffs2 overlay
> [   10.569375] overlayfs: upper fs does not support tmpfile.
> [   10.582122] urandom-seed: Seeding with /etc/urandom.seed
> [   10.646740] eth0: link down
> [   10.666531] procd: - early -
> [   10.669596] procd: - watchdog -
> [   11.232285] procd: - watchdog -
> [   11.235826] procd: - ubus -
> [   11.290957] random: ubusd: uninitialized urandom read (4 bytes read)
> [   11.298769] random: ubusd: uninitialized urandom read (4 bytes read)
> [   11.306209] procd: - init -
> [   12.017594] kmodloader: loading kernel modules from /etc/modules.d/*
> [   12.055647] Loading modules backported from Linux version v5.4.27-0-
> g585e0cc08069
> [   12.063425] Backport generated by backports.git v5.4.27-1-0-gf6e8852f
> [   12.106155] usbcore: registered new interface driver usbserial_generic
> [   12.113035] usbserial: USB Serial support registered for generic
> [   12.155174] xt_time: kernel timezone is -0000
> [   12.278162] usbcore: registered new interface driver pl2303
> [   12.284050] usbserial: USB Serial support registered for pl2303
> [   12.322117] urngd: v1.0.2 started.
> [   12.373325] ath10k 5.1 driver, optimized for CT firmware, probing pci device:
> 0x3c.
> [   12.395040] ath10k_pci 0000:00:00.0: enabling device (0000 -> 0002)
> [   12.401721] ath10k_pci 0000:00:00.0: pci irq legacy oper_irq_mode 1
> irq_mode 0 reset_mode 0
> [   12.531525] random: crng init done
> [   14.100472] ath10k_pci 0000:00:00.0: qca988x hw2.0 target 0x4100016c
> chip_id 0x043202ff sub 0000:0000
> [   14.110052] ath10k_pci 0000:00:00.0: kconfig debug 0 debugfs 1 tracing 0 dfs
> 1 testmode 0
> [   14.122473] ath10k_pci 0000:00:00.0: firmware ver 10.1-ct-8x-__fH-022-
> cc5313da api 2 features wmi-10.x,mfp,txstatus-noack,wmi-10.x-CT,ratemask-
> CT,txrate-CT,get-temp-CT,tx-rc-CT,cust-stats-CT,retry-gt2-CT,txrate2-acon-
> cb-CT,wmi-block-ack-CT crc32 84cbd09d
> [   14.382884] ath10k_pci 0000:00:00.0: board_file api 1 bmi_id N/A crc32
> bebc7c08
> [   15.329508] ath10k_pci 0000:00:00.0: unsupported HTC service id: 1536
> [   15.336565] ath10k_pci 0000:00:00.0: 10.1 wmi init: vdevs: 16  peers: 127  tid:
> 256
> [   15.354181] ath10k_pci 0000:00:00.0: wmi print 'P 128 V 8 T 410'
> [   15.360451] ath10k_pci 0000:00:00.0: wmi print 'msdu-desc: 1424  sw-crypt:
> 0 ct-sta: 0'
> [   15.368733] ath10k_pci 0000:00:00.0: wmi print 'alloc rem: 21000 iram: 25992'
> [   15.422690] ath10k_pci 0000:00:00.0: htt-ver 2.2 wmi-op 2 htt-op 2 cal file
> max-sta 128 raw 0 hwcrypto 1
> [   15.437026] ath10k_pci 0000:00:00.0: NOTE:  Firmware DBGLOG output
> disabled in debug_mask: 0x10000000
> [   15.547797] ath: EEPROM regdomain: 0x0
> [   15.547803] ath: EEPROM indicates default country code should be used
> [   15.547806] ath: doing EEPROM country->regdmn map search
> [   15.547817] ath: country maps to regdmn code: 0x3a
> [   15.547822] ath: Country alpha2 being used: US
> [   15.547825] ath: Regpair used: 0x3a
> [   15.617138] ath: EEPROM regdomain: 0x0
> [   15.617146] ath: EEPROM indicates default country code should be used
> [   15.617149] ath: doing EEPROM country->regdmn map search
> [   15.617161] ath: country maps to regdmn code: 0x3a
> [   15.617166] ath: Country alpha2 being used: US
> [   15.617169] ath: Regpair used: 0x3a
> [   15.629735] ieee80211 phy1: Selected rate control algorithm 'minstrel_ht'
> [   15.631175] ieee80211 phy1: Atheros AR9561 Rev:0 mem=0xb8100000, irq=2
> [   15.670721] kmodloader: done loading kernel modules from
> /etc/modules.d/*
> [   23.139094] eth0: link up (1000Mbps/Full duplex)
> [   23.151278] br-antiboks: port 1(eth0.8) entered blocking state
> [   23.157362] br-antiboks: port 1(eth0.8) entered disabled state
> [   23.163657] device eth0.8 entered promiscuous mode
> [   23.168645] device eth0 entered promiscuous mode
> [   23.174312] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
> [   23.202007] br-antiboks: port 1(eth0.8) entered blocking state
> [   23.208081] br-antiboks: port 1(eth0.8) entered forwarding state
> [   23.337472] br-guest: port 1(eth0.13) entered blocking state
> [   23.343388] br-guest: port 1(eth0.13) entered disabled state
> [   23.349514] device eth0.13 entered promiscuous mode
> [   23.390512] br-guest: port 1(eth0.13) entered blocking state
> [   23.396384] br-guest: port 1(eth0.13) entered forwarding state
> [   23.517643] br-lan: port 1(eth0.7) entered blocking state
> [   23.523288] br-lan: port 1(eth0.7) entered disabled state
> [   23.545012] device eth0.7 entered promiscuous mode
> [   23.556419] br-lan: port 1(eth0.7) entered blocking state
> [   23.562042] br-lan: port 1(eth0.7) entered forwarding state
> [   24.142480] IPv6: ADDRCONF(NETDEV_CHANGE): br-antiboks: link becomes
> ready
> [   25.938244] ath: EEPROM regdomain: 0x8242
> [   25.938252] ath: EEPROM indicates we should expect a country code
> [   25.938258] ath: doing EEPROM country->regdmn map search
> [   25.938263] ath: country maps to regdmn code: 0x37
> [   25.938268] ath: Country alpha2 being used: NO
> [   25.938271] ath: Regpair used: 0x37
> [   25.938276] ath: regdomain 0x8242 dynamically updated by user
> [   25.938348] ath: EEPROM regdomain: 0x8242
> [   25.938351] ath: EEPROM indicates we should expect a country code
> [   25.938356] ath: doing EEPROM country->regdmn map search
> [   25.938412] ath: country maps to regdmn code: 0x37
> [   25.938416] ath: Country alpha2 being used: NO
> [   25.938419] ath: Regpair used: 0x37
> [   25.938423] ath: regdomain 0x8242 dynamically updated by user
> [   29.469663] ath10k_pci 0000:00:00.0: unsupported HTC service id: 1536
> [   29.476436] ath10k_pci 0000:00:00.0: 10.1 wmi init: vdevs: 16  peers: 127  tid:
> 256
> [   29.494056] ath10k_pci 0000:00:00.0: wmi print 'P 128 V 8 T 410'
> [   29.500337] ath10k_pci 0000:00:00.0: wmi print 'msdu-desc: 1424  sw-crypt:
> 0 ct-sta: 0'
> [   29.508634] ath10k_pci 0000:00:00.0: wmi print 'alloc rem: 21000 iram: 25992'
> [   29.578049] ath10k_pci 0000:00:00.0: pdev param 0 not supported by
> firmware
> [   29.617938] br-lan: port 2(wlan0) entered blocking state
> [   29.623478] br-lan: port 2(wlan0) entered disabled state
> [   29.629269] device wlan0 entered promiscuous mode
> [   29.640443] br-lan: port 3(wlan1) entered blocking state
> [   29.646063] br-lan: port 3(wlan1) entered disabled state
> [   29.651867] device wlan1 entered promiscuous mode
> [   29.998669] IPv6: ADDRCONF(NETDEV_CHANGE): wlan1: link becomes
> ready
> [   30.005432] br-lan: port 3(wlan1) entered blocking state
> [   30.010991] br-lan: port 3(wlan1) entered forwarding state
> [   30.030686] br-antiboks: port 2(wlan1-1) entered blocking state
> [   30.036963] br-antiboks: port 2(wlan1-1) entered disabled state
> [   30.043372] device wlan1-1 entered promiscuous mode
> [   30.066895] br-antiboks: port 2(wlan1-1) entered blocking state
> [   30.073059] br-antiboks: port 2(wlan1-1) entered forwarding state
> [   30.190721] IPv6: ADDRCONF(NETDEV_CHANGE): wlan1-1: link becomes
> ready
> [   91.183136] ath10k_pci 0000:00:00.0: mac flush null vif, drop 0 queues 0xffff
> [   91.249150] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes
> ready
> [   91.255996] br-lan: port 2(wlan0) entered blocking state
> [   91.261558] br-lan: port 2(wlan0) entered forwarding state
> [   91.282793] br-antiboks: port 3(wlan0-1) entered blocking state
> [   91.289050] br-antiboks: port 3(wlan0-1) entered disabled state
> [   91.295503] device wlan0-1 entered promiscuous mode
> [   91.321901] br-antiboks: port 3(wlan0-1) entered blocking state
> [   91.328079] br-antiboks: port 3(wlan0-1) entered forwarding state
> [   91.448415] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0-1: link becomes
> ready
> 
> 
> 
> 
> Now, I could be completely wrong here.  This could very well be some hidden
> race, which just happens to be triggered by changes to inlining etc. Or
> whatever.
> 
> Proper analysis from somebody with a clue is appreciated :-)
> 
> Note that the kernel grows a lot with these two functions inlined.
> 
> 
> 
> Bjørn
> 
> 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: openpgp-digital-signature.asc
Type: application/pgp-signature
Size: 834 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20200403/a19eaec5/attachment.sig>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


More information about the openwrt-devel mailing list