All of lore.kernel.org
 help / color / mirror / Atom feed
From: Oleksandr Andrushchenko <Oleksandr_Andrushchenko@epam.com>
To: Jan Beulich <jbeulich@suse.com>,
	"xen-devel@lists.xenproject.org" <xen-devel@lists.xenproject.org>
Cc: Andrew Cooper <andrew.cooper3@citrix.com>,
	George Dunlap <george.dunlap@citrix.com>,
	Julien Grall <julien@xen.org>,
	Stefano Stabellini <sstabellini@kernel.org>, Wei Liu <wl@xen.org>
Subject: Re: [PATCH v2 1/2] mm: introduce INVALID_{G,M}FN_RAW
Date: Fri, 10 Dec 2021 09:51:18 +0000	[thread overview]
Message-ID: <fc16b259-7c5b-6aca-bb2d-a8d44e9d3c64@epam.com> (raw)
In-Reply-To: <6d2d29ca-0495-5029-afc8-7248f462db06@suse.com>

Hi, Jan!

On 10.12.21 11:39, Jan Beulich wrote:
> This allows properly tying together INVALID_{G,M}FN and
> INVALID_{G,M}FN_INITIALIZER as well as using the actual values in
> compile time constant expressions (or even preprocessor dirctives).
s/dirctives/directives
>
> Since INVALID_PFN is unused, and with x86'es paging_mark_pfn_dirty()
> being the only user of pfn_t it also doesn't seem likely that new uses
> would appear, remove that one at this same occasion.
>
> Signed-off-by: Jan Beulich <jbeulich@suse.com>
With the above nit fixed:
Reviewed-by: Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com>
> ---
> v2: New.
>
> --- a/xen/include/xen/mm-frame.h
> +++ b/xen/include/xen/mm-frame.h
> @@ -6,12 +6,13 @@
>   
>   TYPE_SAFE(unsigned long, mfn);
>   #define PRI_mfn          "05lx"
> -#define INVALID_MFN      _mfn(~0UL)
> +#define INVALID_MFN_RAW  (~0UL)
> +#define INVALID_MFN      _mfn(INVALID_MFN_RAW)
>   /*
>    * To be used for global variable initialization. This workaround a bug
>    * in GCC < 5.0.
>    */
> -#define INVALID_MFN_INITIALIZER { ~0UL }
> +#define INVALID_MFN_INITIALIZER { INVALID_MFN_RAW }
>   
>   #ifndef mfn_t
>   #define mfn_t /* Grep fodder: mfn_t, _mfn() and mfn_x() are defined above */
> @@ -44,12 +45,13 @@ static inline bool_t mfn_eq(mfn_t x, mfn
>   
>   TYPE_SAFE(unsigned long, gfn);
>   #define PRI_gfn          "05lx"
> -#define INVALID_GFN      _gfn(~0UL)
> +#define INVALID_GFN_RAW  (~0UL)
> +#define INVALID_GFN      _gfn(INVALID_GFN_RAW)
>   /*
>    * To be used for global variable initialization. This workaround a bug
>    * in GCC < 5.0 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64856
>    */
> -#define INVALID_GFN_INITIALIZER { ~0UL }
> +#define INVALID_GFN_INITIALIZER { INVALID_GFN_RAW }
>   
>   #ifndef gfn_t
>   #define gfn_t /* Grep fodder: gfn_t, _gfn() and gfn_x() are defined above */
> @@ -82,7 +84,6 @@ static inline bool_t gfn_eq(gfn_t x, gfn
>   
>   TYPE_SAFE(unsigned long, pfn);
>   #define PRI_pfn          "05lx"
> -#define INVALID_PFN      (~0UL)
>   
>   #ifndef pfn_t
>   #define pfn_t /* Grep fodder: pfn_t, _pfn() and pfn_x() are defined above */
>
>

  reply	other threads:[~2021-12-10  9:51 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-10  9:38 [PATCH v2 0/2] grant table and add-to-physmap adjustments on top of XSAs 379 and 384 Jan Beulich
2021-12-10  9:39 ` [PATCH v2 1/2] mm: introduce INVALID_{G,M}FN_RAW Jan Beulich
2021-12-10  9:51   ` Oleksandr Andrushchenko [this message]
2021-12-17 14:46   ` Julien Grall
2021-12-10  9:40 ` [PATCH v2 2/2] memory: XENMEM_add_to_physmap (almost) wrapping checks Jan Beulich
2021-12-10 14:10   ` Oleksandr Andrushchenko
2021-12-13  7:28     ` Jan Beulich
2021-12-13 18:41       ` Stefano Stabellini
2022-01-27 14:53 ` [PATCH v3] " Jan Beulich
2022-01-31 18:30   ` Julien Grall

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=fc16b259-7c5b-6aca-bb2d-a8d44e9d3c64@epam.com \
    --to=oleksandr_andrushchenko@epam.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=george.dunlap@citrix.com \
    --cc=jbeulich@suse.com \
    --cc=julien@xen.org \
    --cc=sstabellini@kernel.org \
    --cc=wl@xen.org \
    --cc=xen-devel@lists.xenproject.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.