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

Building the kernel for PmOS #10

Open
phodina opened this issue May 8, 2023 · 3 comments
Open

Building the kernel for PmOS #10

phodina opened this issue May 8, 2023 · 3 comments

Comments

@phodina
Copy link

phodina commented May 8, 2023

Hi,
I'd like to build the kernel for PmOS. I have Jetson Nano board to for test on real HW. However, I ran into issue building the kernel.

I get errors when building the kernel. I use the defconfig. Where can I find the generated dir with the missing headers?

scripts/sign-file.c: In function 'display_openssl_errors':
scripts/sign-file.c:89:9: warning: 'ERR_get_error_line' is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
   89 |         while ((e = ERR_get_error_line(&file, &line))) {
      |         ^~~~~
In file included from scripts/sign-file.c:29:
/usr/include/openssl/err.h:423:15: note: declared here
  423 | unsigned long ERR_get_error_line(const char **file, int *line);
      |               ^~~~~~~~~~~~~~~~~~
scripts/sign-file.c: In function 'drain_openssl_errors':
scripts/sign-file.c:102:9: warning: 'ERR_get_error_line' is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
  102 |         while (ERR_get_error_line(&file, &line)) {}
      |         ^~~~~
/usr/include/openssl/err.h:423:15: note: declared here
  423 | unsigned long ERR_get_error_line(const char **file, int *line);
      |               ^~~~~~~~~~~~~~~~~~
scripts/sign-file.c: In function 'read_private_key':
scripts/sign-file.c:142:17: warning: 'ENGINE_load_builtin_engines' is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
  142 |                 ENGINE_load_builtin_engines();
      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from scripts/sign-file.c:30:
/usr/include/openssl/engine.h:358:28: note: declared here
  358 | OSSL_DEPRECATEDIN_3_0 void ENGINE_load_builtin_engines(void);
      |                            ^~~~~~~~~~~~~~~~~~~~~~~~~~~
scripts/sign-file.c:144:17: warning: 'ENGINE_by_id' is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
  144 |                 e = ENGINE_by_id("pkcs11");
      |                 ^
/usr/include/openssl/engine.h:336:31: note: declared here
  336 | OSSL_DEPRECATEDIN_3_0 ENGINE *ENGINE_by_id(const char *id);
      |                               ^~~~~~~~~~~~
scripts/sign-file.c:146:17: warning: 'ENGINE_init' is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
  146 |                 if (ENGINE_init(e))
      |                 ^~
/usr/include/openssl/engine.h:620:27: note: declared here
  620 | OSSL_DEPRECATEDIN_3_0 int ENGINE_init(ENGINE *e);
      |                           ^~~~~~~~~~~
scripts/sign-file.c:151:25: warning: 'ENGINE_ctrl_cmd_string' is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
  151 |                         ERR(!ENGINE_ctrl_cmd_string(e, "PIN", key_pass, 0),
      |                         ^~~
/usr/include/openssl/engine.h:479:5: note: declared here
  479 | int ENGINE_ctrl_cmd_string(ENGINE *e, const char *cmd_name, const char *arg,
      |     ^~~~~~~~~~~~~~~~~~~~~~
scripts/sign-file.c:153:17: warning: 'ENGINE_load_private_key' is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
  153 |                 private_key = ENGINE_load_private_key(e, private_key_name,
      |                 ^~~~~~~~~~~
/usr/include/openssl/engine.h:638:11: note: declared here
  638 | EVP_PKEY *ENGINE_load_private_key(ENGINE *e, const char *key_id,
      |           ^~~~~~~~~~~~~~~~~~~~~~~
scripts/extract-cert.c: In function 'display_openssl_errors':
scripts/extract-cert.c:46:9: warning: 'ERR_get_error_line' is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
   46 |         while ((e = ERR_get_error_line(&file, &line))) {
      |         ^~~~~
In file included from scripts/extract-cert.c:23:
/usr/include/openssl/err.h:423:15: note: declared here
  423 | unsigned long ERR_get_error_line(const char **file, int *line);
      |               ^~~~~~~~~~~~~~~~~~
scripts/extract-cert.c: In function 'drain_openssl_errors':
scripts/extract-cert.c:59:9: warning: 'ERR_get_error_line' is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
   59 |         while (ERR_get_error_line(&file, &line)) {}
      |         ^~~~~
/usr/include/openssl/err.h:423:15: note: declared here
  423 | unsigned long ERR_get_error_line(const char **file, int *line);
      |               ^~~~~~~~~~~~~~~~~~
scripts/extract-cert.c: In function 'main':
scripts/extract-cert.c:124:17: warning: 'ENGINE_load_builtin_engines' is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
  124 |                 ENGINE_load_builtin_engines();
      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from scripts/extract-cert.c:24:
/usr/include/openssl/engine.h:358:28: note: declared here
  358 | OSSL_DEPRECATEDIN_3_0 void ENGINE_load_builtin_engines(void);
      |                            ^~~~~~~~~~~~~~~~~~~~~~~~~~~
scripts/extract-cert.c:126:17: warning: 'ENGINE_by_id' is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
  126 |                 e = ENGINE_by_id("pkcs11");
      |                 ^
/usr/include/openssl/engine.h:336:31: note: declared here
  336 | OSSL_DEPRECATEDIN_3_0 ENGINE *ENGINE_by_id(const char *id);
      |                               ^~~~~~~~~~~~
scripts/extract-cert.c:128:17: warning: 'ENGINE_init' is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
  128 |                 if (ENGINE_init(e))
      |                 ^~
/usr/include/openssl/engine.h:620:27: note: declared here
  620 | OSSL_DEPRECATEDIN_3_0 int ENGINE_init(ENGINE *e);
      |                           ^~~~~~~~~~~
scripts/extract-cert.c:133:25: warning: 'ENGINE_ctrl_cmd_string' is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
  133 |                         ERR(!ENGINE_ctrl_cmd_string(e, "PIN", key_pass, 0), "Set PKCS#11 PIN");
      |                         ^~~
/usr/include/openssl/engine.h:479:5: note: declared here
  479 | int ENGINE_ctrl_cmd_string(ENGINE *e, const char *cmd_name, const char *arg,
      |     ^~~~~~~~~~~~~~~~~~~~~~
scripts/extract-cert.c:134:17: warning: 'ENGINE_ctrl_cmd' is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
  134 |                 ENGINE_ctrl_cmd(e, "LOAD_CERT_CTRL", 0, &parms, NULL, 1);
      |                 ^~~~~~~~~~~~~~~
/usr/include/openssl/engine.h:450:27: note: declared here
  450 | OSSL_DEPRECATEDIN_3_0 int ENGINE_ctrl_cmd(ENGINE *e, const char *cmd_name,
      |                           ^~~~~~~~~~~~~~~
scripts/Makefile.build:69: './nvmap.ko' will not be built even though obj-m is specified.
scripts/Makefile.build:70: You cannot use subdir-y/m to visit a module Makefile. Use obj-y/m instead.
In file included from ./include/linux/mmzone.h:19,
                 from ./include/linux/gfp.h:6,
                 from ./include/linux/mm.h:10,
                 from ./include/linux/scatterlist.h:8,
                 from ./include/linux/dma-buf.h:18,
                 from /home/pmos/build/src/linux-tegra-5.10-oe4t-patches-l4t-r35.1/nvidia/include/linux/nvmap.h:23,
                 from /home/pmos/build/src/linux-tegra-5.10-oe4t-patches-l4t-r35.1/nvidia/include/trace/events/nvmap.h:24,
                 from /home/pmos/build/src/linux-tegra-5.10-oe4t-patches-l4t-r35.1/nvidia/drivers/video/tegra/nvmap/nvmap_fault.c:18:
./include/linux/page-flags-layout.h:6:10: fatal error: generated/bounds.h: No such file or directory
    6 | #include <generated/bounds.h>
      |          ^~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[1]: *** [scripts/Makefile.build:281: nvmap_fault.o] Error 1
make[1]: *** Waiting for unfinished jobs....
In file included from ./include/linux/mm_types.h:15,
                 from ./include/linux/page-flags.h:13,
                 from ./arch/arm64/include/asm/mte.h:15,
                 from ./arch/arm64/include/asm/pgtable.h:13,
                 from ./include/linux/pgtable.h:6,
                 from ./arch/arm64/include/asm/io.h:12,
                 from ./include/linux/io.h:13,
                 from /home/pmos/build/src/linux-tegra-5.10-oe4t-patches-l4t-r35.1/nvidia/drivers/video/tegra/nvmap/nvmap_handle.c:21:
./include/linux/page-flags-layout.h:6:10: fatal error: generated/bounds.h: No such file or directory
    6 | #include <generated/bounds.h>
      |          ^~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[1]: *** [scripts/Makefile.build:281: nvmap_handle.o] Error 1
In file included from ./include/linux/mm_types.h:15,
                 from ./include/linux/page-flags.h:13,
                 from ./arch/arm64/include/asm/mte.h:15,
                 from ./arch/arm64/include/asm/pgtable.h:13,
                 from ./include/linux/pgtable.h:6,
                 from ./arch/arm64/include/asm/io.h:12,
                 from ./include/linux/io.h:13,
                 from /home/pmos/build/src/linux-tegra-5.10-oe4t-patches-l4t-r35.1/nvidia/drivers/video/tegra/nvmap/nvmap_cache.c:18:
./include/linux/page-flags-layout.h:6:10: fatal error: generated/bounds.h: No such file or directory
    6 | #include <generated/bounds.h>
      |          ^~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[1]: *** [scripts/Makefile.build:281: nvmap_cache.o] Error 1
In file included from ./include/linux/mm_types.h:15,
                 from ./include/linux/page-flags.h:13,
                 from ./arch/arm64/include/asm/mte.h:15,
                 from ./arch/arm64/include/asm/pgtable.h:13,
                 from ./include/linux/pgtable.h:6,
                 from ./arch/arm64/include/asm/io.h:12,
                 from ./include/linux/io.h:13,
                 from /home/pmos/build/src/linux-tegra-5.10-oe4t-patches-l4t-r35.1/nvidia/drivers/video/tegra/nvmap/nvmap_kasan_wrapper.c:19:
./include/linux/page-flags-layout.h:6:10: fatal error: generated/bounds.h: No such file or directory
    6 | #include <generated/bounds.h>
      |          ^~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[1]: *** [scripts/Makefile.build:281: nvmap_kasan_wrapper.o] Error 1
In file included from ./include/linux/mm_types.h:15,
                 from ./include/linux/page-flags.h:13,
                 from ./arch/arm64/include/asm/mte.h:15,
                 from ./arch/arm64/include/asm/pgtable.h:13,
                 from ./include/linux/pgtable.h:6,
                 from ./arch/arm64/include/asm/io.h:12,
                 from ./include/linux/io.h:13,
                 from /home/pmos/build/src/linux-tegra-5.10-oe4t-patches-l4t-r35.1/nvidia/drivers/video/tegra/nvmap/nvmap_alloc.c:23:
./include/linux/page-flags-layout.h:6:10: fatal error: generated/bounds.h: No such file or directory
    6 | #include <generated/bounds.h>
      |          ^~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[1]: *** [scripts/Makefile.build:281: nvmap_alloc.o] Error 1
In file included from ./include/linux/mmzone.h:19,
                 from ./include/linux/gfp.h:6,
                 from ./include/linux/mm.h:10,
                 from ./include/linux/scatterlist.h:8,
                 from ./include/linux/dma-buf.h:18,
                 from /home/pmos/build/src/linux-tegra-5.10-oe4t-patches-l4t-r35.1/nvidia/include/linux/nvmap.h:23,
                 from /home/pmos/build/src/linux-tegra-5.10-oe4t-patches-l4t-r35.1/nvidia/include/trace/events/nvmap.h:24,
                 from /home/pmos/build/src/linux-tegra-5.10-oe4t-patches-l4t-r35.1/nvidia/drivers/video/tegra/nvmap/nvmap_tag.c:22:
./include/linux/page-flags-layout.h:6:10: fatal error: generated/bounds.h: No such file or directory
    6 | #include <generated/bounds.h>
      |          ^~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[1]: *** [scripts/Makefile.build:281: nvmap_tag.o] Error 1
In file included from ./include/linux/ktime.h:25,
                 from ./include/linux/timer.h:6,
                 from ./include/linux/workqueue.h:9,
                 from ./include/linux/rhashtable-types.h:15,
                 from ./include/linux/ipc.h:7,
                 from ./include/uapi/linux/sem.h:5,
                 from ./include/linux/sem.h:5,
                 from ./include/linux/sched.h:15,
                 from ./include/linux/ratelimit.h:6,
                 from ./include/linux/dev_printk.h:16,
                 from ./include/linux/device.h:15,
                 from ./include/linux/dma-mapping.h:7,
                 from /home/pmos/build/src/linux-tegra-5.10-oe4t-patches-l4t-r35.1/nvidia/drivers/video/tegra/nvmap/nvmap_ioctl.c:20:
./include/linux/jiffies.h:14:10: fatal error: generated/timeconst.h: No such file or directory
   14 | #include <generated/timeconst.h>
      |          ^~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[1]: *** [scripts/Makefile.build:281: nvmap_ioctl.o] Error 1
In file included from ./include/linux/mmzone.h:19,
                 from ./include/linux/gfp.h:6,
                 from ./include/linux/slab.h:15,
                 from /home/pmos/build/src/linux-tegra-5.10-oe4t-patches-l4t-r35.1/nvidia/drivers/video/tegra/nvmap/nvmap_dmabuf.c:19:
./include/linux/page-flags-layout.h:6:10: fatal error: generated/bounds.h: No such file or directory
    6 | #include <generated/bounds.h>
      |          ^~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[1]: *** [scripts/Makefile.build:281: nvmap_dmabuf.o] Error 1
In file included from ./include/linux/mmzone.h:19,
                 from ./include/linux/gfp.h:6,
                 from ./include/linux/xarray.h:14,
                 from /home/pmos/build/src/linux-tegra-5.10-oe4t-patches-l4t-r35.1/nvidia/drivers/video/tegra/nvmap/nvmap_id_array.c:6:
./include/linux/page-flags-layout.h:6:10: fatal error: generated/bounds.h: No such file or directory
    6 | #include <generated/bounds.h>
      |          ^~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[1]: *** [scripts/Makefile.build:281: nvmap_id_array.o] Error 1
In file included from ./include/linux/dcache.h:13,
                 from ./include/linux/fs.h:8,
                 from ./include/linux/backing-dev.h:13,
                 from /home/pmos/build/src/linux-tegra-5.10-oe4t-patches-l4t-r35.1/nvidia/drivers/video/tegra/nvmap/nvmap_dev.c:18:
./include/linux/lockref.h:19:10: fatal error: generated/bounds.h: No such file or directory
   19 | #include <generated/bounds.h>
      |          ^~~~~~~~~~~~~~~~~~~~
compilation terminated.
In file included from ./include/linux/dcache.h:13,
                 from ./include/linux/fs.h:8,
                 from ./include/linux/debugfs.h:15,
                 from /home/pmos/build/src/linux-tegra-5.10-oe4t-patches-l4t-r35.1/nvidia/drivers/video/tegra/nvmap/nvmap_carveout.c:18:
./include/linux/lockref.h:19:10: fatal error: generated/bounds.h: No such file or directory
   19 | #include <generated/bounds.h>
      |          ^~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[1]: *** [scripts/Makefile.build:281: nvmap_dev.o] Error 1
make[1]: *** [scripts/Makefile.build:281: nvmap_carveout.o] Error 1
In file included from ./include/linux/dcache.h:13,
                 from ./include/linux/fs.h:8,
                 from ./include/linux/highmem.h:5,
                 from /home/pmos/build/src/linux-tegra-5.10-oe4t-patches-l4t-r35.1/nvidia/drivers/video/tegra/nvmap/nvmap_core.c:21:
./include/linux/lockref.h:19:10: fatal error: generated/bounds.h: No such file or directory
   19 | #include <generated/bounds.h>
      |          ^~~~~~~~~~~~~~~~~~~~
compilation terminated.
In file included from ./include/linux/ktime.h:25,
                 from ./include/linux/timer.h:6,
                 from ./include/linux/workqueue.h:9,
                 from ./include/linux/rhashtable-types.h:15,
                 from ./include/linux/ipc.h:7,
                 from ./include/uapi/linux/sem.h:5,
                 from ./include/linux/sem.h:5,
                 from ./include/linux/sched.h:15,
                 from ./arch/arm64/include/asm/compat.h:16,
                 from ./arch/arm64/include/asm/stat.h:13,
                 from ./include/linux/stat.h:6,
                 from ./include/linux/module.h:13,
                 from /home/pmos/build/src/linux-tegra-5.10-oe4t-patches-l4t-r35.1/nvidia/drivers/video/tegra/nvmap/nvmap_init.c:18:
./include/linux/jiffies.h:14:10: fatal error: generated/timeconst.h: No such file or directory
   14 | #include <generated/timeconst.h>
      |          ^~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[1]: *** [scripts/Makefile.build:281: nvmap_core.o] Error 1
make[1]: *** [scripts/Makefile.build:281: nvmap_init.o] Error 1
In file included from ./include/linux/mmzone.h:19,
                 from ./include/linux/gfp.h:6,
                 from ./include/linux/mm.h:10,
                 from ./include/linux/scatterlist.h:8,
                 from ./include/linux/dma-buf.h:18,
                 from /home/pmos/build/src/linux-tegra-5.10-oe4t-patches-l4t-r35.1/nvidia/include/linux/nvmap.h:23,
                 from /home/pmos/build/src/linux-tegra-5.10-oe4t-patches-l4t-r35.1/nvidia/include/trace/events/nvmap.h:24,
                 from /home/pmos/build/src/linux-tegra-5.10-oe4t-patches-l4t-r35.1/nvidia/drivers/video/tegra/nvmap/nvmap_mm.c:18:
./include/linux/page-flags-layout.h:6:10: fatal error: generated/bounds.h: No such file or directory
    6 | #include <generated/bounds.h>
      |          ^~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[1]: *** [scripts/Makefile.build:281: nvmap_mm.o] Error 1
In file included from ./include/linux/dcache.h:13,
                 from ./include/linux/fs.h:8,
                 from ./include/linux/debugfs.h:15,
                 from /home/pmos/build/src/linux-tegra-5.10-oe4t-patches-l4t-r35.1/nvidia/drivers/video/tegra/nvmap/nvmap_stats.c:18:
./include/linux/lockref.h:19:10: fatal error: generated/bounds.h: No such file or directory
   19 | #include <generated/bounds.h>
      |          ^~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[1]: *** [scripts/Makefile.build:281: nvmap_stats.o] Error 1
In file included from ./include/linux/dcache.h:13,
                 from ./include/linux/fs.h:8,
                 from ./include/linux/debugfs.h:15,
                 from /home/pmos/build/src/linux-tegra-5.10-oe4t-patches-l4t-r35.1/nvidia/drivers/video/tegra/nvmap/nvmap_heap.c:20:
./include/linux/lockref.h:19:10: fatal error: generated/bounds.h: No such file or directory
   19 | #include <generated/bounds.h>
      |          ^~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[1]: *** [scripts/Makefile.build:281: nvmap_heap.o] Error 1
make: *** [Makefile:1241: prepare0] Error 2
@madisongh
Copy link
Member

Where can I find the generated dir with the missing headers?

Its location is mentioned at the top of the Kbuild file.

The kernel in this repo is derived from NVIDIA's Jetson Linux, and is only supported on Jetson Xavier and Jetson Orin platforms. I don't know what "PmOS" is, but I would be surprised if it really supports running this particular kernel on the Jetson Nano.

@phodina
Copy link
Author

phodina commented May 9, 2023

Where can I find the generated dir with the missing headers?

Its location is mentioned at the top of the Kbuild file.

Thanks I'll check the file.

The kernel in this repo is derived from NVIDIA's Jetson Linux, and is only supported on Jetson Xavier and Jetson Orin platforms. I don't know what "PmOS" is, but I would be surprised if it really supports running this particular kernel on the Jetson Nano.

Sorry, I meant PmOS, it's based on Alpine Linux. The biggest issue will be probably muslc as all the Nvidia stuff will be linked againsted glibc.

Is there an older branch that supports also Jetson Nano? I can also prepare the device package for Jetson Xavier and Jetson Orin but I don't have the HW to test it.

@madisongh
Copy link
Member

Thanks for the link.

The latest kernel for the Nano is a 4.9-based one from L4T R32.7.3. See this repo/branch.

And yes, you'll probably run into compatibility issues with musl if you intend to use any of the prebuilt libraries from the L4T BSP.

If you don't need the downstream NVIDIA binary-only components, you might consider using a mainline kernel instead. There's some info over at elinux.org about that.

rene pushed a commit to rene/linux-tegra-5.10 that referenced this issue Oct 27, 2023
Issue:
phydev->adjust_link can be NULL in case of phy which
generates link down interrupt after phy_stop is called.
This interrupt causes a race condition, with adjust link
being set to NULL when we get an interrupt and simultaneously
phy is getting disconnected.

[ 2683.554983] libphy: Calling adjust link, up = 0
[ 2683.559652] ether_adjust_link, 1100, disconnect
[ 2683.564750] nvethernet 6810000.ethernet eth2: Link is Down
[ 2683.571863] phy_state_machine Calling phy suspend
[ 2683.577192] Calling phy disconnect from close
[ 2683.580703] Intr handler, state machine
[ 2683.586079] libphy: Calling adjust link, up = 0
[ 2683.586108] libphy: phy_disconnect adjust link = NULL
[ 2683.590749] Unable to handle kernel NULL pointer dereference at virtual address 0000000000000000
[ 2683.595942] libphy: phy_detach, 1667
[ 2683.604958] Mem abort info:
[ 2683.604959]   ESR = 0x86000004
[ 2683.604961]   EC = 0x21: IABT (current EL), IL = 32 bits
[ 2683.608629] libphy: phy_detach, 1671
[ 2683.608630] libphy: phy_detach, 1674
[ 2683.611496]   SET = 0, FnV = 0
[ 2683.611498]   EA = 0, S1PTW = 0
[ 2683.633773] user pgtable: 4k pages, 48-bit VAs, pgdp=0000000107bf0000
[ 2683.640380] [0000000000000000] pgd=0000000000000000, p4d=0000000000000000
[ 2683.647372] Internal error: Oops: 86000004 [OE4T#1] PREEMPT SMP
[ 2683.653093] Modules linked in:
[ 2683.656235] CPU: 6 PID: 1219 Comm: kworker/u16:0 Tainted: G        W         5.10.120-tegra OE4T#10
[ 2683.665174] Hardware name: Unknown Jetson AGX Orin/Jetson AGX Orin, BIOS 0.0-ff9214ce 12/20/2022
[ 2683.674218] Workqueue: events_power_efficient phy_state_machine
[ 2683.680299] pstate: 60c00009 (nZCv daif +PAN +UAO -TCO BTYPE=--)
[ 2683.686467] pc : 0x0
[ 2683.688710] lr : phy_link_change+0x50/0xb0
[ 2683.692908] sp : ffff800016dc3d20
[ 2683.696303] x29: ffff800016dc3d20 x28: ffffb676a7a26000
[ 2683.701762] x27: ffff7513c014f470 x26: ffff7513c014f420
[ 2683.707218] x25: 0000000000000000 x24: ffff7513c7ebe800
[ 2683.712681] x23: ffff7513c6aa0000 x22: ffff7513c7ebecf8
[ 2683.718137] x21: 0000000000000000 x20: ffff7513c6aa0000
[ 2683.723593] x19: ffff7513c7ebe800 x18: 0000000000000010
[ 2683.729047] x17: 0000000000000000 x16: 0000000000000000
[ 2683.734507] x15: ffff7513c7f61470 x14: ffffffffffffffff
[ 2683.739958] x13: ffff800096dc3a17 x12: ffff800016dc3a1f
[ 2683.745419] x11: 0000000000000000 x10: ffffb676a7aa0aa0
[ 2683.750882] x9 : ffffb676a5bbba7c x8 : 20676e696c6c6143
[ 2683.756336] x7 : 203a79687062696c x6 : 000000000000000a
[ 2683.761788] x5 : 0000000000000002 x4 : 0000000000000000
[ 2683.767245] x3 : 00000000ffffffff x2 : 0000000000000000
[ 2683.772697] x1 : 0000000000000000 x0 : ffff7513c6aa0000
[ 2683.778154] Call trace:
[ 2683.780664]  0x0
[ 2683.782549]  phy_state_machine+0x194/0x260
[ 2683.786756]  process_one_work+0x1c4/0x4d0
[ 2683.790882]  worker_thread+0x54/0x430
[ 2683.794630]  kthread+0x148/0x180
[ 2683.797950]  ret_from_fork+0x10/0x34
[ 2683.801626] Code: bad PC value
[ 2683.804774] ---[ end trace e61974d923004c5a ]---
[ 2683.809521] Kernel panic - not syncing: Oops: Fatal exception
[ 2683.815741] Kernel Offset: 0x367695aa0000 from 0xffff800010000000
[ 2683.821999] PHYS_OFFSET: 0xffff8aed40000000
[ 2683.826290] CPU features: 0x081c0146,4a80aa38
[ 2683.830767] Memory Limit: none
[ 2683.833895] ---[ end Kernel panic - not syncing: Oops: Fatal exception ]---

Fix:
Add a null check before calling adjust_link callback.

Bug 3877272
Bug 3920560

Change-Id: I2843ff746a92bf23349628a02b32a4f16eea0ce1
Signed-off-by: Sushil Kumar Singh <[email protected]>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-5.10/+/2835744
(Cherry-picked from commit 009bebb6905f0d8040592007ce5f16f20212cf75)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-5.10/+/2857069
Reviewed-by: Wayne Wang (SW-TEGRA) <[email protected]>
Reviewed-by: Bibek Basu <[email protected]>
GVS: Gerrit_Virtual_Submit <[email protected]>
Tested-by: Wayne Wang (SW-TEGRA) <[email protected]>
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

2 participants