[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] x86: use single definitions for a few constants


  • To: xen-changelog@xxxxxxxxxxxxxxxxxxx
  • From: Xen patchbot-unstable <patchbot@xxxxxxx>
  • Date: Tue, 19 Feb 2013 15:22:10 +0000
  • Delivery-date: Tue, 19 Feb 2013 15:23:38 +0000
  • List-id: "Change log for Mercurial \(receive only\)" <xen-changelog.lists.xen.org>

# HG changeset patch
# User Jan Beulich <jbeulich@xxxxxxxx>
# Date 1360917928 -3600
# Node ID 0a09dc05c6702463a7909bf73b26b911dcbf3386
# Parent  0cca8a18432f08b342d76a753aa98559d892f592
x86: use single definitions for a few constants

... rather than having a C and an assembly one.

Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
Acked-by: Keir Fraser <keir@xxxxxxx>
---


diff -r 0cca8a18432f -r 0a09dc05c670 xen/include/asm-x86/config.h
--- a/xen/include/asm-x86/config.h      Fri Feb 15 09:42:02 2013 +0100
+++ b/xen/include/asm-x86/config.h      Fri Feb 15 09:45:28 2013 +0100
@@ -112,19 +112,14 @@ extern unsigned char boot_edid_info[128]
 
 #define CONFIG_COMPAT 1
 
+#include <xen/const.h>
+
 #define PML4_ENTRY_BITS  39
-#ifndef __ASSEMBLY__
-#define PML4_ENTRY_BYTES (1UL << PML4_ENTRY_BITS)
-#define PML4_ADDR(_slot)                             \
-    ((((_slot ## UL) >> 8) * 0xffff000000000000UL) | \
-     (_slot ## UL << PML4_ENTRY_BITS))
-#define GB(_gb) (_gb ## UL << 30)
-#else
-#define PML4_ENTRY_BYTES (1 << PML4_ENTRY_BITS)
-#define PML4_ADDR(_slot)                             \
-    (((_slot >> 8) * 0xffff000000000000) | (_slot << PML4_ENTRY_BITS))
-#define GB(_gb) (_gb << 30)
-#endif
+#define PML4_ENTRY_BYTES (_AC(1,UL) << PML4_ENTRY_BITS)
+#define PML4_ADDR(_slot)                              \
+    (((_AC(_slot, UL) >> 8) * _AC(0xffff000000000000,UL)) | \
+     (_AC(_slot, UL) << PML4_ENTRY_BITS))
+#define GB(_gb) (_AC(_gb, UL) << 30)
 
 /*
  * Memory layout:
@@ -242,7 +237,7 @@ extern unsigned char boot_edid_info[128]
                                                           PAGE_SHIFT)) + 1)
 #define SPAGETABLE_SIZE         (SPAGETABLE_NR * sizeof(struct spage_info))
 #define SPAGETABLE_VIRT_START   ((SPAGETABLE_VIRT_END - SPAGETABLE_SIZE) & \
-                                 (-1UL << SUPERPAGE_SHIFT))
+                                 (_AC(-1,UL) << SUPERPAGE_SHIFT))
 /* Slot 261: page-frame information array (128GB). */
 #define FRAMETABLE_VIRT_END     DIRECTMAP_VIRT_START
 #define FRAMETABLE_SIZE         GB(128)

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.