From: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
To: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Cc: andersson@kernel.org, robh+dt@kernel.org,
krzysztof.kozlowski+dt@linaro.org, bp@alien8.de,
tony.luck@intel.com, quic_saipraka@quicinc.com,
konrad.dybcio@linaro.org, linux-arm-msm@vger.kernel.org,
linux-kernel@vger.kernel.org, james.morse@arm.com,
mchehab@kernel.org, rric@kernel.org, linux-edac@vger.kernel.org,
quic_ppareek@quicinc.com, luca.weiss@fairphone.com,
ahalaney@redhat.com, steev@kali.org, stable@vger.kernel.org
Subject: Re: [PATCH v6 17/17] soc: qcom: llcc: Do not create EDAC platform device on SDM845
Date: Wed, 18 Jan 2023 21:56:57 +0530 [thread overview]
Message-ID: <20230118162657.GE4690@thinkpad> (raw)
In-Reply-To: <3ca41414-df2e-4ba0-9dc7-cacea2413fe6@linaro.org>
On Wed, Jan 18, 2023 at 05:05:28PM +0100, Krzysztof Kozlowski wrote:
> On 18/01/2023 16:59, Manivannan Sadhasivam wrote:
> > On Wed, Jan 18, 2023 at 04:37:29PM +0100, Krzysztof Kozlowski wrote:
> >> On 18/01/2023 16:09, Manivannan Sadhasivam wrote:
> >>> The platforms based on SDM845 SoC locks the access to EDAC registers in the
> >>> bootloader. So probing the EDAC driver will result in a crash. Hence,
> >>> disable the creation of EDAC platform device on all SDM845 devices.
> >>>
> >>> The issue has been observed on Lenovo Yoga C630 and DB845c.
> >>>
> >>> Cc: <stable@vger.kernel.org> # 5.10
> >>> Reported-by: Steev Klimaszewski <steev@kali.org>
> >>> Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
> >>> ---
> >>> drivers/soc/qcom/llcc-qcom.c | 17 ++++++++++++-----
> >>> 1 file changed, 12 insertions(+), 5 deletions(-)
> >>>
> >>> diff --git a/drivers/soc/qcom/llcc-qcom.c b/drivers/soc/qcom/llcc-qcom.c
> >>> index 7b7c5a38bac6..8d840702df50 100644
> >>> --- a/drivers/soc/qcom/llcc-qcom.c
> >>> +++ b/drivers/soc/qcom/llcc-qcom.c
> >>> @@ -1012,11 +1012,18 @@ static int qcom_llcc_probe(struct platform_device *pdev)
> >>>
> >>> drv_data->ecc_irq = platform_get_irq_optional(pdev, 0);
> >>>
> >>> - llcc_edac = platform_device_register_data(&pdev->dev,
> >>> - "qcom_llcc_edac", -1, drv_data,
> >>> - sizeof(*drv_data));
> >>> - if (IS_ERR(llcc_edac))
> >>> - dev_err(dev, "Failed to register llcc edac driver\n");
> >>> + /*
> >>> + * The platforms based on SDM845 SoC locks the access to EDAC registers
> >>> + * in bootloader. So probing the EDAC driver will result in a crash.
> >>> + * Hence, disable the creation of EDAC platform device on SDM845.
> >>> + */
> >>> + if (!of_device_is_compatible(dev->of_node, "qcom,sdm845-llcc")) {
> >>
> >> Don't spread of_device_is_compatible() in driver code. You have driver
> >> data for this.
> >>
> >
> > Yeah, but there is no ID to in the driver data to identify an SoC.
>
> What do you mean there is no? You use exactly the same compatible as the
> one in driver data.
>
Right, but I was saying that there is no unique field to identify an SoC.
>
> > I could add
> > one but is that really worth doing so? Is using of_device_is_compatible() in
> > drivers discouraged nowadays?
>
> Because it spreads variant matching all over. It does not scale. drv
> data fields are the way or better quirks/flags.
>
The driver quirk/flags are usually beneficial if it applies to multiple
platforms, otherwise they are a bit overkill IMO just like in this case.
One can argue that this matching could spread to other SoCs in the future, but
I don't think that could happen for this case.
Thanks,
Mani
> Best regards,
> Krzysztof
>
--
மணிவண்ணன் சதாசிவம்
next prev parent reply other threads:[~2023-01-18 16:30 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20230118150904.26913-1-manivannan.sadhasivam@linaro.org>
2023-01-18 15:08 ` [PATCH v6 01/17] EDAC/device: Respect any driver-supplied workqueue polling value Manivannan Sadhasivam
2023-01-18 17:46 ` Bjorn Andersson
2023-01-18 19:05 ` Borislav Petkov
2023-01-19 10:55 ` Borislav Petkov
2023-01-18 15:08 ` [PATCH v6 03/17] EDAC/qcom: Do not pass llcc_driv_data as edac_device_ctl_info's pvt_info Manivannan Sadhasivam
2023-01-20 18:56 ` Borislav Petkov
2023-01-18 15:09 ` [PATCH v6 17/17] soc: qcom: llcc: Do not create EDAC platform device on SDM845 Manivannan Sadhasivam
2023-01-18 15:37 ` Krzysztof Kozlowski
2023-01-18 15:59 ` Manivannan Sadhasivam
2023-01-18 16:05 ` Krzysztof Kozlowski
2023-01-18 16:26 ` Manivannan Sadhasivam [this message]
2023-01-18 17:06 ` Krzysztof Kozlowski
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=20230118162657.GE4690@thinkpad \
--to=manivannan.sadhasivam@linaro.org \
--cc=ahalaney@redhat.com \
--cc=andersson@kernel.org \
--cc=bp@alien8.de \
--cc=james.morse@arm.com \
--cc=konrad.dybcio@linaro.org \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=krzysztof.kozlowski@linaro.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-edac@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=luca.weiss@fairphone.com \
--cc=mchehab@kernel.org \
--cc=quic_ppareek@quicinc.com \
--cc=quic_saipraka@quicinc.com \
--cc=robh+dt@kernel.org \
--cc=rric@kernel.org \
--cc=stable@vger.kernel.org \
--cc=steev@kali.org \
--cc=tony.luck@intel.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