Xrx200 IRQ balancing between VPEs

This post says the interrupts are not evenly distributed on xrx200. It seems the 4.14.93 openwrt kernel doesn't support the interrupt controller for the second VPE of xrx200, this seemed weird to me, so I dug on internet and I've found a kernel here which supports it. There was no devicetree with base address of the second icu, but the GPL sources from TP-W9980 contains a kernel 2.6 header (located at GPL_TD-W9980/lantiq/target/linux/ltqcpe/files/include/asm-mips/ifx/vr9/vr9.h) with hardcoded base address:

#define IFX_ICU_VPE1                            (KSEG1 | 0x1F880300)

The base address was confirmed by an address space scan (devmem).

These informations combines in attached files. Basically interrupt functions require a check for which CPU they run on and use a correct base address. There were some bugfixes in the 3.10 kernel, which are missing in openwrt (but it seems to work without them). There are spinlocks too but the system seems to work without them (maybe the new kernels have implicit locking? anyway race conditions would appeared only during big interrupt load, which I didn't test).

Other thing required is the enable of the second VPE (core) interrupts. The function vsmp_init_secondary() in arch/mips/kernel/smp-mt.c seems to activate only IP0, IP1, IP6 and IP7, which seems it is not sufficient to get the interrupts to MIPS VPE core, so I decided to enable them all by:

change_c0_status(ST0_IM, STATUSF_IP0 | STATUSF_IP1 | STATUSF_IP2 | STATUSF_IP3 | STATUSF_IP4 | STATUSF_IP5 | STATUSF_IP6 | STATUSF_IP7);

It seems v3.10 kernel did use mips_gic_present() part of the if-else condition, but it seems it is not compatible with 4.14 kernel code and the part doesn't enable IP0 and IP1 which are (IMO) IPI calls on xrx200 (first VPE gets them enabled in the interrupt driver). The second change is and irrelevant fix (seems to be already in current vanilla kernel) for a correct VPE numbering in /proc/cpuinfo.

Last part of the change is the devicetree arch/mips/boot/dts/vr9.dtsi:

                icu0: icu0@80200 {
                        #interrupt-cells = <1>;
                        interrupt-controller;
                        compatible = "lantiq,icu";
                        reg = <0x80200 0x28
                                0x80228 0x28
                                0x80250 0x28
                                0x80278 0x28
                                0x802a0 0x28>;
                };

//second ICU for irq affinity/balancing
                icu1: icu1@80300 {
                        #interrupt-cells = <1>;
                        compatible = "lantiq,icu1";
                        reg = <0x80300 0x28
                                0x80328 0x28
                                0x80350 0x28
                                0x80378 0x28
                                0x803a0 0x28>;
                };

Can somebody test if the balancing it works? I did it successfully on my TP-W9980B. Ideas for a better solution are always welcomed too ;-).

# cat /proc/interrupts 
           CPU0       CPU1       
  0:      14066       9147      MIPS   0  IPI_resched
  1:        841       1046      MIPS   1  IPI_call
  7:     333849     332983      MIPS   7  timer
  8:          0          0      MIPS   0  IPI call
  9:          0          0      MIPS   1  IPI resched
 22:      25251          1       icu  22  spi_rx
 23:       3145          1       icu  23  spi_tx
 24:          0          0       icu  24  spi_err
 62:          0       7478       icu  62  1e101000.usb, dwc2_hsotg:usb1
 63:          1      10848       icu  63  mei_cpe
 72:          0      12886       icu  72  vrx200_rx
 73:      15506          0       icu  73  vrx200_tx
 75:          0          0       icu  75  vrx200_tx_2
 91:          0          0       icu  91  1e106000.usb, dwc2_hsotg:usb2
112:       3325          0       icu 112  asc_tx
113:          0        123       icu 113  asc_rx
114:          0          0       icu 114  asc_err
126:          0          0       icu 126  gptu
127:          0          0       icu 127  gptu
128:          0          0       icu 128  gptu
129:          0          0       icu 129  gptu
130:          0          0       icu 130  gptu
131:          0          0       icu 131  gptu
144:          0          0       icu 144  ath9k
161:          0          0       icu 161  ifx_pcie_rc0

