xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Julien Grall <julien.grall@linaro.org>
To: Stefano Stabellini <sstabellini@kernel.org>, mjaggi@caviumnetworks.com
Cc: xen-devel@lists.xenproject.org, julien.grall@arm.com,
	Manish Jaggi <mjaggi@cavium.com>,
	Andre.Przywara@arm.com
Subject: Re: [PATCH v6 5/5] ARM: ITS: Expose ITS in the MADT table
Date: Tue, 10 Oct 2017 20:24:58 +0100	[thread overview]
Message-ID: <dc552e63-e9e5-64db-d85a-b719c3ad727f@linaro.org> (raw)
In-Reply-To: <alpine.DEB.2.10.1710101030190.3105@sstabellini-ThinkPad-X260>

Hi,

On 10/10/2017 20:15, Stefano Stabellini wrote:
> On Tue, 10 Oct 2017, mjaggi@caviumnetworks.com wrote:
>> From: Manish Jaggi <mjaggi@cavium.com>
>>
>> Add gicv3_its_make_hwdom_madt to update hwdom MADT ITS information.
>>
>> Reviewed-by: Andre Przywara <andre.przywara@arm.com>
>> Signed-off-by: Manish Jaggi <mjaggi@cavium.com>
>> ---
>>  xen/arch/arm/gic-v3-its.c        | 19 +++++++++++++++++++
>>  xen/arch/arm/gic-v3.c            |  2 ++
>>  xen/include/asm-arm/gic_v3_its.h |  8 ++++++++
>>  3 files changed, 29 insertions(+)
>>
>> diff --git a/xen/arch/arm/gic-v3-its.c b/xen/arch/arm/gic-v3-its.c
>> index bd94308..e57ae05 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 int i;
>> +    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));
>
> I think we are supposed to use ACPI_MEMCPY for this kind of operations.
> If that's OK for you, I'll fix on commit.

I don't think we should use ACPI_MEMCPY. The macro is here because 
acpica (our drivers/acpi) is meant to be OS-agnostic. So you need a way 
to tell how your OS copies memory.

I had a look on the usage of ACPI_MEMCPY, it seems that only the 
arch/arm and drivers/acpi is using it. This seem to confirm that 
probably we used it by mistake in the Arm code.

Cheers,

-- 
Julien Grall

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

  reply	other threads:[~2017-10-10 19:25 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-10 12:52 [PATCH v6 0/5] ARM: ACPI: ITS: Add ITS Support for ACPI hardware domain mjaggi
2017-10-10 12:52 ` [PATCH v6 1/5] ARM: ITS: Introduce common function add_to_host_its_list mjaggi
2017-10-10 12:52 ` [PATCH v6 2/5] ARM: ITS: Populate host_its_list from ACPI MADT Table mjaggi
2017-10-10 13:41   ` Julien Grall
2017-10-10 12:52 ` [PATCH v6 3/5] ARM: ITS: Deny hardware domain access to ITS mjaggi
2017-10-10 13:39   ` Julien Grall
2017-10-10 13:53     ` Manish Jaggi
2017-10-10 13:55       ` Julien Grall
2017-10-10 12:52 ` [PATCH v6 4/5] ARM: Update Formula to compute MADT size using new callbacks in gic_hw_operations mjaggi
2017-10-10 13:44   ` Julien Grall
2017-10-10 12:52 ` [PATCH v6 5/5] ARM: ITS: Expose ITS in the MADT table mjaggi
2017-10-10 13:47   ` Julien Grall
2017-10-10 19:15   ` Stefano Stabellini
2017-10-10 19:24     ` Julien Grall [this message]
2017-10-10 20:07       ` Stefano Stabellini
2017-10-10 20:15         ` Julien Grall
2017-10-10 15:09 ` [PATCH v6 0/5] ARM: ACPI: ITS: Add ITS Support for ACPI hardware domain 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=dc552e63-e9e5-64db-d85a-b719c3ad727f@linaro.org \
    --to=julien.grall@linaro.org \
    --cc=Andre.Przywara@arm.com \
    --cc=julien.grall@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).