All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Cooper <andrew.cooper3@citrix.com>
To: Tim Deegan <tim@xen.org>
Cc: "xen-devel@lists.xen.org" <xen-devel@lists.xen.org>
Subject: Re: [PATCH] x86/mm: Comment the definitions of _mfn(), _gfn() &c
Date: Thu, 22 Nov 2012 17:17:03 +0000	[thread overview]
Message-ID: <50AE5E0F.8070405@citrix.com> (raw)
In-Reply-To: <3ea68d29fd57988d7788.1353604221@whitby.uk.xensource.com>

On 22/11/12 17:10, Tim Deegan wrote:
> # HG changeset patch
> # User Tim Deegan <tim@xen.org>
> # 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.

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

>
> Signed-off-by: Tim Deegan <tim@xen.org>
>
> diff -r 7b4449bdb980 -r 3ea68d29fd57 xen/include/asm-x86/guest_pt.h
> --- a/xen/include/asm-x86/guest_pt.h	Thu Nov 22 10:47:58 2012 +0100
> +++ b/xen/include/asm-x86/guest_pt.h	Thu Nov 22 17:08:12 2012 +0000
> @@ -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 -r 3ea68d29fd57 xen/include/asm-x86/mm.h
> --- a/xen/include/asm-x86/mm.h	Thu Nov 22 10:47:58 2012 +0100
> +++ b/xen/include/asm-x86/mm.h	Thu Nov 22 17:08:12 2012 +0000
> @@ -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
> Xen-devel@lists.xen.org
> http://lists.xen.org/xen-devel

-- 
Andrew Cooper - Dom0 Kernel Engineer, Citrix XenServer
T: +44 (0)1223 225 900, http://www.citrix.com

      reply	other threads:[~2012-11-22 17:17 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-22 17:10 [PATCH] x86/mm: Comment the definitions of _mfn(), _gfn() &c Tim Deegan
2012-11-22 17:17 ` Andrew Cooper [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=50AE5E0F.8070405@citrix.com \
    --to=andrew.cooper3@citrix.com \
    --cc=tim@xen.org \
    --cc=xen-devel@lists.xen.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.