Skip to content

Commit d12453c

Browse files
committed
Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux
Pull arm64 fixes from Catalin Marinas: "An arm64/mpam fix to use non-atomic bitops on struct mmap_props member (atomicity not required). For kunit testing, the structure is packed to avoid memcmp() errors but this affects atomic bitops as they have strict alignment requirements. Also remove a duplicate include in the mpam driver" * tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux: arm_mpam: Use non-atomic bitops when modifying feature bitmap arm_mpam: Remove duplicate linux/srcu.h header
2 parents d3eeb99 + b9f5c38 commit d12453c

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

drivers/resctrl/mpam_internal.h

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
#include <linux/jump_label.h>
1313
#include <linux/llist.h>
1414
#include <linux/mutex.h>
15-
#include <linux/srcu.h>
1615
#include <linux/spinlock.h>
1716
#include <linux/srcu.h>
1817
#include <linux/types.h>
@@ -201,8 +200,12 @@ struct mpam_props {
201200
} PACKED_FOR_KUNIT;
202201

203202
#define mpam_has_feature(_feat, x) test_bit(_feat, (x)->features)
204-
#define mpam_set_feature(_feat, x) set_bit(_feat, (x)->features)
205-
#define mpam_clear_feature(_feat, x) clear_bit(_feat, (x)->features)
203+
/*
204+
* The non-atomic get/set operations are used because if struct mpam_props is
205+
* packed, the alignment requirements for atomics aren't met.
206+
*/
207+
#define mpam_set_feature(_feat, x) __set_bit(_feat, (x)->features)
208+
#define mpam_clear_feature(_feat, x) __clear_bit(_feat, (x)->features)
206209

207210
/* The values for MSMON_CFG_MBWU_FLT.RWBW */
208211
enum mon_filter_options {

0 commit comments

Comments
 (0)