]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - arch/powerpc/kernel/prom.c
Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc
[karo-tx-linux.git] / arch / powerpc / kernel / prom.c
index d87e03fc8cfd7b0507d9baddcde3e141cad0df9e..6bfcab97c981a9b7978dac1491d5362247b24006 100644 (file)
@@ -893,49 +893,10 @@ static int __init prom_reconfig_setup(void)
 __initcall(prom_reconfig_setup);
 #endif
 
-/* Find the device node for a given logical cpu number, also returns the cpu
- * local thread number (index in ibm,interrupt-server#s) if relevant and
- * asked for (non NULL)
- */
-struct device_node *of_get_cpu_node(int cpu, unsigned int *thread)
+bool arch_match_cpu_phys_id(int cpu, u64 phys_id)
 {
-       int hardid;
-       struct device_node *np;
-
-       hardid = get_hard_smp_processor_id(cpu);
-
-       for_each_node_by_type(np, "cpu") {
-               const __be32 *intserv;
-               unsigned int plen, t;
-
-               /* Check for ibm,ppc-interrupt-server#s. If it doesn't exist
-                * fallback to "reg" property and assume no threads
-                */
-               intserv = of_get_property(np, "ibm,ppc-interrupt-server#s",
-                               &plen);
-               if (intserv == NULL) {
-                       const __be32 *reg = of_get_property(np, "reg", NULL);
-                       if (reg == NULL)
-                               continue;
-                       if (be32_to_cpup(reg) == hardid) {
-                               if (thread)
-                                       *thread = 0;
-                               return np;
-                       }
-               } else {
-                       plen /= sizeof(u32);
-                       for (t = 0; t < plen; t++) {
-                               if (hardid == be32_to_cpu(intserv[t])) {
-                                       if (thread)
-                                               *thread = t;
-                                       return np;
-                               }
-                       }
-               }
-       }
-       return NULL;
+       return (int)phys_id == get_hard_smp_processor_id(cpu);
 }
-EXPORT_SYMBOL(of_get_cpu_node);
 
 #if defined(CONFIG_DEBUG_FS) && defined(DEBUG)
 static struct debugfs_blob_wrapper flat_dt_blob;