aboutsummaryrefslogtreecommitdiffstats
path: root/package/kernel/lantiq/ltq-deu/src/ifxmips_deu.h
diff options
context:
space:
mode:
authorDaniel Kestrel <kestrel1974@t-online.de>2021-06-05 21:37:53 +0200
committerHauke Mehrtens <hauke@hauke-m.de>2022-01-06 00:22:48 +0100
commit87a19c9345db7554441dbd10f8c4460f6629c10a (patch)
tree748cf30a44b5ad8261ba3bc1c7ec9d1f89ecc53e /package/kernel/lantiq/ltq-deu/src/ifxmips_deu.h
parent536dc6f16467f7f029ddf30fb8d47770b3010190 (diff)
downloadupstream-87a19c9345db7554441dbd10f8c4460f6629c10a.tar.gz
upstream-87a19c9345db7554441dbd10f8c4460f6629c10a.tar.bz2
upstream-87a19c9345db7554441dbd10f8c4460f6629c10a.zip
ltq-deu: make deu hash lock global and remove md5_hmac_ exports
All hash algorithms use the same base IFX_HASH_CON to access the hash unit. Parallel threads should not be able to call different hash algorithms and therefor a global lock is required. Fixed linker warning, that md5_hmac_init, md5_hmac_update and md5_hmac_final are static export symbols. The export symbols are not required, because the functions are exposed using shash_alg structure. Signed-off-by: Daniel Kestrel <kestrel1974@t-online.de>
Diffstat (limited to 'package/kernel/lantiq/ltq-deu/src/ifxmips_deu.h')
-rw-r--r--package/kernel/lantiq/ltq-deu/src/ifxmips_deu.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/package/kernel/lantiq/ltq-deu/src/ifxmips_deu.h b/package/kernel/lantiq/ltq-deu/src/ifxmips_deu.h
index 8045c2081a..3c994cb346 100644
--- a/package/kernel/lantiq/ltq-deu/src/ifxmips_deu.h
+++ b/package/kernel/lantiq/ltq-deu/src/ifxmips_deu.h
@@ -131,6 +131,10 @@ void __exit lqdeu_fini_async_des(void);
void __exit deu_fini (void);
int deu_dma_init (void);
+extern spinlock_t ltq_deu_hash_lock;
+#define CRTCL_SECT_HASH_INIT spin_lock_init(&ltq_deu_hash_lock)
+#define CRTCL_SECT_HASH_START spin_lock_irqsave(&ltq_deu_hash_lock, flag)
+#define CRTCL_SECT_HASH_END spin_unlock_irqrestore(&ltq_deu_hash_lock, flag)
#define DEU_WAKELIST_INIT(queue) \