diff mbox series

[v3,2/9] xen: split parameter related definitions in own header file

Message ID 20200121084330.18309-3-jgross@suse.com (mailing list archive)
State Superseded
Headers show
Series Add hypervisor sysfs-like support | expand

Commit Message

Juergen Gross Jan. 21, 2020, 8:43 a.m. UTC
Move the parameter related definitions from init.h into a new header
file param.h. This will avoid include hell when new dependencies are
added to parameter definitions.

Signed-off-by: Juergen Gross <jgross@suse.com>
---
V3:
- new patch
---
 xen/arch/arm/acpi/boot.c                 |   1 +
 xen/arch/arm/cpuerrata.c                 |   1 +
 xen/arch/arm/domain_build.c              |   1 +
 xen/arch/arm/gic-v3-lpi.c                |   1 +
 xen/arch/arm/setup.c                     |   1 +
 xen/arch/arm/smpboot.c                   |   1 +
 xen/arch/arm/traps.c                     |   1 +
 xen/arch/x86/acpi/boot.c                 |   1 +
 xen/arch/x86/acpi/cpu_idle.c             |   1 +
 xen/arch/x86/acpi/cpufreq/cpufreq.c      |   1 +
 xen/arch/x86/acpi/power.c                |   1 +
 xen/arch/x86/apic.c                      |   1 +
 xen/arch/x86/cpu/amd.c                   |   1 +
 xen/arch/x86/cpu/common.c                |   1 +
 xen/arch/x86/cpu/mcheck/mce.c            |   1 +
 xen/arch/x86/cpu/mcheck/mce_intel.c      |   1 +
 xen/arch/x86/cpu/mtrr/generic.c          |   1 +
 xen/arch/x86/cpu/mwait-idle.c            |   1 +
 xen/arch/x86/cpu/vpmu.c                  |   1 +
 xen/arch/x86/cpuid.c                     |   1 +
 xen/arch/x86/dom0_build.c                |   1 +
 xen/arch/x86/e820.c                      |   1 +
 xen/arch/x86/genapic/probe.c             |   1 +
 xen/arch/x86/genapic/x2apic.c            |   1 +
 xen/arch/x86/hpet.c                      |   1 +
 xen/arch/x86/hvm/asid.c                  |   1 +
 xen/arch/x86/hvm/hvm.c                   |   1 +
 xen/arch/x86/hvm/quirks.c                |   1 +
 xen/arch/x86/hvm/viridian/viridian.c     |   1 +
 xen/arch/x86/hvm/vmx/vmcs.c              |   1 +
 xen/arch/x86/hvm/vmx/vmx.c               |   1 +
 xen/arch/x86/io_apic.c                   |   1 +
 xen/arch/x86/irq.c                       |   1 +
 xen/arch/x86/microcode.c                 |   1 +
 xen/arch/x86/mm.c                        |   1 +
 xen/arch/x86/mm/p2m.c                    |   1 +
 xen/arch/x86/msi.c                       |   1 +
 xen/arch/x86/nmi.c                       |   1 +
 xen/arch/x86/numa.c                      |   1 +
 xen/arch/x86/oprofile/nmi_int.c          |   1 +
 xen/arch/x86/psr.c                       |   1 +
 xen/arch/x86/pv/domain.c                 |   1 +
 xen/arch/x86/pv/shim.c                   |   1 +
 xen/arch/x86/setup.c                     |   1 +
 xen/arch/x86/shutdown.c                  |   1 +
 xen/arch/x86/spec_ctrl.c                 |   1 +
 xen/arch/x86/tboot.c                     |   1 +
 xen/arch/x86/time.c                      |   1 +
 xen/arch/x86/traps.c                     |   1 +
 xen/arch/x86/tsx.c                       |   1 +
 xen/arch/x86/x86_64/mmconfig-shared.c    |   1 +
 xen/arch/x86/xstate.c                    |   1 +
 xen/common/argo.c                        |   1 +
 xen/common/core_parking.c                |   1 +
 xen/common/cpupool.c                     |   1 +
 xen/common/debugtrace.c                  |   1 +
 xen/common/domain.c                      |   1 +
 xen/common/efi/boot.c                    |   1 +
 xen/common/gdbstub.c                     |   1 +
 xen/common/grant_table.c                 |   1 +
 xen/common/kernel.c                      |   1 +
 xen/common/kexec.c                       |   1 +
 xen/common/memory.c                      |   1 +
 xen/common/page_alloc.c                  |   1 +
 xen/common/rcupdate.c                    |   1 +
 xen/common/sched_credit.c                |   1 +
 xen/common/sched_credit2.c               |   1 +
 xen/common/schedule.c                    |   1 +
 xen/common/shutdown.c                    |   1 +
 xen/common/timer.c                       |   1 +
 xen/common/trace.c                       |   1 +
 xen/drivers/acpi/apei/hest.c             |   1 +
 xen/drivers/acpi/tables.c                |   1 +
 xen/drivers/char/arm-uart.c              |   1 +
 xen/drivers/char/console.c               |   1 +
 xen/drivers/char/ehci-dbgp.c             |   1 +
 xen/drivers/char/ns16550.c               |   1 +
 xen/drivers/char/serial.c                |   1 +
 xen/drivers/cpufreq/cpufreq.c            |   1 +
 xen/drivers/passthrough/amd/iommu_acpi.c |   1 +
 xen/drivers/passthrough/iommu.c          |   1 +
 xen/drivers/passthrough/pci.c            |   1 +
 xen/drivers/passthrough/vtd/dmar.c       |   1 +
 xen/drivers/passthrough/vtd/quirks.c     |   1 +
 xen/drivers/passthrough/vtd/x86/vtd.c    |   1 +
 xen/drivers/passthrough/x86/ats.c        |   1 +
 xen/drivers/video/vesa.c                 |   1 +
 xen/drivers/video/vga.c                  |   1 +
 xen/include/xen/init.h                   | 120 -----------------------------
 xen/include/xen/param.h                  | 126 +++++++++++++++++++++++++++++++
 xen/xsm/flask/flask_op.c                 |   1 +
 xen/xsm/xsm_core.c                       |   1 +
 92 files changed, 216 insertions(+), 120 deletions(-)
 create mode 100644 xen/include/xen/param.h

Comments

Julien Grall Jan. 21, 2020, 1 p.m. UTC | #1
Hi Juergen,

On 21/01/2020 08:43, Juergen Gross wrote:
> Move the parameter related definitions from init.h into a new header
> file param.h. This will avoid include hell when new dependencies are
> added to parameter definitions.

How did you find out the list of places where the new files need to be 
included?

Also, was it build test it on Arm?

Cheers,
Juergen Gross Jan. 21, 2020, 1:28 p.m. UTC | #2
On 21.01.20 14:00, Julien Grall wrote:
> Hi Juergen,
> 
> On 21/01/2020 08:43, Juergen Gross wrote:
>> Move the parameter related definitions from init.h into a new header
>> file param.h. This will avoid include hell when new dependencies are
>> added to parameter definitions.
> 
> How did you find out the list of places where the new files need to be 
> included?

I did a grep for all parameter definitions.

> 
> Also, was it build test it on Arm?

Yes.


Juergen
Julien Grall Jan. 21, 2020, 1:31 p.m. UTC | #3
On 21/01/2020 13:28, Jürgen Groß wrote:
> On 21.01.20 14:00, Julien Grall wrote:
>> Hi Juergen,
>>
>> On 21/01/2020 08:43, Juergen Gross wrote:
>>> Move the parameter related definitions from init.h into a new header
>>> file param.h. This will avoid include hell when new dependencies are
>>> added to parameter definitions.
>>
>> How did you find out the list of places where the new files need to be 
>> included?
> 
> I did a grep for all parameter definitions.
That's what I thought but wanted to check :).

>>
>> Also, was it build test it on Arm?
> 
> Yes.

Thanks!

For Arm + common code:

Acked-by: Julien Grall <julien@xen.org>

Cheers,
Dario Faggioli Jan. 22, 2020, 1:34 a.m. UTC | #4
On Tue, 2020-01-21 at 09:43 +0100, Juergen Gross wrote:
> Move the parameter related definitions from init.h into a new header
> file param.h. This will avoid include hell when new dependencies are
> added to parameter definitions.
> 
> Signed-off-by: Juergen Gross <jgross@suse.com>
>
sched-stuff:

Acked-by: Dario Faggioli <dfaggioli@suse.com>

