From: Julien Grall <julien.grall@citrix.com>
To: Stefano Stabellini <stefano.stabellini@eu.citrix.com>,
Julien Grall <julien.grall@citrix.com>
Cc: patches@apm.com,
Pranavkumar Sawargaonkar <pranavkumar@linaro.org>,
stefano.stabellini@citrix.com, christoffer.dall@linaro.org,
xen-devel@lists.xen.org
Subject: Re: [PATCH] xen: arm: X-Gene Storm check GIC DIST address for EOI quirk
Date: Tue, 7 Apr 2015 11:29:52 +0100 [thread overview]
Message-ID: <5523B1A0.9040802@citrix.com> (raw)
In-Reply-To: <alpine.DEB.2.02.1504071039320.7690@kaball.uk.xensource.com>
Hi Stefano,
On 07/04/2015 10:40, Stefano Stabellini wrote:
> On Mon, 6 Apr 2015, Julien Grall wrote:
>> Hi Pranav,
>>
>> Thank you for the patch.
>>
>> On 06/04/2015 10:54, Pranavkumar Sawargaonkar wrote:
>>> In old X-Gene Storm firmware and DT, secure mode addresses have been
>>> mentioned in GICv2 node. In this case maintenance interrupt is used
>>> instead of EOI HW method.
>>>
>>> This patch checks the GIC Distributor Base Address to enable EOI quirk
>>> for old firmware.
>>>
>>> Ref:
>>> http://lists.xen.org/archives/html/xen-devel/2014-07/msg01263.html
>>>
>>> Signed-off-by: Pranavkumar Sawargaonkar <pranavkumar@linaro.org>
>>> ---
>>> xen/arch/arm/platforms/xgene-storm.c | 37
>>> +++++++++++++++++++++++++++++++++-
>>> 1 file changed, 36 insertions(+), 1 deletion(-)
>>>
>>> diff --git a/xen/arch/arm/platforms/xgene-storm.c
>>> b/xen/arch/arm/platforms/xgene-storm.c
>>> index eee650e..dd7cbfc 100644
>>> --- a/xen/arch/arm/platforms/xgene-storm.c
>>> +++ b/xen/arch/arm/platforms/xgene-storm.c
>>> @@ -22,6 +22,7 @@
>>> #include <asm/platform.h>
>>> #include <xen/stdbool.h>
>>> #include <xen/vmap.h>
>>> +#include <xen/device_tree.h>
>>> #include <asm/io.h>
>>> #include <asm/gic.h>
>>>
>>> @@ -35,9 +36,41 @@ static u64 reset_addr, reset_size;
>>> static u32 reset_mask;
>>> static bool reset_vals_valid = false;
>>>
>>> +#define XGENE_SEC_GICV2_DIST_ADDR 0x78010000
>>> +static u32 quirk_guest_pirq_need_eoi;
>>
>> This variable will mostly be read. So, I would add __read_mostly.
>>
>>> +
>>> +static void xgene_check_pirq_eoi(void)
>>
>> If I'm not mistaken, this function is only called during Xen initialization.
>> So, I would add __init.
>>
>>> +{
>>> + struct dt_device_node *node;
>>> + int res;
>>> + paddr_t dbase;
>>> +
>>> + dt_for_each_device_node( dt_host, node )
>>> + {
>>
>> It would be better to create a new callback for platform specific GIC
>> initialization and use dt_interrupt_controller.
>>
>> This would avoid to have this loop and rely on there is always only one
>> interrupt controller in the DT.
>
> That is true, however we do know that on this SoC there is only one GIC,
> so it might be acceptable to rely on this knowledge: this is already
> very platform specific code.
If we keep the loop, I would add a comment on the above the loop
explaining that we rely on there is always only GIC.
Although, I was wondering if we could simply rely on the node path to
get the DT node?
Regards,
--
Julien Grall
next prev parent reply other threads:[~2015-04-07 10:29 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-06 8:54 [PATCH] xen: arm: X-Gene Storm check GIC DIST address for EOI quirk Pranavkumar Sawargaonkar
2015-04-06 14:47 ` Julien Grall
2015-04-07 9:40 ` Stefano Stabellini
2015-04-07 10:29 ` Julien Grall [this message]
2015-04-15 16:16 ` Ian Campbell
2015-04-16 5:59 ` Pranavkumar Sawargaonkar
2015-04-08 8:28 ` Christoffer Dall
2015-04-13 6:12 ` Pranavkumar Sawargaonkar
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=5523B1A0.9040802@citrix.com \
--to=julien.grall@citrix.com \
--cc=christoffer.dall@linaro.org \
--cc=patches@apm.com \
--cc=pranavkumar@linaro.org \
--cc=stefano.stabellini@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.