summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAndrey Zhizhikin <andrey.zhizhikin@leica-geosystems.com>2021-03-09 11:23:29 +0000
committerAndrey Zhizhikin <andrey.zhizhikin@leica-geosystems.com>2021-03-09 11:23:29 +0000
commit08867468907e4fb0db541529eaeee70eaf81d395 (patch)
treec2f432a1235b3b03b5f4e1882a9b2fcec06c286d /include
parentfa0b19f1fb666dd7afa9858bdf9c76c8d98039d9 (diff)
parent84d5d3c9d3fbcee10bc16d3a3316af9a924c91c6 (diff)
Merge tag 'v5.4.104' into 5.4-2.3.x-imx
This is the 5.4.104 stable release Signed-off-by: Andrey Zhizhikin <andrey.zhizhikin@leica-geosystems.com>
Diffstat (limited to 'include')
-rw-r--r--include/crypto/hash.h8
-rw-r--r--include/linux/crypto.h9
-rw-r--r--include/sound/intel-nhlt.h5
3 files changed, 15 insertions, 7 deletions
diff --git a/include/crypto/hash.h b/include/crypto/hash.h
index d52b95b75ae4..84e9f2380edf 100644
--- a/include/crypto/hash.h
+++ b/include/crypto/hash.h
@@ -141,7 +141,7 @@ struct ahash_alg {
struct shash_desc {
struct crypto_shash *tfm;
- void *__ctx[] CRYPTO_MINALIGN_ATTR;
+ void *__ctx[] __aligned(ARCH_SLAB_MINALIGN);
};
#define HASH_MAX_DIGESTSIZE 64
@@ -154,9 +154,9 @@ struct shash_desc {
#define HASH_MAX_STATESIZE 512
-#define SHASH_DESC_ON_STACK(shash, ctx) \
- char __##shash##_desc[sizeof(struct shash_desc) + \
- HASH_MAX_DESCSIZE] CRYPTO_MINALIGN_ATTR; \
+#define SHASH_DESC_ON_STACK(shash, ctx) \
+ char __##shash##_desc[sizeof(struct shash_desc) + HASH_MAX_DESCSIZE] \
+ __aligned(__alignof__(struct shash_desc)); \
struct shash_desc *shash = (struct shash_desc *)__##shash##_desc
/**
diff --git a/include/linux/crypto.h b/include/linux/crypto.h
index 19ea3a371d7b..0c720a2982ae 100644
--- a/include/linux/crypto.h
+++ b/include/linux/crypto.h
@@ -130,9 +130,12 @@
* The macro CRYPTO_MINALIGN_ATTR (along with the void * type in the actual
* declaration) is used to ensure that the crypto_tfm context structure is
* aligned correctly for the given architecture so that there are no alignment
- * faults for C data types. In particular, this is required on platforms such
- * as arm where pointers are 32-bit aligned but there are data types such as
- * u64 which require 64-bit alignment.
+ * faults for C data types. On architectures that support non-cache coherent
+ * DMA, such as ARM or arm64, it also takes into account the minimal alignment
+ * that is required to ensure that the context struct member does not share any
+ * cachelines with the rest of the struct. This is needed to ensure that cache
+ * maintenance for non-coherent DMA (cache invalidation in particular) does not
+ * affect data that may be accessed by the CPU concurrently.
*/
#define CRYPTO_MINALIGN ARCH_KMALLOC_MINALIGN
diff --git a/include/sound/intel-nhlt.h b/include/sound/intel-nhlt.h
index f657fd8fc0ad..f38947b9a1b9 100644
--- a/include/sound/intel-nhlt.h
+++ b/include/sound/intel-nhlt.h
@@ -113,6 +113,11 @@ struct nhlt_vendor_dmic_array_config {
} __packed;
enum {
+ NHLT_CONFIG_TYPE_GENERIC = 0,
+ NHLT_CONFIG_TYPE_MIC_ARRAY = 1
+};
+
+enum {
NHLT_MIC_ARRAY_2CH_SMALL = 0xa,
NHLT_MIC_ARRAY_2CH_BIG = 0xb,
NHLT_MIC_ARRAY_4CH_1ST_GEOM = 0xc,