Regards
Durrant, Paul Jan. 22, 2020, 11:28 a.m. UTC | #5
> -----Original Message-----
> From: Juergen Gross <jgross@suse.com>
> Sent: 21 January 2020 08:43
> To: xen-devel@lists.xenproject.org
> Cc: Juergen Gross <jgross@suse.com>; Stefano Stabellini
> <sstabellini@kernel.org>; Julien Grall <julien@xen.org>; Volodymyr Babchuk
> <Volodymyr_Babchuk@epam.com>; Andrew Cooper <andrew.cooper3@citrix.com>;
> George Dunlap <George.Dunlap@eu.citrix.com>; Ian Jackson
> <ian.jackson@eu.citrix.com>; Jan Beulich <jbeulich@suse.com>; Konrad
> Rzeszutek Wilk <konrad.wilk@oracle.com>; Wei Liu <wl@xen.org>; Roger Pau
> Monné <roger.pau@citrix.com>; Durrant, Paul <pdurrant@amazon.co.uk>; Jun
> Nakajima <jun.nakajima@intel.com>; Kevin Tian <kevin.tian@intel.com>;
> Lukasz Hawrylko <lukasz.hawrylko@linux.intel.com>; Christopher Clark
> <christopher.w.clark@gmail.com>; Dario Faggioli <dfaggioli@suse.com>;
> Daniel De Graaf <dgdegra@tycho.nsa.gov>
> Subject: [PATCH v3 2/9] xen: split parameter related definitions in own
> header file
> 
> Move the parameter related definitions from init.h into a new header
> file param.h. This will avoid include hell when new dependencies are
> added to parameter definitions.
> 
> Signed-off-by: Juergen Gross <jgross@suse.com>

Acked-by: Paul Durrant <pdurrant@amazon.com>
Jan Beulich Jan. 22, 2020, 4:49 p.m. UTC | #6
On 21.01.2020 09:43, Juergen Gross wrote:
> Move the parameter related definitions from init.h into a new header
> file param.h. This will avoid include hell when new dependencies are
> added to parameter definitions.
> 
> Signed-off-by: Juergen Gross <jgross@suse.com>

x86:
Acked-by: Jan Beulich <jbeulich@suse.com>
Tian, Kevin Feb. 3, 2020, 5:37 a.m. UTC | #7
> From: Juergen Gross <jgross@suse.com>
> Sent: Tuesday, January 21, 2020 4:43 PM
> 
> Move the parameter related definitions from init.h into a new header
> file param.h. This will avoid include hell when new dependencies are
> added to parameter definitions.
> 
> Signed-off-by: Juergen Gross <jgross@suse.com>

Reviewed-by: Kevin Tian <kevin.tian@intel.com>
Jan Beulich Feb. 3, 2020, 12:13 p.m. UTC | #8
On 21.01.2020 09:43, Juergen Gross wrote:
> Move the parameter related definitions from init.h into a new header
> file param.h. This will avoid include hell when new dependencies are
> added to parameter definitions.
> 
> Signed-off-by: Juergen Gross <jgross@suse.com>

There was some re-basing necessary here, which I hope I didn't screw
up. I also decided to commit this despite, from a strictly formal
perspective, there still being missing acks here, based on this
being an entirely mechanical change to those files, and on the
grounds that further re-basing would likely turn out to be needed
with further delays here.

Jan
diff mbox series

Patch

diff --git a/xen/arch/arm/acpi/boot.c b/xen/arch/arm/acpi/boot.c
index bf9c78b02c..30e4bd1bc5 100644
--- a/xen/arch/arm/acpi/boot.c
+++ b/xen/arch/arm/acpi/boot.c
@@ -30,6 +30,7 @@ 
 #include <xen/errno.h>
 #include <acpi/actables.h>
 #include <xen/mm.h>
+#include <xen/param.h>
 #include <xen/device_tree.h>
 
 #include <asm/acpi.h>
diff --git a/xen/arch/arm/cpuerrata.c b/xen/arch/arm/cpuerrata.c
index da72b02442..0248893de0 100644
--- a/xen/arch/arm/cpuerrata.c
+++ b/xen/arch/arm/cpuerrata.c
@@ -2,6 +2,7 @@ 
 #include <xen/cpumask.h>
 #include <xen/init.h>
 #include <xen/mm.h>
+#include <xen/param.h>
 #include <xen/sizes.h>
 #include <xen/smp.h>
 #include <xen/spinlock.h>
diff --git a/xen/arch/arm/domain_build.c b/xen/arch/arm/domain_build.c
index dd9c3b73ba..d2d11eda26 100644
--- a/xen/arch/arm/domain_build.c
+++ b/xen/arch/arm/domain_build.c
@@ -2,6 +2,7 @@ 
 #include <xen/compile.h>
 #include <xen/lib.h>
 #include <xen/mm.h>
+#include <xen/param.h>
 #include <xen/domain_page.h>
 #include <xen/sched.h>
 #include <xen/sizes.h>
diff --git a/xen/arch/arm/gic-v3-lpi.c b/xen/arch/arm/gic-v3-lpi.c
index 78b9521b21..869bc97fa1 100644
--- a/xen/arch/arm/gic-v3-lpi.c
+++ b/xen/arch/arm/gic-v3-lpi.c
@@ -20,6 +20,7 @@ 
 
 #include <xen/lib.h>
 #include <xen/mm.h>
+#include <xen/param.h>
 #include <xen/sched.h>
 #include <xen/sizes.h>
 #include <xen/warning.h>
diff --git a/xen/arch/arm/setup.c b/xen/arch/arm/setup.c
index 9dd3738d44..5d8eb46203 100644
--- a/xen/arch/arm/setup.c
+++ b/xen/arch/arm/setup.c
@@ -30,6 +30,7 @@ 
 #include <xen/init.h>
 #include <xen/irq.h>
 #include <xen/mm.h>
+#include <xen/param.h>
 #include <xen/softirq.h>
 #include <xen/keyhandler.h>
 #include <xen/cpu.h>
diff --git a/xen/arch/arm/smpboot.c b/xen/arch/arm/smpboot.c
index 00b64c3322..cae2179126 100644
--- a/xen/arch/arm/smpboot.c
+++ b/xen/arch/arm/smpboot.c
@@ -23,6 +23,7 @@ 
 #include <xen/errno.h>
 #include <xen/init.h>
 #include <xen/mm.h>
+#include <xen/param.h>
 #include <xen/sched.h>
 #include <xen/smp.h>
 #include <xen/softirq.h>
diff --git a/xen/arch/arm/traps.c b/xen/arch/arm/traps.c
index a20474f87c..6f9bec22d3 100644
--- a/xen/arch/arm/traps.c
+++ b/xen/arch/arm/traps.c
@@ -26,6 +26,7 @@ 
 #include <xen/livepatch.h>
 #include <xen/mem_access.h>
 #include <xen/mm.h>
+#include <xen/param.h>
 #include <xen/perfc.h>
 #include <xen/smp.h>
 #include <xen/softirq.h>
diff --git a/xen/arch/x86/acpi/boot.c b/xen/arch/x86/acpi/boot.c
index 15542a9bdf..2aae4b480a 100644
--- a/xen/arch/x86/acpi/boot.c
+++ b/xen/arch/x86/acpi/boot.c
@@ -27,6 +27,7 @@ 
 #include <xen/acpi.h>
 #include <xen/irq.h>
 #include <xen/mm.h>
+#include <xen/param.h>
 #include <xen/dmi.h>
 #include <asm/fixmap.h>
 #include <asm/page.h>
diff --git a/xen/arch/x86/acpi/cpu_idle.c b/xen/arch/x86/acpi/cpu_idle.c
index 5edd1844f4..b9d99a0468 100644
--- a/xen/arch/x86/acpi/cpu_idle.c
+++ b/xen/arch/x86/acpi/cpu_idle.c
@@ -37,6 +37,7 @@ 
 #include <xen/smp.h>
 #include <xen/guest_access.h>
 #include <xen/keyhandler.h>
+#include <xen/param.h>
 #include <xen/trace.h>
 #include <xen/irq.h>
 #include <asm/cache.h>
diff --git a/xen/arch/x86/acpi/cpufreq/cpufreq.c b/xen/arch/x86/acpi/cpufreq/cpufreq.c
index f05275578d..281be131a3 100644
--- a/xen/arch/x86/acpi/cpufreq/cpufreq.c
+++ b/xen/arch/x86/acpi/cpufreq/cpufreq.c
@@ -31,6 +31,7 @@ 
 #include <xen/errno.h>
 #include <xen/delay.h>
 #include <xen/cpumask.h>
