diff for duplicates of <520B85C8.5030908@arm.com> diff --git a/a/1.txt b/N1/1.txt index 299759e..1ee4fc9 100644 --- a/a/1.txt +++ b/N1/1.txt @@ -2,20 +2,25 @@ On 14/08/13 13:53, Rob Herring wrote: > On 08/14/2013 05:01 AM, Sudeep KarkadaNagesha wrote: >> On 13/08/13 22:07, Benjamin Herrenschmidt wrote: >>> On Tue, 2013-08-13 at 19:29 +0100, Sudeep KarkadaNagesha wrote: ->>>> I don't understand completely the use of ibm,ppc-interrupt-server#s and +>>>> I don't understand completely the use of ibm,ppc-interrupt-server#s an= +d >>>> its implications on generic of_get_cpu_node implementation. ->>>> I see the PPC specific definition of of_get_cpu_node uses thread id only +>>>> I see the PPC specific definition of of_get_cpu_node uses thread id on= +ly >>>> in 2 instances. Based on that, I have tried to move all the other >>>> instances to use generic definition. >>>> >>>> Let me know if the idea is correct. >>> ->>> No. The device-tree historically only represents cores, not HW threads, so ->>> it makes sense to retrieve also the thread number corresponding to the CPU. +>>> No. The device-tree historically only represents cores, not HW threads,= + so +>>> it makes sense to retrieve also the thread number corresponding to the = +CPU. >>> >> Ok >> ->>> However, the mechanism to represent HW threads in the device-tree is currently +>>> However, the mechanism to represent HW threads in the device-tree is cu= +rrently >>> somewhat platform specific (the ibm,ppc-interrupt-server#s). >> I see most of the callers pass NULL to thread id argument except 2 >> instances in entire tree. If that's the case why can't we move to use @@ -25,7 +30,8 @@ On 14/08/13 13:53, Rob Herring wrote: >>> >>> So what you could do for now is: >>> ->>> - Have a generic version that always returns 0 as the thread, which is weak +>>> - Have a generic version that always returns 0 as the thread, which is= + weak >> I would prefer to move to generic of_get_cpu_node where ever possible >> and rename the function that takes thread id rather than making generic >> one weak. @@ -35,7 +41,8 @@ On 14/08/13 13:53, Rob Herring wrote: >> How about only in cases where it needs thread_id. >> >>> ->>> - Start a discussion on the bindings (if not already there) to define threads +>>> - Start a discussion on the bindings (if not already there) to define = +threads >>> in a better way at which point the generic function can be updated. >>> >> I am not sure if we need to define any new bindings. Excerpts from ePAPR @@ -55,69 +62,69 @@ On 14/08/13 13:53, Rob Herring wrote: >> for_each_child_of_node(cpus, cpun) { >> if (of_node_cmp(cpun->type, "cpu")) >> continue; ->> cell = of_get_property(cpun, "reg", &prop_len); +>> cell =3D of_get_property(cpun, "reg", &prop_len); >> if (!cell) { >> pr_warn("%s: missing reg property\n", cpun->full_name); >> continue; >> } ->> prop_len /= sizeof(*cell); +>> prop_len /=3D sizeof(*cell); >> while (prop_len) { ->> hwid = of_read_number(cell, ac); ->> prop_len -= ac; +>> hwid =3D of_read_number(cell, ac); +>> prop_len -=3D ac; >> if (arch_match_cpu_phys_id(cpu, hwid)) >> return cpun; >> } >> } -> +>=20 > How about something like this: -> +>=20 > for_each_child_of_node(cpus, cpun) { > if (of_node_cmp(cpun->type, "cpu")) > continue; -> -> if (arch_of_get_cpu_node(cpun, thread)) -> return cpun; -> -> cell = of_get_property(cpun, "reg", &prop_len); +>=20 +> =09if (arch_of_get_cpu_node(cpun, thread)) +> =09=09return cpun; +>=20 +> cell =3D of_get_property(cpun, "reg", &prop_len); > if (!cell) { > pr_warn("%s: missing reg property\n", cpun->full_name); > continue; > } -> prop_len /= sizeof(*cell); +> prop_len /=3D sizeof(*cell); > while (prop_len) { -> hwid = of_read_number(cell, ac); -> prop_len -= ac; +> hwid =3D of_read_number(cell, ac); +> prop_len -=3D ac; > if (arch_match_cpu_phys_id(cpu, hwid)) -> return cpun; +> =09 return cpun; > } > } -> +>=20 > For PPC: -> +>=20 > arch_of_get_cpu_node() > { > const u32 *intserv; > unsigned int plen, t; -> +>=20 > /* Check for ibm,ppc-interrupt-server#s. */ -> intserv = of_get_property(np, "ibm,ppc-interrupt-server#s", +> intserv =3D of_get_property(np, "ibm,ppc-interrupt-server#s", > &plen); > if (!intserv) -> return false; -> -> hardid = get_hard_smp_processor_id(cpu); -> -> plen /= sizeof(u32); -> for (t = 0; t < plen; t++) { -> if (hardid == intserv[t]) { +> =09=09return false; +>=20 +> =09hardid =3D get_hard_smp_processor_id(cpu); +>=20 +> plen /=3D sizeof(u32); +> for (t =3D 0; t < plen; t++) { +> if (hardid =3D=3D intserv[t]) { > if (thread) -> *thread = t; +> *thread =3D t; > return true; > } > } -> return false; +> =09return false; > } -> +>=20 Sorry responded to earlier mail before seeing this. This approach looks good, but we still need to have thread id as argument which should be fine. @@ -141,5 +148,5 @@ Sudeep >> >> >> -> -> +>=20 +>=20 diff --git a/a/content_digest b/N1/content_digest index 37c2286..69ea916 100644 --- a/a/content_digest +++ b/N1/content_digest @@ -10,35 +10,40 @@ "Date\0Wed, 14 Aug 2013 14:27:36 +0100\0" "To\0Rob Herring <robherring2@gmail.com>" " Benjamin Herrenschmidt <benh@kernel.crashing.org>\0" - "Cc\0Sudeep KarkadaNagesha <Sudeep.KarkadaNagesha@arm.com>" - linuxppc-dev@lists.ozlabs.org <linuxppc-dev@lists.ozlabs.org> - Rafael J. Wysocki <rjw@sisk.pl> - Viresh Kumar <viresh.kumar@linaro.org> - Olof Johansson <olof@lixom.net> + "Cc\0devicetree@vger.kernel.org <devicetree@vger.kernel.org>" linux-pm@vger.kernel.org <linux-pm@vger.kernel.org> - linux-arm-kernel@lists.infradead.org <linux-arm-kernel@lists.infradead.org> + Sudeep KarkadaNagesha <Sudeep.KarkadaNagesha@arm.com> + Viresh Kumar <viresh.kumar@linaro.org> linux-kernel@vger.kernel.org <linux-kernel@vger.kernel.org> - " devicetree@vger.kernel.org <devicetree@vger.kernel.org>\0" + Rafael J. Wysocki <rjw@sisk.pl> + Olof Johansson <olof@lixom.net> + 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 14/08/13 13:53, Rob Herring wrote:\n" "> On 08/14/2013 05:01 AM, Sudeep KarkadaNagesha wrote:\n" ">> On 13/08/13 22:07, Benjamin Herrenschmidt wrote:\n" ">>> On Tue, 2013-08-13 at 19:29 +0100, Sudeep KarkadaNagesha wrote:\n" - ">>>> I don't understand completely the use of ibm,ppc-interrupt-server#s and\n" + ">>>> I don't understand completely the use of ibm,ppc-interrupt-server#s an=\n" + "d\n" ">>>> its implications on generic of_get_cpu_node implementation.\n" - ">>>> I see the PPC specific definition of of_get_cpu_node uses thread id only\n" + ">>>> I see the PPC specific definition of of_get_cpu_node uses thread id on=\n" + "ly\n" ">>>> in 2 instances. Based on that, I have tried to move all the other\n" ">>>> instances to use generic definition.\n" ">>>>\n" ">>>> Let me know if the idea is correct.\n" ">>>\n" - ">>> No. The device-tree historically only represents cores, not HW threads, so\n" - ">>> it makes sense to retrieve also the thread number corresponding to the CPU.\n" + ">>> No. The device-tree historically only represents cores, not HW threads,=\n" + " so\n" + ">>> it makes sense to retrieve also the thread number corresponding to the =\n" + "CPU.\n" ">>>\n" ">> Ok\n" ">>\n" - ">>> However, the mechanism to represent HW threads in the device-tree is currently\n" + ">>> However, the mechanism to represent HW threads in the device-tree is cu=\n" + "rrently\n" ">>> somewhat platform specific (the ibm,ppc-interrupt-server#s).\n" ">> I see most of the callers pass NULL to thread id argument except 2\n" ">> instances in entire tree. If that's the case why can't we move to use\n" @@ -48,7 +53,8 @@ ">>>\n" ">>> So what you could do for now is:\n" ">>>\n" - ">>> - Have a generic version that always returns 0 as the thread, which is weak\n" + ">>> - Have a generic version that always returns 0 as the thread, which is=\n" + " weak\n" ">> I would prefer to move to generic of_get_cpu_node where ever possible\n" ">> and rename the function that takes thread id rather than making generic\n" ">> one weak.\n" @@ -58,7 +64,8 @@ ">> How about only in cases where it needs thread_id.\n" ">>\n" ">>>\n" - ">>> - Start a discussion on the bindings (if not already there) to define threads\n" + ">>> - Start a discussion on the bindings (if not already there) to define =\n" + "threads\n" ">>> in a better way at which point the generic function can be updated.\n" ">>>\n" ">> I am not sure if we need to define any new bindings. Excerpts from ePAPR\n" @@ -78,69 +85,69 @@ ">> for_each_child_of_node(cpus, cpun) {\n" ">> if (of_node_cmp(cpun->type, \"cpu\"))\n" ">> continue;\n" - ">> cell = of_get_property(cpun, \"reg\", &prop_len);\n" + ">> cell =3D of_get_property(cpun, \"reg\", &prop_len);\n" ">> if (!cell) {\n" ">> pr_warn(\"%s: missing reg property\\n\", cpun->full_name);\n" ">> continue;\n" ">> }\n" - ">> prop_len /= sizeof(*cell);\n" + ">> prop_len /=3D sizeof(*cell);\n" ">> while (prop_len) {\n" - ">> hwid = of_read_number(cell, ac);\n" - ">> prop_len -= ac;\n" + ">> hwid =3D of_read_number(cell, ac);\n" + ">> prop_len -=3D ac;\n" ">> if (arch_match_cpu_phys_id(cpu, hwid))\n" ">> return cpun;\n" ">> }\n" ">> }\n" - "> \n" + ">=20\n" "> How about something like this:\n" - "> \n" + ">=20\n" "> for_each_child_of_node(cpus, cpun) {\n" "> if (of_node_cmp(cpun->type, \"cpu\"))\n" "> continue;\n" - "> \n" - "> \tif (arch_of_get_cpu_node(cpun, thread))\n" - "> \t\treturn cpun;\n" - "> \n" - "> cell = of_get_property(cpun, \"reg\", &prop_len);\n" + ">=20\n" + "> =09if (arch_of_get_cpu_node(cpun, thread))\n" + "> =09=09return cpun;\n" + ">=20\n" + "> cell =3D of_get_property(cpun, \"reg\", &prop_len);\n" "> if (!cell) {\n" "> pr_warn(\"%s: missing reg property\\n\", cpun->full_name);\n" "> continue;\n" "> }\n" - "> prop_len /= sizeof(*cell);\n" + "> prop_len /=3D sizeof(*cell);\n" "> while (prop_len) {\n" - "> hwid = of_read_number(cell, ac);\n" - "> prop_len -= ac;\n" + "> hwid =3D of_read_number(cell, ac);\n" + "> prop_len -=3D ac;\n" "> if (arch_match_cpu_phys_id(cpu, hwid))\n" - "> \t return cpun;\n" + "> =09 return cpun;\n" "> }\n" "> }\n" - "> \n" + ">=20\n" "> For PPC:\n" - "> \n" + ">=20\n" "> arch_of_get_cpu_node()\n" "> {\n" "> const u32 *intserv;\n" "> unsigned int plen, t;\n" - "> \n" + ">=20\n" "> /* Check for ibm,ppc-interrupt-server#s. */\n" - "> intserv = of_get_property(np, \"ibm,ppc-interrupt-server#s\",\n" + "> intserv =3D of_get_property(np, \"ibm,ppc-interrupt-server#s\",\n" "> &plen);\n" "> if (!intserv)\n" - "> \t\treturn false;\n" - "> \n" - "> \thardid = get_hard_smp_processor_id(cpu);\n" - "> \n" - "> plen /= sizeof(u32);\n" - "> for (t = 0; t < plen; t++) {\n" - "> if (hardid == intserv[t]) {\n" + "> =09=09return false;\n" + ">=20\n" + "> =09hardid =3D get_hard_smp_processor_id(cpu);\n" + ">=20\n" + "> plen /=3D sizeof(u32);\n" + "> for (t =3D 0; t < plen; t++) {\n" + "> if (hardid =3D=3D intserv[t]) {\n" "> if (thread)\n" - "> *thread = t;\n" + "> *thread =3D t;\n" "> return true;\n" "> }\n" "> }\n" - "> \treturn false;\n" + "> =09return false;\n" "> }\n" - "> \n" + ">=20\n" "\n" "Sorry responded to earlier mail before seeing this. This approach looks\n" "good, but we still need to have thread id as argument which should be fine.\n" @@ -164,7 +171,7 @@ ">>\n" ">>\n" ">>\n" - "> \n" - > + ">=20\n" + >=20 -47b47cc267b5a7ce34139f356a60c693ef28272f7f7b5cde8f9f29f84d74fe82 +8bce5b7d2270a8d4e839464f1cfb1cd34eab53f01be8548ed42c4db47afa08db
diff --git a/a/content_digest b/N2/content_digest index 37c2286..bb8663f 100644 --- a/a/content_digest +++ b/N2/content_digest @@ -5,20 +5,10 @@ "ref\01376428024.4255.14.camel@pasglop\0" "ref\0520B5584.7030608@arm.com\0" "ref\0520B7DAE.3060501@gmail.com\0" - "From\0Sudeep KarkadaNagesha <Sudeep.KarkadaNagesha@arm.com>\0" - "Subject\0Re: [GIT PULL] DT/core: cpu_ofnode updates for v3.12\0" + "From\0Sudeep.KarkadaNagesha@arm.com (Sudeep KarkadaNagesha)\0" + "Subject\0[GIT PULL] DT/core: cpu_ofnode updates for v3.12\0" "Date\0Wed, 14 Aug 2013 14:27:36 +0100\0" - "To\0Rob Herring <robherring2@gmail.com>" - " Benjamin Herrenschmidt <benh@kernel.crashing.org>\0" - "Cc\0Sudeep KarkadaNagesha <Sudeep.KarkadaNagesha@arm.com>" - linuxppc-dev@lists.ozlabs.org <linuxppc-dev@lists.ozlabs.org> - Rafael J. Wysocki <rjw@sisk.pl> - Viresh Kumar <viresh.kumar@linaro.org> - Olof Johansson <olof@lixom.net> - linux-pm@vger.kernel.org <linux-pm@vger.kernel.org> - linux-arm-kernel@lists.infradead.org <linux-arm-kernel@lists.infradead.org> - linux-kernel@vger.kernel.org <linux-kernel@vger.kernel.org> - " devicetree@vger.kernel.org <devicetree@vger.kernel.org>\0" + "To\0linux-arm-kernel@lists.infradead.org\0" "\00:1\0" "b\0" "On 14/08/13 13:53, Rob Herring wrote:\n" @@ -167,4 +157,4 @@ "> \n" > -47b47cc267b5a7ce34139f356a60c693ef28272f7f7b5cde8f9f29f84d74fe82 +9ef0dbb2ce440ac95bba0fe680c3a025513dc8936434a838e9db674a07476c0e
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.