x86/mm: Comment the definitions of _mfn(), _gfn() &c
PATCH 1/1 x86/mm: Comment the definitions of _mfn(), _gfn() &c
# HG changeset patch
# User Tim Deegan <[email protected]>
# Date 1353604092 0
# Node ID 3ea68d29fd57988d7788450f25ad0cd84cbd2fb4 # Parent 7b4449bdb980caee8efc498d5ea48f772331df2f x86/mm: Comment the definitions of _mfn(), _gfn() &c.
It's not very easy to find them if you don't know to look for the TYPE_SAFE() macro.
xen/include/asm-x86/guest_pt.h +1 -0
@@ -36,6 +36,7 @@/* Type of the guest's frame numbers */ TYPE_SAFE(unsigned long,gfn)#define PRI_gfn "05lx" +/* Grep fodder: gfn_t, _gfn() and gfn_x() are defined here */ #define VALID_GFN (m) (m != INVALID_GFN)
xen/include/asm-x86/mm.h +1 -0
@@ -455,6 +455,7 @@ static inline _type _name##_x(_name##_t#endif TYPE_SAFE(unsigned long,mfn); +/* Grep fodder: mfn_t, _mfn() and mfn_x() are defined here */ /* Macro for printk formats: use as printk("%"PRI_mfn"\n", mfn_x(foo)); */ #define PRI_mfn "05lx"
Quoted 9 lines · Tim Deegan
# HG changeset patch
# User Tim Deegan <[email protected]>
# Date 1353604092 0
# Node ID3ea68d29fd57988d7788450f25ad0cd84cbd2fb4# Parent7b4449bdb980caee8efc498d5ea48f772331df2fx86/mm: Comment the definitions of_mfn(),_gfn()&c.It's not very easy to find them if you don't know to look for the
TYPE_SAFE()macro.
Ah - fantastic. I have certainly spent longer than was sensible looking for these definitions.
Would it be possible/sensible to a quick
#ifndef gfn_t
#define gfn_t /* gfn_t defined around here */
#undef gfn_t
#endif
So the likes of cscope and tags will also pick them up?
~Andrew
Quoted 30 lines
Signed-off-by Tim Deegan <[email protected]>diff -r
7b4449bdb980-r3ea68d29fd57xen/include/asm-x86/guest_pt.hxen/include/asm-x86/guest_pt.h +1
-0@@ -36,6 +36,7 @@/* Type of the guest's frame numbers */ TYPE_SAFE(unsigned long,gfn)#define PRI_gfn "05lx" +/* Grep fodder: gfn_t, _gfn() and gfn_x() are defined here */ #define VALID_GFN (m) (m != INVALID_GFN)diff -r
7b4449bdb980-r3ea68d29fd57xen/include/asm-x86/mm.hxen/include/asm-x86/mm.h +1
-0@@ -455,6 +455,7 @@ static inline _type _name##_x(_name##_t#endif TYPE_SAFE(unsigned long,mfn); +/* Grep fodder: mfn_t, _mfn() and mfn_x() are defined here */ /* Macro for printk formats: use as printk("%"PRI_mfn"\n", mfn_x(foo)); */ #define PRI_mfn "05lx"_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
Signature · 2 lines
Andrew Cooper - Dom0 Kernel Engineer, Citrix XenServer T: +44 (0)1223 225 900, http://www.citrix.com