P.S. There was SMTC mode, where kernel managed any TC as a single core. But it was removed somewhere in v3.15. With SMTC you could have 4 cores in your xrx200 device :smiley: (but there would be a higher latency ofc...). In my TD-W9980B only two TC are used (mapped to 2 VPEs), so the second 2 TC are disabled and unused. Maybe on other boards the second VPE is using them for some proprietary DSP operations (as I read in old topics here). The compatibility of the balancing should be tested on such boards too.

irq.c, smp-mt.c, vr9.dtsi

2 Likes

Thank you for dealing with it.

I try to make an build for the Easybox 904xDSL.
But how can i implement these files or what are the correct paths ?
At the moment i try this:

mkdir -p ./target/linux/lantiq/files-4.14/arch/mips/lantiq
cp -vf "$DOWNLOAD_DIR/irq.c" ./target/linux/lantiq/files-4.14/arch/mips/lantiq/irq.c
mkdir -p ./target/linux/lantiq/files-4.14/arch/mips/kernel
cp -vf "$DOWNLOAD_DIR/smp-mt.c" ./target/linux/lantiq/files-4.14/arch/mips/kernel/smp-mt.c
mkdir -p ./target/linux/lantiq/files-4.14/arch/mips/boot/dts
cp -vf "$DOWNLOAD_DIR/vr9_dtsi.txt" ./target/linux/lantiq/files-4.14/arch/mips/boot/dts/vr9.dtsi

(It will take a while until I'm done and testing)

I have a TD-W8980 with me. I use it only for torrent downloads and it sends data wirelessly to my main router, which is a BT HomeHub 5A, and its attached 500Gb drive. I can spare my W8980 for testing for a few days. I want to test because this one crashes a lot if my torrents are downloading at more than 400 KiBytes/s and/or there are multiple active at the same time. I have a 8mb/1mb ADSL connection for now and Wireless transfer is around 3-4 MiBytes/s. Doing anything that can help make xrx200 devices maintain better performance is better than nothing.

So I would like to know how can I test your files? I always build my own firmware through Image Builder. But I dont think that I can use these files in Image Builder. Do I need to clone the whole OpenWrt source for this? Can I just use the SDK instead?

Dammed it ends up with:

pplying /opt/build/owrt/target/linux/lantiq/patches-4.14/0002-gpio-stp-xway-Implement-get-callback.patch using plaintext:
patching file drivers/gpio/gpio-stp-xway.c

Applying /opt/build/owrt/target/linux/lantiq/patches-4.14/0004-MIPS-lantiq-add-atm-hack.patch using plaintext:
patching file arch/mips/include/asm/mach-lantiq/lantiq_atm.h
patching file arch/mips/include/asm/mach-lantiq/lantiq_ptm.h
patching file arch/mips/lantiq/irq.c
Hunk #1 FAILED at 14 (different line endings).
Hunk #2 FAILED at 96 (different line endings).
2 out of 2 hunks FAILED -- saving rejects to file arch/mips/lantiq/irq.c.rej
patching file arch/mips/mm/cache.c
patching file include/uapi/linux/atm.h
patching file net/atm/proc.c
Patch failed!  Please fix /opt/build/owrt/target/linux/lantiq/patches-4.14/0004-MIPS-lantiq-add-atm-hack.patch!
Makefile:23: recipe for target '/opt/build/owrt/build_dir/target-mips_24kc_musl/linux-lantiq_xrx200/linux-4.14.95/.prepared_2df2a6e15d6ed78a1a41ed71570f284e' failed
make[4]: *** [/opt/build/owrt/build_dir/target-mips_24kc_musl/linux-lantiq_xrx200/linux-4.14.95/.prepared_2df2a6e15d6ed78a1a41ed71570f284e] Error 1
make[4]: Leaving directory '/opt/build/owrt/target/linux/lantiq'
Makefile:13: recipe for target 'compile' failed
make[3]: *** [compile] Error 2
make[3]: Leaving directory '/opt/build/owrt/target/linux'
time: target/linux/compile#34.20#15.50#124.59
target/Makefile:23: recipe for target 'target/linux/compile' failed
make[2]: *** [target/linux/compile] Error 2
make[2]: Leaving directory '/opt/build/owrt'
target/Makefile:18: recipe for target '/opt/build/owrt/staging_dir/target-mips_24kc_musl/stamp/.target_compile' failed
make[1]: *** [/opt/build/owrt/staging_dir/target-mips_24kc_musl/stamp/.target_compile] Error 2
make[1]: Leaving directory '/opt/build/owrt'
/opt/build/owrt/include/toplevel.mk:216: die Regel für Ziel „world“ scheiterte
make: *** [world] Fehler 2

but as i understand it make only sense in combination with:

right ?

1 Like

My steps for my workbuild, same as on wiki:

git clone https://github.com/openwrt/openwrt.git
cd openwrt
./scripts/feeds update -a
./scripts/feeds install -a
make V=s menuconfig
make V=s

Now there should be full kernel tree located there: build_dir/target-mips_24kc_musl/linux-lantiq_xrx200/linux-4.14.93

Now the irq.c file is located build_dir/target-mips_24kc_musl/linux-lantiq_xrx200/linux-4.14.93/arch/mips/lantiq/irq.c , the smp-mt.c file is located build_dir/target-mips_24kc_musl/linux-lantiq_xrx200/linux-4.14.93/arch/mips/kernel/smp-mt.c ... it depends on the current build (the current will have probably a newer kernel, but you get the idea ...). The DTS file is located build_dir/target-mips_24kc_musl/linux-lantiq_xrx200/linux-4.14.93/arch/mips/boot/dts/vr9.dtsi it should be fine to just overwrite them with the versions from pastebin. You can always do a diff.

Now when you redo:

make V=s

you should get the updated images targets/lantiq/xrx200 and build_dir/target-mips_24kc_musl/linux-lantiq_xrx200 . The is probably easier way to do that, but I didn't have yet a time to learn openwrt patching system and I don't want to flash every single rebuild into the SPI flash.

No it doesn't have to be combined, balancing can put RX interrupt on one core and TX interrupt on the second core (concurrent interrupts doesn't have to wait on each other). The DMA burst change will just use a more optimal value for DMA (IMO, the tplink kernel source does it ...), which means DMA doesn't need to ask for every single byte, it just ask for a block of data.

