All of lore.kernel.org
 help / color / mirror / Atom feed
From: Julien Grall <julien.grall@citrix.com>
To: Ian Campbell <ian.campbell@citrix.com>, xen-devel@lists.xen.org
Cc: stefano.stabellini@eu.citrix.com
Subject: Re: [PATCH v6 4/6] xen: arm: map child MMIO and IRQs to dom0 for PCI bus DT nodes.
Date: Mon, 6 Jul 2015 11:58:18 +0100	[thread overview]
Message-ID: <559A5F4A.7020807@citrix.com> (raw)
In-Reply-To: <1435938972-18288-4-git-send-email-ian.campbell@citrix.com>

Hi Ian,

Some minor comments:

On 03/07/15 16:56, Ian Campbell wrote:
> +static int map_range_to_domain(const struct dt_device_node *dev,
> +                               u64 addr, u64 len,
> +                               void *data)
> +{
> +    struct domain *d = data;
> +    bool_t need_mapping = !dt_device_for_passthrough(dev);
> +    int res;
> +
> +    res = iomem_permit_access(d, paddr_to_pfn(addr & PAGE_MASK),

the PAGE_MASK is not useful here.

> +                              paddr_to_pfn(PAGE_ALIGN(addr + len - 1)));
> +    if ( res )
> +    {
> +        printk(XENLOG_ERR "Unable to permit to dom%d access to"
> +               " 0x%"PRIx64" - 0x%"PRIx64"\n",
> +               d->domain_id,
> +               addr & PAGE_MASK, PAGE_ALIGN(addr + len) - 1);
> +        return res;
> +    }
> +
> +    if ( need_mapping )
> +    {
> +        res = map_mmio_regions(d,
> +                               paddr_to_pfn(addr & PAGE_MASK),

ditto

> +                               DIV_ROUND_UP(len, PAGE_SIZE),
> +                               paddr_to_pfn(addr & PAGE_MASK));

ditto

Other than that:

Reviewed-by: Julien Grall <julien.grall@citrix.com>

Regards,

-- 
Julien Grall

  reply	other threads:[~2015-07-06 10:58 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-03 15:55 [PATCH v6 0/6] xen: arm: Parse PCI DT nodes' ranges and interrupt-map Ian Campbell
2015-07-03 15:56 ` [PATCH v6 1/6] xen: dt: add dt_for_each_irq_map helper Ian Campbell
2015-07-03 15:56 ` [PATCH v6 2/6] xen: dt: add dt_for_each_range helper Ian Campbell
2015-07-03 15:56 ` [PATCH v6 3/6] xen: arm: drop redundant extra call to vgic_reserve_virq Ian Campbell
2015-07-03 15:56 ` [PATCH v6 4/6] xen: arm: map child MMIO and IRQs to dom0 for PCI bus DT nodes Ian Campbell
2015-07-06 10:58   ` Julien Grall [this message]
2015-07-03 15:56 ` [PATCH v6 5/6] xen: arm: Import of_bus PCI entry from Linux (as a dt_bus entry) Ian Campbell
2015-07-06 10:59   ` Julien Grall
2015-07-03 15:56 ` [PATCH v6 6/6] xen: arm: consolidate mmio and irq mapping to dom0 Ian Campbell
2015-07-06 11:02   ` Julien Grall
2015-07-06 11:04 ` [PATCH v6 0/6] xen: arm: Parse PCI DT nodes' ranges and interrupt-map Julien Grall
2015-07-06 13:56   ` Ian Campbell

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=559A5F4A.7020807@citrix.com \
    --to=julien.grall@citrix.com \
    --cc=ian.campbell@citrix.com \
    --cc=stefano.stabellini@eu.citrix.com \
    --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.