1 static int cpumatch(struct device *, struct cfdata *, void *); 2 static void cpuattach(struct device *, struct device *, void *); 3 4 CFATTACH_DECL(cpu, sizeof(struct device), 5 cpumatch, cpuattach, NULL, NULL); 6 7 extern struct cfdriver cpu_cd; 8 9 int 10 cpumatch(struct device *parent, struct cfdata *cf, void *aux) 11 { 12 struct mainbus_attach_args *mba = aux; 13 14 if (strcmp(mba->mba_name, cpu_cd.cd_name) != 0) 15 return 0; 16 17 if (cpu_info_store.ci_dev != NULL) 18 return 0; 19 20 return 1; 21 } 22 23 void 24 cpuattach(struct device *parent, struct device *self, void *aux) 25 { 26 (void) cpu_attach_common(self, 0); 27 } 28