[Xen-devel] [PATCH 3/4] xen/percpu: Drop unused asm/percpu.h includes

Andrew Cooper posted 4 patches 6 years, 6 months ago
[Xen-devel] [PATCH 3/4] xen/percpu: Drop unused asm/percpu.h includes
Posted by Andrew Cooper 6 years, 6 months ago
These files either don't use any PER_CPU() infrastructure at all, or use
DEFINE_PER_CPU_*().  This is declared in xen/percpu.h, not asm/percpu.h, which
means that xen/percpu.h is included via a different path.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
---
CC: Jan Beulich <JBeulich@suse.com>
CC: Wei Liu <wl@xen.org>
CC: Roger Pau Monné <roger.pau@citrix.com>
CC: Stefano Stabellini <sstabellini@kernel.org>
CC: Julien Grall <julien.grall@arm.com>
CC: Volodymyr Babchuk <Volodymyr_Babchuk@epam.com>
---
 xen/arch/arm/xen.lds.S               | 1 -
 xen/arch/x86/acpi/cpufreq/cpufreq.c  | 1 -
 xen/arch/x86/acpi/cpufreq/powernow.c | 1 -
 xen/arch/x86/crash.c                 | 1 -
 xen/arch/x86/xen.lds.S               | 1 -
 xen/common/core_parking.c            | 2 +-
 xen/drivers/cpufreq/cpufreq.c        | 2 +-
 xen/include/asm-x86/asm_defns.h      | 1 -
 xen/include/xen/kexec.h              | 1 -
 9 files changed, 2 insertions(+), 9 deletions(-)

diff --git a/xen/arch/arm/xen.lds.S b/xen/arch/arm/xen.lds.S
index 07cbdf2543..09ec99baf5 100644
--- a/xen/arch/arm/xen.lds.S
+++ b/xen/arch/arm/xen.lds.S
@@ -4,7 +4,6 @@
 
 #include <xen/cache.h>
 #include <asm/page.h>
-#include <asm/percpu.h>
 #undef ENTRY
 #undef ALIGN
 
diff --git a/xen/arch/x86/acpi/cpufreq/cpufreq.c b/xen/arch/x86/acpi/cpufreq/cpufreq.c
index 7086d1aa15..f05275578d 100644
--- a/xen/arch/x86/acpi/cpufreq/cpufreq.c
+++ b/xen/arch/x86/acpi/cpufreq/cpufreq.c
@@ -38,7 +38,6 @@
 #include <asm/msr.h>
 #include <asm/io.h>
 #include <asm/processor.h>
-#include <asm/percpu.h>
 #include <asm/cpufeature.h>
 #include <acpi/acpi.h>
 #include <acpi/cpufreq/cpufreq.h>
diff --git a/xen/arch/x86/acpi/cpufreq/powernow.c b/xen/arch/x86/acpi/cpufreq/powernow.c
index 72ab6a1eba..3cf9c6cd05 100644
--- a/xen/arch/x86/acpi/cpufreq/powernow.c
+++ b/xen/arch/x86/acpi/cpufreq/powernow.c
@@ -32,7 +32,6 @@
 #include <asm/msr.h>
 #include <asm/io.h>
 #include <asm/processor.h>
-#include <asm/percpu.h>
 #include <asm/cpufeature.h>
 #include <acpi/acpi.h>
 #include <acpi/cpufreq/cpufreq.h>
diff --git a/xen/arch/x86/crash.c b/xen/arch/x86/crash.c
index a9f3e1890c..ce361afd7c 100644
--- a/xen/arch/x86/crash.c
+++ b/xen/arch/x86/crash.c
@@ -10,7 +10,6 @@
 
 #include <asm/atomic.h>
 #include <asm/elf.h>
-#include <asm/percpu.h>
 #include <xen/types.h>
 #include <xen/irq.h>
 #include <asm/nmi.h>
diff --git a/xen/arch/x86/xen.lds.S b/xen/arch/x86/xen.lds.S
index c82e1e504a..fca25ad54c 100644
--- a/xen/arch/x86/xen.lds.S
+++ b/xen/arch/x86/xen.lds.S
@@ -3,7 +3,6 @@
 
 #include <xen/cache.h>
 #include <asm/page.h>
-#include <asm/percpu.h>
 #undef ENTRY
 #undef ALIGN
 