+#include <xen/param.h>
 #include <xen/sched.h>
 #include <xen/timer.h>
 #include <xen/xmalloc.h>
diff --git a/xen/arch/x86/acpi/power.c b/xen/arch/x86/acpi/power.c
index 8078352312..f5f4aa9bda 100644
--- a/xen/arch/x86/acpi/power.c
+++ b/xen/arch/x86/acpi/power.c
@@ -14,6 +14,7 @@ 
 #include <xen/acpi.h>
 #include <xen/errno.h>
 #include <xen/iocap.h>
+#include <xen/param.h>
 #include <xen/sched.h>
 #include <asm/acpi.h>
 #include <asm/irq.h>
diff --git a/xen/arch/x86/apic.c b/xen/arch/x86/apic.c
index a6a7754d77..2d68396feb 100644
--- a/xen/arch/x86/apic.c
+++ b/xen/arch/x86/apic.c
@@ -20,6 +20,7 @@ 
 #include <xen/errno.h>
 #include <xen/init.h>
 #include <xen/mm.h>
+#include <xen/param.h>
 #include <xen/sched.h>
 #include <xen/irq.h>
 #include <xen/delay.h>
diff --git a/xen/arch/x86/cpu/amd.c b/xen/arch/x86/cpu/amd.c
index 8b5f0f2e4c..e351dd227f 100644
--- a/xen/arch/x86/cpu/amd.c
+++ b/xen/arch/x86/cpu/amd.c
@@ -1,6 +1,7 @@ 
 #include <xen/init.h>
 #include <xen/bitops.h>
 #include <xen/mm.h>
+#include <xen/param.h>
 #include <xen/smp.h>
 #include <xen/pci.h>
 #include <asm/io.h>
diff --git a/xen/arch/x86/cpu/common.c b/xen/arch/x86/cpu/common.c
index e5ad17d8d9..1b33f1ed71 100644
--- a/xen/arch/x86/cpu/common.c
+++ b/xen/arch/x86/cpu/common.c
@@ -1,6 +1,7 @@ 
 #include <xen/init.h>
 #include <xen/string.h>
 #include <xen/delay.h>
+#include <xen/param.h>
 #include <xen/smp.h>
 #include <asm/current.h>
 #include <asm/debugreg.h>
diff --git a/xen/arch/x86/cpu/mcheck/mce.c b/xen/arch/x86/cpu/mcheck/mce.c
index 198595ff97..d61e582af3 100644
--- a/xen/arch/x86/cpu/mcheck/mce.c
+++ b/xen/arch/x86/cpu/mcheck/mce.c
@@ -6,6 +6,7 @@ 
 #include <xen/init.h>
 #include <xen/types.h>
 #include <xen/kernel.h>
+#include <xen/param.h>
 #include <xen/smp.h>
 #include <xen/errno.h>
 #include <xen/console.h>
diff --git a/xen/arch/x86/cpu/mcheck/mce_intel.c b/xen/arch/x86/cpu/mcheck/mce_intel.c
index 70738852b9..6f23ea5329 100644
--- a/xen/arch/x86/cpu/mcheck/mce_intel.c
+++ b/xen/arch/x86/cpu/mcheck/mce_intel.c
@@ -4,6 +4,7 @@ 
 #include <xen/event.h>
 #include <xen/kernel.h>
 #include <xen/delay.h>
+#include <xen/param.h>
 #include <xen/smp.h>
 #include <xen/mm.h>
 #include <xen/cpu.h>
diff --git a/xen/arch/x86/cpu/mtrr/generic.c b/xen/arch/x86/cpu/mtrr/generic.c
index cc0bf4c310..89634f918f 100644
--- a/xen/arch/x86/cpu/mtrr/generic.c
+++ b/xen/arch/x86/cpu/mtrr/generic.c
@@ -3,6 +3,7 @@ 
 #include <xen/lib.h>
 #include <xen/init.h>
 #include <xen/mm.h>
+#include <xen/param.h>
 #include <xen/stdbool.h>
 #include <asm/flushtlb.h>
 #include <asm/invpcid.h>
diff --git a/xen/arch/x86/cpu/mwait-idle.c b/xen/arch/x86/cpu/mwait-idle.c
index 52413e6da1..1c5d6eb023 100644
--- a/xen/arch/x86/cpu/mwait-idle.c
+++ b/xen/arch/x86/cpu/mwait-idle.c
@@ -52,6 +52,7 @@ 
 #include <xen/lib.h>
 #include <xen/cpu.h>
 #include <xen/init.h>
+#include <xen/param.h>
 #include <xen/softirq.h>
 #include <xen/trace.h>
 #include <asm/cpuidle.h>
diff --git a/xen/arch/x86/cpu/vpmu.c b/xen/arch/x86/cpu/vpmu.c
index b62095eef2..3c778450ac 100644
--- a/xen/arch/x86/cpu/vpmu.c
+++ b/xen/arch/x86/cpu/vpmu.c
@@ -22,6 +22,7 @@ 
 #include <xen/event.h>
 #include <xen/guest_access.h>
 #include <xen/cpu.h>
+#include <xen/param.h>
 #include <asm/regs.h>
 #include <asm/types.h>
 #include <asm/msr.h>
diff --git a/xen/arch/x86/cpuid.c b/xen/arch/x86/cpuid.c
index b1ed33d524..aee221dc44 100644
--- a/xen/arch/x86/cpuid.c
+++ b/xen/arch/x86/cpuid.c
@@ -1,5 +1,6 @@ 
 #include <xen/init.h>
 #include <xen/lib.h>
+#include <xen/param.h>
 #include <xen/sched.h>
 #include <xen/nospec.h>
 #include <asm/cpuid.h>
diff --git a/xen/arch/x86/dom0_build.c b/xen/arch/x86/dom0_build.c
index 28b964e018..909b01330d 100644
--- a/xen/arch/x86/dom0_build.c
+++ b/xen/arch/x86/dom0_build.c
@@ -7,6 +7,7 @@ 
 #include <xen/init.h>
 #include <xen/iocap.h>
 #include <xen/libelf.h>
+#include <xen/param.h>
 #include <xen/pfn.h>
 #include <xen/sched.h>
 #include <xen/sched-if.h>
diff --git a/xen/arch/x86/e820.c b/xen/arch/x86/e820.c
index 082f9928a1..0fe9af3ca6 100644
--- a/xen/arch/x86/e820.c
+++ b/xen/arch/x86/e820.c
@@ -1,6 +1,7 @@ 
 #include <xen/init.h>
 #include <xen/lib.h>
 #include <xen/mm.h>
+#include <xen/param.h>
 #include <xen/compat.h>
 #include <xen/dmi.h>
 #include <xen/pfn.h>
diff --git a/xen/arch/x86/genapic/probe.c b/xen/arch/x86/genapic/probe.c
index 1fcc1734f5..d4d7a554a0 100644
--- a/xen/arch/x86/genapic/probe.c
+++ b/xen/arch/x86/genapic/probe.c
@@ -8,6 +8,7 @@ 
 #include <xen/kernel.h>
 #include <xen/ctype.h>
 #include <xen/init.h>
+#include <xen/param.h>
 #include <asm/cache.h>
 #include <asm/fixmap.h>
 #include <asm/mpspec.h>
diff --git a/xen/arch/x86/genapic/x2apic.c b/xen/arch/x86/genapic/x2apic.c
index 1cb16bc10d..f9b5e49761 100644
--- a/xen/arch/x86/genapic/x2apic.c
+++ b/xen/arch/x86/genapic/x2apic.c
@@ -19,6 +19,7 @@ 
 #include <xen/init.h>
 #include <xen/cpu.h>
 #include <xen/cpumask.h>
+#include <xen/param.h>
 #include <asm/apicdef.h>
 #include <asm/genapic.h>
 #include <asm/apic.h>
diff --git a/xen/arch/x86/hpet.c b/xen/arch/x86/hpet.c
index 57f68fa81b..ae99993d90 100644
--- a/xen/arch/x86/hpet.c
+++ b/xen/arch/x86/hpet.c
@@ -11,6 +11,7 @@ 
 #include <xen/softirq.h>
 #include <xen/irq.h>
 #include <xen/numa.h>
+#include <xen/param.h>
 #include <xen/sched.h>
 #include <asm/fixmap.h>
 #include <asm/div64.h>
