All of lore.kernel.org
 help / color / mirror / Atom feed
From: Julien Grall <julien.grall@linaro.org>
To: Ian Campbell <ian.campbell@citrix.com>, xen-devel@lists.xen.org
Cc: Roy Franz <roy.franz@linaro.org>,
	tim@xen.org, Fu Wei <fu.wei@linaro.org>,
	Jan Beulich <JBeulich@suse.com>,
	stefano.stabellini@eu.citrix.com
Subject: Re: [PATCH RFC 1/2] xen: refactor physical address space compression support into common code
Date: Thu, 07 Aug 2014 16:56:00 +0100	[thread overview]
Message-ID: <53E3A190.4050409@linaro.org> (raw)
In-Reply-To: <53da2210.8511ec0a.4375.46cdSMTPIN_ADDED_MISSING@mx.google.com>

Hi Ian,

On 07/31/2014 12:01 PM, Ian Campbell wrote:
> diff --git a/xen/include/xen/pdx.h b/xen/include/xen/pdx.h
> new file mode 100644
> index 0000000..bcda9e6
> --- /dev/null
> +++ b/xen/include/xen/pdx.h
> @@ -0,0 +1,47 @@
> +#ifndef __XEN_PDX_H__
> +#define __XEN_PDX_H__
> +
> +#ifdef HAS_PDX
> +
> +extern unsigned long max_pdx;
> +extern unsigned long pfn_pdx_bottom_mask, ma_va_bottom_mask;
> +extern unsigned int pfn_pdx_hole_shift;
> +extern unsigned long pfn_hole_mask;
> +extern unsigned long pfn_top_mask, ma_top_mask;
> +
> +#define PDX_GROUP_COUNT ((1 << PDX_GROUP_SHIFT) / \
> +                         (sizeof(*frame_table) & -sizeof(*frame_table)))
> +extern unsigned long pdx_group_valid[];
> +
> +extern void set_pdx_range(unsigned long smfn, unsigned long emfn);
> +
> +#define page_to_pdx(pg)  ((pg) - frame_table)
> +#define pdx_to_page(pdx) (frame_table + (pdx))
> +
> +extern int __mfn_valid(unsigned long mfn);
> +
> +static inline unsigned long pfn_to_pdx(unsigned long pfn)
> +{
> +    return (pfn & pfn_pdx_bottom_mask) |
> +           ((pfn & pfn_top_mask) >> pfn_pdx_hole_shift);
> +}
> +
> +static inline unsigned long pdx_to_pfn(unsigned long pdx)
> +{
> +    return (pdx & pfn_pdx_bottom_mask) |
> +           ((pdx << pfn_pdx_hole_shift) & pfn_top_mask);
> +}
> +
> +extern void pfn_pdx_hole_setup(unsigned long);
> +
> +#endif /* HAVE_PDX */
> +#endif /* __XEN_PAGING_H__ */

NIT: I think the comment should be /* __XEN_PDX_H__ */

Regards,

-- 
Julien Grall

      parent reply	other threads:[~2014-08-07 15:56 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <E1XCo59-0002Jo-Ge@lists.xen.org>
2014-07-31 11:01 ` [PATCH RFC 1/2] xen: refactor physical address space compression support into common code Ian Campbell
     [not found] ` <1bdc9d35.859@novprvlin0050.provo.novell.com>
2014-08-01  8:32   ` Jan Beulich
2014-08-05  9:20 ` [PATCH RFC 0/2] Support for spare physical address space on ARM Ian Campbell
     [not found] ` <53da2210.8511ec0a.4375.46cdSMTPIN_ADDED_MISSING@mx.google.com>
2014-08-07 15:56   ` Julien Grall [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=53E3A190.4050409@linaro.org \
    --to=julien.grall@linaro.org \
    --cc=JBeulich@suse.com \
    --cc=fu.wei@linaro.org \
    --cc=ian.campbell@citrix.com \
    --cc=roy.franz@linaro.org \
    --cc=stefano.stabellini@eu.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.