mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Oleksandr Tyshchenko <Oleksandr_Tyshchenko@epam.com>
To: Juergen Gross <jgross@suse.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Cc: Stefano Stabellini <sstabellini@kernel.org>,
	"xen-devel@lists.xenproject.org" <xen-devel@lists.xenproject.org>
Subject: Re: [PATCH 5/7] xen/events: drop xen_allocate_irqs_dynamic()
Date: Tue, 14 Nov 2023 18:29:35 +0000	[thread overview]
Message-ID: <8ea75027-7e0f-4ea7-8bad-219d67ebae2f@epam.com> (raw)
In-Reply-To: <c29136e0-054f-449d-b9f6-8116e3eea0c6@suse.com>



On 14.11.23 10:35, Juergen Gross wrote:


Hello Juergen


> On 14.11.23 09:20, Oleksandr Tyshchenko wrote:
>>
>>
>> On 16.10.23 09:28, Juergen Gross wrote:
>>
>>
>> Hello Juergen
>>
>>> Instead of having a common function for allocating a single IRQ or a
>>> consecutive number of IRQs, split up the functionality into the callers
>>> of xen_allocate_irqs_dynamic().
>>>
>>> This allows to handle any allocation error in xen_irq_init() gracefully
>>> instead of panicing the system. Let xen_irq_init() return the irq_info
>>> pointer or NULL in case of an allocation error.
>>>
>>> Additionally set the IRQ into irq_info already at allocation time, as
>>> otherwise the IRQ would be '0' (which is a valid IRQ number) until
>>> being set.
>>>
>>> Signed-off-by: Juergen Gross <jgross@suse.com>
>>> ---
>>>    drivers/xen/events/events_base.c | 74 
>>> +++++++++++++++++++-------------
>>>    1 file changed, 44 insertions(+), 30 deletions(-)
>>>
>>
>> [snip]
>>
>>> @@ -1725,6 +1738,7 @@ void rebind_evtchn_irq(evtchn_port_t evtchn, 
>>> int irq)
>>>           so there should be a proper type */
>>>        BUG_ON(info->type == IRQT_UNBOUND);
>>> +    info->irq = irq;
>>
>>
>> I failed to understand why this is added here. Doesn't irq remain the
>> same, and info->irq remains valid? Could you please clarify.
> 
> The IRQ remains the same, but the event channel could change.
> 
> This setting of info->irq compensates for the related removal in
> xen_irq_info_common_setup().


Thanks for the clarification, you can add my

Reviewed-by: Oleksandr Tyshchenko <oleksandr_tyshchenko@epam.com>

> 
>>
>> Other changes lgtm.
> 
> 
> Juergen
> 

  reply	other threads:[~2023-11-14 18:29 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-16  6:28 [PATCH 0/7] xen/events: do some cleanups in events_base.c Juergen Gross
2023-10-16  6:28 ` [PATCH 1/7] xen/events: fix delayed eoi list handling Juergen Gross
2023-11-13 13:51   ` Oleksandr Tyshchenko
2023-10-16  6:28 ` [PATCH 2/7] xen/events: remove unused functions Juergen Gross
2023-11-13 14:20   ` Oleksandr Tyshchenko
2023-10-16  6:28 ` [PATCH 3/7] xen/events: reduce externally visible helper functions Juergen Gross
2023-11-13 15:53   ` Oleksandr Tyshchenko
2023-10-16  6:28 ` [PATCH 4/7] xen/events: remove some simple helpers from events_base.c Juergen Gross
2023-11-13 17:35   ` Oleksandr Tyshchenko
2023-11-14  8:28     ` Juergen Gross
2023-10-16  6:28 ` [PATCH 5/7] xen/events: drop xen_allocate_irqs_dynamic() Juergen Gross
2023-11-14  8:20   ` Oleksandr Tyshchenko
2023-11-14  8:35     ` Juergen Gross
2023-11-14 18:29       ` Oleksandr Tyshchenko [this message]
2023-10-16  6:28 ` [PATCH 6/7] xen/events: modify internal [un]bind interfaces Juergen Gross
2023-11-14 13:45   ` Oleksandr Tyshchenko
2023-10-16  6:28 ` [PATCH 7/7] xen/events: remove some info_for_irq() calls in pirq handling Juergen Gross
2023-11-14 18:16   ` Oleksandr Tyshchenko
2023-11-15  7:41     ` Juergen Gross
2023-11-13  7:14 ` [PATCH 0/7] xen/events: do some cleanups in events_base.c Juergen Gross

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=8ea75027-7e0f-4ea7-8bad-219d67ebae2f@epam.com \
    --to=oleksandr_tyshchenko@epam.com \
    --cc=jgross@suse.com \
    --cc=linux-kernel@vger.kernel.org \
    --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

all inboxes | Powered by JetHome®