diff --git a/xen/arch/x86/hvm/asid.c b/xen/arch/x86/hvm/asid.c
index 9d3c671a5f..8e00a28443 100644
--- a/xen/arch/x86/hvm/asid.c
+++ b/xen/arch/x86/hvm/asid.c
@@ -18,6 +18,7 @@ 
 
 #include <xen/init.h>
 #include <xen/lib.h>
+#include <xen/param.h>
 #include <xen/sched.h>
 #include <xen/smp.h>
 #include <xen/percpu.h>
diff --git a/xen/arch/x86/hvm/hvm.c b/xen/arch/x86/hvm/hvm.c
index 4723f5d09c..19dc703603 100644
--- a/xen/arch/x86/hvm/hvm.c
+++ b/xen/arch/x86/hvm/hvm.c
@@ -35,6 +35,7 @@ 
 #include <xen/mem_access.h>
 #include <xen/rangeset.h>
 #include <xen/monitor.h>
+#include <xen/param.h>
 #include <xen/warning.h>
 #include <xen/vpci.h>
 #include <xen/nospec.h>
diff --git a/xen/arch/x86/hvm/quirks.c b/xen/arch/x86/hvm/quirks.c
index 881c6b99d2..54cc66c382 100644
--- a/xen/arch/x86/hvm/quirks.c
+++ b/xen/arch/x86/hvm/quirks.c
@@ -19,6 +19,7 @@ 
 #include <xen/lib.h>
 #include <xen/dmi.h>
 #include <xen/bitmap.h>
+#include <xen/param.h>
 #include <asm/hvm/support.h>
 
 s8 __read_mostly hvm_port80_allowed = -1;
diff --git a/xen/arch/x86/hvm/viridian/viridian.c b/xen/arch/x86/hvm/viridian/viridian.c
index 44c8e6cac6..f2302dc1e6 100644
--- a/xen/arch/x86/hvm/viridian/viridian.c
+++ b/xen/arch/x86/hvm/viridian/viridian.c
@@ -9,6 +9,7 @@ 
 #include <xen/version.h>
 #include <xen/hypercall.h>
 #include <xen/domain_page.h>
+#include <xen/param.h>
 #include <asm/guest_access.h>
 #include <asm/guest/hyperv-tlfs.h>
 #include <asm/paging.h>
diff --git a/xen/arch/x86/hvm/vmx/vmcs.c b/xen/arch/x86/hvm/vmx/vmcs.c
index 634d1946d3..65445afeb0 100644
--- a/xen/arch/x86/hvm/vmx/vmcs.c
+++ b/xen/arch/x86/hvm/vmx/vmcs.c
@@ -18,6 +18,7 @@ 
 #include <xen/init.h>
 #include <xen/mm.h>
 #include <xen/lib.h>
+#include <xen/param.h>
 #include <xen/errno.h>
 #include <xen/domain_page.h>
 #include <xen/event.h>
diff --git a/xen/arch/x86/hvm/vmx/vmx.c b/xen/arch/x86/hvm/vmx/vmx.c
index f83f102638..4fc9d1128c 100644
--- a/xen/arch/x86/hvm/vmx/vmx.c
+++ b/xen/arch/x86/hvm/vmx/vmx.c
@@ -17,6 +17,7 @@ 
 
 #include <xen/init.h>
 #include <xen/lib.h>
+#include <xen/param.h>
 #include <xen/trace.h>
 #include <xen/sched.h>
 #include <xen/irq.h>
diff --git a/xen/arch/x86/io_apic.c b/xen/arch/x86/io_apic.c
index 4125ea0c0c..e98e08e9c8 100644
--- a/xen/arch/x86/io_apic.c
+++ b/xen/arch/x86/io_apic.c
@@ -24,6 +24,7 @@ 
 #include <xen/init.h>
 #include <xen/irq.h>
 #include <xen/delay.h>
+#include <xen/param.h>
 #include <xen/sched.h>
 #include <xen/acpi.h>
 #include <xen/keyhandler.h>
diff --git a/xen/arch/x86/irq.c b/xen/arch/x86/irq.c
index 310ac00a60..cc2eb8e925 100644
--- a/xen/arch/x86/irq.c
+++ b/xen/arch/x86/irq.c
@@ -10,6 +10,7 @@ 
 #include <xen/errno.h>
 #include <xen/event.h>
 #include <xen/irq.h>
+#include <xen/param.h>
 #include <xen/perfc.h>
 #include <xen/sched.h>
 #include <xen/keyhandler.h>
diff --git a/xen/arch/x86/microcode.c b/xen/arch/x86/microcode.c
index 6ced293d88..2f22bc2bb2 100644
--- a/xen/arch/x86/microcode.c
+++ b/xen/arch/x86/microcode.c
@@ -26,6 +26,7 @@ 
 #include <xen/kernel.h>
 #include <xen/init.h>
 #include <xen/notifier.h>
+#include <xen/param.h>
 #include <xen/sched.h>
 #include <xen/smp.h>
 #include <xen/softirq.h>
diff --git a/xen/arch/x86/mm.c b/xen/arch/x86/mm.c
index 654190e9e9..9d5f45b506 100644
--- a/xen/arch/x86/mm.c
+++ b/xen/arch/x86/mm.c
@@ -103,6 +103,7 @@ 
 #include <xen/kernel.h>
 #include <xen/lib.h>
 #include <xen/mm.h>
+#include <xen/param.h>
 #include <xen/domain.h>
 #include <xen/sched.h>
 #include <xen/err.h>
diff --git a/xen/arch/x86/mm/p2m.c b/xen/arch/x86/mm/p2m.c
index 3119269073..09e4d1910a 100644
--- a/xen/arch/x86/mm/p2m.c
+++ b/xen/arch/x86/mm/p2m.c
@@ -27,6 +27,7 @@ 
 #include <xen/iommu.h>
 #include <xen/vm_event.h>
 #include <xen/event.h>
+#include <xen/param.h>
 #include <public/vm_event.h>
 #include <asm/domain.h>
 #include <asm/page.h>
diff --git a/xen/arch/x86/msi.c b/xen/arch/x86/msi.c
index df97ce0c72..c85cf9f85a 100644
--- a/xen/arch/x86/msi.c
+++ b/xen/arch/x86/msi.c
@@ -14,6 +14,7 @@ 
 #include <xen/acpi.h>
 #include <xen/cpu.h>
 #include <xen/errno.h>
+#include <xen/param.h>
 #include <xen/pci.h>
 #include <xen/pci_regs.h>
 #include <xen/iocap.h>
diff --git a/xen/arch/x86/nmi.c b/xen/arch/x86/nmi.c
index e26121a737..a5c6bdd0ce 100644
--- a/xen/arch/x86/nmi.c
+++ b/xen/arch/x86/nmi.c
@@ -16,6 +16,7 @@ 
 #include <xen/init.h>
 #include <xen/lib.h>
 #include <xen/mm.h>
+#include <xen/param.h>
 #include <xen/irq.h>
 #include <xen/delay.h>
 #include <xen/time.h>
diff --git a/xen/arch/x86/numa.c b/xen/arch/x86/numa.c
index 7e1f563012..6ef15b34d5 100644
--- a/xen/arch/x86/numa.c
+++ b/xen/arch/x86/numa.c
@@ -11,6 +11,7 @@ 
 #include <xen/nodemask.h>
 #include <xen/numa.h>
 #include <xen/keyhandler.h>
+#include <xen/param.h>
 #include <xen/time.h>
 #include <xen/smp.h>
 #include <xen/pfn.h>
diff --git a/xen/arch/x86/oprofile/nmi_int.c b/xen/arch/x86/oprofile/nmi_int.c
index 3dfb8fef93..8f97f7522c 100644
--- a/xen/arch/x86/oprofile/nmi_int.c
+++ b/xen/arch/x86/oprofile/nmi_int.c
@@ -15,6 +15,7 @@ 
 #include <xen/types.h>
 #include <xen/errno.h>
 #include <xen/init.h>
+#include <xen/param.h>
 #include <xen/string.h>
 #include <xen/delay.h>
 #include <xen/xenoprof.h>
diff --git a/xen/arch/x86/psr.c b/xen/arch/x86/psr.c
index 8bf1c23751..d7f8864651 100644
--- a/xen/arch/x86/psr.c
+++ b/xen/arch/x86/psr.c
@@ -16,6 +16,7 @@ 
 #include <xen/cpu.h>
 #include <xen/err.h>
 #include <xen/init.h>
+#include <xen/param.h>
 #include <xen/sched.h>
 #include <asm/psr.h>
 
