All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Auger <eric.auger@linaro.org>
To: Christoffer Dall <christoffer.dall@linaro.org>, qemu-devel@nongnu.org
Cc: kvmarm@lists.cs.columbia.edu
Subject: Re: [PATCH v3 3/4] target-arm: Extend the gic node properties
Date: Tue, 26 May 2015 14:54:50 +0200	[thread overview]
Message-ID: <55646D1A.3060508@linaro.org> (raw)
In-Reply-To: <1432464666-4825-4-git-send-email-christoffer.dall@linaro.org>

Reviewed-by: Eric Auger <eric.auger@linaro.org>

only minor things below

On 05/24/2015 12:51 PM, Christoffer Dall wrote:
> From: Shanker Donthineni <shankerd@codeaurora.org>
> 
> In preparation for adding the GICv2m which requires address specifiers
> and is a subnode of the gic, we extend the gic DT definition to specify
> the #address-cells and #size-cells properties and add an empty ranges
> property properties of the DT node, since this is required to add the
> v2m node as a child of the gic node.
> 
> Note that we must also expand the irq-map to reference the gic with the
> right address-cells as a consequnce of this change.
consequence
> 
> Signed-off-by: Shanker Donthineni <shankerd@codeaurora.org>
> Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org>
> ---
> Changes since v2:
>  - New separate patch factoring out changes to existing code for eased
>    bisectability in case we broke something
>  - The above fixes the issue with non-MSI compatible guests.
> 
>  hw/arm/virt.c | 17 +++++++++++------
>  1 file changed, 11 insertions(+), 6 deletions(-)
> 
> diff --git a/hw/arm/virt.c b/hw/arm/virt.c
> index f9f7482..6797c6f 100644
> --- a/hw/arm/virt.c
> +++ b/hw/arm/virt.c
> @@ -340,7 +340,11 @@ static void fdt_add_gic_node(VirtBoardInfo *vbi)
>                                       2, vbi->memmap[VIRT_GIC_DIST].size,
>                                       2, vbi->memmap[VIRT_GIC_CPU].base,
>                                       2, vbi->memmap[VIRT_GIC_CPU].size);
> +    qemu_fdt_setprop_cell(vbi->fdt, "/intc", "#address-cells", 0x2);
> +    qemu_fdt_setprop_cell(vbi->fdt, "/intc", "#size-cells", 0x2);
> +    qemu_fdt_setprop(vbi->fdt, "/intc", "ranges", NULL, 0);
>      qemu_fdt_setprop_cell(vbi->fdt, "/intc", "phandle", vbi->gic_phandle);
> +
spare empty line
>  }
>  
>  static void create_gic(VirtBoardInfo *vbi, qemu_irq *pic)
> @@ -604,11 +608,12 @@ static void create_fw_cfg(const VirtBoardInfo *vbi)
>      g_free(nodename);
>  }
>  
> +#define PCIE_IRQMAP_LEN 10
>  static void create_pcie_irq_map(const VirtBoardInfo *vbi, uint32_t gic_phandle,
>                                  int first_irq, const char *nodename)
>  {
>      int devfn, pin;
> -    uint32_t full_irq_map[4 * 4 * 8] = { 0 };
> +    uint32_t full_irq_map[4 * 4 * PCIE_IRQMAP_LEN] = { 0 };
>      uint32_t *irq_map = full_irq_map;
>  
>      for (devfn = 0; devfn <= 0x18; devfn += 0x8) {
> @@ -619,15 +624,15 @@ static void create_pcie_irq_map(const VirtBoardInfo *vbi, uint32_t gic_phandle,
>              int i;
>  
>              uint32_t map[] = {
> -                devfn << 8, 0, 0,                           /* devfn */
> -                pin + 1,                                    /* PCI pin */
> -                gic_phandle, irq_type, irq_nr, irq_level }; /* GIC irq */
> +                devfn << 8, 0, 0,                                 /* devfn */
> +                pin + 1,                                          /* PCI pin */
> +                gic_phandle, 0, 0, irq_type, irq_nr, irq_level }; /* GIC irq */
>  
>              /* Convert map to big endian */
> -            for (i = 0; i < 8; i++) {
> +            for (i = 0; i < PCIE_IRQMAP_LEN; i++) {
>                  irq_map[i] = cpu_to_be32(map[i]);
>              }
> -            irq_map += 8;
> +            irq_map += PCIE_IRQMAP_LEN;
>          }
>      }
>  
> 

WARNING: multiple messages have this Message-ID (diff)
From: Eric Auger <eric.auger@linaro.org>
To: Christoffer Dall <christoffer.dall@linaro.org>, qemu-devel@nongnu.org
Cc: kvmarm@lists.cs.columbia.edu,
	Shanker Donthineni <shankerd@codeaurora.org>
Subject: Re: [Qemu-devel] [PATCH v3 3/4] target-arm: Extend the gic node properties
Date: Tue, 26 May 2015 14:54:50 +0200	[thread overview]
Message-ID: <55646D1A.3060508@linaro.org> (raw)
In-Reply-To: <1432464666-4825-4-git-send-email-christoffer.dall@linaro.org>

Reviewed-by: Eric Auger <eric.auger@linaro.org>

only minor things below

On 05/24/2015 12:51 PM, Christoffer Dall wrote:
> From: Shanker Donthineni <shankerd@codeaurora.org>
> 
> In preparation for adding the GICv2m which requires address specifiers
> and is a subnode of the gic, we extend the gic DT definition to specify
> the #address-cells and #size-cells properties and add an empty ranges
> property properties of the DT node, since this is required to add the
> v2m node as a child of the gic node.
> 
> Note that we must also expand the irq-map to reference the gic with the
> right address-cells as a consequnce of this change.
consequence
> 
> Signed-off-by: Shanker Donthineni <shankerd@codeaurora.org>
> Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org>
> ---
> Changes since v2:
>  - New separate patch factoring out changes to existing code for eased
>    bisectability in case we broke something
>  - The above fixes the issue with non-MSI compatible guests.
> 
>  hw/arm/virt.c | 17 +++++++++++------
>  1 file changed, 11 insertions(+), 6 deletions(-)
> 
> diff --git a/hw/arm/virt.c b/hw/arm/virt.c
> index f9f7482..6797c6f 100644
> --- a/hw/arm/virt.c
> +++ b/hw/arm/virt.c
> @@ -340,7 +340,11 @@ static void fdt_add_gic_node(VirtBoardInfo *vbi)
>                                       2, vbi->memmap[VIRT_GIC_DIST].size,
>                                       2, vbi->memmap[VIRT_GIC_CPU].base,
>                                       2, vbi->memmap[VIRT_GIC_CPU].size);
> +    qemu_fdt_setprop_cell(vbi->fdt, "/intc", "#address-cells", 0x2);
> +    qemu_fdt_setprop_cell(vbi->fdt, "/intc", "#size-cells", 0x2);
> +    qemu_fdt_setprop(vbi->fdt, "/intc", "ranges", NULL, 0);
>      qemu_fdt_setprop_cell(vbi->fdt, "/intc", "phandle", vbi->gic_phandle);
> +
spare empty line
>  }
>  
>  static void create_gic(VirtBoardInfo *vbi, qemu_irq *pic)
> @@ -604,11 +608,12 @@ static void create_fw_cfg(const VirtBoardInfo *vbi)
>      g_free(nodename);
>  }
>  
> +#define PCIE_IRQMAP_LEN 10
>  static void create_pcie_irq_map(const VirtBoardInfo *vbi, uint32_t gic_phandle,
>                                  int first_irq, const char *nodename)
>  {
>      int devfn, pin;
> -    uint32_t full_irq_map[4 * 4 * 8] = { 0 };
> +    uint32_t full_irq_map[4 * 4 * PCIE_IRQMAP_LEN] = { 0 };
>      uint32_t *irq_map = full_irq_map;
>  
>      for (devfn = 0; devfn <= 0x18; devfn += 0x8) {
> @@ -619,15 +624,15 @@ static void create_pcie_irq_map(const VirtBoardInfo *vbi, uint32_t gic_phandle,
>              int i;
>  
>              uint32_t map[] = {
> -                devfn << 8, 0, 0,                           /* devfn */
> -                pin + 1,                                    /* PCI pin */
> -                gic_phandle, irq_type, irq_nr, irq_level }; /* GIC irq */
> +                devfn << 8, 0, 0,                                 /* devfn */
> +                pin + 1,                                          /* PCI pin */
> +                gic_phandle, 0, 0, irq_type, irq_nr, irq_level }; /* GIC irq */
>  
>              /* Convert map to big endian */
> -            for (i = 0; i < 8; i++) {
> +            for (i = 0; i < PCIE_IRQMAP_LEN; i++) {
>                  irq_map[i] = cpu_to_be32(map[i]);
>              }
> -            irq_map += 8;
> +            irq_map += PCIE_IRQMAP_LEN;
>          }
>      }
>  
> 

  reply	other threads:[~2015-05-26 12:45 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-24 10:51 [PATCH v3 0/4] Add support for for GICv2m and MSIs to arm-virt Christoffer Dall
2015-05-24 10:51 ` [Qemu-devel] " Christoffer Dall
2015-05-24 10:51 ` [PATCH v3 1/4] target-arm: Add GIC phandle to VirtBoardInfo Christoffer Dall
2015-05-24 10:51   ` [Qemu-devel] " Christoffer Dall
2015-05-26 12:24   ` Eric Auger
2015-05-26 12:24     ` [Qemu-devel] " Eric Auger
2015-05-24 10:51 ` [PATCH v3 2/4] arm_gicv2m: Add GICv2m widget to support MSIs Christoffer Dall
2015-05-24 10:51   ` [Qemu-devel] " Christoffer Dall
2015-05-26 12:24   ` Eric Auger
2015-05-26 12:24     ` [Qemu-devel] " Eric Auger
2015-05-24 10:51 ` [PATCH v3 3/4] target-arm: Extend the gic node properties Christoffer Dall
2015-05-24 10:51   ` [Qemu-devel] " Christoffer Dall
2015-05-26 12:54   ` Eric Auger [this message]
2015-05-26 12:54     ` Eric Auger
2015-05-24 10:51 ` [PATCH v3 4/4] target-arm: Add the GICv2m to the virt board Christoffer Dall
2015-05-24 10:51   ` [Qemu-devel] " Christoffer Dall
2015-05-25 13:09   ` Pavel Fedin
2015-05-25 13:09     ` [Qemu-devel] " Pavel Fedin
2015-05-25 15:01     ` Peter Maydell
2015-05-25 15:01       ` Peter Maydell
2015-05-25 16:25       ` Eric Auger
2015-05-25 16:25         ` Eric Auger
2015-05-26  6:39         ` Pavel Fedin
2015-05-26  6:39           ` Pavel Fedin
2015-05-25 20:56     ` Christoffer Dall
2015-05-25 20:56       ` Christoffer Dall
2015-05-26 12:54   ` Eric Auger
2015-05-26 12:54     ` [Qemu-devel] " Eric Auger
2015-05-26 12:55     ` Peter Maydell
2015-05-26 12:55       ` [Qemu-devel] " Peter Maydell
2015-05-26 13:07       ` Eric Auger
2015-05-26 13:07         ` [Qemu-devel] " Eric Auger
2015-05-26 13:52         ` Peter Maydell
2015-05-26 13:52           ` [Qemu-devel] " Peter Maydell
2015-05-26 13:54         ` Pavel Fedin
2015-05-26 13:54           ` [Qemu-devel] " Pavel Fedin

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=55646D1A.3060508@linaro.org \
    --to=eric.auger@linaro.org \
    --cc=christoffer.dall@linaro.org \
    --cc=kvmarm@lists.cs.columbia.edu \
    --cc=qemu-devel@nongnu.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.