All of lore.kernel.org
 help / color / mirror / Atom feed
From: Julien Grall <julien.grall@arm.com>
To: mjaggi@caviumnetworks.com, xen-devel@lists.xenproject.org
Cc: Andre.Przywara@arm.com, sstabellini@kernel.org,
	Manish Jaggi <mjaggi@cavium.com>
Subject: Re: [PATCH v4 5/5] ARM: ITS: Expose ITS in the MADT table
Date: Tue, 3 Oct 2017 15:33:44 +0100	[thread overview]
Message-ID: <16c57898-e378-faec-19c3-fd3b6902d791@arm.com> (raw)
In-Reply-To: <1505999845-12577-6-git-send-email-mjaggi@caviumnetworks.com>

Hi Manish,

On 21/09/17 14:17, mjaggi@caviumnetworks.com wrote:
> From: Manish Jaggi <mjaggi@cavium.com>
> 
> Add gicv3_its_make_hwdom_madt to update hwdom MADT ITS information.
> 
> Signed-off-by: Manish Jaggi <mjaggi@cavium.com>
> ---
>   xen/arch/arm/gic-v3-its.c        | 19 +++++++++++++++++++
>   xen/arch/arm/gic-v3.c            |  1 +
>   xen/include/asm-arm/gic_v3_its.h |  8 ++++++++
>   3 files changed, 28 insertions(+)
> 
> diff --git a/xen/arch/arm/gic-v3-its.c b/xen/arch/arm/gic-v3-its.c
> index 8697e5b..e3e7e92 100644
> --- a/xen/arch/arm/gic-v3-its.c
> +++ b/xen/arch/arm/gic-v3-its.c
> @@ -1062,6 +1062,25 @@ void gicv3_its_acpi_init(void)
>       acpi_table_parse_madt(ACPI_MADT_TYPE_GENERIC_TRANSLATOR,
>                               gicv3_its_acpi_probe, 0);
>   }
> +
> +unsigned long gicv3_its_make_hwdom_madt(const struct domain *d, void *base_ptr)
> +{
> +    unsigned long i = 0;
> +    void *fw_its;
> +    struct acpi_madt_generic_translator *hwdom_its;
> +
> +    hwdom_its = base_ptr;
> +
> +    for ( i = 0; i < vgic_v3_its_count(d); i++ )
> +    {
> +        fw_its = acpi_table_get_entry_madt(ACPI_MADT_TYPE_GENERIC_TRANSLATOR,
> +                                           i);
> +        memcpy(hwdom_its, fw_its, sizeof(struct acpi_madt_generic_translator));
> +        hwdom_its++;
> +    }
> +
> +    return sizeof(struct acpi_madt_generic_translator) * vgic_v3_its_count(d);
> +}
>   #endif
>   
>   /*
> diff --git a/xen/arch/arm/gic-v3.c b/xen/arch/arm/gic-v3.c
> index 6e8d580..d29eea6 100644
> --- a/xen/arch/arm/gic-v3.c
> +++ b/xen/arch/arm/gic-v3.c
> @@ -1403,6 +1403,7 @@ static int gicv3_make_hwdom_madt(const struct domain *d, u32 offset)
>           table_len += size;
>       }
>   
> +    table_len += gicv3_its_make_hwdom_madt(d, base_ptr + table_len);

Newline here please.

I will leave Andre to comment on this patch as he suggested the rework.

Cheers,

>       return table_len;
>   }
>   
> diff --git a/xen/include/asm-arm/gic_v3_its.h b/xen/include/asm-arm/gic_v3_its.h
> index 31fca66..fc37776 100644
> --- a/xen/include/asm-arm/gic_v3_its.h
> +++ b/xen/include/asm-arm/gic_v3_its.h
> @@ -138,6 +138,8 @@ void gicv3_its_dt_init(const struct dt_device_node *node);
>   
>   #ifdef CONFIG_ACPI
>   void gicv3_its_acpi_init(void);
> +unsigned long gicv3_its_make_hwdom_madt(const struct domain *d,
> +                                        void *base_ptr);
>   #endif
>   
>   /* Deny iomem access for its */
> @@ -208,6 +210,12 @@ static inline void gicv3_its_dt_init(const struct dt_device_node *node)
>   static inline void gicv3_its_acpi_init(void)
>   {
>   }
> +
> +static inline unsigned long gicv3_its_make_hwdom_madt(const struct domain *d,
> +                                                      void *base_ptr)
> +{
> +    return 0;
> +}
>   #endif
>   
>   static inline int gicv3_its_deny_access(const struct domain *d)
> 

-- 
Julien Grall

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

  reply	other threads:[~2017-10-03 14:33 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-21 13:17 [PATCH v4 0/5] ARM: ACPI: ITS: Add ITS Support for ACPI hardware domain mjaggi
2017-09-21 13:17 ` [PATCH v4 1/5] ARM: ITS: Introduce common function add_to_host_its_list mjaggi
2017-09-21 13:17 ` [PATCH v4 2/5] ARM: ITS: Populate host_its_list from ACPI MADT Table mjaggi
2017-10-03 13:47   ` Julien Grall
2017-10-04  5:29     ` Manish Jaggi
2017-10-05 15:13       ` Andre Przywara
2017-09-21 13:17 ` [PATCH v4 3/5] ARM: ITS: Deny hardware domain access to ITS mjaggi
2017-10-03 14:25   ` Julien Grall
2017-10-05 15:14   ` Andre Przywara
2017-09-21 13:17 ` [PATCH v4 4/5] ARM: Introduce get_hwdom_madt_size in gic_hw_operations mjaggi
2017-10-03 14:31   ` Julien Grall
2017-10-04  5:30     ` Manish Jaggi
2017-10-05 15:14   ` Andre Przywara
2017-09-21 13:17 ` [PATCH v4 5/5] ARM: ITS: Expose ITS in the MADT table mjaggi
2017-10-03 14:33   ` Julien Grall [this message]
2017-10-05  6:52     ` Manish Jaggi
2017-10-05 15:14   ` Andre Przywara

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=16c57898-e378-faec-19c3-fd3b6902d791@arm.com \
    --to=julien.grall@arm.com \
    --cc=Andre.Przywara@arm.com \
    --cc=mjaggi@cavium.com \
    --cc=mjaggi@caviumnetworks.com \
    --cc=sstabellini@kernel.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.