From: Julien Grall <julien.grall@linaro.org>
To: Vijay Kilari <vijay.kilari@gmail.com>
Cc: Ian Campbell <Ian.Campbell@citrix.com>,
Stefano Stabellini <stefano.stabellini@eu.citrix.com>,
Prasun Kapoor <Prasun.Kapoor@caviumnetworks.com>,
Vijaya Kumar K <vijaya.kumar@caviumnetworks.com>,
xen-devel@lists.xen.org,
Stefano Stabellini <stefano.stabellini@citrix.com>
Subject: Re: [RFC PATCH v1 06/10] xen/arm: split gic driver into generic and gicv2 driver
Date: Sun, 23 Mar 2014 15:05:37 +0000 [thread overview]
Message-ID: <532EF841.5010701@linaro.org> (raw)
In-Reply-To: <CALicx6vtpCi2R+ptwZEbU3brzmfrJH7qRJoTBavHHctHchyW-g@mail.gmail.com>
Hello Vijay,
On 22/03/14 09:40, Vijay Kilari wrote:
> On Thu, Mar 20, 2014 at 9:32 PM, Julien Grall <julien.grall@linaro.org> wrote:
>> Hello Vijay,
>>
>> Thanks for the patch.
>>
>> On 03/19/2014 02:17 PM, vijay.kilari@gmail.com wrote:
>>> From: Vijaya Kumar K <Vijaya.Kumar@caviumnetworks.com>
>>>
>>> Existing GIC driver has both generic code and hw specific
>>> code. Segregate GIC low level driver into gic-v2.c and
>>> keep generic code in existing gic.c file
>>>
>>> GIC v2 driver registers required functions
>>> to generic GIC driver. This helps to plug in next version
>>> of GIC drivers like GIC v3.
>>>
>>> Signed-off-by: Vijaya Kumar K <Vijaya.Kumar@caviumnetworks.com>
>>> ---
>>
>> [..]
>>
>>> +
>>> +void __init gicv2_init(void)
>>> +{
>>
>> Instead of calling gicv2_init and gicv3_init from generic, it would be
>> better to the device API (see xen/include/asm-arm/device.h). An example
>> of use is my iommu series (see https://patches.linaro.org/26032/
>> iommu_hardware_setup).
>>
> OK. I will check
>
>> [..]
>>
>>> -void send_SGI_one(unsigned int cpu, enum gic_sgi sgi)
>>> +static void send_SGI_one(unsigned int cpu, enum gic_sgi sgi)
>>
>> Why did you put static here?
>>
> I think it is not being called from outside of this file.
> Should I keep it non static for future use?
I think this change should not be part of this patch. As you said this
patch should be only code movement, and adding prototype is definitely
not code movement.
If you want to keep it, I would prefer a separate patch.
>>> {
>>> - ASSERT(cpu < NR_GIC_CPU_IF); /* Targets bitmap only supports 8
>> CPUs */
>>> send_SGI_mask(cpumask_of(cpu), sgi);
>>> }
>>>
It might interesting to keep it just in case.
If you plan to remove it from
>>> -void send_SGI_self(enum gic_sgi sgi)
>>> -{
>>> - ASSERT(sgi < 16); /* There are only 16 SGIs */
>>> -
>>> - dsb();
>>> -
>>> - GICD[GICD_SGIR] = GICD_SGI_TARGET_SELF
>>> - | sgi;
>>> -}
>>> -
>>
>> Why did you remove send_SGI_self?
>>
> It is not used at all.
Same as send_SGI_one. It's not part of this patch.
>>> void send_SGI_allbutself(enum gic_sgi sgi)
>>> {
>>> - ASSERT(sgi < 16); /* There are only 16 SGIs */
>>> + cpumask_t all_others_mask;
>>> + ASSERT(sgi < 16); /* There are only 16 SGIs */
>>>
>>> - dsb();
>>> + cpumask_andnot(&all_others_mask, &cpu_possible_map,
>> cpumask_of(smp_processor_id()));
>>>
>>> - GICD[GICD_SGIR] = GICD_SGI_TARGET_OTHERS
>>> - | sgi;
>>> + dsb();
>>> + send_SGI_mask(&all_others_mask, sgi);
>>
>> Why did you remove the optmization for GICv2?
> What was the optimization that was there earlier?
GICD_SGI_TARGET_OTHERS, will send an SGI to every CPU even if the CPU is
not yet online (e.g not registered by Xen). It's used during secondary
boot (see cpu_up_send_sgi).
Here you are breaking SMP boot on GICv2.
>> [..]
>>> + void (*enable_irq)(int);
>>> + void (*disable_irq)(int);
>>> + void (*eoi_irq)(int);
>>> + void (*deactivate_irq)(int);
>>> + unsigned int (*ack_irq)(void);
>>
>> I would prefer to introduce a new hw_controller here rather than adding
>> another abstraction.
>>
> Can you please explain more on what is meant by new hw_controller?
oops, I meant hw_irq_controller sorry. (see xen/include/xen/irq.h).
Regards,
--
Julien Grall
next prev parent reply other threads:[~2014-03-23 15:05 UTC|newest]
Thread overview: 95+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-19 14:17 [RFC PATCH v1 00/10] xen/arm: Add GICv3 support vijay.kilari
2014-03-19 14:17 ` [RFC PATCH v1 01/10] xen/arm: make secondary gic init as notifier call vijay.kilari
2014-03-20 12:48 ` Julien Grall
2014-03-22 8:16 ` Vijay Kilari
2014-03-23 14:38 ` Julien Grall
2014-03-26 11:27 ` Vijay Kilari
2014-03-26 14:41 ` Julien Grall
2014-03-26 17:22 ` George Dunlap
2014-03-21 17:15 ` Ian Campbell
2014-03-22 8:32 ` Vijay Kilari
2014-03-22 13:54 ` Julien Grall
2014-03-24 10:53 ` Ian Campbell
2014-03-19 14:17 ` [RFC PATCH v1 02/10] xen/arm: register mmio handler at runtime vijay.kilari
2014-03-20 13:18 ` Julien Grall
2014-03-21 13:19 ` Andrii Tseglytskyi
2014-03-21 17:17 ` Ian Campbell
2014-03-21 17:23 ` Julien Grall
2014-03-26 12:29 ` Vijay Kilari
2014-03-26 14:47 ` Julien Grall
2014-03-27 5:40 ` Vijay Kilari
2014-03-27 15:02 ` Julien Grall
2014-04-01 9:34 ` Vijay Kilari
2014-04-01 11:00 ` Julien Grall
2014-04-01 12:32 ` Vijay Kilari
2014-04-01 12:44 ` Ian Campbell
2014-04-01 12:51 ` Julien Grall
2014-04-01 13:05 ` Vijay Kilari
2014-04-01 13:56 ` Julien Grall
2014-03-19 14:17 ` [RFC PATCH v1 03/10] xen/arm: move vgic data to vgic driver vijay.kilari
2014-03-20 13:51 ` Julien Grall
2014-03-21 17:23 ` Ian Campbell
2014-03-22 9:20 ` Vijay Kilari
2014-03-24 10:57 ` Ian Campbell
2014-03-26 11:44 ` Vijay Kilari
2014-03-26 12:00 ` Ian Campbell
2014-03-26 12:42 ` Vijay Kilari
2014-03-22 9:17 ` Vijay Kilari
2014-03-20 17:14 ` Stefano Stabellini
2014-03-20 17:56 ` Julien Grall
2014-03-20 18:11 ` Stefano Stabellini
2014-03-21 9:22 ` Ian Campbell
2014-03-19 14:17 ` [RFC PATCH v1 04/10] arm/xen: move gic save and restore registers to gic driver vijay.kilari
2014-03-20 15:22 ` Julien Grall
2014-03-21 17:26 ` Ian Campbell
2014-03-22 9:22 ` Vijay Kilari
2014-03-20 17:23 ` Stefano Stabellini
2014-03-21 17:28 ` Ian Campbell
2014-03-22 9:27 ` Vijay Kilari
2014-03-19 14:17 ` [RFC PATCH v1 05/10] xen/arm: move gic definitions to seperate file vijay.kilari
2014-03-20 15:13 ` Julien Grall
2014-03-19 14:17 ` [RFC PATCH v1 06/10] xen/arm: split gic driver into generic and gicv2 driver vijay.kilari
2014-03-20 11:55 ` Stefano Stabellini
2014-03-22 9:32 ` Vijay Kilari
2014-03-23 14:43 ` Julien Grall
2014-03-24 11:01 ` Ian Campbell
2014-03-20 16:02 ` Julien Grall
2014-03-21 17:32 ` Ian Campbell
2014-03-21 17:37 ` Julien Grall
2014-03-22 9:40 ` Vijay Kilari
2014-03-23 15:05 ` Julien Grall [this message]
2014-03-20 16:39 ` Stefano Stabellini
2014-03-21 17:38 ` Ian Campbell
2014-03-22 9:59 ` Vijay Kilari
2014-03-24 11:06 ` Ian Campbell
2014-03-19 14:17 ` [RFC PATCH v1 07/10] xen/arm: split vgic into generic and GIC v2 specific drivers vijay.kilari
2014-03-19 14:17 ` [RFC PATCH v1 08/10] xen/arm: Add support for GIC v3 vijay.kilari
2014-03-20 12:37 ` Stefano Stabellini
2014-03-22 10:07 ` Vijay Kilari
2014-03-24 11:28 ` Ian Campbell
2014-03-24 17:01 ` Stefano Stabellini
2014-03-26 13:16 ` Vijay Kilari
2014-03-26 17:22 ` Stefano Stabellini
2014-03-20 16:40 ` Julien Grall
2014-03-22 10:21 ` Vijay Kilari
2014-03-23 14:49 ` Julien Grall
2014-03-24 11:26 ` Ian Campbell
2014-03-24 11:50 ` Julien Grall
2014-03-24 17:02 ` Stefano Stabellini
2014-03-19 14:17 ` [RFC PATCH v1 09/10] xen/arm: Add vgic " vijay.kilari
2014-03-20 12:38 ` Stefano Stabellini
2014-03-19 14:17 ` [RFC PATCH v1 10/10] xen/arm: GICv3 device tree parsing vijay.kilari
2014-03-20 16:08 ` Julien Grall
2014-03-22 10:30 ` Vijay Kilari
2014-03-24 11:43 ` Ian Campbell
2014-03-24 12:03 ` Julien Grall
2014-03-24 12:07 ` Ian Campbell
2014-03-24 12:08 ` Julien Grall
2014-03-24 17:34 ` Stefano Stabellini
2014-03-24 18:00 ` Julien Grall
2014-03-25 11:04 ` Stefano Stabellini
2014-03-25 12:33 ` Julien Grall
2014-03-25 12:34 ` Julien Grall
2014-04-01 12:59 ` Ian Campbell
2014-04-01 13:07 ` Julien Grall
2014-03-20 11:55 ` [RFC PATCH v1 00/10] xen/arm: Add GICv3 support Stefano Stabellini
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=532EF841.5010701@linaro.org \
--to=julien.grall@linaro.org \
--cc=Ian.Campbell@citrix.com \
--cc=Prasun.Kapoor@caviumnetworks.com \
--cc=stefano.stabellini@citrix.com \
--cc=stefano.stabellini@eu.citrix.com \
--cc=vijay.kilari@gmail.com \
--cc=vijaya.kumar@caviumnetworks.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 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).