int __init arch_smp_init_cpus(void) { int rc; const char *str; physical_addr_t hwid; unsigned int i, cpus_count = 0, cpu = 1; bool bootcpu_valid = false; struct vmm_devtree_node *dn, *cpus; smp_init_ops(); cpus = vmm_devtree_getnode(VMM_DEVTREE_PATH_SEPARATOR_STRING "cpus"); if (!cpus) { vmm_printf("%s: Failed to find cpus node\n", __func__); return VMM_ENOTAVAIL; } dn = NULL; vmm_devtree_for_each_child(dn, cpus) { str = NULL; rc = vmm_devtree_read_string(dn, VMM_DEVTREE_DEVICE_TYPE_ATTR_NAME, &str); if (rc || !str) { continue; } if (strcmp(str, VMM_DEVTREE_DEVICE_TYPE_VAL_CPU)) { continue; } cpus_count++; }
if (early_hiwdt100_wdt_init()) { pr_err("%s: failed to initial wdt\n", __FUNCTION__); } } bool __init hisi_smp_init_ops(void) { #ifdef CONFIG_MCPM mcpm_smp_set_ops(); return true; #endif return false; } static const char *hisi_compat[] __initdata = { "hisilicon,hi6210", NULL, }; DT_MACHINE_START(HS_DT, "unknown") .dt_compat = hisi_compat, .smp_init = smp_init_ops(hisi_smp_init_ops), .map_io = hi6210_map_common_io, .init_irq = irqchip_init, .init_time = hisi_timer_init, .init_machine = hisi_init, MACHINE_END
24000000); } static const struct of_device_id v2m_dt_bus_match[] __initconst = { { .compatible = "simple-bus", }, { .compatible = "arm,amba-bus", }, { .compatible = "arm,vexpress,config-bus", }, {} }; static void __init v2m_dt_init(void) { l2x0_of_init(0x00400000, 0xfe0fffff); of_platform_populate(NULL, v2m_dt_bus_match, NULL, NULL); } static const char * const v2m_dt_match[] __initconst = { "arm,vexpress", NULL, }; DT_MACHINE_START(VEXPRESS_DT, "ARM-Versatile Express") .dt_compat = v2m_dt_match, .smp = smp_ops(vexpress_smp_ops), .smp_init = smp_init_ops(vexpress_smp_init_ops), .map_io = v2m_dt_map_io, .init_early = v2m_dt_init_early, .init_time = v2m_dt_timer_init, .init_machine = v2m_dt_init, MACHINE_END
* the Free Software Foundation; version 2 of the License. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. */ #include <linux/init.h> #include <asm/mach/arch.h> #include "common.h" #include "r8a7790.h" #include "rcar-gen2.h" static const char * const r8a7790_boards_compat_dt[] __initconst = { "renesas,r8a7790", NULL, }; DT_MACHINE_START(R8A7790_DT, "Generic R8A7790 (Flattened Device Tree)") .smp_init = smp_init_ops(shmobile_smp_init_fallback_ops), .smp = smp_ops(r8a7790_smp_ops), .init_early = shmobile_init_delay, .init_time = rcar_gen2_timer_init, .init_late = shmobile_init_late, .reserve = rcar_gen2_reserve, .dt_compat = r8a7790_boards_compat_dt, MACHINE_END