Commit d12453c7 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
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
parents d3eeb99b b9f5c38e
Loading
Loading
Loading
Loading
+6 −3
Original line number Diff line number Diff line
@@ -12,7 +12,6 @@
#include <linux/jump_label.h>
#include <linux/llist.h>
#include <linux/mutex.h>
#include <linux/srcu.h>
#include <linux/spinlock.h>
#include <linux/srcu.h>
#include <linux/types.h>
@@ -201,8 +200,12 @@ struct mpam_props {
} PACKED_FOR_KUNIT;

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

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