I tried to compile the source but it fails around compiling gdb in toolchain. I'm not sure if I can continue any further from it unless the error gets resolved. I'll post the error log here once I have my laptop with me in a few hours maybe. In the meantime if someone else is able to compile source successfully then maybe please share the firmware for Tp-Link TD-W8980 here and I can then test it how it works.

Running v18.06.1 I get 3 mb/s from this router and 5 mb/s to this router on LAN. Tested through iperf and netcat.

Update: Correct me if I'm wrong but I think that two of the above functions are already available in Kernel config but are not available by default. Run make kernel_menuconfig and go to Kernel Type for the options.
2019-01-28

I have make a kernelpatch with this script:

#!/bin/bash

CWD=$(pwd)
BUILD_D=/mnt/mapper/sda3/build # the build directory change if need
RESULT_ROOT="$CWD"
RESULT_D="$RESULT_ROOT"
DL_D="$CWD/Xrx200-IRQ-balancing-between-VPEs-files"
PATCHES_D="$BUILD_D/create_kpatches_irqbalancing" 

test -d "$DL_D" || mkdir -p "$DL_D"
cd "$DL_D"
wget -O irq.c https://pastebin.com/raw/1Bv9abyB
wget -O smp-mt.c https://pastebin.com/raw/Mvx3Cu3b
wget -O vr9_dtsi.txt https://pastebin.com/raw/dYqHpaCz

rm -rf "$PATCHES_D" # delete the build directory first if needed

test -d "$PATCHES_D" || mkdir -p "$PATCHES_D"
cd "$PATCHES_D"
git clone https://git.openwrt.org/openwrt/openwrt.git openwrt
cd ./openwrt
git checkout master

make menuconfig # choice lantiq / xrx200
make target/linux/{clean,prepare} V=s
KVER=$(find ./build_dir/target-mips_24kc_musl/linux-lantiq_xrx200 -maxdepth 1 -mindepth 1 | grep "linux-" | rev | cut -d- -f1 | rev)

rm -r ../a
mkdir -p ../a/arch/mips/lantiq
cp -vf ./build_dir/target-mips_24kc_musl/linux-lantiq_xrx200/linux-$KVER/arch/mips/lantiq/irq.c ../a/arch/mips/lantiq
mkdir -p ../a/arch/mips/kernel
cp -vf ./build_dir/target-mips_24kc_musl/linux-lantiq_xrx200/linux-$KVER/arch/mips/kernel/smp-mt.c ../a/arch/mips/kernel
mkdir -p ../a/arch/mips/boot/dts
cp -vf ./build_dir/target-mips_24kc_musl/linux-lantiq_xrx200/linux-$KVER/arch/mips/boot/dts/vr9.dtsi ../a/arch/mips/boot/dts