diff --git a/xen/common/core_parking.c b/xen/common/core_parking.c
index 7ae5d6278e..c22710f94d 100644
--- a/xen/common/core_parking.c
+++ b/xen/common/core_parking.c
@@ -19,7 +19,7 @@
 #include <xen/cpu.h>
 #include <xen/init.h>
 #include <xen/cpumask.h>
-#include <asm/percpu.h>
+
 #include <asm/smp.h>
 
 #define CORE_PARKING_INCREMENT 1
diff --git a/xen/drivers/cpufreq/cpufreq.c b/xen/drivers/cpufreq/cpufreq.c
index ba9897a22b..2d716abf72 100644
--- a/xen/drivers/cpufreq/cpufreq.c
+++ b/xen/drivers/cpufreq/cpufreq.c
@@ -41,7 +41,7 @@
 #include <asm/bug.h>
 #include <asm/io.h>
 #include <asm/processor.h>
-#include <asm/percpu.h>
+
 #include <acpi/acpi.h>
 #include <acpi/cpufreq/cpufreq.h>
 
diff --git a/xen/include/asm-x86/asm_defns.h b/xen/include/asm-x86/asm_defns.h
index 4fe5556a34..c4f49a35d3 100644
--- a/xen/include/asm-x86/asm_defns.h
+++ b/xen/include/asm-x86/asm_defns.h
@@ -7,7 +7,6 @@
 #include <asm/asm-offsets.h>
 #endif
 #include <asm/bug.h>
-#include <asm/percpu.h>
 #include <asm/x86-defns.h>
 #include <xen/stringify.h>
 #include <asm/cpufeature.h>
diff --git a/xen/include/xen/kexec.h b/xen/include/xen/kexec.h
index f5b9d165ae..1068f34c5b 100644
--- a/xen/include/xen/kexec.h
+++ b/xen/include/xen/kexec.h
@@ -4,7 +4,6 @@
 #ifdef CONFIG_KEXEC
 
 #include <public/kexec.h>
-#include <asm/percpu.h>
 #include <xen/elfcore.h>
 #include <xen/kimage.h>
 
-- 
2.11.0


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
Re: [Xen-devel] [PATCH 3/4] xen/percpu: Drop unused asm/percpu.h includes
Posted by Julien Grall 6 years, 6 months ago
Hi Andrew,

On 7/26/19 10:08 PM, Andrew Cooper wrote:
> These files either don't use any PER_CPU() infrastructure at all, or use
> DEFINE_PER_CPU_*().  This is declared in xen/percpu.h, not asm/percpu.h, which
> means that xen/percpu.h is included via a different path.
> 
> Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>

Acked-by: Julien Grall <julien.grall@arm.com>

Cheers,

-- 
Julien Grall

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
Re: [Xen-devel] [PATCH 3/4] xen/percpu: Drop unused asm/percpu.h includes
Posted by Jan Beulich 6 years, 6 months ago
On 26.07.2019 23:08, Andrew Cooper wrote:
> These files either don't use any PER_CPU() infrastructure at all, or use
> DEFINE_PER_CPU_*().  This is declared in xen/percpu.h, not asm/percpu.h, which
> means that xen/percpu.h is included via a different path.
> 
> Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>

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

> --- a/xen/common/core_parking.c
> +++ b/xen/common/core_parking.c
> @@ -19,7 +19,7 @@
>   #include <xen/cpu.h>
>   #include <xen/init.h>
>   #include <xen/cpumask.h>
> -#include <asm/percpu.h>
> +
>   #include <asm/smp.h>

I don't believe in such blank lines to be overly useful,
especially when ...

> --- a/xen/include/xen/kexec.h
> +++ b/xen/include/xen/kexec.h
> @@ -4,7 +4,6 @@
>   #ifdef CONFIG_KEXEC
>   
>   #include <public/kexec.h>
> -#include <asm/percpu.h>
>   #include <xen/elfcore.h>
>   #include <xen/kimage.h>

... this model isn't being followed consistently.

Jan
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
Re: [Xen-devel] [PATCH 3/4] xen/percpu: Drop unused asm/percpu.h includes
Posted by Roger Pau Monné 6 years, 6 months ago
On Fri, Jul 26, 2019 at 10:08:53PM +0100, Andrew Cooper wrote:
> These files either don't use any PER_CPU() infrastructure at all, or use
> DEFINE_PER_CPU_*().  This is declared in xen/percpu.h, not asm/percpu.h, which
> means that xen/percpu.h is included via a different path.
> 
> Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>

Reviewed-by: Roger Pau Monné <roger.pau@citrix.com>

Thanks.

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel