mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Wei Yongjun <weiyongjun1@huawei.com>
To: Marc Zyngier <maz@kernel.org>, Bartosz Golaszewski <brgl@bgdev.pl>
Cc: Wei Yongjun <weiyongjun@huaweicloud.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	Linus Walleij <linus.walleij@linaro.org>,
	<linux-gpio@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v2 1/3] genirq/irq_sim: Allow both one and two cell bindings
Date: Wed, 28 Sep 2022 15:32:25 +0800	[thread overview]
Message-ID: <e9dc5d57-6978-c491-1851-9ea6d4ecfcf5@huawei.com> (raw)
In-Reply-To: <865yha8fcs.wl-maz@kernel.org>



On 2022/9/26 20:55, Marc Zyngier wrote:
> On Mon, 26 Sep 2022 07:24:48 -0400,
> Bartosz Golaszewski <brgl@bgdev.pl> wrote:
>>
>> On Mon, Sep 26, 2022 at 10:27 AM Wei Yongjun <weiyongjun@huaweicloud.com> wrote:
>>>
>>> From: Wei Yongjun <weiyongjun1@huawei.com>
>>>
>>> The IRQ simulator only support one cell binding now, this patch make it
>>> works with either one or two cell bindings, where the cell values map
>>> directly to the irq number and irq flags.
>>>
>>> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
>>> ---
>>>  kernel/irq/irq_sim.c | 1 +
>>>  1 file changed, 1 insertion(+)
>>>
>>> diff --git a/kernel/irq/irq_sim.c b/kernel/irq/irq_sim.c
>>> index dd76323ea3fd..73a90b7b6022 100644
>>> --- a/kernel/irq/irq_sim.c
>>> +++ b/kernel/irq/irq_sim.c
>>> @@ -149,6 +149,7 @@ static void irq_sim_domain_unmap(struct irq_domain *domain, unsigned int virq)
>>>  static const struct irq_domain_ops irq_sim_domain_ops = {
>>>         .map            = irq_sim_domain_map,
>>>         .unmap          = irq_sim_domain_unmap,
>>> +       .xlate          = irq_domain_xlate_onetwocell,
>>>  };
>>>
>>>  /**
>>> --
>>> 2.34.1
>>>
>>
>> You'll need Marc's (Cc'ed) Ack here.

Hi Marc,

> 
> The question is what will the simulator code do with this information.
> Throw it away? What of 3/4/5 cell bindings? I'd rather see the

The 3/4/5 cell bindings is selience ignored currently.

> simulator being extended to deal with arbitrary bindings instead of
> trading a harcoded limit for another one. And also give some
> semantics to the extra cells.

Would you means we should allow the users to overwrite the xlate callback
or overwrite the domain_ops?

Regards,
Wei Yongjun

  reply	other threads:[~2022-09-28  7:55 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-26  8:44 [PATCH v2 0/3] allow gpio simulator be used as interrupt controller Wei Yongjun
2022-09-26  8:44 ` [PATCH v2 1/3] genirq/irq_sim: Allow both one and two cell bindings Wei Yongjun
2022-09-26 11:24   ` Bartosz Golaszewski
2022-09-26 12:55     ` Marc Zyngier
2022-09-28  7:32       ` Wei Yongjun [this message]
2022-09-28  7:47         ` Marc Zyngier
2022-09-26  8:44 ` [PATCH v2 2/3] gpio: sim: make gpio simulator can be used as interrupt controller Wei Yongjun
2022-09-26  8:44 ` [PATCH v2 3/3] gpio: sim: document use case for " Wei Yongjun

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=e9dc5d57-6978-c491-1851-9ea6d4ecfcf5@huawei.com \
    --to=weiyongjun1@huawei.com \
    --cc=brgl@bgdev.pl \
    --cc=linus.walleij@linaro.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maz@kernel.org \
    --cc=tglx@linutronix.de \
    --cc=weiyongjun@huaweicloud.com \
    /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®