rm -r ../b
mkdir -p ../b/arch/mips/lantiq
cp -vf "$DL_D/irq.c" 		../b/arch/mips/lantiq/irq.c
mkdir -p ../b/arch/mips/kernel
cp -vf "$DL_D/smp-mt.c" 	../b/arch/mips/kernel/smp-mt.c
mkdir -p ../b/arch/mips/boot/dts
cp -vf "$DL_D/vr9_dtsi.txt" 	../b/arch/mips/boot/dts/vr9.dtsi

cd ..
diff -aurN a b > "$CWD/4060-Xrx200-IRQ-balancing-between-VPEs.patch" || diff -aurN a b > ./4060-Xrx200-IRQ-balancing-between-VPEs.patch

exit 0

( I need it because your way is to complex for my buildscripts )
At the moment my Raspberry is building Openwrt for my Easybox 904xDSL i hope it works and i can test it in the next days.
thanks for help @pc2005

SMP is supported by default (running userspace apps on both VPEs), but there was no support for running interrupt handlers on the second VPE (all interrupt handlers had to run on first VPE = bottleneck).

I see, there was a change in newer kernel which changes interrupts handling "MIPS: lantiq: Fix IPI interrupt handling", but IMO there is still no peripheral IRQ support. Gonna need to fix my patch.

thanks, I think i'm gonna use your script for other patches too :smiley:

You can try to contact the developers and submit the patch so it can be ported in OpenWrt and may get included in v19.01.

Patches 0901-add-icu-smp-support.patch 0902-enable-external-irqs-for-second-vpe.patch 0903-add-icu1-node-for-smp.patch , compatible with git openwrt snapshot a3ccac6b1d693527befa73532a6cf5abda7134c0 and kernel linux-4.14.96. Should be possible to add them into target/linux/lantiq/patches-4.14, but I didn't test it if the patch folder applies after files folder it should work. Or you can apply them directly on kernel in build_dir/target-mips_24kc_musl/linux-lantiq_xrx200/linux-4.14.96 .

I can't test the patches on my system because support for cifs is broken in snapshots for now. I couldn't make it work on my router. So I had to go back to stable release. If you have tested it on your end it should be okay to submit the pull request for now.

Sorry, Happy too early my created patch end up in:

 make[2] package/install
 make[2] target/install
 make[3] -C target/linux install
