diff for duplicates of <522D93D7.4010307@arm.com> diff --git a/a/1.txt b/N1/1.txt index d6ca804..f7d746a 100644 --- a/a/1.txt +++ b/N1/1.txt @@ -1,11 +1,12 @@ On 06/09/13 14:44, Guennadi Liakhovetski wrote: > Hi -> +>=20 > On Tue, 20 Aug 2013, Sudeep KarkadaNagesha wrote: -> +>=20 >> From: Sudeep KarkadaNagesha <sudeep.karkadanagesha@arm.com> >> ->> Now that the cpu device registration initialises the of_node(if available) +>> Now that the cpu device registration initialises the of_node(if availabl= +e) >> appropriately for all the cpus, parsing here is redundant. >> >> This patch removes all DT parsing and uses cpu->of_node instead. @@ -18,50 +19,54 @@ On 06/09/13 14:44, Guennadi Liakhovetski wrote: >> drivers/cpufreq/cpufreq-cpu0.c | 23 ++++------------------- >> 1 file changed, 4 insertions(+), 19 deletions(-) >> ->> diff --git a/drivers/cpufreq/cpufreq-cpu0.c b/drivers/cpufreq/cpufreq-cpu0.= +>> diff --git a/drivers/cpufreq/cpufreq-cpu0.c b/drivers/cpufreq/cpufreq-cp= +u0.=3D >> c >> index ad1fde2..5b05c26 100644 >> --- a/drivers/cpufreq/cpufreq-cpu0.c >> +++ b/drivers/cpufreq/cpufreq-cpu0.c ->> @@ -174,29 +174,17 @@ static struct cpufreq_driver cpu0_cpufreq_driver =3D = +>> @@ -174,29 +174,17 @@ static struct cpufreq_driver cpu0_cpufreq_driver = +=3D3D =3D >> { ->> =20 +>> =3D20 >> static int cpu0_cpufreq_probe(struct platform_device *pdev) >> { ->> -=09struct device_node *np, *parent; ->> +=09struct device_node *np; ->> =09int ret; ->> =20 ->> -=09parent =3D of_find_node_by_path("/cpus"); ->> -=09if (!parent) { ->> -=09=09pr_err("failed to find OF /cpus\n"); ->> -=09=09return -ENOENT; ->> -=09} +>> -=3D09struct device_node *np, *parent; +>> +=3D09struct device_node *np; +>> =3D09int ret; +>> =3D20 +>> -=3D09parent =3D3D of_find_node_by_path("/cpus"); +>> -=3D09if (!parent) { +>> -=3D09=3D09pr_err("failed to find OF /cpus\n"); +>> -=3D09=3D09return -ENOENT; +>> -=3D09} >> - ->> -=09for_each_child_of_node(parent, np) { ->> -=09=09if (of_get_property(np, "operating-points", NULL)) ->> -=09=09=09break; ->> -=09} ->> +=09cpu_dev =3D &pdev->dev; ->> =20 ->> +=09np =3D of_node_get(cpu_dev->of_node); -> -> Has this actually been tested? This seems to break cpufreq-cpu0. The -> reason is, that this probe function is called not for the DT CPU node, but -> for a special virtual cpufreq-cpu0 platform device, typically created by +>> -=3D09for_each_child_of_node(parent, np) { +>> -=3D09=3D09if (of_get_property(np, "operating-points", NULL)) +>> -=3D09=3D09=3D09break; +>> -=3D09} +>> +=3D09cpu_dev =3D3D &pdev->dev; +>> =3D20 +>> +=3D09np =3D3D of_node_get(cpu_dev->of_node); +>=20 +> Has this actually been tested? This seems to break cpufreq-cpu0. The=20 +> reason is, that this probe function is called not for the DT CPU node, bu= +t=20 +> for a special virtual cpufreq-cpu0 platform device, typically created by= +=20 > platforms, using -> -> platform_device_register_simple("cpufreq-cpu0", -1, NULL, 0); -> +>=20 +> =09platform_device_register_simple("cpufreq-cpu0", -1, NULL, 0); +>=20 > which then of course doesn't have on .of_node associated with it. -> +>=20 Hi Guennadi, Based on my understanding of the original code: - cpu_dev = &pdev->dev; - ... - ret = of_init_opp_table(cpu_dev); + cpu_dev =3D &pdev->dev; +=09... +=09ret =3D of_init_opp_table(cpu_dev); of_init_opp_table needs cpu_dev to be get_cpu_device(0). My understanding was that platform using cpufreq-cpu0 sets &pdev->dev to @@ -73,7 +78,8 @@ Can you please clarify ? The fix would be as below but I would like to know if setting cpu_dev to get_cpu_device(0) instead of &pdev->dev has any impact on other parts of code using cpu_dev ? -diff --git a/drivers/cpufreq/cpufreq-cpu0.c b/drivers/cpufreq/cpufreq-cpu0.c +diff --git a/drivers/cpufreq/cpufreq-cpu0.c b/drivers/cpufreq/cpufreq-cpu0.= +c index cbfffa9..871c336 100644 --- a/drivers/cpufreq/cpufreq-cpu0.c +++ b/drivers/cpufreq/cpufreq-cpu0.c @@ -82,10 +88,10 @@ index cbfffa9..871c336 100644 struct device_node *np; int ret; -- cpu_dev = &pdev->dev; -+ cpu_dev = get_cpu_device(0); +- cpu_dev =3D &pdev->dev; ++ cpu_dev =3D get_cpu_device(0); - np = of_node_get(cpu_dev->of_node); + np =3D of_node_get(cpu_dev->of_node); if (!np) { diff --git a/a/content_digest b/N1/content_digest index 0b2c6de..1979b2e 100644 --- a/a/content_digest +++ b/N1/content_digest @@ -7,30 +7,30 @@ "Date\0Mon, 09 Sep 2013 10:24:39 +0100\0" "To\0Guennadi Liakhovetski <g.liakhovetski@gmx.de>" " Shawn Guo <shawn.guo@linaro.org>\0" - "Cc\0Sudeep KarkadaNagesha <Sudeep.KarkadaNagesha@arm.com>" - linux-arm-kernel@lists.infradead.org <linux-arm-kernel@lists.infradead.org> - linux-kernel@vger.kernel.org <linux-kernel@vger.kernel.org> - linux-pm@vger.kernel.org <linux-pm@vger.kernel.org> + "Cc\0Jonas Bonn <jonas@southpole.se>" devicetree@vger.kernel.org <devicetree@vger.kernel.org> - linuxppc-dev@lists.ozlabs.org <linuxppc-dev@lists.ozlabs.org> - Viresh Kumar <viresh.kumar@linaro.org> - Greg Kroah-Hartman <gregkh@linuxfoundation.org> - Benjamin Herrenschmidt <benh@kernel.crashing.org> - Jonas Bonn <jonas@southpole.se> Michal Simek <monstr@monstr.eu> + linux-pm@vger.kernel.org <linux-pm@vger.kernel.org> + Sudeep KarkadaNagesha <Sudeep.KarkadaNagesha@arm.com> + Viresh Kumar <viresh.kumar@linaro.org> + linux-kernel@vger.kernel.org <linux-kernel@vger.kernel.org> + rob.herring@calxeda.com <rob.herring@calxeda.com> Rafael J. Wysocki <rjw@sisk.pl> + Greg Kroah-Hartman <gregkh@linuxfoundation.org> grant.likely@linaro.org <grant.likely@linaro.org> - " rob.herring@calxeda.com <rob.herring@calxeda.com>\0" + linuxppc-dev@lists.ozlabs.org <linuxppc-dev@lists.ozlabs.org> + " linux-arm-kernel@lists.infradead.org <linux-arm-kernel@lists.infradead.org>\0" "\00:1\0" "b\0" "On 06/09/13 14:44, Guennadi Liakhovetski wrote:\n" "> Hi\n" - "> \n" + ">=20\n" "> On Tue, 20 Aug 2013, Sudeep KarkadaNagesha wrote:\n" - "> \n" + ">=20\n" ">> From: Sudeep KarkadaNagesha <sudeep.karkadanagesha@arm.com>\n" ">>\n" - ">> Now that the cpu device registration initialises the of_node(if available)\n" + ">> Now that the cpu device registration initialises the of_node(if availabl=\n" + "e)\n" ">> appropriately for all the cpus, parsing here is redundant.\n" ">>\n" ">> This patch removes all DT parsing and uses cpu->of_node instead.\n" @@ -43,50 +43,54 @@ ">> drivers/cpufreq/cpufreq-cpu0.c | 23 ++++-------------------\n" ">> 1 file changed, 4 insertions(+), 19 deletions(-)\n" ">>\n" - ">> diff --git a/drivers/cpufreq/cpufreq-cpu0.c b/drivers/cpufreq/cpufreq-cpu0.=\n" + ">> diff --git a/drivers/cpufreq/cpufreq-cpu0.c b/drivers/cpufreq/cpufreq-cp=\n" + "u0.=3D\n" ">> c\n" ">> index ad1fde2..5b05c26 100644\n" ">> --- a/drivers/cpufreq/cpufreq-cpu0.c\n" ">> +++ b/drivers/cpufreq/cpufreq-cpu0.c\n" - ">> @@ -174,29 +174,17 @@ static struct cpufreq_driver cpu0_cpufreq_driver =3D =\n" + ">> @@ -174,29 +174,17 @@ static struct cpufreq_driver cpu0_cpufreq_driver =\n" + "=3D3D =3D\n" ">> {\n" - ">> =20\n" + ">> =3D20\n" ">> static int cpu0_cpufreq_probe(struct platform_device *pdev)\n" ">> {\n" - ">> -=09struct device_node *np, *parent;\n" - ">> +=09struct device_node *np;\n" - ">> =09int ret;\n" - ">> =20\n" - ">> -=09parent =3D of_find_node_by_path(\"/cpus\");\n" - ">> -=09if (!parent) {\n" - ">> -=09=09pr_err(\"failed to find OF /cpus\\n\");\n" - ">> -=09=09return -ENOENT;\n" - ">> -=09}\n" + ">> -=3D09struct device_node *np, *parent;\n" + ">> +=3D09struct device_node *np;\n" + ">> =3D09int ret;\n" + ">> =3D20\n" + ">> -=3D09parent =3D3D of_find_node_by_path(\"/cpus\");\n" + ">> -=3D09if (!parent) {\n" + ">> -=3D09=3D09pr_err(\"failed to find OF /cpus\\n\");\n" + ">> -=3D09=3D09return -ENOENT;\n" + ">> -=3D09}\n" ">> -\n" - ">> -=09for_each_child_of_node(parent, np) {\n" - ">> -=09=09if (of_get_property(np, \"operating-points\", NULL))\n" - ">> -=09=09=09break;\n" - ">> -=09}\n" - ">> +=09cpu_dev =3D &pdev->dev;\n" - ">> =20\n" - ">> +=09np =3D of_node_get(cpu_dev->of_node);\n" - "> \n" - "> Has this actually been tested? This seems to break cpufreq-cpu0. The \n" - "> reason is, that this probe function is called not for the DT CPU node, but \n" - "> for a special virtual cpufreq-cpu0 platform device, typically created by \n" + ">> -=3D09for_each_child_of_node(parent, np) {\n" + ">> -=3D09=3D09if (of_get_property(np, \"operating-points\", NULL))\n" + ">> -=3D09=3D09=3D09break;\n" + ">> -=3D09}\n" + ">> +=3D09cpu_dev =3D3D &pdev->dev;\n" + ">> =3D20\n" + ">> +=3D09np =3D3D of_node_get(cpu_dev->of_node);\n" + ">=20\n" + "> Has this actually been tested? This seems to break cpufreq-cpu0. The=20\n" + "> reason is, that this probe function is called not for the DT CPU node, bu=\n" + "t=20\n" + "> for a special virtual cpufreq-cpu0 platform device, typically created by=\n" + "=20\n" "> platforms, using\n" - "> \n" - "> \tplatform_device_register_simple(\"cpufreq-cpu0\", -1, NULL, 0);\n" - "> \n" + ">=20\n" + "> =09platform_device_register_simple(\"cpufreq-cpu0\", -1, NULL, 0);\n" + ">=20\n" "> which then of course doesn't have on .of_node associated with it.\n" - "> \n" + ">=20\n" "\n" "Hi Guennadi,\n" "\n" "Based on my understanding of the original code:\n" - " cpu_dev = &pdev->dev;\n" - "\t...\n" - "\tret = of_init_opp_table(cpu_dev);\n" + " cpu_dev =3D &pdev->dev;\n" + "=09...\n" + "=09ret =3D of_init_opp_table(cpu_dev);\n" "\n" "of_init_opp_table needs cpu_dev to be get_cpu_device(0). My\n" "understanding was that platform using cpufreq-cpu0 sets &pdev->dev to\n" @@ -98,7 +102,8 @@ "know if setting cpu_dev to get_cpu_device(0) instead of &pdev->dev has\n" "any impact on other parts of code using cpu_dev ?\n" "\n" - "diff --git a/drivers/cpufreq/cpufreq-cpu0.c b/drivers/cpufreq/cpufreq-cpu0.c\n" + "diff --git a/drivers/cpufreq/cpufreq-cpu0.c b/drivers/cpufreq/cpufreq-cpu0.=\n" + "c\n" "index cbfffa9..871c336 100644\n" "--- a/drivers/cpufreq/cpufreq-cpu0.c\n" "+++ b/drivers/cpufreq/cpufreq-cpu0.c\n" @@ -107,14 +112,14 @@ " struct device_node *np;\n" " int ret;\n" "\n" - "- cpu_dev = &pdev->dev;\n" - "+ cpu_dev = get_cpu_device(0);\n" + "- cpu_dev =3D &pdev->dev;\n" + "+ cpu_dev =3D get_cpu_device(0);\n" "\n" - " np = of_node_get(cpu_dev->of_node);\n" + " np =3D of_node_get(cpu_dev->of_node);\n" " if (!np) {\n" "\n" "\n" "Regards,\n" Sudeep -f96f550e9d7cb07ddb0de9ea5810d0f9f40eff5089198f2750690d4e7a4555cc +b5d9f11ce0961871726fde6036bda4d0820ca9791468b0bdb1965cf6cf70fadb
diff --git a/a/content_digest b/N2/content_digest index 0b2c6de..10a26ba 100644 --- a/a/content_digest +++ b/N2/content_digest @@ -2,25 +2,10 @@ "ref\01376991021-12160-1-git-send-email-Sudeep.KarkadaNagesha@arm.com\0" "ref\01376991021-12160-13-git-send-email-Sudeep.KarkadaNagesha@arm.com\0" "ref\0Pine.LNX.4.64.1309061539310.11068@axis700.grange\0" - "From\0Sudeep KarkadaNagesha <Sudeep.KarkadaNagesha@arm.com>\0" - "Subject\0Re: [PATCH v4 12/19] cpufreq: cpufreq-cpu0: remove device tree parsing for cpu nodes\0" + "From\0Sudeep.KarkadaNagesha@arm.com (Sudeep KarkadaNagesha)\0" + "Subject\0[PATCH v4 12/19] cpufreq: cpufreq-cpu0: remove device tree parsing for cpu nodes\0" "Date\0Mon, 09 Sep 2013 10:24:39 +0100\0" - "To\0Guennadi Liakhovetski <g.liakhovetski@gmx.de>" - " Shawn Guo <shawn.guo@linaro.org>\0" - "Cc\0Sudeep KarkadaNagesha <Sudeep.KarkadaNagesha@arm.com>" - linux-arm-kernel@lists.infradead.org <linux-arm-kernel@lists.infradead.org> - linux-kernel@vger.kernel.org <linux-kernel@vger.kernel.org> - linux-pm@vger.kernel.org <linux-pm@vger.kernel.org> - devicetree@vger.kernel.org <devicetree@vger.kernel.org> - linuxppc-dev@lists.ozlabs.org <linuxppc-dev@lists.ozlabs.org> - Viresh Kumar <viresh.kumar@linaro.org> - Greg Kroah-Hartman <gregkh@linuxfoundation.org> - Benjamin Herrenschmidt <benh@kernel.crashing.org> - Jonas Bonn <jonas@southpole.se> - Michal Simek <monstr@monstr.eu> - Rafael J. Wysocki <rjw@sisk.pl> - grant.likely@linaro.org <grant.likely@linaro.org> - " rob.herring@calxeda.com <rob.herring@calxeda.com>\0" + "To\0linux-arm-kernel@lists.infradead.org\0" "\00:1\0" "b\0" "On 06/09/13 14:44, Guennadi Liakhovetski wrote:\n" @@ -117,4 +102,4 @@ "Regards,\n" Sudeep -f96f550e9d7cb07ddb0de9ea5810d0f9f40eff5089198f2750690d4e7a4555cc +24f6fff59295884fc3772673bc2a0bfa5f9da1d43fd72fdd5bbff1bfbe132b20
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.