diff mbox series

[05/10] mini-os: don't repeat definition available via header file

Message ID 20211206072337.9517-6-jgross@suse.com (mailing list archive)
State Superseded
Headers show
Series mini-os: add missing PVH features | expand

Commit Message

Juergen Gross Dec. 6, 2021, 7:23 a.m. UTC
arch/x86/setup.c is repeating the definition of __pte() instead using
the appropriate header. Fix that.

Signed-off-by: Juergen Gross <jgross@suse.com>
---
 arch/x86/setup.c | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

Comments

Samuel Thibault Dec. 12, 2021, 12:27 a.m. UTC | #1
Juergen Gross, le lun. 06 déc. 2021 08:23:32 +0100, a ecrit:
> arch/x86/setup.c is repeating the definition of __pte() instead using
> the appropriate header. Fix that.
> 
> Signed-off-by: Juergen Gross <jgross@suse.com>

Reviewed-by: Samuel Thibault <samuel.thibault@ens-lyon.org>

> ---
>  arch/x86/setup.c | 8 +-------
>  1 file changed, 1 insertion(+), 7 deletions(-)
> 
> diff --git a/arch/x86/setup.c b/arch/x86/setup.c
> index 1ec68d3..b27bbed 100644
> --- a/arch/x86/setup.c
> +++ b/arch/x86/setup.c
> @@ -29,6 +29,7 @@
>  #include <mini-os/os.h>
>  #include <mini-os/lib.h> /* for printk, memcpy */
>  #include <mini-os/kernel.h>
> +#include <mini-os/hypervisor.h>
>  #include <xen/xen.h>
>  #include <xen/arch-x86/cpuid.h>
>  #include <xen/arch-x86/hvm/start_info.h>
> @@ -61,13 +62,6 @@ char stack[2*STACK_SIZE];
>  
>  extern char shared_info[PAGE_SIZE];
>  
> -#if defined(__x86_64__)
> -#define __pte(x) ((pte_t) { (x) } )
> -#else
> -#define __pte(x) ({ unsigned long long _x = (x);        \
> -    ((pte_t) {(unsigned long)(_x), (unsigned long)(_x>>32)}); })
> -#endif
> -
>  static inline void fpu_init(void) {
>  	asm volatile("fninit");
>  }
> -- 
> 2.26.2
>
diff mbox series

Patch

diff --git a/arch/x86/setup.c b/arch/x86/setup.c
index 1ec68d3..b27bbed 100644
--- a/arch/x86/setup.c
+++ b/arch/x86/setup.c
@@ -29,6 +29,7 @@ 
 #include <mini-os/os.h>
 #include <mini-os/lib.h> /* for printk, memcpy */
 #include <mini-os/kernel.h>
+#include <mini-os/hypervisor.h>
 #include <xen/xen.h>
 #include <xen/arch-x86/cpuid.h>
 #include <xen/arch-x86/hvm/start_info.h>
@@ -61,13 +62,6 @@  char stack[2*STACK_SIZE];
 
 extern char shared_info[PAGE_SIZE];
 
-#if defined(__x86_64__)
-#define __pte(x) ((pte_t) { (x) } )
-#else
-#define __pte(x) ({ unsigned long long _x = (x);        \
-    ((pte_t) {(unsigned long)(_x), (unsigned long)(_x>>32)}); })
-#endif
-
 static inline void fpu_init(void) {
 	asm volatile("fninit");
 }