mips-openwrt-linux-musl-ld: arch/mips/kernel/smp-mt.o: in function `ltq_disable_irq':
/opt/build/owrt/build_dir/target-mips_24kc_musl/linux-lantiq_xrx200/linux-4.14.96/arch/mips/kernel/smp-mt.c:121: multiple definition of `ltq_disable_irq'; arch/mips/lantiq/irq.o:/opt/build/owrt/build_dir/target-mips_24kc_musl/linux-lantiq_xrx200/linux-4.14.96/arch/mips/lantiq/irq.c:121: first defined here
mips-openwrt-linux-musl-ld: arch/mips/kernel/smp-mt.o: in function `ltq_mask_and_ack_irq':
/opt/build/owrt/build_dir/target-mips_24kc_musl/linux-lantiq_xrx200/linux-4.14.96/arch/mips/kernel/smp-mt.c:137: multiple definition of `ltq_mask_and_ack_irq'; arch/mips/lantiq/irq.o:/opt/build/owrt/build_dir/target-mips_24kc_musl/linux-lantiq_xrx200/linux-4.14.96/arch/mips/lantiq/irq.c:137: first defined here
mips-openwrt-linux-musl-ld: arch/mips/kernel/smp-mt.o: in function `ltq_enable_irq':
/opt/build/owrt/build_dir/target-mips_24kc_musl/linux-lantiq_xrx200/linux-4.14.96/arch/mips/kernel/smp-mt.c:172: multiple definition of `ltq_enable_irq'; arch/mips/lantiq/irq.o:/opt/build/owrt/build_dir/target-mips_24kc_musl/linux-lantiq_xrx200/linux-4.14.96/arch/mips/lantiq/irq.c:172: first defined here
mips-openwrt-linux-musl-ld: arch/mips/kernel/smp-mt.o: in function `get_c0_perfcount_int':
/opt/build/owrt/build_dir/target-mips_24kc_musl/linux-lantiq_xrx200/linux-4.14.96/arch/mips/kernel/smp-mt.c:626: multiple definition of `get_c0_perfcount_int'; arch/mips/lantiq/irq.o:/opt/build/owrt/build_dir/target-mips_24kc_musl/linux-lantiq_xrx200/linux-4.14.96/arch/mips/lantiq/irq.c:626: first defined here
mips-openwrt-linux-musl-ld: arch/mips/kernel/smp-mt.o: in function `ltq_eiu_get_irq':
/opt/build/owrt/build_dir/target-mips_24kc_musl/linux-lantiq_xrx200/linux-4.14.96/arch/mips/kernel/smp-mt.c:113: multiple definition of `ltq_eiu_get_irq'; arch/mips/lantiq/irq.o:/opt/build/owrt/build_dir/target-mips_24kc_musl/linux-lantiq_xrx200/linux-4.14.96/arch/mips/lantiq/irq.c:113: first defined here
mips-openwrt-linux-musl-ld: arch/mips/kernel/smp-mt.o: in function `arch_init_ipiirq':
/opt/build/owrt/build_dir/target-mips_24kc_musl/linux-lantiq_xrx200/linux-4.14.96/arch/mips/kernel/smp-mt.c:407: multiple definition of `arch_init_ipiirq'; arch/mips/lantiq/irq.o:/opt/build/owrt/build_dir/target-mips_24kc_musl/linux-lantiq_xrx200/linux-4.14.96/arch/mips/lantiq/irq.c:407: first defined here
mips-openwrt-linux-musl-ld: arch/mips/kernel/smp-mt.o: in function `icu_of_init':
/opt/build/owrt/build_dir/target-mips_24kc_musl/linux-lantiq_xrx200/linux-4.14.96/arch/mips/kernel/smp-mt.c:487: multiple definition of `icu_of_init'; arch/mips/lantiq/irq.o:/opt/build/owrt/build_dir/target-mips_24kc_musl/linux-lantiq_xrx200/linux-4.14.96/arch/mips/lantiq/irq.c:487: first defined here
mips-openwrt-linux-musl-ld: arch/mips/kernel/smp-mt.o: in function `plat_irq_dispatch':
/opt/build/owrt/build_dir/target-mips_24kc_musl/linux-lantiq_xrx200/linux-4.14.96/arch/mips/kernel/smp-mt.c:447: multiple definition of `plat_irq_dispatch'; arch/mips/lantiq/irq.o:/opt/build/owrt/build_dir/target-mips_24kc_musl/linux-lantiq_xrx200/linux-4.14.96/arch/mips/lantiq/irq.c:447: first defined here
mips-openwrt-linux-musl-ld: arch/mips/kernel/smp-mt.o: in function `get_c0_compare_int':
/opt/build/owrt/build_dir/target-mips_24kc_musl/linux-lantiq_xrx200/linux-4.14.96/arch/mips/kernel/smp-mt.c:633: multiple definition of `get_c0_compare_int'; arch/mips/lantiq/irq.o:/opt/build/owrt/build_dir/target-mips_24kc_musl/linux-lantiq_xrx200/linux-4.14.96/arch/mips/lantiq/irq.c:633: first defined here
mips-openwrt-linux-musl-ld: arch/mips/kernel/smp-mt.o: in function `arch_init_irq':
/opt/build/owrt/build_dir/target-mips_24kc_musl/linux-lantiq_xrx200/linux-4.14.96/arch/mips/kernel/smp-mt.c:642: multiple definition of `arch_init_irq'; arch/mips/lantiq/irq.o:/opt/build/owrt/build_dir/target-mips_24kc_musl/linux-lantiq_xrx200/linux-4.14.96/arch/mips/lantiq/irq.c:642: first defined here
make[5]: *** [vmlinux] Error 1
make[4]: *** [/opt/build/owrt/build_dir/target-mips_24kc_musl/linux-lantiq_xrx200/linux-4.14.96/.image] Error 2
make[3]: *** [install] Error 2
time: target/linux/install#70.82#22.53#94.29
make[2]: *** [target/linux/install] Error 2
make[1]: *** [/opt/build/owrt/staging_dir/target-mips_24kc_musl/stamp/.target_install] Error 2
make -r world: build failed. Please re-run make with -j1 V=s or V=sc for a higher verbosity level to see what's going on
/opt/build/owrt/include/toplevel.mk:216: die Regel für Ziel „world“ scheiterte
make: *** [world] Fehler 1
 

