diff for duplicates of <52121C84.1030102@arm.com> diff --git a/a/1.txt b/N1/1.txt index cf99b56..a9c6b0f 100644 --- a/a/1.txt +++ b/N1/1.txt @@ -11,61 +11,68 @@ On 19/08/13 14:11, Rob Herring wrote: >> >> It is recommended to use these helper function only in pre-SMP/early >> initialisation stages to retrieve CPU device node pointers in logical ->> ordering. Once the cpu devices are registered, it can be retrieved easily +>> ordering. Once the cpu devices are registered, it can be retrieved easil= +y >> from cpu device of_node which avoids unnecessary parsing and matching. >> >> Cc: Rob Herring <rob.herring@calxeda.com> >> Cc: Grant Likely <grant.likely@linaro.org> >> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> >> Signed-off-by: Sudeep KarkadaNagesha <sudeep.karkadanagesha@arm.com> -> +>=20 > [snip] -> +>=20 >> +/** ->> + * of_get_cpu_node - Get device node associated with the given logical CPU +>> + * of_get_cpu_node - Get device node associated with the given logical = +CPU >> + * >> + * @cpu: CPU number(logical index) for which device node is required ->> + * @thread: if not NULL, local thread number within the physical core is +>> + * @thread: if not NULL, local thread number within the physical core i= +s >> + * returned >> + * ->> + * The main purpose of this function is to retrieve the device node for the ->> + * given logical CPU index. It should be used to initialize the of_node in +>> + * The main purpose of this function is to retrieve the device node for= + the +>> + * given logical CPU index. It should be used to initialize the of_node= + in >> + * cpu device. Once of_node in cpu device is populated, all the further >> + * references can use that instead. >> + * ->> + * CPU logical to physical index mapping is architecture specific and is built ->> + * before booting secondary cores. This function uses arch_match_cpu_phys_id +>> + * CPU logical to physical index mapping is architecture specific and i= +s built +>> + * before booting secondary cores. This function uses arch_match_cpu_ph= +ys_id >> + * which can be overridden by architecture specific implementation. >> + * >> + * Returns a node pointer for the logical cpu if found, else NULL. >> + */ >> +struct device_node *of_get_cpu_node(int cpu, unsigned int *thread) >> +{ ->> + struct device_node *cpun, *cpus; +>> +=09struct device_node *cpun, *cpus; >> + ->> + cpus = of_find_node_by_path("/cpus"); ->> + if (!cpus) { ->> + pr_warn("Missing cpus node, bailing out\n"); ->> + return NULL; ->> + } +>> +=09cpus =3D of_find_node_by_path("/cpus"); +>> +=09if (!cpus) { +>> +=09=09pr_warn("Missing cpus node, bailing out\n"); +>> +=09=09return NULL; +>> +=09} >> + ->> + for_each_child_of_node(cpus, cpun) { ->> + if (of_node_cmp(cpun->type, "cpu")) ->> + continue; +>> +=09for_each_child_of_node(cpus, cpun) { +>> +=09=09if (of_node_cmp(cpun->type, "cpu")) +>> +=09=09=09continue; >> +#ifdef CONFIG_PPC -> +>=20 > You don't really need this ifdef as this function should never succeed > on other arches. Alternatively, you can use "IS_ENABLED(CONFIG_PPC)" > instead. -> +>=20 Agreed, I can remove it as long as no other architecture use that property. It's just to avoid checking for it on other architectures. I will use IS_ENABLED as you suggested. > Otherwise, -> +>=20 > Acked-by: Rob Herring <rob.herring@calxeda.com> -> +>=20 Thanks. Regards, diff --git a/a/content_digest b/N1/content_digest index 236feee..dd72e42 100644 --- a/a/content_digest +++ b/N1/content_digest @@ -6,18 +6,17 @@ "Subject\0Re: [RFC PATCH v2 4/4] of: move of_get_cpu_node implementation to DT core library\0" "Date\0Mon, 19 Aug 2013 14:24:20 +0100\0" "To\0Rob Herring <robherring2@gmail.com>\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> - Jonas Bonn <jonas@southpole.se> Michal Simek <monstr@monstr.eu> - Benjamin Herrenschmidt <benh@kernel.crashing.org> + linux-pm@vger.kernel.org <linux-pm@vger.kernel.org> + Sudeep KarkadaNagesha <Sudeep.KarkadaNagesha@arm.com> + linux-kernel@vger.kernel.org <linux-kernel@vger.kernel.org> rob.herring@calxeda.com <rob.herring@calxeda.com> Rafael J. Wysocki <rjw@sisk.pl> - " grant.likely@linaro.org <grant.likely@linaro.org>\0" + grant.likely@linaro.org <grant.likely@linaro.org> + 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 19/08/13 14:11, Rob Herring wrote:\n" @@ -33,64 +32,71 @@ ">>\n" ">> It is recommended to use these helper function only in pre-SMP/early\n" ">> initialisation stages to retrieve CPU device node pointers in logical\n" - ">> ordering. Once the cpu devices are registered, it can be retrieved easily\n" + ">> ordering. Once the cpu devices are registered, it can be retrieved easil=\n" + "y\n" ">> from cpu device of_node which avoids unnecessary parsing and matching.\n" ">>\n" ">> Cc: Rob Herring <rob.herring@calxeda.com>\n" ">> Cc: Grant Likely <grant.likely@linaro.org>\n" ">> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>\n" ">> Signed-off-by: Sudeep KarkadaNagesha <sudeep.karkadanagesha@arm.com>\n" - "> \n" + ">=20\n" "> [snip]\n" - "> \n" + ">=20\n" ">> +/**\n" - ">> + * of_get_cpu_node - Get device node associated with the given logical CPU\n" + ">> + * of_get_cpu_node - Get device node associated with the given logical =\n" + "CPU\n" ">> + *\n" ">> + * @cpu: CPU number(logical index) for which device node is required\n" - ">> + * @thread: if not NULL, local thread number within the physical core is\n" + ">> + * @thread: if not NULL, local thread number within the physical core i=\n" + "s\n" ">> + * returned\n" ">> + *\n" - ">> + * The main purpose of this function is to retrieve the device node for the\n" - ">> + * given logical CPU index. It should be used to initialize the of_node in\n" + ">> + * The main purpose of this function is to retrieve the device node for=\n" + " the\n" + ">> + * given logical CPU index. It should be used to initialize the of_node=\n" + " in\n" ">> + * cpu device. Once of_node in cpu device is populated, all the further\n" ">> + * references can use that instead.\n" ">> + *\n" - ">> + * CPU logical to physical index mapping is architecture specific and is built\n" - ">> + * before booting secondary cores. This function uses arch_match_cpu_phys_id\n" + ">> + * CPU logical to physical index mapping is architecture specific and i=\n" + "s built\n" + ">> + * before booting secondary cores. This function uses arch_match_cpu_ph=\n" + "ys_id\n" ">> + * which can be overridden by architecture specific implementation.\n" ">> + *\n" ">> + * Returns a node pointer for the logical cpu if found, else NULL.\n" ">> + */\n" ">> +struct device_node *of_get_cpu_node(int cpu, unsigned int *thread)\n" ">> +{\n" - ">> +\tstruct device_node *cpun, *cpus;\n" + ">> +=09struct device_node *cpun, *cpus;\n" ">> +\n" - ">> +\tcpus = of_find_node_by_path(\"/cpus\");\n" - ">> +\tif (!cpus) {\n" - ">> +\t\tpr_warn(\"Missing cpus node, bailing out\\n\");\n" - ">> +\t\treturn NULL;\n" - ">> +\t}\n" + ">> +=09cpus =3D of_find_node_by_path(\"/cpus\");\n" + ">> +=09if (!cpus) {\n" + ">> +=09=09pr_warn(\"Missing cpus node, bailing out\\n\");\n" + ">> +=09=09return NULL;\n" + ">> +=09}\n" ">> +\n" - ">> +\tfor_each_child_of_node(cpus, cpun) {\n" - ">> +\t\tif (of_node_cmp(cpun->type, \"cpu\"))\n" - ">> +\t\t\tcontinue;\n" + ">> +=09for_each_child_of_node(cpus, cpun) {\n" + ">> +=09=09if (of_node_cmp(cpun->type, \"cpu\"))\n" + ">> +=09=09=09continue;\n" ">> +#ifdef CONFIG_PPC\n" - "> \n" + ">=20\n" "> You don't really need this ifdef as this function should never succeed\n" "> on other arches. Alternatively, you can use \"IS_ENABLED(CONFIG_PPC)\"\n" "> instead.\n" - "> \n" + ">=20\n" "Agreed, I can remove it as long as no other architecture use that\n" "property. It's just to avoid checking for it on other architectures.\n" "I will use IS_ENABLED as you suggested.\n" "\n" "> Otherwise,\n" - "> \n" + ">=20\n" "> Acked-by: Rob Herring <rob.herring@calxeda.com>\n" - "> \n" + ">=20\n" "Thanks.\n" "\n" "Regards,\n" Sudeep -003839206d288421b0df4a204da20987fdafcae00ac88757dcf91dfb0030dd0f +1b9549ebe68742e4ca55c8ae8568828ce734fc34699db7e4aed0cd93ef7675db
diff --git a/a/content_digest b/N2/content_digest index 236feee..1bb6aa5 100644 --- a/a/content_digest +++ b/N2/content_digest @@ -2,22 +2,10 @@ "ref\01376674791-28244-1-git-send-email-Sudeep.KarkadaNagesha@arm.com\0" "ref\01376674791-28244-3-git-send-email-Sudeep.KarkadaNagesha@arm.com\0" "ref\05212196F.4060708@gmail.com\0" - "From\0Sudeep KarkadaNagesha <Sudeep.KarkadaNagesha@arm.com>\0" - "Subject\0Re: [RFC PATCH v2 4/4] of: move of_get_cpu_node implementation to DT core library\0" + "From\0Sudeep.KarkadaNagesha@arm.com (Sudeep KarkadaNagesha)\0" + "Subject\0[RFC PATCH v2 4/4] of: move of_get_cpu_node implementation to DT core library\0" "Date\0Mon, 19 Aug 2013 14:24:20 +0100\0" - "To\0Rob Herring <robherring2@gmail.com>\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> - Jonas Bonn <jonas@southpole.se> - Michal Simek <monstr@monstr.eu> - Benjamin Herrenschmidt <benh@kernel.crashing.org> - rob.herring@calxeda.com <rob.herring@calxeda.com> - Rafael J. Wysocki <rjw@sisk.pl> - " grant.likely@linaro.org <grant.likely@linaro.org>\0" + "To\0linux-arm-kernel@lists.infradead.org\0" "\00:1\0" "b\0" "On 19/08/13 14:11, Rob Herring wrote:\n" @@ -93,4 +81,4 @@ "Regards,\n" Sudeep -003839206d288421b0df4a204da20987fdafcae00ac88757dcf91dfb0030dd0f +34a441789df3711dbf57b8f3af23ef6dda2d14228f42a4eb9fce48c6833e6118
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.