diff --git a/xen/arch/x86/pv/domain.c b/xen/arch/x86/pv/domain.c
index 4da0b2afff..c3473b9a47 100644
--- a/xen/arch/x86/pv/domain.c
+++ b/xen/arch/x86/pv/domain.c
@@ -7,6 +7,7 @@ 
 #include <xen/domain_page.h>
 #include <xen/errno.h>
 #include <xen/lib.h>
+#include <xen/param.h>
 #include <xen/sched.h>
 
 #include <asm/cpufeature.h>
diff --git a/xen/arch/x86/pv/shim.c b/xen/arch/x86/pv/shim.c
index 7a898fdbe5..76fb380100 100644
--- a/xen/arch/x86/pv/shim.c
+++ b/xen/arch/x86/pv/shim.c
@@ -23,6 +23,7 @@ 
 #include <xen/hypercall.h>
 #include <xen/init.h>
 #include <xen/iocap.h>
+#include <xen/param.h>
 #include <xen/shutdown.h>
 #include <xen/types.h>
 #include <xen/consoled.h>
diff --git a/xen/arch/x86/setup.c b/xen/arch/x86/setup.c
index d858883404..9aa171f733 100644
--- a/xen/arch/x86/setup.c
+++ b/xen/arch/x86/setup.c
@@ -2,6 +2,7 @@ 
 #include <xen/lib.h>
 #include <xen/err.h>
 #include <xen/grant_table.h>
+#include <xen/param.h>
 #include <xen/sched.h>
 #include <xen/domain.h>
 #include <xen/serial.h>
diff --git a/xen/arch/x86/shutdown.c b/xen/arch/x86/shutdown.c
index 005c0bf4fa..acef033143 100644
--- a/xen/arch/x86/shutdown.c
+++ b/xen/arch/x86/shutdown.c
@@ -6,6 +6,7 @@ 
 
 #include <xen/init.h>
 #include <xen/lib.h>
+#include <xen/param.h>
 #include <xen/sched.h>
 #include <xen/smp.h>
 #include <xen/delay.h>
diff --git a/xen/arch/x86/spec_ctrl.c b/xen/arch/x86/spec_ctrl.c
index aa632bdcee..20f562902b 100644
--- a/xen/arch/x86/spec_ctrl.c
+++ b/xen/arch/x86/spec_ctrl.c
@@ -19,6 +19,7 @@ 
 #include <xen/errno.h>
 #include <xen/init.h>
 #include <xen/lib.h>
+#include <xen/param.h>
 #include <xen/warning.h>
 
 #include <asm/microcode.h>
diff --git a/xen/arch/x86/tboot.c b/xen/arch/x86/tboot.c
index 5020c4ad49..8c232270b4 100644
--- a/xen/arch/x86/tboot.c
+++ b/xen/arch/x86/tboot.c
@@ -1,6 +1,7 @@ 
 #include <xen/init.h>
 #include <xen/types.h>
 #include <xen/lib.h>
+#include <xen/param.h>
 #include <xen/sched.h>
 #include <xen/domain_page.h>
 #include <xen/iommu.h>
diff --git a/xen/arch/x86/time.c b/xen/arch/x86/time.c
index f6b26f8883..cf3e51fb5e 100644
--- a/xen/arch/x86/time.c
+++ b/xen/arch/x86/time.c
@@ -14,6 +14,7 @@ 
 #include <xen/sched.h>
 #include <xen/lib.h>
 #include <xen/init.h>
+#include <xen/param.h>
 #include <xen/time.h>
 #include <xen/timer.h>
 #include <xen/smp.h>
diff --git a/xen/arch/x86/traps.c b/xen/arch/x86/traps.c
index 97499a0c79..56067f85d1 100644
--- a/xen/arch/x86/traps.c
+++ b/xen/arch/x86/traps.c
@@ -30,6 +30,7 @@ 
 #include <xen/err.h>
 #include <xen/errno.h>
 #include <xen/mm.h>
+#include <xen/param.h>
 #include <xen/console.h>
 #include <xen/shutdown.h>
 #include <xen/guest_access.h>
diff --git a/xen/arch/x86/tsx.c b/xen/arch/x86/tsx.c
index 2d202a0d4e..39e483640a 100644
--- a/xen/arch/x86/tsx.c
+++ b/xen/arch/x86/tsx.c
@@ -1,4 +1,5 @@ 
 #include <xen/init.h>
+#include <xen/param.h>
 #include <asm/msr.h>
 
 /*
diff --git a/xen/arch/x86/x86_64/mmconfig-shared.c b/xen/arch/x86/x86_64/mmconfig-shared.c
index cc08b52a35..0c55c7206e 100644
--- a/xen/arch/x86/x86_64/mmconfig-shared.c
+++ b/xen/arch/x86/x86_64/mmconfig-shared.c
@@ -14,6 +14,7 @@ 
 
 #include <xen/init.h>
 #include <xen/mm.h>
+#include <xen/param.h>
 #include <xen/acpi.h>
 #include <xen/xmalloc.h>
 #include <xen/pci.h>
diff --git a/xen/arch/x86/xstate.c b/xen/arch/x86/xstate.c
index 243495ed07..078419a171 100644
--- a/xen/arch/x86/xstate.c
+++ b/xen/arch/x86/xstate.c
@@ -5,6 +5,7 @@ 
  *
  */
 
+#include <xen/param.h>
 #include <xen/percpu.h>
 #include <xen/sched.h>
 #include <asm/current.h>
diff --git a/xen/common/argo.c b/xen/common/argo.c
index 2b91e94499..aa3443a377 100644
--- a/xen/common/argo.c
+++ b/xen/common/argo.c
@@ -24,6 +24,7 @@ 
 #include <xen/guest_access.h>
 #include <xen/lib.h>
 #include <xen/nospec.h>
+#include <xen/param.h>
 #include <xen/sched.h>
 #include <xen/time.h>
 #include <xsm/xsm.h>
diff --git a/xen/common/core_parking.c b/xen/common/core_parking.c
index a6669e1766..411106c675 100644
--- a/xen/common/core_parking.c
+++ b/xen/common/core_parking.c
@@ -19,6 +19,7 @@ 
 #include <xen/cpu.h>
 #include <xen/init.h>
 #include <xen/cpumask.h>
+#include <xen/param.h>
 
 #include <asm/smp.h>
 
diff --git a/xen/common/cpupool.c b/xen/common/cpupool.c
index d66b541a94..9712614f16 100644
--- a/xen/common/cpupool.c
+++ b/xen/common/cpupool.c
@@ -14,6 +14,7 @@ 
 #include <xen/lib.h>
 #include <xen/init.h>
 #include <xen/cpumask.h>
+#include <xen/param.h>
 #include <xen/percpu.h>
 #include <xen/sched.h>
 #include <xen/sched-if.h>
diff --git a/xen/common/debugtrace.c b/xen/common/debugtrace.c
index a788e55b4c..c21ec99ee0 100644
--- a/xen/common/debugtrace.c
+++ b/xen/common/debugtrace.c
@@ -11,6 +11,7 @@ 
 #include <xen/keyhandler.h>
 #include <xen/lib.h>
 #include <xen/mm.h>
+#include <xen/param.h>
 #include <xen/percpu.h>
 #include <xen/serial.h>
 #include <xen/smp.h>
diff --git a/xen/common/domain.c b/xen/common/domain.c
index ee3f9ffd3e..086177d3c8 100644
--- a/xen/common/domain.c
+++ b/xen/common/domain.c
@@ -9,6 +9,7 @@ 
 #include <xen/lib.h>
 #include <xen/ctype.h>
 #include <xen/err.h>
+#include <xen/param.h>
 #include <xen/sched.h>
 #include <xen/sched-if.h>
 #include <xen/domain.h>
diff --git a/xen/common/efi/boot.c b/xen/common/efi/boot.c
index bf7bb95999..b9f461505c 100644
--- a/xen/common/efi/boot.c
+++ b/xen/common/efi/boot.c
@@ -11,6 +11,7 @@ 
 #include <xen/lib.h>
 #include <xen/mm.h>
 #include <xen/multiboot.h>
+#include <xen/param.h>
 #include <xen/pci_regs.h>
 #include <xen/pfn.h>
 #if EFI_PAGE_SIZE != PAGE_SIZE
diff --git a/xen/common/gdbstub.c b/xen/common/gdbstub.c
index 6234834a20..848c1f4327 100644
--- a/xen/common/gdbstub.c
+++ b/xen/common/gdbstub.c
@@ -40,6 +40,7 @@ 
 #include <xen/watchdog.h>
 #include <asm/debugger.h>
 #include <xen/init.h>