But i am 100% shure that the files are replaced by new like copy.
Can someone confirm the error ?

Im not entire sure either , but seems like in your workspace there is already a patch applied that does some of the changes youve added from @pc2005

Maybe try do a recursive grep on the multiple definition var errors. Eg grep -rn ltq_disable_irq /opt/build/owrt/build_dir/target-mips_24kc_musl/

Sorry ashes on my head
there was an fail in my script it copy irq.c to smp-mp.c
i have edit it. but anyway i try the patches from pc2005

1 Like

@pc2005 the patches end up in:

Applying /opt/build/openwrt-sb1-master/target/linux/lantiq/patches-4.14/0901-add-icu-smp-support.patch using plaintext: 
(Stripping trailing CRs from patch; use --binary to disable.)
can't find file to patch at input line 3
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|--- ./a/arch/mips/lantiq/irq.c 2019-01-30 02:20:35.739994259 +0100
|+++ ./b/arch/mips/lantiq/irq.c 2019-01-30 04:30:31.152538191 +0100
--------------------------
No file to patch.  Skipping patch.
patch unexpectedly ends in middle of line
10 out of 10 hunks ignored
Patch failed!  Please fix /opt/build/openwrt-sb1-master/target/linux/lantiq/patches-4.14/0901-add-icu-smp-support.patch!
Makefile:23: recipe for target '/opt/build/openwrt-sb1-master/build_dir/target-mips_24kc_musl/linux-lantiq_xrx200/linux-4.14.96/.prepared_f12eb2f9aed002097e49068404c55dea' failed
make[3]: *** [/opt/build/openwrt-sb1-master/build_dir/target-mips_24kc_musl/linux-lantiq_xrx200/linux-4.14.96/.prepared_f12eb2f9aed002097e49068404c55dea] Error 1
make[3]: Leaving directory '/opt/build/openwrt-sb1-master/target/linux/lantiq'
Makefile:13: recipe for target 'prepare' failed
make[2]: *** [prepare] Error 2
make[2]: Leaving directory '/opt/build/openwrt-sb1-master/target/linux'
time: target/linux/prepare#41.75#16.02#160.44
target/Makefile:23: recipe for target 'target/linux/prepare' failed
make[1]: *** [target/linux/prepare] Error 2
make[1]: Leaving directory '/opt/build/openwrt-sb1-master'
/opt/build/openwrt-sb1-master/include/toplevel.mk:216: die Regel für Ziel „target/linux/prepare“ scheiterte
make: *** [target/linux/prepare] Fehler 2
irq.c
smp-mt.c

I guest it must be named a/arch/mips/lantiq/irq.c instead ./a/arch/mips/lantiq/irq.c
I fear there is a "./" to much.

But in the moment it does not make sense to make a build because the package postgres will not build and in consequence of that a lot of other needed packages are missed

My mistake :wink: without both ./ in patch header the openwrt will patch and compile fine.

I'm using rootfs on NFS (and kernel is downloaded only into RAM), so its fine for me to make many devel builds.

Fixed patches:
0901-add-icu-smp-support.patch
0902-enable-external-irqs-for-second-vpe.patch
0903-add-icu1-node-for-smp.patch

1 Like

Hi Petr,

Thank you for your efforts. I have a BT HomeHub 5a (xrx200 rev 1.2) and was keen to try your patches. I downloaded trunk this morning (kernel 4.14.96) and placed your patches (all 5 of them) in target/linux/lantiq/patches-4.14:

mac@mac-desktop:~/source/target/linux/lantiq/patches-4.14$ ls -al 09*
-rw-r--r-- 1 mac mac  8657 Jan 31 12:33 0901-add-icu-smp-support.patch
-rw-r--r-- 1 mac mac   432 Jan 31 12:33 0902-enable-external-irqs-for-second-vpe.patch
-rw-r--r-- 1 mac mac   921 Jan 31 12:34 0903-add-icu1-node-for-smp.patch
-rw-r--r-- 1 mac mac 26619 Jan 31 12:30 0904-backport-vanilla-eth-driver.patch
-rw-r--r-- 1 mac mac   545 Jan 31 12:31 0905-increase-dma-burst-size.patch

Sadly they failed to build:

