From: Thomas Leonard Subject: [PATCH ARM v5 13/20] mini-os: moved __pte to x86 Date: Thu, 26 Jun 2014 12:28:30 +0100 Message-ID: <1403782117-15125-14-git-send-email-talex5@gmail.com> References: <1403782117-15125-1-git-send-email-talex5@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta14.messagelabs.com ([193.109.254.103]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1X07rc-0004Tw-9E for xen-devel@lists.xenproject.org; Thu, 26 Jun 2014 11:29:12 +0000 Received: by mail-wi0-f182.google.com with SMTP id bs8so819851wib.9 for ; Thu, 26 Jun 2014 04:29:08 -0700 (PDT) In-Reply-To: <1403782117-15125-1-git-send-email-talex5@gmail.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: xen-devel@lists.xenproject.org Cc: Thomas Leonard , Dave.Scott@eu.citrix.com, anil@recoil.org, stefano.stabellini@eu.citrix.com, samuel.thibault@ens-lyon.org List-Id: xen-devel@lists.xenproject.org We don't need to define this on ARM. Suggested by Julien Grall. Signed-off-by: Thomas Leonard --- extras/mini-os/include/types.h | 12 ------------ extras/mini-os/include/x86/x86_32/hypercall-x86_32.h | 5 +++++ extras/mini-os/include/x86/x86_64/hypercall-x86_64.h | 4 ++++ 3 files changed, 9 insertions(+), 12 deletions(-) diff --git a/extras/mini-os/include/types.h b/extras/mini-os/include/types.h index de356e8..93356fe 100644 --- a/extras/mini-os/include/types.h +++ b/extras/mini-os/include/types.h @@ -30,23 +30,11 @@ typedef unsigned long u_long; #ifdef __i386__ typedef long long quad_t; typedef unsigned long long u_quad_t; - -typedef struct { unsigned long pte_low, pte_high; } pte_t; - #elif defined(__x86_64__) typedef long quad_t; typedef unsigned long u_quad_t; - -typedef struct { unsigned long pte; } pte_t; #endif /* __i386__ || __x86_64__ */ -#ifdef __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 - #ifdef HAVE_LIBC #include #include diff --git a/extras/mini-os/include/x86/x86_32/hypercall-x86_32.h b/extras/mini-os/include/x86/x86_32/hypercall-x86_32.h index dcfbe41..99a4ee3 100644 --- a/extras/mini-os/include/x86/x86_32/hypercall-x86_32.h +++ b/extras/mini-os/include/x86/x86_32/hypercall-x86_32.h @@ -35,6 +35,11 @@ #include #include +typedef struct { unsigned long pte_low, pte_high; } pte_t; + +#define __pte(x) ({ unsigned long long _x = (x); \ + ((pte_t) {(unsigned long)(_x), (unsigned long)(_x>>32)}); }) + #define __STR(x) #x #define STR(x) __STR(x) diff --git a/extras/mini-os/include/x86/x86_64/hypercall-x86_64.h b/extras/mini-os/include/x86/x86_64/hypercall-x86_64.h index 7083763..e00b3bd 100644 --- a/extras/mini-os/include/x86/x86_64/hypercall-x86_64.h +++ b/extras/mini-os/include/x86/x86_64/hypercall-x86_64.h @@ -38,6 +38,10 @@ #include #include +typedef struct { unsigned long pte; } pte_t; + +#define __pte(x) ((pte_t) { (x) } ) + #define __STR(x) #x #define STR(x) __STR(x) -- 2.0.0