+#include <xen/param.h>
 #include <xen/smp.h>
 #include <xen/console.h>
 #include <xen/errno.h>
diff --git a/xen/common/grant_table.c b/xen/common/grant_table.c
index 5536d282b9..2ecf38dfbe 100644
--- a/xen/common/grant_table.c
+++ b/xen/common/grant_table.c
@@ -28,6 +28,7 @@ 
 #include <xen/lib.h>
 #include <xen/sched.h>
 #include <xen/mm.h>
+#include <xen/param.h>
 #include <xen/event.h>
 #include <xen/trace.h>
 #include <xen/grant_table.h>
diff --git a/xen/common/kernel.c b/xen/common/kernel.c
index 760917dab5..22941cec94 100644
--- a/xen/common/kernel.c
+++ b/xen/common/kernel.c
@@ -7,6 +7,7 @@ 
 #include <xen/init.h>
 #include <xen/lib.h>
 #include <xen/errno.h>
+#include <xen/param.h>
 #include <xen/version.h>
 #include <xen/sched.h>
 #include <xen/paging.h>
diff --git a/xen/common/kexec.c b/xen/common/kexec.c
index a262cc5a18..9af7de4df3 100644
--- a/xen/common/kexec.c
+++ b/xen/common/kexec.c
@@ -12,6 +12,7 @@ 
 #include <xen/ctype.h>
 #include <xen/errno.h>
 #include <xen/guest_access.h>
+#include <xen/param.h>
 #include <xen/watchdog.h>
 #include <xen/sched.h>
 #include <xen/types.h>
diff --git a/xen/common/memory.c b/xen/common/memory.c
index 309e872edf..e262e63e4a 100644
--- a/xen/common/memory.c
+++ b/xen/common/memory.c
@@ -11,6 +11,7 @@ 
 #include <xen/types.h>
 #include <xen/lib.h>
 #include <xen/mm.h>
+#include <xen/param.h>
 #include <xen/perfc.h>
 #include <xen/sched.h>
 #include <xen/event.h>
diff --git a/xen/common/page_alloc.c b/xen/common/page_alloc.c
index 919a270587..97902d42c1 100644
--- a/xen/common/page_alloc.c
+++ b/xen/common/page_alloc.c
@@ -126,6 +126,7 @@ 
 #include <xen/sched.h>
 #include <xen/spinlock.h>
 #include <xen/mm.h>
+#include <xen/param.h>
 #include <xen/irq.h>
 #include <xen/softirq.h>
 #include <xen/domain_page.h>
diff --git a/xen/common/rcupdate.c b/xen/common/rcupdate.c
index a56103c6f7..11cfc196fd 100644
--- a/xen/common/rcupdate.c
+++ b/xen/common/rcupdate.c
@@ -34,6 +34,7 @@ 
 #include <xen/types.h>
 #include <xen/kernel.h>
 #include <xen/init.h>
+#include <xen/param.h>
 #include <xen/spinlock.h>
 #include <xen/smp.h>
 #include <xen/rcupdate.h>
diff --git a/xen/common/sched_credit.c b/xen/common/sched_credit.c
index aa41a3301b..2ab89140db 100644
--- a/xen/common/sched_credit.c
+++ b/xen/common/sched_credit.c
@@ -10,6 +10,7 @@ 
 
 #include <xen/init.h>
 #include <xen/lib.h>
+#include <xen/param.h>
 #include <xen/sched.h>
 #include <xen/domain.h>
 #include <xen/delay.h>
diff --git a/xen/common/sched_credit2.c b/xen/common/sched_credit2.c
index f7c477053c..3c65269aef 100644
--- a/xen/common/sched_credit2.c
+++ b/xen/common/sched_credit2.c
@@ -12,6 +12,7 @@ 
 
 #include <xen/init.h>
 #include <xen/lib.h>
+#include <xen/param.h>
 #include <xen/sched.h>
 #include <xen/domain.h>
 #include <xen/delay.h>
diff --git a/xen/common/schedule.c b/xen/common/schedule.c
index 54a07ff9e8..cef2414659 100644
--- a/xen/common/schedule.c
+++ b/xen/common/schedule.c
@@ -16,6 +16,7 @@ 
 #ifndef COMPAT
 #include <xen/init.h>
 #include <xen/lib.h>
+#include <xen/param.h>
 #include <xen/sched.h>
 #include <xen/domain.h>
 #include <xen/delay.h>
diff --git a/xen/common/shutdown.c b/xen/common/shutdown.c
index 2ed4d62214..912593915b 100644
--- a/xen/common/shutdown.c
+++ b/xen/common/shutdown.c
@@ -1,5 +1,6 @@ 
 #include <xen/init.h>
 #include <xen/lib.h>
+#include <xen/param.h>
 #include <xen/sched.h>
 #include <xen/domain.h>
 #include <xen/delay.h>
diff --git a/xen/common/timer.c b/xen/common/timer.c
index 645206a989..1bb265ceea 100644
--- a/xen/common/timer.c
+++ b/xen/common/timer.c
@@ -10,6 +10,7 @@ 
 #include <xen/errno.h>
 #include <xen/sched.h>
 #include <xen/lib.h>
+#include <xen/param.h>
 #include <xen/smp.h>
 #include <xen/perfc.h>
 #include <xen/time.h>
diff --git a/xen/common/trace.c b/xen/common/trace.c
index ebfc735b31..a2a389a1c7 100644
--- a/xen/common/trace.c
+++ b/xen/common/trace.c
@@ -19,6 +19,7 @@ 
 #include <asm/types.h>
 #include <asm/io.h>
 #include <xen/lib.h>
+#include <xen/param.h>
 #include <xen/sched.h>
 #include <xen/smp.h>
 #include <xen/trace.h>
diff --git a/xen/drivers/acpi/apei/hest.c b/xen/drivers/acpi/apei/hest.c
index 70734ab0e2..c5f3aaab7c 100644
--- a/xen/drivers/acpi/apei/hest.c
+++ b/xen/drivers/acpi/apei/hest.c
@@ -30,6 +30,7 @@ 
 #include <xen/init.h>
 #include <xen/kernel.h>
 #include <xen/mm.h>
+#include <xen/param.h>
 #include <xen/pfn.h>
 #include <acpi/acpi.h>
 #include <acpi/apei.h>
diff --git a/xen/drivers/acpi/tables.c b/xen/drivers/acpi/tables.c
index b890b73901..8c2a279e18 100644
--- a/xen/drivers/acpi/tables.c
+++ b/xen/drivers/acpi/tables.c
@@ -24,6 +24,7 @@ 
 
 #include <xen/init.h>
 #include <xen/kernel.h>
+#include <xen/param.h>
 #include <xen/smp.h>
 #include <xen/string.h>
 #include <xen/types.h>
diff --git a/xen/drivers/char/arm-uart.c b/xen/drivers/char/arm-uart.c
index 627746ba89..eeb9ceefc0 100644
--- a/xen/drivers/char/arm-uart.c
+++ b/xen/drivers/char/arm-uart.c
@@ -21,6 +21,7 @@ 
 #include <asm/types.h>
 #include <xen/console.h>
 #include <xen/device_tree.h>
+#include <xen/param.h>
 #include <xen/serial.h>
 #include <xen/errno.h>
 #include <xen/acpi.h>
diff --git a/xen/drivers/char/console.c b/xen/drivers/char/console.c
index 4bcbbfa7d6..913ae1b66a 100644
--- a/xen/drivers/char/console.c
+++ b/xen/drivers/char/console.c
@@ -15,6 +15,7 @@ 
 #include <xen/init.h>
 #include <xen/event.h>
 #include <xen/console.h>
+#include <xen/param.h>
 #include <xen/serial.h>
 #include <xen/softirq.h>
 #include <xen/keyhandler.h>
diff --git a/xen/drivers/char/ehci-dbgp.c b/xen/drivers/char/ehci-dbgp.c
index b6e155d17b..c893d246de 100644
--- a/xen/drivers/char/ehci-dbgp.c
+++ b/xen/drivers/char/ehci-dbgp.c
@@ -8,6 +8,7 @@ 
 #include <xen/console.h>
 #include <xen/delay.h>
 #include <xen/errno.h>
+#include <xen/param.h>
 #include <xen/pci.h>
 #include <xen/serial.h>
 #include <asm/byteorder.h>
