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

[Xen-changelog] [xen-unstable] x86: move and fold certain type property definitions



# HG changeset patch
# User Jan Beulich <jbeulich@xxxxxxxx>
# Date 1326383035 -3600
# Node ID ac8e624d3dbbc15cf5dc4e6607b299f1773ec4b0
# Parent  9db6fe19dd04d2ac33eebed528058811f1cf0183
x86: move and fold certain type property definitions

Not only is it less code to have them consolidated, it also permits
their use virtually everywhere (since config.h is required to be
included everywhere. (Shouldn't we, btw, follow Linux and remove the
explicit inclusion in favor of command line enforced one?)

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


diff -r 9db6fe19dd04 -r ac8e624d3dbb xen/include/asm-x86/config.h
--- a/xen/include/asm-x86/config.h      Thu Jan 12 13:54:28 2012 +0100
+++ b/xen/include/asm-x86/config.h      Thu Jan 12 16:43:55 2012 +0100
@@ -8,11 +8,16 @@
 #define __X86_CONFIG_H__
 
 #if defined(__x86_64__)
+# define LONG_BYTEORDER 3
 # define CONFIG_PAGING_LEVELS 4
 #else
+# define LONG_BYTEORDER 2
 # define CONFIG_PAGING_LEVELS 3
 #endif
 
+#define BYTES_PER_LONG (1 << LONG_BYTEORDER)
+#define BITS_PER_LONG (BYTES_PER_LONG << 3)
+
 #define CONFIG_X86 1
 #define CONFIG_X86_HT 1
 #define CONFIG_PAGING_ASSISTANCE 1
diff -r 9db6fe19dd04 -r ac8e624d3dbb xen/include/asm-x86/types.h
--- a/xen/include/asm-x86/types.h       Thu Jan 12 13:54:28 2012 +0100
+++ b/xen/include/asm-x86/types.h       Thu Jan 12 16:43:55 2012 +0100
@@ -55,14 +55,4 @@
 
 #endif /* __ASSEMBLY__ */
 
-#if defined(__i386__)
-#define BITS_PER_LONG 32
-#define BYTES_PER_LONG 4
-#define LONG_BYTEORDER 2
-#elif defined(__x86_64__)
-#define BITS_PER_LONG 64
-#define BYTES_PER_LONG 8
-#define LONG_BYTEORDER 3
-#endif
-
 #endif /* __X86_TYPES_H__ */

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
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®.