diff mbox series

[6/8] xen/mm: Exclude flushtlb.h from mm.h for PPC and RISC-V

Message ID 20250312174513.4075066-8-andrew.cooper3@citrix.com (mailing list archive)
State New
Headers show
Series xen: Untangle mm.h | expand

Commit Message

Andrew Cooper March 12, 2025, 5:45 p.m. UTC
put_page_alloc_ref(), the final function in xen/mm.h uses test_and_clear_bit()
which is picked up transitively by all architectures.  RISC-V gets it only via
flushtlb.h, hence why it notices here.

ARM and x86 will be cleaned up in subsequent patches.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
---
CC: Anthony PERARD <anthony.perard@vates.tech>
CC: Michal Orzel <michal.orzel@amd.com>
CC: Jan Beulich <jbeulich@suse.com>
CC: Julien Grall <julien@xen.org>
CC: Roger Pau Monné <roger.pau@citrix.com>
CC: Stefano Stabellini <sstabellini@kernel.org>
CC: Volodymyr Babchuk <Volodymyr_Babchuk@epam.com>
CC: Bertrand Marquis <bertrand.marquis@arm.com>
CC: Oleksii Kurochko <oleksii.kurochko@gmail.com>
CC: Shawn Anastasio <sanastasio@raptorengineering.com>
---
 xen/include/xen/mm.h | 3 +++
 1 file changed, 3 insertions(+)
diff mbox series

Patch

diff --git a/xen/include/xen/mm.h b/xen/include/xen/mm.h
index fff36ff903d6..154e649db9e4 100644
--- a/xen/include/xen/mm.h
+++ b/xen/include/xen/mm.h
@@ -61,6 +61,7 @@ 
 #ifndef __XEN_MM_H__
 #define __XEN_MM_H__
 
+#include <xen/bitops.h>
 #include <xen/bug.h>
 #include <xen/compiler.h>
 #include <xen/list.h>
@@ -586,7 +587,9 @@  void destroy_ring_for_helper(void **_va, struct page_info *page);
 /* Return the upper bound of MFNs, including hotplug memory. */
 unsigned long get_upper_mfn_bound(void);
 
+#if defined(CONFIG_X86) || defined(CONFIG_ARM)
 #include <asm/flushtlb.h>
+#endif
 
 enum XENSHARE_flags {
     SHARE_rw,