diff --git a/xen/drivers/char/ns16550.c b/xen/drivers/char/ns16550.c
index aa87c57fc9..bd048f307a 100644
--- a/xen/drivers/char/ns16550.c
+++ b/xen/drivers/char/ns16550.c
@@ -11,6 +11,7 @@ 
 #include <xen/console.h>
 #include <xen/init.h>
 #include <xen/irq.h>
+#include <xen/param.h>
 #include <xen/sched.h>
 #include <xen/timer.h>
 #include <xen/serial.h>
diff --git a/xen/drivers/char/serial.c b/xen/drivers/char/serial.c
index 88cd876790..5ecba0af33 100644
--- a/xen/drivers/char/serial.c
+++ b/xen/drivers/char/serial.c
@@ -9,6 +9,7 @@ 
 #include <xen/delay.h>
 #include <xen/init.h>
 #include <xen/mm.h>
+#include <xen/param.h>
 #include <xen/serial.h>
 #include <xen/cache.h>
 
diff --git a/xen/drivers/cpufreq/cpufreq.c b/xen/drivers/cpufreq/cpufreq.c
index 2d716abf72..e630a47419 100644
--- a/xen/drivers/cpufreq/cpufreq.c
+++ b/xen/drivers/cpufreq/cpufreq.c
@@ -31,6 +31,7 @@ 
 #include <xen/delay.h>
 #include <xen/cpumask.h>
 #include <xen/list.h>
+#include <xen/param.h>
 #include <xen/sched.h>
 #include <xen/string.h>
 #include <xen/timer.h>
diff --git a/xen/drivers/passthrough/amd/iommu_acpi.c b/xen/drivers/passthrough/amd/iommu_acpi.c
index 9fbc343c58..6c5f8e46ec 100644
--- a/xen/drivers/passthrough/amd/iommu_acpi.c
+++ b/xen/drivers/passthrough/amd/iommu_acpi.c
@@ -19,6 +19,7 @@ 
 
 #include <xen/errno.h>
 #include <xen/acpi.h>
+#include <xen/param.h>
 #include <asm/apicdef.h>
 #include <asm/io_apic.h>
 #include <asm/amd-iommu.h>
diff --git a/xen/drivers/passthrough/iommu.c b/xen/drivers/passthrough/iommu.c
index 4e19cf56cc..9d421e06de 100644
--- a/xen/drivers/passthrough/iommu.c
+++ b/xen/drivers/passthrough/iommu.c
@@ -17,6 +17,7 @@ 
 #include <xen/paging.h>
 #include <xen/guest_access.h>
 #include <xen/event.h>
+#include <xen/param.h>
 #include <xen/softirq.h>
 #include <xen/keyhandler.h>
 #include <xsm/xsm.h>
diff --git a/xen/drivers/passthrough/pci.c b/xen/drivers/passthrough/pci.c
index c07a63981a..0d3ced1fcf 100644
--- a/xen/drivers/passthrough/pci.c
+++ b/xen/drivers/passthrough/pci.c
@@ -22,6 +22,7 @@ 
 #include <xen/prefetch.h>
 #include <xen/iommu.h>
 #include <xen/irq.h>
+#include <xen/param.h>
 #include <xen/vm_event.h>
 #include <asm/hvm/irq.h>
 #include <xen/delay.h>
diff --git a/xen/drivers/passthrough/vtd/dmar.c b/xen/drivers/passthrough/vtd/dmar.c
index f36b99ae37..1784f91b34 100644
--- a/xen/drivers/passthrough/vtd/dmar.c
+++ b/xen/drivers/passthrough/vtd/dmar.c
@@ -24,6 +24,7 @@ 
 #include <xen/kernel.h>
 #include <xen/acpi.h>
 #include <xen/mm.h>
+#include <xen/param.h>
 #include <xen/xmalloc.h>
 #include <xen/pci.h>
 #include <xen/pci_regs.h>
diff --git a/xen/drivers/passthrough/vtd/quirks.c b/xen/drivers/passthrough/vtd/quirks.c
index 4dadd9523f..5594270678 100644
--- a/xen/drivers/passthrough/vtd/quirks.c
+++ b/xen/drivers/passthrough/vtd/quirks.c
@@ -17,6 +17,7 @@ 
  */
 
 #include <xen/irq.h>
+#include <xen/param.h>
 #include <xen/sched.h>
 #include <xen/xmalloc.h>
 #include <xen/domain_page.h>
diff --git a/xen/drivers/passthrough/vtd/x86/vtd.c b/xen/drivers/passthrough/vtd/x86/vtd.c
index ff456e1e70..f379afac03 100644
--- a/xen/drivers/passthrough/vtd/x86/vtd.c
+++ b/xen/drivers/passthrough/vtd/x86/vtd.c
@@ -17,6 +17,7 @@ 
  * Copyright (C) Weidong Han <weidong.han@intel.com>
  */
 
+#include <xen/param.h>
 #include <xen/sched.h>
 #include <xen/softirq.h>
 #include <xen/domain_page.h>
diff --git a/xen/drivers/passthrough/x86/ats.c b/xen/drivers/passthrough/x86/ats.c
index 3eea7f89fc..8ae0eae4a2 100644
--- a/xen/drivers/passthrough/x86/ats.c
+++ b/xen/drivers/passthrough/x86/ats.c
@@ -12,6 +12,7 @@ 
  * this program; If not, see <http://www.gnu.org/licenses/>.
  */
 
+#include <xen/param.h>
 #include <xen/sched.h>
 #include <xen/pci.h>
 #include <xen/pci_regs.h>
diff --git a/xen/drivers/video/vesa.c b/xen/drivers/video/vesa.c
index fd2cb1312d..2c1bbd9278 100644
--- a/xen/drivers/video/vesa.c
+++ b/xen/drivers/video/vesa.c
@@ -6,6 +6,7 @@ 
 
 #include <xen/init.h>
 #include <xen/lib.h>
+#include <xen/param.h>
 #include <xen/xmalloc.h>
 #include <xen/kernel.h>
 #include <xen/vga.h>
diff --git a/xen/drivers/video/vga.c b/xen/drivers/video/vga.c
index 666f2e2509..b7f04d0d97 100644
--- a/xen/drivers/video/vga.c
+++ b/xen/drivers/video/vga.c
@@ -7,6 +7,7 @@ 
 #include <xen/init.h>
 #include <xen/lib.h>
 #include <xen/mm.h>
+#include <xen/param.h>
 #include <xen/vga.h>
 #include <xen/pci.h>
 #include <asm/io.h>
diff --git a/xen/include/xen/init.h b/xen/include/xen/init.h
index d0f3a007d0..bfe789e93f 100644
--- a/xen/include/xen/init.h
+++ b/xen/include/xen/init.h
@@ -71,126 +71,6 @@  typedef void (*exitcall_t)(void);
 void do_presmp_initcalls(void);
 void do_initcalls(void);
 
