Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[kernel 4.19.206-rt87] Error building rockhip_wlan #261

Closed
avafinger opened this issue Nov 20, 2021 · 8 comments
Closed

[kernel 4.19.206-rt87] Error building rockhip_wlan #261

avafinger opened this issue Nov 20, 2021 · 8 comments

Comments

@avafinger
Copy link

I get this error building latest 4.19 while no error building the previous version:

drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/dhd_pno.c: In function '_dhd_pno_get_for_batch':
drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/dhd_pno.c:3172:23: error: passing argument 1 of 'waitqueue_active' from incompatible pointer type [-Werror=incompatible-pointer-types]
  if (waitqueue_active(&_pno_state->get_batch_done.wait))
                       ^
In file included from ./include/linux/pid.h:7:0,
                 from ./include/linux/sched.h:14,
                 from ./arch/arm64/include/asm/compat.h:25,
                 from ./arch/arm64/include/asm/stat.h:24,
                 from ./include/linux/stat.h:6,
                 from ./include/linux/module.h:10,
                 from drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/include/linuxver.h:55,
                 from drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/include/linux_osl.h:295,
                 from drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/include/osl.h:48,
                 from drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/dhd_pno.c:37:
./include/linux/wait.h:126:19: note: expected 'struct wait_queue_head *' but argument is of type 'struct swait_queue_head *'
 static inline int waitqueue_active(struct wait_queue_head *wq_head)
                   ^~~~~~~~~~~~~~~~
drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/dhd_pno.c: At top level:
cc1: warning: unrecognized command line option '-Wno-non-literal-null-conversion'
cc1: warning: unrecognized command line option '-Wno-parentheses-equality'
cc1: some warnings being treated as errors
scripts/Makefile.build:333: recipe for target 'drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/dhd_pno.o' failed
make[6]: *** [drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/dhd_pno.o] Error 1
scripts/Makefile.build:637: recipe for target 'drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd' failed
make[5]: *** [drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd] Error 2
scripts/Makefile.build:637: recipe for target 'drivers/net/wireless/rockchip_wlan/rkwifi' failed
make[4]: *** [drivers/net/wireless/rockchip_wlan/rkwifi] Error 2
scripts/Makefile.build:637: recipe for target 'drivers/net/wireless/rockchip_wlan' failed
make[3]: *** [drivers/net/wireless/rockchip_wlan] Error 2

How to fix this?

@avafinger avafinger changed the title [kernel 4.19.206] Error building rockhip_wlan [kernel 4.19.206-rt87] Error building rockhip_wlan Nov 20, 2021
@jocker-xie
Copy link

Hello, have you solved this problem yet?
Temporarily shut down this driver to test its real-time performance. Is it the same with you

./cyclictest -t20 -p 80 -n -i 10000 -l 10000
# /dev/cpu_dma_latency set to 0us
policy: fifo: loadavg: 2.60 1.21 0.56 1/219 828          

T: 0 (  807) P:80 I:10000 C:  10000 Min:     21 Act:   63 Avg:   67 Max:     177
T: 1 (  808) P:80 I:10500 C:   9524 Min:     19 Act:   64 Avg:   68 Max:     190
T: 2 (  809) P:80 I:11000 C:   9091 Min:     20 Act:   64 Avg:   65 Max:     233
T: 3 (  810) P:80 I:11500 C:   8695 Min:     18 Act:   74 Avg:   85 Max:     250
T: 4 (  811) P:80 I:12000 C:   8333 Min:     22 Act:   62 Avg:   65 Max:     167
T: 5 (  812) P:80 I:12500 C:   8000 Min:     20 Act:   64 Avg:   67 Max:     167
T: 6 (  813) P:80 I:13000 C:   7692 Min:     21 Act:   61 Avg:   67 Max:     177
T: 7 (  814) P:80 I:13500 C:   7407 Min:     20 Act:   65 Avg:   66 Max:     231
...

@avafinger
Copy link
Author

No.
The driver seems to be leftover from a non rt kernel.

@jocker-xie
Copy link

Have you tried xenomai transplantation?

@reedmnds
Copy link

With the transplantation IPIPE patch is critual. Check the kernel sometimes little tweaks with kernel solves the problem

@avafinger
Copy link
Author

With the transplantation IPIPE patch is critual

Can you point to the patch? I am not sure it's so trivial. Do you have rockhip_wlan working?

@NHellFire
Copy link

As it's using simple wait queue, it should call swait_active and not waitqueue_active

rockchip_wlan-rt.patch.txt

@avafinger
Copy link
Author

@NHellFire ,

Thank you for the fix and sorry for the long delay to get back to you.

