[PATCH 1/2] x86: Sort headers

Andrew Cooper posted 2 patches 2 days, 23 hours ago
[PATCH 1/2] x86: Sort headers
Posted by Andrew Cooper 2 days, 23 hours ago
... prior to making changes.

mtrr/main.c absolutely does not need to include asm/uaccess.h

No functional change.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
---
CC: Jan Beulich <JBeulich@suse.com>
CC: Roger Pau Monné <roger.pau@citrix.com>
---
 xen/arch/x86/cpu/mtrr/generic.c | 10 ++++++----
 xen/arch/x86/cpu/mtrr/main.c    |  5 +++--
 xen/arch/x86/mm/p2m-ept.c       | 22 ++++++++++++----------
 3 files changed, 21 insertions(+), 16 deletions(-)

diff --git a/xen/arch/x86/cpu/mtrr/generic.c b/xen/arch/x86/cpu/mtrr/generic.c
index c587e9140e06..ad6a24f055ec 100644
--- a/xen/arch/x86/cpu/mtrr/generic.c
+++ b/xen/arch/x86/cpu/mtrr/generic.c
@@ -1,17 +1,19 @@
 /* This only handles 32bit MTRR on 32bit hosts. This is strictly wrong
    because MTRRs can span upto 40 bits (36bits on most modern x86) */ 
-#include <xen/lib.h>
+
 #include <xen/init.h>
+#include <xen/lib.h>
 #include <xen/mm.h>
 #include <xen/param.h>
-#include <xen/stdbool.h>
+
+#include <asm/cpufeature.h>
 #include <asm/flushtlb.h>
 #include <asm/invpcid.h>
 #include <asm/io.h>
-#include <asm/mtrr.h>
 #include <asm/msr.h>
+#include <asm/mtrr.h>
 #include <asm/system.h>
-#include <asm/cpufeature.h>
+
 #include "mtrr.h"
 
 static const struct fixed_range_block {
diff --git a/xen/arch/x86/cpu/mtrr/main.c b/xen/arch/x86/cpu/mtrr/main.c
index d4f549d92ee7..eff0500f0d06 100644
--- a/xen/arch/x86/cpu/mtrr/main.c
+++ b/xen/arch/x86/cpu/mtrr/main.c
@@ -34,11 +34,12 @@
 #include <xen/lib.h>
 #include <xen/smp.h>
 #include <xen/spinlock.h>
+
 #include <asm/atomic.h>
+#include <asm/msr.h>
 #include <asm/mtrr.h>
-#include <asm/uaccess.h>
 #include <asm/processor.h>
-#include <asm/msr.h>
+
 #include "mtrr.h"
 
 /* No blocking mutexes in Xen. Spin instead. */
diff --git a/xen/arch/x86/mm/p2m-ept.c b/xen/arch/x86/mm/p2m-ept.c
index dfdbfa0afec8..204bdb054a89 100644
--- a/xen/arch/x86/mm/p2m-ept.c
+++ b/xen/arch/x86/mm/p2m-ept.c
@@ -5,22 +5,24 @@
  */
 
 #include <xen/domain_page.h>
+#include <xen/iommu.h>
+#include <xen/keyhandler.h>
 #include <xen/sched.h>
-#include <public/hvm/dm_op.h>
+#include <xen/softirq.h>
+
 #include <asm/altp2m.h>
 #include <asm/current.h>
-#include <asm/iocap.h>
-#include <asm/paging.h>
 #include <asm/domain.h>
-#include <asm/p2m.h>
-#include <asm/hvm/vmx/vmx.h>
-#include <asm/hvm/vmx/vmcs.h>
+#include <asm/hvm/cacheattr.h>
 #include <asm/hvm/nestedhvm.h>
-#include <xen/iommu.h>
+#include <asm/hvm/vmx/vmcs.h>
+#include <asm/hvm/vmx/vmx.h>
+#include <asm/iocap.h>
 #include <asm/mtrr.h>
-#include <asm/hvm/cacheattr.h>
-#include <xen/keyhandler.h>
-#include <xen/softirq.h>
+#include <asm/p2m.h>
+#include <asm/paging.h>
+
+#include <public/hvm/dm_op.h>
 
 #include "mm-locks.h"
 #include "p2m.h"

base-commit: 381b4ff16f7ff83a2dc44f16b8dd0208f3255ec7
-- 
2.39.5


Re: [PATCH 1/2] x86: Sort headers
Posted by Jan Beulich 2 hours ago
On 06.02.2026 14:13, Andrew Cooper wrote:
> ... prior to making changes.
> 
> mtrr/main.c absolutely does not need to include asm/uaccess.h
> 
> No functional change.
> 
> Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>

Acked-by: Jan Beulich <jbeulich@suse.com>