11c51ed4fSMagnus Damm /* 21c51ed4fSMagnus Damm * SMP support for R-Mobile / SH-Mobile 31c51ed4fSMagnus Damm * 41c51ed4fSMagnus Damm * Copyright (C) 2010 Magnus Damm 5c413521eSPaul Mundt * Copyright (C) 2011 Paul Mundt 61c51ed4fSMagnus Damm * 71c51ed4fSMagnus Damm * Based on vexpress, Copyright (C) 2002 ARM Ltd, All Rights Reserved 81c51ed4fSMagnus Damm * 91c51ed4fSMagnus Damm * This program is free software; you can redistribute it and/or modify 101c51ed4fSMagnus Damm * it under the terms of the GNU General Public License version 2 as 111c51ed4fSMagnus Damm * published by the Free Software Foundation. 121c51ed4fSMagnus Damm */ 131c51ed4fSMagnus Damm #include <linux/init.h> 141c51ed4fSMagnus Damm #include <linux/smp.h> 150f7b332fSRussell King #include <asm/hardware/gic.h> 161c51ed4fSMagnus Damm 17a62580e5SMarc Zyngier void __init shmobile_smp_init_cpus(unsigned int ncores) 181c51ed4fSMagnus Damm { 191c51ed4fSMagnus Damm unsigned int i; 201c51ed4fSMagnus Damm 21a06f916bSRussell King if (ncores > nr_cpu_ids) { 22a06f916bSRussell King pr_warn("SMP: %u cores greater than maximum (%u), clipping\n", 23a06f916bSRussell King ncores, nr_cpu_ids); 24a06f916bSRussell King ncores = nr_cpu_ids; 25a06f916bSRussell King } 26a06f916bSRussell King 271c51ed4fSMagnus Damm for (i = 0; i < ncores; i++) 281c51ed4fSMagnus Damm set_cpu_possible(i, true); 290f7b332fSRussell King 300f7b332fSRussell King set_smp_cross_call(gic_raise_softirq); 311c51ed4fSMagnus Damm } 32