Applying /home/mac/source/target/linux/lantiq/patches-4.14/0701-NET-lantiq-etop-of-mido.patch using plaintext: 
patching file drivers/net/ethernet/lantiq_etop.c

Applying /home/mac/source/target/linux/lantiq/patches-4.14/0901-add-icu-smp-support.patch using plaintext: 
patching file arch/mips/lantiq/irq.c
Hunk #1 FAILED at 49.
Hunk #2 succeeded at 62 with fuzz 2.
Hunk #3 FAILED at 120.
Hunk #4 FAILED at 131.
Hunk #5 FAILED at 143.
Hunk #6 FAILED at 197.
Hunk #7 succeeded at 242 with fuzz 2.
Hunk #8 FAILED at 280.
Hunk #9 FAILED at 300.
Hunk #10 FAILED at 344.
8 out of 10 hunks FAILED -- saving rejects to file arch/mips/lantiq/irq.c.rej
Patch failed!  Please fix /home/mac/source/target/linux/lantiq/patches-4.14/0901-add-icu-smp-support.patch!

Not sure why.

I downloaded current git https://github.com/openwrt/openwrt.git with last commit efa6b8b6b6463a406bbbff30839ef9c05d0daaac and it works OK. But by looking at your patch sizes, they are much bigger, did you click on "raw" or "download" button on linked webpage?

Hi, there I can install the new patch, but it looks like not working on Easybox 904 xDSL:

root@OpenWrt:/# cat /proc/interrupts
           CPU0       CPU1       
  7:     387744     388066      MIPS   7  timer
  8:       4751       4485      MIPS   0  IPI call
  9:       9468      10813      MIPS   1  IPI resched
 62:          0          0       icu  62  1e101000.usb, dwc2_hsotg:usb1
 63:      41170          0       icu  63  mei_cpe
 72:          0      14729       icu  72  vrx200_rx
 73:          0      20599       icu  73  vrx200_tx
 75:          0          0       icu  75  vrx200_tx_2
 91:          0        178       icu  91  1e106000.usb, dwc2_hsotg:usb2
 96:          0      27498       icu  96  ptm_mailbox_isr
112:          0       8808       icu 112  asc_tx
113:          0       3011       icu 113  asc_rx
114:          0          0       icu 114  asc_err
126:          0          0       icu 126  gptu
127:          0          0       icu 127  gptu
128:          0          0       icu 128  gptu
129:          0          0       icu 129  gptu
130:          0          0       icu 130  gptu
131:          0          0       icu 131  gptu
ERR:          0
root@OpenWrt:/# cat /proc/cpuinfo
system type             : xRX200 rev 1.2
machine                 : EasyBox 904 xDSL
processor               : 0
cpu model               : MIPS 34Kc V5.6
BogoMIPS                : 332.54
wait instruction        : yes
microsecond timers      : yes
tlb_entries             : 16
extra interrupt vector  : yes
hardware watchpoint     : yes, count: 4, address/irw mask: [0x0ffc, 0x0ffc, 0x0ffb, 0x0ffb]
isa                     : mips1 mips2 mips32r1 mips32r2
ASEs implemented        : mips16 dsp mt
Options implemented     : tlb 4kex 4k_cache prefetch mcheck ejtag llsc dc_aliases userlocal vint perf_cntr_intr_bit nan_legacy nan_2008 perf
shadow register sets    : 1
kscratch registers      : 0
package                 : 0
core                    : 0
VPE                     : 0
VCED exceptions         : not available
VCEI exceptions         : not available

processor               : 1
cpu model               : MIPS 34Kc V5.6
BogoMIPS                : 333.82
wait instruction        : yes
microsecond timers      : yes
tlb_entries             : 16
extra interrupt vector  : yes
hardware watchpoint     : yes, count: 4, address/irw mask: [0x0ffc, 0x0ffc, 0x0ffb, 0x0ffb]
isa                     : mips1 mips2 mips32r1 mips32r2
ASEs implemented        : mips16 dsp mt
Options implemented     : tlb 4kex 4k_cache prefetch mcheck ejtag llsc dc_aliases userlocal vint perf_cntr_intr_bit nan_legacy nan_2008 perf
shadow register sets    : 1
kscratch registers      : 0
package                 : 0
core                    : 0
VPE                     : 1
VCED exceptions         : not available
VCEI exceptions         : not available

Download speed should be 96Mb/s but it is 85Mb/s

Does it sense to test the files from beginning of this thread ?

1 Like