diff mbox

[v3,1/5] xen: Add macros MB and GB

Message ID 1380300997-28099-2-git-send-email-julien.grall@linaro.org
State Accepted, archived
Headers show

Commit Message

Julien Grall Sept. 27, 2013, 4:56 p.m. UTC
Signed-off-by: Julien Grall <julien.grall@linaro.org>
CC: Keir Fraser <keir@xen.org>
CC: Jan Beulich <jbeulich@suse.com>

---
    Changes in v3:
        - Add GB
        - Move to common code (include/xen/config.h)
---
 xen/include/asm-arm/config.h |    1 -
 xen/include/xen/config.h     |    3 +++
 2 files changed, 3 insertions(+), 1 deletion(-)

Comments

Andrew Cooper Sept. 27, 2013, 5:01 p.m. UTC | #1
On 27/09/13 17:56, Julien Grall wrote:
> Signed-off-by: Julien Grall <julien.grall@linaro.org>
> CC: Keir Fraser <keir@xen.org>
> CC: Jan Beulich <jbeulich@suse.com>
>
> ---
>     Changes in v3:
>         - Add GB
>         - Move to common code (include/xen/config.h)
> ---
>  xen/include/asm-arm/config.h |    1 -
>  xen/include/xen/config.h     |    3 +++
>  2 files changed, 3 insertions(+), 1 deletion(-)

You will also need to delete GB() from xen/include/asm-x86/config.h for
this to compile.

~Andrew

>
> diff --git a/xen/include/asm-arm/config.h b/xen/include/asm-arm/config.h
> index 9e395c2..5b7b1a8 100644
> --- a/xen/include/asm-arm/config.h
> +++ b/xen/include/asm-arm/config.h
> @@ -142,7 +142,6 @@
>  #define SLOT0_ENTRY_BITS  39
>  #define SLOT0(slot) (_AT(vaddr_t,slot) << SLOT0_ENTRY_BITS)
>  #define SLOT0_ENTRY_SIZE  SLOT0(1)
> -#define GB(_gb)     (_AC(_gb, UL) << 30)
>  
>  #define VMAP_VIRT_START  GB(1)
>  #define VMAP_VIRT_END    (VMAP_VIRT_START + GB(1) - 1)
> diff --git a/xen/include/xen/config.h b/xen/include/xen/config.h
> index a52298e..657c6e5 100644
> --- a/xen/include/xen/config.h
> +++ b/xen/include/xen/config.h
> @@ -69,6 +69,9 @@
>  #define __force
>  #define __bitwise
>  
> +#define MB(_mb)     (_AC(_mb, UL) << 20)
> +#define GB(_gb)     (_AC(_gb, UL) << 30)
> +
>  #ifndef __ASSEMBLY__
>  
>  int current_domain_id(void);
diff mbox

Patch

diff --git a/xen/include/asm-arm/config.h b/xen/include/asm-arm/config.h
index 9e395c2..5b7b1a8 100644
--- a/xen/include/asm-arm/config.h
+++ b/xen/include/asm-arm/config.h
@@ -142,7 +142,6 @@ 
 #define SLOT0_ENTRY_BITS  39
 #define SLOT0(slot) (_AT(vaddr_t,slot) << SLOT0_ENTRY_BITS)
 #define SLOT0_ENTRY_SIZE  SLOT0(1)
-#define GB(_gb)     (_AC(_gb, UL) << 30)
 
 #define VMAP_VIRT_START  GB(1)
 #define VMAP_VIRT_END    (VMAP_VIRT_START + GB(1) - 1)
diff --git a/xen/include/xen/config.h b/xen/include/xen/config.h
index a52298e..657c6e5 100644
--- a/xen/include/xen/config.h
+++ b/xen/include/xen/config.h
@@ -69,6 +69,9 @@ 
 #define __force
 #define __bitwise
 
+#define MB(_mb)     (_AC(_mb, UL) << 20)
+#define GB(_gb)     (_AC(_gb, UL) << 30)
+
 #ifndef __ASSEMBLY__
 
 int current_domain_id(void);