Skip to content

Commit bc615a2

Browse files
authored
Merge pull request #9478 from sameehj/fix-tegra
linuxkm: Fix spinlock initialization on Tegra kernels for __SPIN_LOCK…
2 parents 2f1be0f + 9a699c0 commit bc615a2

2 files changed

Lines changed: 6 additions & 0 deletions

File tree

.wolfssl_known_macro_extras

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ CONFIG_ARCH_CHIP_STM32F746ZG
5252
CONFIG_ARCH_CHIP_STM32H743ZI
5353
CONFIG_ARCH_CHIP_STM32L552ZE
5454
CONFIG_ARCH_POSIX
55+
CONFIG_ARCH_TEGRA
5556
CONFIG_ARM
5657
CONFIG_ARM64
5758
CONFIG_BOARD_NATIVE_POSIX

linuxkm/linuxkm_wc_port.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1454,7 +1454,12 @@
14541454

14551455
static __always_inline int wc_InitMutex(wolfSSL_Mutex* m)
14561456
{
1457+
/* Tegra vendor kernels do not support assignment of __SPIN_LOCK_UNLOCKED() */
1458+
# ifndef CONFIG_ARCH_TEGRA
14571459
m->lock = __SPIN_LOCK_UNLOCKED(m);
1460+
# else
1461+
spin_lock_init(&m->lock);
1462+
#endif
14581463
m->irq_flags = 0;
14591464

14601465
return 0;

0 commit comments

Comments
 (0)