/* Initialize all available SMP OPS */ static void __init smp_init_ops(void) { u32 i, count; const struct smp_operations *ops; struct vmm_devtree_nidtbl_entry *nide; count = vmm_devtree_nidtbl_count(); for (i = 0; i < count; i++) { nide = vmm_devtree_nidtbl_get(i); if (strcmp(nide->subsys, "smp_ops")) { continue; } ops = nide->nodeid.data; ops->ops_init(); } }
static const struct smp_operations * __init smp_get_ops(const char *name) { u32 i, count; const struct smp_operations *ops; struct vmm_devtree_nidtbl_entry *nide; count = vmm_devtree_nidtbl_count(); for (i = 0; i < count; i++) { nide = vmm_devtree_nidtbl_get(i); if (strcmp(nide->subsys, "smp_ops")) { continue; } ops = nide->nodeid.data; if (!strcmp(name, ops->name)) { return ops; } } return NULL; }