Kwiboo pushed a commit to Kwiboo/linux-rockchip that referenced this issue Oct 23, 2023
Add various tests to check maximum number of supported programs
being attached:

  # ./vmtest.sh -- ./test_progs -t tc_opts
  [...]
  ./test_progs -t tc_opts
  [    1.185325] bpf_testmod: loading out-of-tree module taints kernel.
  [    1.186826] bpf_testmod: module verification failed: signature and/or required key missing - tainting kernel
  [    1.270123] tsc: Refined TSC clocksource calibration: 3407.988 MHz
  [    1.272428] clocksource: tsc: mask: 0xffffffffffffffff max_cycles: 0x311fc932722, max_idle_ns: 440795381586 ns
  [    1.276408] clocksource: Switched to clocksource tsc
  rockchip-linux#252     tc_opts_after:OK
  rockchip-linux#253     tc_opts_append:OK
  rockchip-linux#254     tc_opts_basic:OK
  rockchip-linux#255     tc_opts_before:OK
  rockchip-linux#256     tc_opts_chain_classic:OK
  rockchip-linux#257     tc_opts_chain_mixed:OK
  rockchip-linux#258     tc_opts_delete_empty:OK
  rockchip-linux#259     tc_opts_demixed:OK
  rockchip-linux#260     tc_opts_detach:OK
  rockchip-linux#261     tc_opts_detach_after:OK
  rockchip-linux#262     tc_opts_detach_before:OK
  rockchip-linux#263     tc_opts_dev_cleanup:OK
  rockchip-linux#264     tc_opts_invalid:OK
  rockchip-linux#265     tc_opts_max:OK              <--- (new test)
  rockchip-linux#266     tc_opts_mixed:OK
  rockchip-linux#267     tc_opts_prepend:OK
  rockchip-linux#268     tc_opts_replace:OK
  rockchip-linux#269     tc_opts_revision:OK
  Summary: 18/0 PASSED, 0 SKIPPED, 0 FAILED

Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/20230929204121.20305-2-daniel@iogearbox.net
Kwiboo pushed a commit to Kwiboo/linux-rockchip that referenced this issue Oct 23, 2023
Add a new test case which performs double query of the bpf_mprog through
libbpf API, but also via raw bpf(2) syscall. This is testing to gather
first the count and then in a subsequent probe the full information with
the program array without clearing passed structs in between.

  # ./vmtest.sh -- ./test_progs -t tc_opts
  [...]
  ./test_progs -t tc_opts
  [    1.398818] tsc: Refined TSC clocksource calibration: 3407.999 MHz
  [    1.400263] clocksource: tsc: mask: 0xffffffffffffffff max_cycles: 0x311fd336761, max_idle_ns: 440795243819 ns
  [    1.402734] clocksource: Switched to clocksource tsc
  [    1.426639] bpf_testmod: loading out-of-tree module taints kernel.
  [    1.428112] bpf_testmod: module verification failed: signature and/or required key missing - tainting kernel
  rockchip-linux#252     tc_opts_after:OK
  rockchip-linux#253     tc_opts_append:OK
  rockchip-linux#254     tc_opts_basic:OK
  rockchip-linux#255     tc_opts_before:OK
  rockchip-linux#256     tc_opts_chain_classic:OK
  rockchip-linux#257     tc_opts_chain_mixed:OK
  rockchip-linux#258     tc_opts_delete_empty:OK
  rockchip-linux#259     tc_opts_demixed:OK
  rockchip-linux#260     tc_opts_detach:OK
  rockchip-linux#261     tc_opts_detach_after:OK
  rockchip-linux#262     tc_opts_detach_before:OK
  rockchip-linux#263     tc_opts_dev_cleanup:OK
  rockchip-linux#264     tc_opts_invalid:OK
  rockchip-linux#265     tc_opts_max:OK
  rockchip-linux#266     tc_opts_mixed:OK
  rockchip-linux#267     tc_opts_prepend:OK
  rockchip-linux#268     tc_opts_query:OK            <--- (new test)
  rockchip-linux#269     tc_opts_replace:OK
  rockchip-linux#270     tc_opts_revision:OK
  Summary: 19/0 PASSED, 0 SKIPPED, 0 FAILED

Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Link: https://lore.kernel.org/r/20231006220655.1653-4-daniel@iogearbox.net
Signed-off-by: Martin KaFai Lau <martin.lau@kernel.org>
Kwiboo pushed a commit to Kwiboo/linux-rockchip that referenced this issue Oct 23, 2023
Add a new test case to query on an empty bpf_mprog and pass the revision
directly into expected_revision for attachment to assert that this does
succeed.

  ./test_progs -t tc_opts
  [    1.406778] tsc: Refined TSC clocksource calibration: 3407.990 MHz
  [    1.408863] clocksource: tsc: mask: 0xffffffffffffffff max_cycles: 0x311fcaf6eb0, max_idle_ns: 440795321766 ns
  [    1.412419] clocksource: Switched to clocksource tsc
  [    1.428671] bpf_testmod: loading out-of-tree module taints kernel.
  [    1.430260] bpf_testmod: module verification failed: signature and/or required key missing - tainting kernel
  rockchip-linux#252     tc_opts_after:OK
  rockchip-linux#253     tc_opts_append:OK
  rockchip-linux#254     tc_opts_basic:OK
  rockchip-linux#255     tc_opts_before:OK
  rockchip-linux#256     tc_opts_chain_classic:OK
  rockchip-linux#257     tc_opts_chain_mixed:OK
  rockchip-linux#258     tc_opts_delete_empty:OK
  rockchip-linux#259     tc_opts_demixed:OK
  rockchip-linux#260     tc_opts_detach:OK
  rockchip-linux#261     tc_opts_detach_after:OK
  rockchip-linux#262     tc_opts_detach_before:OK
  rockchip-linux#263     tc_opts_dev_cleanup:OK
  rockchip-linux#264     tc_opts_invalid:OK
  rockchip-linux#265     tc_opts_max:OK
  rockchip-linux#266     tc_opts_mixed:OK
  rockchip-linux#267     tc_opts_prepend:OK
  rockchip-linux#268     tc_opts_query:OK
  rockchip-linux#269     tc_opts_query_attach:OK     <--- (new test)
  rockchip-linux#270     tc_opts_replace:OK
  rockchip-linux#271     tc_opts_revision:OK
  Summary: 20/0 PASSED, 0 SKIPPED, 0 FAILED

Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Link: https://lore.kernel.org/r/20231006220655.1653-6-daniel@iogearbox.net
Signed-off-by: Martin KaFai Lau <martin.lau@kernel.org>
@ych325608
Copy link

Hello! After I replaced the RT kernel, the WiFi driver was lost. Do you know the reason

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants