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

[Xen-changelog] [xen-unstable] [IA64] White space cleanup in regionreg.h



# HG changeset patch
# User Alex Williamson <alex.williamson@xxxxxx>
# Date 1179168866 21600
# Node ID 94cce9a515404d20ba9096be064daedab82f6f4f
# Parent  fd72e71de51a53f865e4e82d2bcca1c7664c9b04
[IA64] White space cleanup in regionreg.h

Signed-off-by: Isaku Yamahata <yamahata@xxxxxxxxxxxxx>
---
 xen/include/asm-ia64/regionreg.h |   90 ++++++++++++++++++++++-----------------
 1 files changed, 52 insertions(+), 38 deletions(-)

diff -r fd72e71de51a -r 94cce9a51540 xen/include/asm-ia64/regionreg.h
--- a/xen/include/asm-ia64/regionreg.h  Mon May 14 11:52:01 2007 -0600
+++ b/xen/include/asm-ia64/regionreg.h  Mon May 14 12:54:26 2007 -0600
@@ -1,37 +1,39 @@
-#ifndef                _REGIONREG_H_
-#define                _REGIONREG_H_
-#define XEN_DEFAULT_RID                7
-#define        IA64_MIN_IMPL_RID_MSB   17
-#define _REGION_ID(x)   ({ia64_rr _v; _v.rrval = (long) (x); _v.rid;})
-#define _REGION_PAGE_SIZE(x)    ({ia64_rr _v; _v.rrval = (long) (x); _v.ps;})
-#define _REGION_HW_WALKER(x)    ({ia64_rr _v; _v.rrval = (long) (x); _v.ve;})
-#define _MAKE_RR(r, sz, v) ({ia64_rr _v; 
_v.rrval=0;_v.rid=(r);_v.ps=(sz);_v.ve=(v);_v.rrval;})
+#ifndef _REGIONREG_H_
+#define _REGIONREG_H_
+
+#define XEN_DEFAULT_RID         7
+#define IA64_MIN_IMPL_RID_MSB   17
+#define _REGION_ID(x)           ({ia64_rr _v; _v.rrval = (long)(x); _v.rid;})
+#define _REGION_PAGE_SIZE(x)    ({ia64_rr _v; _v.rrval = (long)(x); _v.ps;})
+#define _REGION_HW_WALKER(x)    ({ia64_rr _v; _v.rrval = (long)(x); _v.ve;})
+#define _MAKE_RR(r, sz, v)      ({ia64_rr _v; _v.rrval=0; _v.rid=(r); \
+                                        _v.ps=(sz); _v.ve=(v); _v.rrval;})
 
 typedef union ia64_rr {
-        struct {
-                unsigned long  ve :   1;        /* enable hw walker */
-                unsigned long  reserved0   :   1;        /* reserved */
-                unsigned long  ps :   6;        /* log page size */
-                unsigned long  rid:  24;        /* region id */
-                unsigned long  reserved1   :  32;        /* reserved */
-        };
-        unsigned long rrval;
+    struct {
+        unsigned long  ve        :  1;  /* enable hw walker */
+        unsigned long  reserved0 :  1;  /* reserved */
+        unsigned long  ps        :  6;  /* log page size */
+        unsigned long  rid       : 24;  /* region id */
+        unsigned long  reserved1 : 32;  /* reserved */
+    };
+    unsigned long rrval;
 } ia64_rr;
 
 //
 // region register macros
 //
-#define RR_TO_VE(arg) (((arg) >> 0) & 0x0000000000000001)
-#define RR_VE(arg) (((arg) & 0x0000000000000001) << 0)
-#define RR_VE_MASK 0x0000000000000001L
-#define RR_VE_SHIFT 0
-#define RR_TO_PS(arg) (((arg) >> 2) & 0x000000000000003f)
-#define RR_PS(arg) (((arg) & 0x000000000000003f) << 2)
-#define RR_PS_MASK 0x00000000000000fcL
-#define RR_PS_SHIFT 2
-#define RR_TO_RID(arg) (((arg) >> 8) & 0x0000000000ffffff)
-#define RR_RID(arg) (((arg) & 0x0000000000ffffff) << 8)
-#define RR_RID_MASK 0x00000000ffffff00L
+#define RR_TO_VE(arg)   (((arg) >> 0) & 0x0000000000000001)
+#define RR_VE(arg)      (((arg) & 0x0000000000000001) << 0)
+#define RR_VE_MASK      0x0000000000000001L
+#define RR_VE_SHIFT     0
+#define RR_TO_PS(arg)   (((arg) >> 2) & 0x000000000000003f)
+#define RR_PS(arg)      (((arg) & 0x000000000000003f) << 2)
+#define RR_PS_MASK      0x00000000000000fcL
+#define RR_PS_SHIFT     2
+#define RR_TO_RID(arg)  (((arg) >> 8) & 0x0000000000ffffff)
+#define RR_RID(arg)     (((arg) & 0x0000000000ffffff) << 8)
+#define RR_RID_MASK     0x00000000ffffff00L
 
 
 int set_one_rr(unsigned long rr, unsigned long val);
@@ -48,21 +50,23 @@ static inline unsigned long
 static inline unsigned long
 vmMangleRID(unsigned long RIDVal)
 {
-       union bits64 { unsigned char bytes[4]; unsigned long uint; };
+    union bits64 {
+        unsigned char bytes[4];
+        unsigned long uint;
+    };
+    union bits64 t;
+    unsigned char tmp;
 
-       union bits64 t;
-       unsigned char tmp;
+    t.uint = RIDVal;
+    tmp = t.bytes[1];
+    t.bytes[1] = t.bytes[3];
+    t.bytes[3] = tmp;
 
-       t.uint = RIDVal;
-       tmp = t.bytes[1];
-       t.bytes[1] = t.bytes[3];
-       t.bytes[3] = tmp;
-
-       return t.uint;
+    return t.uint;
 }
 
 // since vmMangleRID is symmetric, use it for unmangling also
-#define vmUnmangleRID(x)       vmMangleRID(x)
+#define vmUnmangleRID(x)    vmMangleRID(x)
 
 extern void init_rid_allocator (void);
 
@@ -80,4 +84,14 @@ extern int set_metaphysical_rr0(void);
 
 extern void load_region_regs(struct vcpu *v);
 
-#endif         /* !_REGIONREG_H_ */
+#endif /* !_REGIONREG_H_ */
+
+/*
+ * Local variables:
+ * mode: C
+ * c-set-style: "BSD"
+ * c-basic-offset: 4
+ * tab-width: 4
+ * indent-tabs-mode: nil
+ * End:
+ */

_______________________________________________
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®.