Back to home page

OSCL-LXR

 
 

    


0001 // SPDX-License-Identifier: GPL-2.0
0002 /*
0003  * SMP support for R-Mobile / SH-Mobile
0004  *
0005  * Copyright (C) 2010  Magnus Damm
0006  * Copyright (C) 2011  Paul Mundt
0007  *
0008  * Based on vexpress, Copyright (C) 2002 ARM Ltd, All Rights Reserved
0009  */
0010 #include <linux/init.h>
0011 #include <asm/cacheflush.h>
0012 #include <asm/smp_plat.h>
0013 #include "common.h"
0014 
0015 extern unsigned long shmobile_smp_fn[];
0016 extern unsigned long shmobile_smp_arg[];
0017 extern unsigned long shmobile_smp_mpidr[];
0018 
0019 void shmobile_smp_hook(unsigned int cpu, unsigned long fn, unsigned long arg)
0020 {
0021     shmobile_smp_fn[cpu] = 0;
0022     flush_cache_all();
0023 
0024     shmobile_smp_mpidr[cpu] = cpu_logical_map(cpu);
0025     shmobile_smp_fn[cpu] = fn;
0026     shmobile_smp_arg[cpu] = arg;
0027     flush_cache_all();
0028 }
0029 
0030 #ifdef CONFIG_HOTPLUG_CPU
0031 bool shmobile_smp_cpu_can_disable(unsigned int cpu)
0032 {
0033     return true; /* Hotplug of any CPU is supported */
0034 }
0035 #endif