10 #include <linux/kernel.h>
12 #include <linux/string.h>
14 #include <linux/errno.h>
17 #include <asm/oplib.h>
25 static char *cpu_mid_prop(
void)
32 static int check_cpu_node(
phandle nd,
int *cur_inst,
33 int (*compare)(
phandle,
int,
void *),
void *compare_arg,
36 if (!compare(nd, *cur_inst, compare_arg)) {
52 static int __cpu_find_by(
int (*compare)(
phandle,
int,
void *),
53 void *compare_arg,
phandle *prom_node,
int *mid)
59 for_each_node_by_type(dp,
"cpu") {
60 int err = check_cpu_node(dp->
phandle, &cur_inst,
72 static int cpu_instance_compare(
phandle nd,
int instance,
void *_arg)
74 int desired_instance = (
int) _arg;
76 if (instance == desired_instance)
83 return __cpu_find_by(cpu_instance_compare, (
void *)instance,
87 static int cpu_mid_compare(
phandle nd,
int instance,
void *_arg)
89 int desired_mid = (
int) _arg;
93 if (this_mid == desired_mid
101 return __cpu_find_by(cpu_mid_compare, (
void *)mid,