162306a36Sopenharmony_ci// SPDX-License-Identifier: GPL-2.0 262306a36Sopenharmony_ci/* 362306a36Sopenharmony_ci * SMP support for R-Mobile / SH-Mobile 462306a36Sopenharmony_ci * 562306a36Sopenharmony_ci * Copyright (C) 2010 Magnus Damm 662306a36Sopenharmony_ci * Copyright (C) 2011 Paul Mundt 762306a36Sopenharmony_ci * 862306a36Sopenharmony_ci * Based on vexpress, Copyright (C) 2002 ARM Ltd, All Rights Reserved 962306a36Sopenharmony_ci */ 1062306a36Sopenharmony_ci#include <linux/init.h> 1162306a36Sopenharmony_ci#include <asm/cacheflush.h> 1262306a36Sopenharmony_ci#include <asm/smp_plat.h> 1362306a36Sopenharmony_ci#include "common.h" 1462306a36Sopenharmony_ci 1562306a36Sopenharmony_ciextern unsigned long shmobile_smp_fn[]; 1662306a36Sopenharmony_ciextern unsigned long shmobile_smp_arg[]; 1762306a36Sopenharmony_ciextern unsigned long shmobile_smp_mpidr[]; 1862306a36Sopenharmony_ci 1962306a36Sopenharmony_civoid shmobile_smp_hook(unsigned int cpu, unsigned long fn, unsigned long arg) 2062306a36Sopenharmony_ci{ 2162306a36Sopenharmony_ci shmobile_smp_fn[cpu] = 0; 2262306a36Sopenharmony_ci flush_cache_all(); 2362306a36Sopenharmony_ci 2462306a36Sopenharmony_ci shmobile_smp_mpidr[cpu] = cpu_logical_map(cpu); 2562306a36Sopenharmony_ci shmobile_smp_fn[cpu] = fn; 2662306a36Sopenharmony_ci shmobile_smp_arg[cpu] = arg; 2762306a36Sopenharmony_ci flush_cache_all(); 2862306a36Sopenharmony_ci} 2962306a36Sopenharmony_ci 3062306a36Sopenharmony_ci#ifdef CONFIG_HOTPLUG_CPU 3162306a36Sopenharmony_cibool shmobile_smp_cpu_can_disable(unsigned int cpu) 3262306a36Sopenharmony_ci{ 3362306a36Sopenharmony_ci return true; /* Hotplug of any CPU is supported */ 3462306a36Sopenharmony_ci} 3562306a36Sopenharmony_ci#endif 36