lkml.org 
[lkml]   [2022]   [May]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subjectlinux-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)
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2022-05-02 11:27    [W:0.026 / U:0.336 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site