-/*
- * Used for kernel command line parameter setup
- */
-struct kernel_param {
-    const char *name;
-    enum {
-        OPT_STR,
-        OPT_UINT,
-        OPT_BOOL,
-        OPT_SIZE,
-        OPT_CUSTOM,
-        OPT_IGNORE,
-    } type;
-    unsigned int len;
-    union {
-        void *var;
-        int (*func)(const char *);
-    } par;
-};
-
-extern const struct kernel_param __setup_start[], __setup_end[];
-extern const struct kernel_param __param_start[], __param_end[];
-
-#define __dataparam       __used_section(".data.param")
-
-#define __param(att)      static const att \
-    __attribute__((__aligned__(sizeof(void *)))) struct kernel_param
-
-#define __setup_str static const __initconst \
-    __attribute__((__aligned__(1))) char
-#define __kparam          __param(__initsetup)
-
-#define custom_param(_name, _var) \
-    __setup_str __setup_str_##_var[] = _name; \
-    __kparam __setup_##_var = \
-        { .name = __setup_str_##_var, \
-          .type = OPT_CUSTOM, \
-          .par.func = _var }
-#define boolean_param(_name, _var) \
-    __setup_str __setup_str_##_var[] = _name; \
-    __kparam __setup_##_var = \
-        { .name = __setup_str_##_var, \
-          .type = OPT_BOOL, \
-          .len = sizeof(_var), \
-          .par.var = &_var }
-#define integer_param(_name, _var) \
-    __setup_str __setup_str_##_var[] = _name; \
-    __kparam __setup_##_var = \
-        { .name = __setup_str_##_var, \
-          .type = OPT_UINT, \
-          .len = sizeof(_var), \
-          .par.var = &_var }
-#define size_param(_name, _var) \
-    __setup_str __setup_str_##_var[] = _name; \
-    __kparam __setup_##_var = \
-        { .name = __setup_str_##_var, \
-          .type = OPT_SIZE, \
-          .len = sizeof(_var), \
-          .par.var = &_var }
-#define string_param(_name, _var) \
-    __setup_str __setup_str_##_var[] = _name; \
-    __kparam __setup_##_var = \
-        { .name = __setup_str_##_var, \
-          .type = OPT_STR, \
-          .len = sizeof(_var), \
-          .par.var = &_var }
-#define ignore_param(_name)                 \
-    __setup_str setup_str_ign[] = _name;    \
-    __kparam setup_ign =                    \
-        { .name = setup_str_ign,            \
-          .type = OPT_IGNORE }
-
-#define __rtparam         __param(__dataparam)
-
-#define custom_runtime_only_param(_name, _var) \
-    __rtparam __rtpar_##_var = \
-      { .name = _name, \
-          .type = OPT_CUSTOM, \
-          .par.func = _var }
-#define boolean_runtime_only_param(_name, _var) \
-    __rtparam __rtpar_##_var = \
-        { .name = _name, \
-          .type = OPT_BOOL, \
-          .len = sizeof(_var), \
-          .par.var = &_var }
-#define integer_runtime_only_param(_name, _var) \
-    __rtparam __rtpar_##_var = \
-        { .name = _name, \
-          .type = OPT_UINT, \
-          .len = sizeof(_var), \
-          .par.var = &_var }
-#define size_runtime_only_param(_name, _var) \
-    __rtparam __rtpar_##_var = \
-        { .name = _name, \
-          .type = OPT_SIZE, \
-          .len = sizeof(_var), \
-          .par.var = &_var }
-#define string_runtime_only_param(_name, _var) \
-    __rtparam __rtpar_##_var = \
-        { .name = _name, \
-          .type = OPT_STR, \
-          .len = sizeof(_var), \
-          .par.var = &_var }
-
-#define custom_runtime_param(_name, _var) \
-    custom_param(_name, _var); \
-    custom_runtime_only_param(_name, _var)
-#define boolean_runtime_param(_name, _var) \
-    boolean_param(_name, _var); \
-    boolean_runtime_only_param(_name, _var)
-#define integer_runtime_param(_name, _var) \
-    integer_param(_name, _var); \
-    integer_runtime_only_param(_name, _var)
-#define size_runtime_param(_name, _var) \
-    size_param(_name, _var); \
-    size_runtime_only_param(_name, _var)
-#define string_runtime_param(_name, _var) \
-    string_param(_name, _var); \
-    string_runtime_only_param(_name, _var)
-
 #endif /* __ASSEMBLY__ */
 
 #ifdef CONFIG_LATE_HWDOM
diff --git a/xen/include/xen/param.h b/xen/include/xen/param.h
new file mode 100644
index 0000000000..75471eb4ad
--- /dev/null
+++ b/xen/include/xen/param.h
@@ -0,0 +1,126 @@ 
+#ifndef _XEN_PARAM_H
+#define _XEN_PARAM_H
+
+#include <xen/init.h>
+
+/*
+ * Used for kernel command line parameter setup
+ */
+struct kernel_param {
+    const char *name;
+    enum {
+        OPT_STR,
+        OPT_UINT,
+        OPT_BOOL,
+        OPT_SIZE,
+        OPT_CUSTOM,
+        OPT_IGNORE,
+    } type;
+    unsigned int len;
+    union {
+        void *var;
+        int (*func)(const char *);
+    } par;
+};
+
+extern const struct kernel_param __setup_start[], __setup_end[];
+extern const struct kernel_param __param_start[], __param_end[];
+
+#define __dataparam       __used_section(".data.param")
+
+#define __param(att)      static const att \
+    __attribute__((__aligned__(sizeof(void *)))) struct kernel_param
+
+#define __setup_str static const __initconst \
+    __attribute__((__aligned__(1))) char
+#define __kparam          __param(__initsetup)
+
+#define custom_param(_name, _var) \
+    __setup_str __setup_str_##_var[] = _name; \
+    __kparam __setup_##_var = \
+        { .name = __setup_str_##_var, \
+          .type = OPT_CUSTOM, \
+          .par.func = _var }
+#define boolean_param(_name, _var) \
+    __setup_str __setup_str_##_var[] = _name; \
+    __kparam __setup_##_var = \
+        { .name = __setup_str_##_var, \
+          .type = OPT_BOOL, \
+          .len = sizeof(_var), \
+          .par.var = &_var }
+#define integer_param(_name, _var) \
+    __setup_str __setup_str_##_var[] = _name; \
+    __kparam __setup_##_var = \
+        { .name = __setup_str_##_var, \
+          .type = OPT_UINT, \
+          .len = sizeof(_var), \
+          .par.var = &_var }
+#define size_param(_name, _var) \
+    __setup_str __setup_str_##_var[] = _name; \
+    __kparam __setup_##_var = \
+        { .name = __setup_str_##_var, \
+          .type = OPT_SIZE, \
+          .len = sizeof(_var), \
+          .par.var = &_var }
+#define string_param(_name, _var) \
+    __setup_str __setup_str_##_var[] = _name; \
+    __kparam __setup_##_var = \
+        { .name = __setup_str_##_var, \
+          .type = OPT_STR, \
+          .len = sizeof(_var), \
+          .par.var = &_var }
+#define ignore_param(_name)                 \
+    __setup_str setup_str_ign[] = _name;    \
+    __kparam setup_ign =                    \
+        { .name = setup_str_ign,            \
+          .type = OPT_IGNORE }
+
+#define __rtparam         __param(__dataparam)
+
+#define custom_runtime_only_param(_name, _var) \
+    __rtparam __rtpar_##_var = \
+      { .name = _name, \
+          .type = OPT_CUSTOM, \
+          .par.func = _var }
+#define boolean_runtime_only_param(_name, _var) \
+    __rtparam __rtpar_##_var = \
+        { .name = _name, \
+          .type = OPT_BOOL, \
+          .len = sizeof(_var), \
+          .par.var = &_var }
+#define integer_runtime_only_param(_name, _var) \
+    __rtparam __rtpar_##_var = \
+        { .name = _name, \
+          .type = OPT_UINT, \
+          .len = sizeof(_var), \
+          .par.var = &_var }
+#define size_runtime_only_param(_name, _var) \
+    __rtparam __rtpar_##_var = \
+        { .name = _name, \
+          .type = OPT_SIZE, \
+          .len = sizeof(_var), \
+          .par.var = &_var }
+#define string_runtime_only_param(_name, _var) \
+    __rtparam __rtpar_##_var = \
+        { .name = _name, \
+          .type = OPT_STR, \
+          .len = sizeof(_var), \
+          .par.var = &_var }
+
+#define custom_runtime_param(_name, _var) \
+    custom_param(_name, _var); \
+    custom_runtime_only_param(_name, _var)
+#define boolean_runtime_param(_name, _var) \
+    boolean_param(_name, _var); \
+    boolean_runtime_only_param(_name, _var)
+#define integer_runtime_param(_name, _var) \
+    integer_param(_name, _var); \
+    integer_runtime_only_param(_name, _var)
+#define size_runtime_param(_name, _var) \
+    size_param(_name, _var); \
+    size_runtime_only_param(_name, _var)
+#define string_runtime_param(_name, _var) \
+    string_param(_name, _var); \
+    string_runtime_only_param(_name, _var)
+
+#endif /* _XEN_PARAM_H */
diff --git a/xen/xsm/flask/flask_op.c b/xen/xsm/flask/flask_op.c
index 1c4decc6cd..a5f2b104e2 100644
--- a/xen/xsm/flask/flask_op.c
+++ b/xen/xsm/flask/flask_op.c
@@ -13,6 +13,7 @@ 
 #include <xsm/xsm.h>
 #include <xen/guest_access.h>
 #include <xen/err.h>
+#include <xen/param.h>
 
 #include <public/xsm/flask_op.h>
 
diff --git a/xen/xsm/xsm_core.c b/xen/xsm/xsm_core.c
index a319df253d..5eab21e1b1 100644
--- a/xen/xsm/xsm_core.c
+++ b/xen/xsm/xsm_core.c
@@ -13,6 +13,7 @@ 
 #include <xen/init.h>
 #include <xen/errno.h>
 #include <xen/lib.h>
+#include <xen/param.h>
 
 #include <xen/hypercall.h>
 #include <xsm/xsm.h>