Now when we have both 5.10 and 5.15 in a mix.
What and where is the control to the build system what kernel is built?
This is target wide but you can overrule this per subtarget in its own Makefile. Or you can select the testing kernel in make menuconfig.
$ cat target/linux/realtek/Makefile
# SPDX-License-Identifier: GPL-2.0-only
include $(TOPDIR)/rules.mk
ARCH:=mips
BOARD:=realtek
BOARDNAME:=Realtek MIPS
DEVICE_TYPE:=basic
FEATURES:=ramdisk squashfs
SUBTARGETS:=rtl838x rtl839x rtl930x rtl931x
KERNEL_PATCHVER:=5.10
KERNEL_TESTING_PATCHVER:=5.15
Thank you for clarifying😃!
It has also turned out last days that my brute force all in one test rig wrt3200acm also has landed in this kernel selection limbo.
Just switch the cortexa9 subtarget to 5.15 yourself
.
realtek: timer driver: activate for RTL930x devices
is what I do (it links to the current hash, but a force-push could change that ![]()
So, I've been building, fixing, rebasing whilst cleaning lots of stuff. I created a new branch, realtek-wip, where I was doing most of this work, to not interfere too much.
Things I have figured out/fixed:
- Moved to 5.15. 5.10 is dead to me
- Added nearly all of plappermaul's eth refactoring stuff. I do get a nice ~5 - 10% improvement on iperf. (about 160Mbit with 4 threads, ~164 with a single thread).
- Kobi's patches are more refined
- 10/100 mbit mode working
- mdelay -> msleep to block less
- new clock and timer patches from plappermaul (turns out, I had the wrong address for 2 of the 5 timers in the dts ...
- the new mtd-concat stuff which, for vendor uboots, maximizes the storage space

DAC < 1m cables (well the microtik one I have) seems to work, 2.5G seems to work, but can't prove this yet as I have nothing that's 2.5G
Should get me a 10G usb dongle for testing ...
What's not working yet, is SMP, I'm thinking this is Kconfig related; but not sure yet what or where. This causes the switch to not boot up due to watchdog timeouts
Speaking of watchdog timeouts, or rather slow behavior during boot, I'm still seeing this occasionally, but once booted, things seem fine (running iperf3 for extended time is fine).
I've pushed the SMP-less stuff to https://gitlab.com/olliver/openwrt/openwrt/-/commits/dev/realtek-dev/ where I hope to get some ttesting feedback, mostly on rtl930x but also on rtl839x and rtl838x. rtl931x is welcome too, but this target is slowly drifting into derelict territory, as it's next to untestable. As I've built so many images and done so many iterations, I have lost track if this works as flawless as I would like. Without the timer stuff, I don't see those weird stalls, so I wonder if those are on rtl83xx as well. Best noticed during boot with single core (due to the watchdog timeout) and during dropbear key generation, as the shell won't respond (well).
What have I tested? Well just iperf3 really. Which isn't a lot. As I wrote above, I still can't get the switch to work as a switch with the initramfs image, probably related to port isolation, @Borromini mentioned this in the past, but I have forgotten, so probably have to scroll up somewhere to see his post ![]()
Since I know to little of dsa and the commands, that's a learning curve for sure.
I'm mostly happy with the current state of the patches, though some birger patches probably still need quite a lot of work. Oh well, such is life
baby steps.
To which brings me to my last point, getting this stuff merged. This relies on testing (of incremental patches? keeping watch at my MR's on github I suppose ...) and actually reviewed and stuff merged.
For this, I cry and plead louder now @svanheule I really need you. Feel free to also look/use cherry-pick and merge stuff from my tree
or, at least on the open MR's. I have almost ~170 patches now, and the more I dick around with it, the more we delay merging, the more patches it'll become. More patches, could also mean that at some point, I'll just dump the branch with 1 major MR, and leave you guys to it
so we have to put in some miles here.
Sadly, while it's 170 patches, if you compare things to 3 months ago, only very very little changes are visible on the surface ![]()
Next steps for me, get stuff merged
fix the smp stuff, checkout the timer delays and start migrating things to regmaps
which would then allow us to drop most of the duplicated code, and try to write simpler drivers that target all devices.
Also, happy hollidays
![]()
Great work!
Did you mean DAC?
I'm working for migration to MIPS generic in Linux Kernel.
The following also contains a experimental fix for the issue in SMP environment...
tested on:
- Switch-M24eG PN28240K (RTL8382M)
- Switch-M48eG PN28480K (RTL8393M)
After reverting the firmware to original, the switch acting weird. None of the ports can go over 300 Mbps. I have tried resetting via the pin. Does anyone know how I can get my old performance back?
While I strongly applaud that effort, and hope to get somewhere with that quickly, lets also try to work together to a) avoid duplication of work, b) avoid horrible rebases. Look at my -dev branch (doesn't include the smp stuff for now) to ensure we are 'closer together'.
This deffinatly requires aligning with @svanheule cause I really don't wanna spend another 2 days rebasing and fixing things if we can avoid it.
If you are referring to https://github.com/musashino-build/openwrt/commit/b23474d3740d49d908bbe4a899d6d92a875e4945, sadly, it doesn't do much. I tried that, and it made the issue worse/more apparant. But with Jan's patches, this may actually something ... I'll try again and pull your other stuff into my tree if I can too. I do see some things that we probably don't want to do in terms of file movement ... just a thought.
The timer seems to be slightly more reliable, but could be imagination too ... idk; I got jan's patches in now too.
bit light on the details there. Probably something else holding you back maybe?
Our activity hours are different due to different time zones, I am currently working on several devices (in realtek and other targets) and can't focus on realtek. So I think it would be better for us to post an overview of own changes, what indivisuals want, etc. in advance and make adjustments based on that.
my working branch: https://github.com/musashino-build/openwrt/tree/tgtbump/rtk_5.15_genmips_files
summery:
- fix interrupt affinity issue on otto timer
- migrate to upstreamed platform support in MIPS generic in Linux (MACH_REALTEK_RTL)
- remove downstream platform support
- update upstreamed platform support
- update platform dependency of drivers
- switch to upstreamed platform support
Notes:
-
interrupt affinity fix
- Swtich-M48eG PN28480K (RTL8393M) stucks while booting with current master (5.10, 5.15 --> log)
- this can be solved by replacing to
irq_force_affinityfromirq_set_affinityin otto timer
-
MIPS generic migration
- move some drivers to files/ from files-5.1x/
- no or little differences between 5.10 and 5.15
- to reduce code duplication
- provide SoC families as selectable option (default: rtl838x)
- board specific SMP ops registration support
- without this, realtek specific SMP ops cannot be registered on the current MIPS generic...
- use generic earlycon instead of platform earlycon
- move some drivers to files/ from files-5.1x/
Well I have 160 patches, which are not so easy to categorize as you do; they are a bit 'all over the place' ![]()
got that in my branch
I saw those patches, but best to drop those. The upstream code is a mess, and MACH_ hasn't beent he 'common' prefix for a while afaik, and REALTEK_RTL is ... well just a bit stupid. RTL is the abbreviation for realtek, so now we have realtek-realtek. Also, I think MACH is more for 'pre-dts' times?
I think that's not a good idea, While some files might be 'identical' between the two kernels, it makes things very hard to manage. I understand that currently this is just about documentation, but any kernel version related change, could break this. So yes, this introduces code duplication, but that's okay if it means we can keep things more manageable. What if our next experimental kernel is 6.0 and half those files are not relevant anymore? It also makes it hard to figure out which files to use.
That sounds like a good idea, I did something along the lines as as well, actually I made it so we have a single kernel for all out targets (where applicable) https://gitlab.com/olliver/openwrt/openwrt/-/commit/201252b974af8f40bce7d97afbe676d73d3b7037.
This is the most interesting patch to me, as I hope it fixes my current RCU stalls.
It did! I think there's still a bug with relation to the timers, but with the SMP support, this bug gets tucked away as the second core can handle the timeouts.
I'll try to destil the generic MIPS patches and put them in my tree isolated from the rest, as there's some other good stuff in there too like:
for example.
Btw, Your commit (https://github.com/musashino-build/openwrt/commit/d89d378d410de6e1a19f6429c0a7e5c8ca873785) doesn't say, but why did you move the load address? What's the purpose/point?
That's because the load address used in OpenWrt is different from the upstream one. This patch is just correcting that, bringing it more in line with other upstream MIPS platforms.
GS310TP isn't happy with the latest commits
BOOT Loader Version 1.0.0.1 (2018-05-18 10:58:12 UTC)
Board: RTL838x CPU:500MHz LXB:200MHz MEM:300MHz
[NGC] Init SDK HW Profile & RTCORE
RTCORE Driver Module Initialize
IOAL init
Hardware-profile probe
GPIO probe (unit 0): (found)
GPIO Init
RTL8231 probe (unit 0): (found)
RTL8231 init (unit 0)
[NGC] Set Multiplex Mode
[NGC] Set GPIO dev 1 dir IN pin 6 value 1
[NGC] Set GPIO dev 1 dir IN pin 7 value 1
[NGC] Set GPIO dev 1 dir OUT pin 8 value 0
[NGC] Set GPIO dev 1 dir OUT pin 9 value 0
[NGC] Set GPIO dev 1 dir OUT pin 10 value 0
[NGC] Set GPIO dev 1 dir IN pin 13 value 1
[NGC] Set GPIO dev 1 dir IN pin 14 value 1
[NGC] Set GPIO dev 1 dir OUT pin 20 value 1
[NGC] Set GPIO dev 1 dir OUT pin 21 value 1
[NGC] Set GPIO dev 1 dir OUT pin 23 value 1
[NGC] Set GPIO dev 1 dir OUT pin 24 value 1
[NGC] Set GPIO dev 1 dir OUT pin 25 value 1
[NGC] Set GPIO dev 1 dir OUT pin 26 value 1
[NGC] Set GPIO dev 1 dir OUT pin 27 value 1
[NGC] Set GPIO dev 1 dir OUT pin 28 value 1
[NGC] Set GPIO dev 1 dir OUT pin 29 value 1
[NGC] Set GPIO dev 1 dir OUT pin 30 value 1
[NGC] Set GPIO dev 1 dir OUT pin 31 value 1
[NGC] Set GPIO dev 1 dir OUT pin 32 value 0
[NGC] Set GPIO dev 1 dir OUT pin 33 value 0
[NGC] Set GPIO dev 1 dir OUT pin 34 value 1
[NGC] Set GPIO dev 1 dir OUT pin 35 value 1
[NGC] Set GPIO dev 1 dir OUT pin 36 value 1
[NGC] Enable 8231
Hardware-profile init (GS310TP)
I2C probe (unit 0)
I2C init (unit 0)
NIC probe (unit 0)
Loader RTNIC Driver Module Initialize
CPU : 500 MHz
RAM : 128 MB
FLASH: 32 MB
Model: GS310TP
MAC :
Hit Esc key to stop autoboot: 0
## Booting image from partition ... 0
## Booting kernel from Legacy Image at 81000000 ...
Version: MIPS OpenWrt Linux-5.15.85
Created: 2022-12-28 21:44:10 UTC
Data Size: 2441126 Bytes = 2.3 MB
Checksum ... OK
Uncompressing ... OK
Starting kernel ...
[ 0.000000] Linux version 5.15.85 (*@*) (mips-openwrt-linux-musl-gcc (OpenWrt GCC 12.2.0 r21521-7fb32285d5) 12.2.0, GNU ld (GNU Binutils) 2.39) #0 Wed Dec 28 21:44:10 2022
[ 0.000000] RTL838X model is 83806800
[ 0.000000] SoC Type: RTL8380
[ 0.000000] printk: bootconsole [early0] enabled
[ 0.000000] CPU0 revision is: 00019070 (MIPS 4KEc)
[ 0.000000] MIPS: machine is Netgear GS310TP v1
[ 0.000000] Initrd not found or empty - disabling initrd
[ 0.000000] Using appended Device Tree.
[ 0.000000] Primary instruction cache 16kB, VIPT, 4-way, linesize 16 bytes.
[ 0.000000] Primary data cache 16kB, 2-way, VIPT, cache aliases, linesize 16 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] 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: 32480
[ 0.000000] Kernel command line: console=ttyS0,115200
[ 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] mem auto-init: stack:off, heap alloc:off, heap free:off
[ 0.000000] Memory: 120256K/131072K available (6089K kernel code, 606K rwdata, 1332K rodata, 1244K init, 209K bss, 10816K reserved, 0K cma-reserved)
[ 0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[ 0.000000] NR_IRQS: 256
[ 0.000000] rtl83xx-clk: initialized, CPU 500 MHz, MEM 300 MHz (8 Bit DDR3), LXB 200 MHz
[ 0.000000] clocksource: realtek_otto_timer: mask: 0xfffffff max_cycles: 0xfffffff, max_idle_ns: 38225208801 ns
[ 0.000000] sched_clock: 28 bits at 3125kHz, resolution 320ns, wraps every 42949672800ns
[ 0.000000] Calibrating delay loop... 498.89 BogoMIPS (lpj=2494464)
[ 0.000000] pid_max: default: 32768 minimum: 301
[ 0.000000] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[ 0.000000] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[ 0.000000] dyndbg: Ignore empty _ddebug table in a CONFIG_DYNAMIC_DEBUG_CORE build
[ 0.000000] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[ 0.000000] futex hash table entries: 256 (order: -1, 3072 bytes, linear)
[ 0.000000] pinctrl core: initialized pinctrl subsystem
[ 0.000000] NET: Registered PF_NETLINK/PF_ROUTE protocol family
[ 0.000000] rtl83xx-clk clock-controller: rate setting enabled, CPU 300-625 MHz, MEM 300-300 MHz, LXB 200-200 MHz, OVERCLOCK AT OWN RISK
[ 0.000034] clocksource: Switched to clocksource realtek_otto_timer
[ 0.009410] NET: Registered PF_INET protocol family
[ 0.015500] IP idents hash table entries: 2048 (order: 2, 16384 bytes, linear)
[ 0.024964] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 4096 bytes, linear)
[ 0.034360] Table-perturb hash table entries: 65536 (order: 6, 262144 bytes, linear)
[ 0.043005] TCP established hash table entries: 1024 (order: 0, 4096 bytes, linear)
[ 0.051589] TCP bind hash table entries: 1024 (order: 0, 4096 bytes, linear)
[ 0.059383] TCP: Hash tables configured (established 1024 bind 1024)
[ 0.066971] UDP hash table entries: 256 (order: 0, 4096 bytes, linear)
[ 0.074354] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes, linear)
[ 0.082851] NET: Registered PF_UNIX/PF_LOCAL protocol family
[ 0.099200] workingset: timestamp_bits=14 max_order=15 bucket_order=1
[ 0.115608] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[ 0.122129] jffs2: version 2.2 (NAND) (SUMMARY) (ZLIB) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[ 0.138078] pinctrl-single 1b001000.pinmux: 32 pins, size 4
[ 0.145047] pinctrl-single 1b00a000.pinmux: 32 pins, size 4
[ 0.153396] Probing RTL8231 GPIOs
[ 0.157047] rtl8231_init called, MDIO bus ID: 31
[ 0.265136] Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled
[ 0.274444] printk: console [ttyS0] disabled
[ 0.279241] 18002000.uart: ttyS0 at MMIO 0x18002000 (irq = 31, base_baud = 12500000) is a 16550A
[ 0.289088] printk: console [ttyS0] enabled
[ 0.289088] printk: console [ttyS0] enabled
[ 0.298450] printk: bootconsole [early0] disabled
[ 0.298450] printk: bootconsole [early0] disabled
[ 0.310655] 18002100.uart: ttyS1 at MMIO 0x18002100 (irq = 30, base_baud = 12500000) is a 16550A
[ 1.072788] brd: module loaded
[ 1.088317] spi-nor spi0.0: w25q256 (32768 Kbytes)
[ 1.093938] 7 fixed-partitions partitions found on MTD device spi0.0
[ 1.101283] OF: Bad cell count for /soc/spi@1200/flash@0/partitions
[ 1.108374] OF: Bad cell count for /soc/spi@1200/flash@0/partitions
[ 1.116001] Creating 7 MTD partitions on "spi0.0":
[ 1.121527] 0x000000000000-0x0000000e0000 : "u-boot"
[ 1.134647] 0x0000000e0000-0x0000000f0000 : "u-boot-env"
[ 1.143492] 0x0000000f0000-0x000000100000 : "u-boot-env2"
[ 1.157396] 0x000000100000-0x000000200000 : "jffs"
[ 1.165768] 0x000000200000-0x000000300000 : "jffs2"
[ 1.179097] 0x000000300000-0x000001180000 : "firmware"
[ 1.188915] 2 uimage-fw partitions found on MTD device firmware
[ 1.195735] Creating 2 MTD partitions on "firmware":
[ 1.201457] 0x000000000000-0x000000260000 : "kernel"
[ 1.214878] 0x000000260000-0x000000e80000 : "rootfs"
[ 1.223307] mtd: setting mtd7 (rootfs) as root device
[ 1.231808] 1 squashfs-split partitions found on MTD device rootfs
[ 1.238805] 0x0000005e0000-0x000000e80000 : "rootfs_data"
[ 1.247791] 0x000001180000-0x000002000000 : "runtime2"
[ 1.280482] Probing RTL838X eth device pdev: 82090400, dev: 82090410
[ 1.338009] Found SoC ID: 8380: RTL8380, family 8380
[ 1.343832] rtl8380_init_mac
[ 1.347114] Using MAC 000000e04c000000
[ 1.446104] Error setting up netdev, freeing it again.
[ 1.452020] rtl838x-eth: probe of 1b00a300.ethernet failed with error -5
[ 1.460563] i2c_dev: i2c /dev entries driver
[ 1.472083] NET: Registered PF_INET6 protocol family
[ 1.499857] Segment Routing with IPv6
[ 1.504376] In-situ OAM (IOAM) with IPv6
[ 1.509016] NET: Registered PF_PACKET protocol family
[ 1.515728] 8021q: 802.1Q VLAN Support v1.8
[ 1.538229] VFS: Mounted root (squashfs filesystem) readonly on device 31:7.
[ 1.560286] Freeing unused kernel image (initmem) memory: 1244K
[ 1.566957] This architecture does not have kernel memory protection.
[ 1.574303] Run /sbin/init as init process
[ 1.578912] with arguments:
[ 1.582313] /sbin/init
[ 1.585370] with environment:
[ 1.588873] HOME=/
[ 1.591590] TERM=linux
[ 2.529608] init: Console is alive
[ 2.534579] init: - watchdog -
[ 3.097661] kmodloader: loading kernel modules from /etc/modules-boot.d/*
[ 3.163975] Reserved instruction in kernel code[#1]:
[ 3.169572] CPU: 0 PID: 238 Comm: kworker/u2:10 Not tainted 5.15.85 #0
[ 3.176874] Workqueue: events_unbound deferred_probe_work_func
[ 3.183432] $ 0 : 00000000 00000001 807ef838 00000000
[ 3.189311] $ 4 : 82090800 00000000 82677cb4 806c4f0c
[ 3.195189] $ 8 : 00000024 802ee618 00000114 00000000
[ 3.201069] $12 : 00000001 8266cf89 8266cf8a fffffffc
[ 3.206947] $16 : 82090810 807cfbe4 807cfbe4 80940000
[ 3.212825] $20 : 00000003 8200535c 82007005 82516cc0
[ 3.218704] $24 : 00000000 00000020
[ 3.224581] $28 : 82676000 82677d28 82006000 80346658
[ 3.230460] Hi : e6545baf
[ 3.233680] Lo : a4644567
[ 3.236892] epc : 807fbfa0 0x807fbfa0
[ 3.241187] ra : 80346658 platform_probe+0x50/0xa4
[ 3.246854] Status: 10107c03 KERNEL EXL IE
[ 3.251554] Cause : 10800028 (ExcCode 0a)
[ 3.256033] PrId : 00019070 (MIPS 4KEc)
[ 3.260414] Modules linked in: gpio_button_hotplug crc32c_generic
[ 3.267235] Process kworker/u2:10 (pid: 238, threadinfo=(ptrval), task=(ptrval), tls=00000000)
[ 3.276854] Stack : 82090810 00000000 807cfbe4 80940000 00000003 82090810 00000000 80344028
[ 3.286278] 82007005 803443a0 82007005 803e7fc4 8074e8c0 80940000 807cfbe4 82090810
[ 3.295703] 80940000 8034442c 807cfbe4 82090810 807d0000 80346700 825c1f80 00000001
[ 3.305128] 807cfbe4 82677e00 82090810 807d0000 8200535c 80344a64 00000100 00000000
[ 3.314552] 825c1f80 800263d8 00000000 00000000 82677e00 80344994 82090854 80341cac
[ 3.323978] ...
[ 3.326727] Call Trace:
[ 3.326739]
[ 3.331117] [<80344028>] really_probe.part.0+0xac/0x354
[ 3.336977] [<803443a0>] __driver_probe_device+0xd0/0x110
[ 3.343023] [<803e7fc4>] of_match_node+0x48/0xc4
[ 3.348208] [<8034442c>] driver_probe_device+0x4c/0x154
[ 3.354059] [<80346700>] platform_match+0x54/0xd8
[ 3.359342] [<80344a64>] __device_attach_driver+0xd0/0x15c
[ 3.365490] [<800263d8>] kernel_clone+0xdc/0x348
[ 3.370674] [<80344994>] __device_attach_driver+0x0/0x15c
[ 3.376727] [<80341cac>] bus_for_each_drv+0x70/0xb0
[ 3.382196] [<803447a4>] __device_attach+0xdc/0x194
[ 3.387666] [<8002679c>] kernel_thread+0x70/0x7c
[ 3.392840] [<800560d4>] check_preempt_wakeup+0x140/0x2c0
[ 3.398904] [<80342f7c>] bus_probe_device+0x9c/0xb8
[ 3.404367] [<8003bff4>] call_usermodehelper_exec_async+0x0/0x174
[ 3.411191] [<803434e0>] deferred_probe_work_func+0x94/0xd4
[ 3.417437] [<8003c1e4>] call_usermodehelper_exec_work+0x7c/0xb8
[ 3.424160] [<8003f128>] process_one_work+0x254/0x4a0
[ 3.429832] [<8003f8e4>] worker_thread+0x16c/0x5b0
[ 3.435203] [<8003f778>] worker_thread+0x0/0x5b0
[ 3.440381] [<8003f778>] worker_thread+0x0/0x5b0
[ 3.445553] [<800475f8>] kthread+0x134/0x13c
[ 3.450367] [<800474c4>] kthread+0x0/0x13c
[ 3.454969] [<800474c4>] kthread+0x0/0x13c
[ 3.459572] [<80001ad8>] ret_from_kernel_thread+0x14/0x1c
[ 3.465642]
[ 3.467312] Code: 00000000 00000000 00000000 <00000a94> 00000a20 00001d30 00001765 00001d34 0000173d
[ 3.478303]
[ 3.480125] ---[ end trace d8288b66616b053b ]---
[ 3.485333] Kernel panic - not syncing: Fatal exception
[ 3.491176] Rebooting in 1 seconds..
BOOT Loader Version 1.0.0.1 (2018-05-18 10:58:12 UTC)
I saw those patches, but best to drop those.
So, are you against migrating to MIPS generic (arch/mips/generic/) ?
The upstream code is a mess, and
MACH_hasn't beent he 'common' prefix for a while afaik, andREALTEK_RTLis ... well just a bit stupid.RTLis the abbreviation for realtek, so now we have realtek-realtek. Also, I think MACH is more for 'pre-dts' times?
I think the upstream code in MIPS generic (arch/mips/generic/) is "generic", but not messy.
Indeed, MACH_ prefix may not be suitable for DT based platform. However, it's just a name issue, and it's not related to the actual operation, so I don't really care. And, I think RTL means a prefix in model name of SoCs that the platform is targeting. (It's RTL, not RealTeK or ReaLTek) However, I don't know how the name was decided, so I don't know exactly.
move some drivers to files/ from files-5.1x/
I think that's not a good idea, ...
Indeed, I reverted moving drivers: https://github.com/musashino-build/openwrt/tree/tgtbump/rtk_5.15_genmips
board specific SMP ops registration support
It did! ...
You've picked my commit to your repository, but the commit is for MIPS generic and has no effect for your tree...
I was thinking about that, and without doing any research (so relying on your collective knowledge here), I know that upstream Linux isn't to conservative with memory. E.g. I know that for x86(_64) they are happy to skip the first few MB's because on some broken BIOS implementations it breaks stuff (sleep, hibernate, boot) because the BIOS overwrites stuff in the first few megs.
OpenWrt has the luxury in being more fine grained controlled, without wasting any memory AND is platform specific. So is this still a good idea then, to skip the kernel into a later bit, or are modern kernels MMU's advanced enough that they can reuse this block of memory?
Not at all, I'm actually replacing one of my patches with you work
I'm much in favor of MIPS generic ![]()
The upstream code however is a little messy, not a mess, granted.
The current symbol name ... just happened without much thought I feel. But as per normal in our field, naming things is the hardest ![]()
I did, and your IRQ affinity patch, however I used the IRQ affinity patch before, and still caused crashes. But looking at the code now, it's clear it shouldn't affect me.
Did you pull this from upstream? If so, can you do the proper patch format? (git format-patch). Ansuel and I just recently fixed all existing patches to use proper patch format, so that it can also be re-applied with git am. If it is 100% your code, did you submit it upstream? What was their take? Ideally, if it is merged upstream, it should go into backport-5.15 of course.
I see you're running 5.15 (thanks for testing!) at commit 7fb32285d543 ("mediatek: redmi-ax6000: drop cs-gpios"). There appear to be multiple issues (default ethernet MAC address, ethernet driver not loading, kmod crashing the kernel). Can you start a new thread, or open a bug report, to discuss this in more detail?
Fair point on the memory usage, although it's "only" 1MiB of potentially wasted space. The load address choice goes back to the introduction of MIPS_GENERIC (kernel commit eed0eabd12ef "MIPS: generic: Introduce generic DT-based board support"). The same address is used on Malta for example, but that goes back to times-before-git. Don't know if that block of memory is ever reclaimed though. Maybe (i.e. very roughly) one could check by comparing free on builds that only differ on the load address?