linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Marc Zyngier <maz@kernel.org>
To: Bartosz Golaszewski <brgl@bgdev.pl>
Cc: Wei Yongjun <weiyongjun@huaweicloud.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	Linus Walleij <linus.walleij@linaro.org>,
	Wei Yongjun <weiyongjun1@huawei.com>,
	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: Mon, 26 Sep 2022 08:55:31 -0400	[thread overview]
Message-ID: <865yha8fcs.wl-maz@kernel.org> (raw)
In-Reply-To: <CAMRc=MfjB4QTf_zp5Rk3T_ndqDjCCjAW2HmGpJ9EF-i1epSLcw@mail.gmail.com>

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.

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
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.

Thanks,

	M.

-- 
Without deviation from the norm, progress is not possible.

  reply	other threads:[~2022-09-26 14:37 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 [this message]
2022-09-28  7:32       ` Wei Yongjun
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=865yha8fcs.wl-maz@kernel.org \
    --to=maz@kernel.org \
    --cc=brgl@bgdev.pl \
    --cc=linus.walleij@linaro.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tglx@linutronix.de \
    --cc=weiyongjun1@huawei.com \
    --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;
as well as URLs for NNTP newsgroup(s).