[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20220502192517.28161b32@canb.auug.org.au>
Date: Mon, 2 May 2022 19:25:17 +1000
From: Stephen Rothwell <sfr@...b.auug.org.au>
To: Andrew Morton <akpm@...ux-foundation.org>,
Vlastimil Babka <vbabka@...e.cz>
Cc: Andrey Konovalov <andreyknvl@...il.com>,
Andrey Konovalov <andreyknvl@...gle.com>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Linux Next Mailing List <linux-next@...r.kernel.org>,
Peter Collingbourne <pcc@...gle.com>
Subject: linux-next: manual merge of the mm tree with the slab tree
Hi all,
Today's linux-next merge of the mm tree got a conflict in:
include/linux/slab.h
between commit:
71aeb554a274 ("mm: slab: fix comment for __assume_kmalloc_alignment")
from the slab tree and commits:
3f0cd9a623ec ("mm: make minimum slab alignment a runtime property")
78c0585fdbac ("mm-make-minimum-slab-alignment-a-runtime-property-fix")
from the mm tree.
I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging. You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.
--
Cheers,
Stephen Rothwell
diff --cc include/linux/slab.h
index 58bb9392775d,3d2f2a3ca17e..000000000000
--- a/include/linux/slab.h
+++ b/include/linux/slab.h
@@@ -216,10 -209,22 +216,22 @@@ void kmem_dump_obj(void *object)
#define ARCH_SLAB_MINALIGN __alignof__(unsigned long long)
#endif
+ /*
+ * Arches can define this function if they want to decide the minimum slab
+ * alignment at runtime. The value returned by the function must be a power
+ * of two and >= ARCH_SLAB_MINALIGN.
+ */
+ #ifndef arch_slab_minalign
+ static inline unsigned int arch_slab_minalign(void)
+ {
+ return ARCH_SLAB_MINALIGN;
+ }
+ #endif
+
/*
- * kmalloc and friends return ARCH_KMALLOC_MINALIGN aligned
- * pointers. kmem_cache_alloc and friends return ARCH_SLAB_MINALIGN
- * aligned pointers.
+ * kmem_cache_alloc and friends return pointers aligned to ARCH_SLAB_MINALIGN.
+ * kmalloc and friends return pointers aligned to both ARCH_KMALLOC_MINALIGN
+ * and ARCH_SLAB_MINALIGN, but here we only assume the former alignment.
*/
#define __assume_kmalloc_alignment __assume_aligned(ARCH_KMALLOC_MINALIGN)
#define __assume_slab_alignment __assume_aligned(ARCH_SLAB_MINALIGN)
Content of type "application/pgp-signature" skipped
Powered by blists - more mailing lists