From: Marc Zyngier <maz@kernel.org>
To: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Cc: "Maulik Shah (mkshah)" <quic_mkshah@quicinc.com>,
Andy Gross <agross@kernel.org>,
Bjorn Andersson <andersson@kernel.org>,
Konrad Dybcio <konrad.dybcio@linaro.org>,
Thomas Gleixner <tglx@linutronix.de>,
linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org,
Neil Armstrong <neil.armstrong@linaro.org>
Subject: Re: [PATCH 1/2] irqchip/qcom-pdc: don't read version register if it is not available
Date: Mon, 28 Aug 2023 11:26:24 +0100 [thread overview]
Message-ID: <863503foof.wl-maz@kernel.org> (raw)
In-Reply-To: <CAA8EJppkJ1s=yjruBm0mntGQ4NBGut2jMLFRtZr6KquA5zn+=Q@mail.gmail.com>
On Mon, 28 Aug 2023 11:18:10 +0100,
Dmitry Baryshkov <dmitry.baryshkov@linaro.org> wrote:
>
> On Mon, 28 Aug 2023 at 13:04, Marc Zyngier <maz@kernel.org> wrote:
> >
> > On Mon, 28 Aug 2023 10:46:10 +0100,
> > Dmitry Baryshkov <dmitry.baryshkov@linaro.org> wrote:
> > >
> > > On Mon, 28 Aug 2023 at 12:36, Maulik Shah (mkshah)
> > > <quic_mkshah@quicinc.com> wrote:
> > > >
> > > > Hi Dmitry,
> > > >
> > > > This patch may be useful if there was a case where some PDCs don't have
> > > > version register populated/available,
> > > > In all PDC versions, version register is always available but due to reg
> > > > size not good enough in device tree for SM8150 it failed to read.
> > > >
> > > > reg size in device node must be expanded if its too small to access all
> > > > registers and i think
> > > > additional check in driver to check if size is good enough would not be
> > > > of much use.
> > >
> > > Unfortunately, it doesn't work this way. DT files are ABI. Even if we
> > > change the DT, the kernel should continue working with the older
> > > version.
> > > Thus, we have to add such bandaid code, which will keep the kernel
> > > from crashing if old DT was used.
> >
> > You're missing the point: all existing PDC HW have version register.
> > The fact that the DT is crap doesn't invalidate this simple fact. It
> > is thus perfectly possible for the driver to *ignore* the crap and do
> > the right thing by expanding the size of the mapping, rather than
> > falling back to the non-versioned code.
>
> Ah. Interesting idea. If that's the overall consensus I can send v2
> doing this. Not sure what is better though.
Given that DT files are mostly generated using copy-paste by people
making a point not to read specifications, odds are that your current
patch would end-up applying the v0 behaviour to v3.2 HW.
What could possibly go wrong?
M.
--
Without deviation from the norm, progress is not possible.
next prev parent reply other threads:[~2023-08-28 10:27 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-25 21:35 [PATCH 1/2] irqchip/qcom-pdc: don't read version register if it is not available Dmitry Baryshkov
2023-08-25 21:35 ` [PATCH 2/2] arm64: dts: qcom: sm8150: extend the size of the PDC resource Dmitry Baryshkov
2023-08-26 9:49 ` Konrad Dybcio
2023-08-28 9:36 ` [PATCH 1/2] irqchip/qcom-pdc: don't read version register if it is not available Maulik Shah (mkshah)
2023-08-28 9:45 ` Konrad Dybcio
2023-08-28 9:46 ` Dmitry Baryshkov
2023-08-28 10:04 ` Marc Zyngier
2023-08-28 10:18 ` Dmitry Baryshkov
2023-08-28 10:26 ` Marc Zyngier [this message]
2023-08-28 12:02 ` Neil Armstrong
2023-08-29 4:25 ` Maulik Shah (mkshah)
2023-08-28 10:20 ` Konrad Dybcio
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=863503foof.wl-maz@kernel.org \
--to=maz@kernel.org \
--cc=agross@kernel.org \
--cc=andersson@kernel.org \
--cc=dmitry.baryshkov@linaro.org \
--cc=konrad.dybcio@linaro.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=neil.armstrong@linaro.org \
--cc=quic_mkshah@quicinc.com \
--cc=tglx@linutronix.de \
/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.