diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2026-01-17 08:52:45 -0800 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2026-01-17 08:52:45 -0800 |
| commit | d12453c7e281d236f77b5c7d7cccbf9e5dfadfe5 (patch) | |
| tree | 37968872b34c67d00ac6a627eabb63d86bc903a5 /drivers | |
| parent | d3eeb99bbc99cc5eb94a4a75ed4415a0272254ef (diff) | |
| parent | b9f5c38e4af1a094384650d2fc79fb992d6d5e64 (diff) | |
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
Diffstat (limited to 'drivers')
| -rw-r--r-- | drivers/resctrl/mpam_internal.h | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/resctrl/mpam_internal.h b/drivers/resctrl/mpam_internal.h index e79c3c47259c..e8971842b124 100644 --- a/drivers/resctrl/mpam_internal.h +++ b/drivers/resctrl/mpam_internal.h @@ -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 { |
