diff mbox series

xenoprof: move asm/ include

Message ID 4fda4793-6fdc-70e6-575d-062f72c8c0dc@suse.com (mailing list archive)
State New, archived
Headers show
Series xenoprof: move asm/ include | expand

Commit Message

Jan Beulich Oct. 30, 2023, 1:19 p.m. UTC
There's no need for xen/xenoprof.h to include the arch header when the
respective config option is off. The only compensation needed is for
svm.c to explicitly include the arch header instead of the common one
(matching what vmx.c and traps.c do).

With that Arm's header can be deleted, and neither RISC-V nor PPC will
need to introduce one.

While there also adjust and move the (prior) inclusion of inttypes.h.

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

Comments

Jan Beulich Oct. 30, 2023, 1:24 p.m. UTC | #1
On 30.10.2023 14:19, Jan Beulich wrote:
> There's no need for xen/xenoprof.h to include the arch header when the
> respective config option is off. The only compensation needed is for
> svm.c to explicitly include the arch header instead of the common one
> (matching what vmx.c and traps.c do).
> 
> With that Arm's header can be deleted, and neither RISC-V nor PPC will
> need to introduce one.
> 
> While there also adjust and move the (prior) inclusion of inttypes.h.
> 
> Signed-off-by: Jan Beulich <jbeulich@suse.com>
> 
> --- a/xen/arch/arm/include/asm/xenoprof.h
> +++ /dev/null
> @@ -1,12 +0,0 @@
> -#ifndef __ASM_XENOPROF_H__
> -#define __ASM_XENOPROF_H__
> -
> -#endif /* __ASM_XENOPROF_H__ */
> -/*
> - * Local variables:
> - * mode: C
> - * c-file-style: "BSD"
> - * c-basic-offset: 4
> - * indent-tabs-mode: nil
> - * End:
> - */

First time that I notice a shortcoming in quilt that I would not have run
into if I used git: quilt can't express deletion of an empty file;
arch/ppc/include/asm/xenoprof.h wants deleting as well.

Jan
Oleksii Kurochko Oct. 30, 2023, 2:03 p.m. UTC | #2
Hi Jan,

On Mon, 2023-10-30 at 14:19 +0100, Jan Beulich wrote:
> There's no need for xen/xenoprof.h to include the arch header when
> the
> respective config option is off. The only compensation needed is for
> svm.c to explicitly include the arch header instead of the common one
> (matching what vmx.c and traps.c do).
> 
> With that Arm's header can be deleted, and neither RISC-V nor PPC
> will
> need to introduce one.
> 
> While there also adjust and move the (prior) inclusion of inttypes.h.
> 
> Signed-off-by: Jan Beulich <jbeulich@suse.com>
> 
> --- a/xen/arch/arm/include/asm/xenoprof.h
> +++ /dev/null
> @@ -1,12 +0,0 @@
> -#ifndef __ASM_XENOPROF_H__
> -#define __ASM_XENOPROF_H__
> -
> -#endif /* __ASM_XENOPROF_H__ */
> -/*
> - * Local variables:
> - * mode: C
> - * c-file-style: "BSD"
> - * c-basic-offset: 4
> - * indent-tabs-mode: nil
> - * End:
> - */
> --- a/xen/arch/x86/hvm/svm/svm.c
> +++ b/xen/arch/x86/hvm/svm/svm.c
> @@ -12,7 +12,6 @@
>  #include <xen/lib.h>
>  #include <xen/sched.h>
>  #include <xen/trace.h>
> -#include <xen/xenoprof.h>
>  
>  #include <asm/amd.h>
>  #include <asm/apic.h>
> @@ -38,6 +37,7 @@
>  #include <asm/processor.h>
>  #include <asm/p2m.h>
>  #include <asm/x86_emulate.h>
> +#include <asm/xenoprof.h>
>  
>  #include <public/sched.h>
>  
> --- a/xen/include/xen/xenoprof.h
> +++ b/xen/include/xen/xenoprof.h
> @@ -10,15 +10,15 @@
>  #ifndef __XEN_XENOPROF_H__
>  #define __XEN_XENOPROF_H__
>  
> -#include <xen/inttypes.h>
> -#include <asm/xenoprof.h>
> -
>  #define PMU_OWNER_NONE          0
>  #define PMU_OWNER_XENOPROF      1
>  #define PMU_OWNER_HVM           2
>  
>  #ifdef CONFIG_XENOPROF
>  
> +#include <xen/stdint.h>
> +#include <asm/xenoprof.h>
> +
>  struct domain;
>  struct vcpu;
>  struct cpu_user_regs;

Looks good to me.

