From: Dominique MARTINET <dominique.martinet@atmark-techno.com> To: "Alice Guo (OSS)" <alice.guo@oss.nxp.com> Cc: Shawn Guo <shawnguo@kernel.org>, Krzysztof Kozlowski <krzk@kernel.org>, "robh+dt@kernel.org" <robh+dt@kernel.org>, "devicetree@vger.kernel.org" <devicetree@vger.kernel.org>, Peng Fan <peng.fan@nxp.com>, dl-linux-imx <linux-imx@nxp.com>, "linux-arm-kernel@lists.infradead.org" <linux-arm-kernel@lists.infradead.org>, "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org> Subject: Re: [EXT] regression due to soc_device_match not handling defer (Was: [PATCH v4 4/4] soc: imx8m: change to use platform driver) Date: Thu, 15 Apr 2021 10:27:58 +0900 [thread overview] Message-ID: <YHeWnuDQo76rYoz5@atmark-techno.com> (raw) In-Reply-To: <AM6PR04MB60536EF0DEEE6EB64CF29390E27D9@AM6PR04MB6053.eurprd04.prod.outlook.com> Alice Guo (OSS) wrote on Tue, Mar 30, 2021 at 02:41:23AM +0000: > Thanks for reporting this issue, I'll check and add a fix to handle defer probe. I haven't seen any follow up on this, have you had a chance to take a look? If this won't make it for 5.12 (in a couple of week probably?) would it make sense to revert 7d981405d0fd ("soc: imx8m: change to use platform driver") for now? While looking at the code earlier I also have an unrelated, late-review on the patch itself: > +static u32 __init imx8mq_soc_revision(struct device *dev) > [...] > @@ -191,8 +223,16 @@ static int __init imx8_soc_init(void) > data = id->data; > if (data) { > soc_dev_attr->soc_id = data->name; > - if (data->soc_revision) > - soc_rev = data->soc_revision(); > + if (data->soc_revision) { > + if (pdev) { > + soc_rev = data->soc_revision(&pdev->dev); > + ret = soc_rev; > + if (ret < 0) I appreciate current soc_revision are "small enough" (looking at include/soc/imx/revision.h we're talking < 256) so this actually works, but would it make sense to either make soc_rev signed, or to have soc_revision() return a s64, or have the revision filled in another *u32 argument to make sure the error is an error and not just a large rev? This is most definitely fine for now but that kind of code patterns can lead to weird errors down the road. Thanks, -- Dominique
WARNING: multiple messages have this Message-ID (diff)
From: Dominique MARTINET <dominique.martinet@atmark-techno.com> To: "Alice Guo (OSS)" <alice.guo@oss.nxp.com> Cc: Shawn Guo <shawnguo@kernel.org>, Krzysztof Kozlowski <krzk@kernel.org>, "robh+dt@kernel.org" <robh+dt@kernel.org>, "devicetree@vger.kernel.org" <devicetree@vger.kernel.org>, Peng Fan <peng.fan@nxp.com>, dl-linux-imx <linux-imx@nxp.com>, "linux-arm-kernel@lists.infradead.org" <linux-arm-kernel@lists.infradead.org>, "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org> Subject: Re: [EXT] regression due to soc_device_match not handling defer (Was: [PATCH v4 4/4] soc: imx8m: change to use platform driver) Date: Thu, 15 Apr 2021 10:27:58 +0900 [thread overview] Message-ID: <YHeWnuDQo76rYoz5@atmark-techno.com> (raw) In-Reply-To: <AM6PR04MB60536EF0DEEE6EB64CF29390E27D9@AM6PR04MB6053.eurprd04.prod.outlook.com> Alice Guo (OSS) wrote on Tue, Mar 30, 2021 at 02:41:23AM +0000: > Thanks for reporting this issue, I'll check and add a fix to handle defer probe. I haven't seen any follow up on this, have you had a chance to take a look? If this won't make it for 5.12 (in a couple of week probably?) would it make sense to revert 7d981405d0fd ("soc: imx8m: change to use platform driver") for now? While looking at the code earlier I also have an unrelated, late-review on the patch itself: > +static u32 __init imx8mq_soc_revision(struct device *dev) > [...] > @@ -191,8 +223,16 @@ static int __init imx8_soc_init(void) > data = id->data; > if (data) { > soc_dev_attr->soc_id = data->name; > - if (data->soc_revision) > - soc_rev = data->soc_revision(); > + if (data->soc_revision) { > + if (pdev) { > + soc_rev = data->soc_revision(&pdev->dev); > + ret = soc_rev; > + if (ret < 0) I appreciate current soc_revision are "small enough" (looking at include/soc/imx/revision.h we're talking < 256) so this actually works, but would it make sense to either make soc_rev signed, or to have soc_revision() return a s64, or have the revision filled in another *u32 argument to make sure the error is an error and not just a large rev? This is most definitely fine for now but that kind of code patterns can lead to weird errors down the road. Thanks, -- Dominique _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2021-04-15 1:28 UTC|newest] Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-11-20 10:11 [PATCH v4 1/4] dt-bindings: soc: imx8m: add DT Binding doc for soc unique ID Alice Guo 2020-11-20 10:11 ` Alice Guo 2020-11-20 10:11 ` [PATCH v4 2/4] arm64: dts: imx8m: add SoC ID compatible Alice Guo 2020-11-20 10:11 ` Alice Guo 2020-11-20 10:11 ` [PATCH v4 3/4] arm64: dts: imx8m: add NVMEM provider and consumer to read soc unique ID Alice Guo 2020-11-20 10:11 ` Alice Guo 2020-11-20 10:53 ` Krzysztof Kozlowski 2020-11-20 10:53 ` Krzysztof Kozlowski 2020-11-20 10:11 ` [PATCH v4 4/4] soc: imx8m: change to use platform driver Alice Guo 2020-11-20 10:11 ` Alice Guo 2020-11-20 10:46 ` Krzysztof Kozlowski 2020-11-20 10:46 ` Krzysztof Kozlowski 2021-03-29 9:08 ` regression due to soc_device_match not handling defer (Was: [PATCH v4 4/4] soc: imx8m: change to use platform driver) Dominique MARTINET 2021-03-29 9:08 ` Dominique MARTINET 2021-03-30 2:41 ` [EXT] " Alice Guo (OSS) 2021-03-30 2:41 ` Alice Guo (OSS) 2021-04-15 1:27 ` Dominique MARTINET [this message] 2021-04-15 1:27 ` Dominique MARTINET 2021-04-15 1:33 ` Peng Fan 2021-04-15 1:33 ` Peng Fan 2021-06-24 10:36 ` Lucas Stach 2021-06-24 10:36 ` Lucas Stach 2021-06-29 2:39 ` Peng Fan (OSS) 2021-06-29 2:39 ` Peng Fan (OSS) 2020-11-20 10:50 ` [PATCH v4 1/4] dt-bindings: soc: imx8m: add DT Binding doc for soc unique ID Krzysztof Kozlowski 2020-11-20 10:50 ` Krzysztof Kozlowski 2020-11-23 4:45 ` [EXT] " Alice Guo 2020-11-23 4:45 ` Alice Guo 2020-11-23 9:04 ` Krzysztof Kozlowski 2020-11-23 9:04 ` 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=YHeWnuDQo76rYoz5@atmark-techno.com \ --to=dominique.martinet@atmark-techno.com \ --cc=alice.guo@oss.nxp.com \ --cc=devicetree@vger.kernel.org \ --cc=krzk@kernel.org \ --cc=linux-arm-kernel@lists.infradead.org \ --cc=linux-imx@nxp.com \ --cc=linux-kernel@vger.kernel.org \ --cc=peng.fan@nxp.com \ --cc=robh+dt@kernel.org \ --cc=shawnguo@kernel.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: linkBe 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.