Reviewed-by: Oleksii Kurochko <oleksii.kurochko@gmail.com>

~ Oleksii
Bertrand Marquis Oct. 30, 2023, 3:36 p.m. UTC | #3
Hi Jan,

> On 30 Oct 2023, at 14:19, Jan Beulich <jbeulich@suse.com> wrote:
> 
> There's no need for xen/xenoprof.h to include the arch header when the
> respective config option is off. The only compensation needed is for
> svm.c to explicitly include the arch header instead of the common one
> (matching what vmx.c and traps.c do).
> 
> With that Arm's header can be deleted, and neither RISC-V nor PPC will
> need to introduce one.
> 
> While there also adjust and move the (prior) inclusion of inttypes.h.
> 
> Signed-off-by: Jan Beulich <jbeulich@suse.com>

Always nice to remove a useless empty file :-)

For the arm part:

Reviewed-by: Bertrand Marquis <bertrand.marquis@arm.com>

Cheers
Bertrand

> 
> --- a/xen/arch/arm/include/asm/xenoprof.h
> +++ /dev/null
> @@ -1,12 +0,0 @@
> -#ifndef __ASM_XENOPROF_H__
> -#define __ASM_XENOPROF_H__
> -
> -#endif /* __ASM_XENOPROF_H__ */
> -/*
> - * Local variables:
> - * mode: C
> - * c-file-style: "BSD"
> - * c-basic-offset: 4
> - * indent-tabs-mode: nil
> - * End:
> - */
> --- a/xen/arch/x86/hvm/svm/svm.c
> +++ b/xen/arch/x86/hvm/svm/svm.c
> @@ -12,7 +12,6 @@
> #include <xen/lib.h>
> #include <xen/sched.h>
> #include <xen/trace.h>
> -#include <xen/xenoprof.h>
> 
> #include <asm/amd.h>
> #include <asm/apic.h>
> @@ -38,6 +37,7 @@
> #include <asm/processor.h>
> #include <asm/p2m.h>
> #include <asm/x86_emulate.h>
> +#include <asm/xenoprof.h>
> 
> #include <public/sched.h>
> 
> --- a/xen/include/xen/xenoprof.h
> +++ b/xen/include/xen/xenoprof.h
> @@ -10,15 +10,15 @@
> #ifndef __XEN_XENOPROF_H__
> #define __XEN_XENOPROF_H__
> 
> -#include <xen/inttypes.h>
> -#include <asm/xenoprof.h>
> -
> #define PMU_OWNER_NONE          0
> #define PMU_OWNER_XENOPROF      1
> #define PMU_OWNER_HVM           2
> 
> #ifdef CONFIG_XENOPROF
> 
> +#include <xen/stdint.h>
> +#include <asm/xenoprof.h>
> +
> struct domain;
> struct vcpu;
> struct cpu_user_regs;
diff mbox series

Patch

--- a/xen/arch/arm/include/asm/xenoprof.h
+++ /dev/null
@@ -1,12 +0,0 @@ 
-#ifndef __ASM_XENOPROF_H__
-#define __ASM_XENOPROF_H__
-
-#endif /* __ASM_XENOPROF_H__ */
-/*
- * Local variables:
- * mode: C
- * c-file-style: "BSD"
- * c-basic-offset: 4
- * indent-tabs-mode: nil
- * End:
- */
--- a/xen/arch/x86/hvm/svm/svm.c
+++ b/xen/arch/x86/hvm/svm/svm.c
@@ -12,7 +12,6 @@ 
 #include <xen/lib.h>
 #include <xen/sched.h>
 #include <xen/trace.h>
-#include <xen/xenoprof.h>
 
 #include <asm/amd.h>
 #include <asm/apic.h>
@@ -38,6 +37,7 @@ 
 #include <asm/processor.h>
 #include <asm/p2m.h>
 #include <asm/x86_emulate.h>
+#include <asm/xenoprof.h>
 
 #include <public/sched.h>
 
--- a/xen/include/xen/xenoprof.h
+++ b/xen/include/xen/xenoprof.h
@@ -10,15 +10,15 @@ 
 #ifndef __XEN_XENOPROF_H__
 #define __XEN_XENOPROF_H__
 
-#include <xen/inttypes.h>
-#include <asm/xenoprof.h>
-
 #define PMU_OWNER_NONE          0
 #define PMU_OWNER_XENOPROF      1
 #define PMU_OWNER_HVM           2
 
 #ifdef CONFIG_XENOPROF
 
+#include <xen/stdint.h>
+#include <asm/xenoprof.h>
+
 struct domain;
 struct vcpu;
 struct cpu_user_regs;