blob: 1f958d7b0bac77d7eff13ac83eb7d02309fe9092 [file] [log] [blame]
Magnus Damm1c51ed42010-12-14 16:56:55 +09001/*
2 * SMP support for R-Mobile / SH-Mobile
3 *
4 * Copyright (C) 2010 Magnus Damm
Paul Mundtc4135212011-01-07 12:03:22 +09005 * Copyright (C) 2011 Paul Mundt
Magnus Damm1c51ed42010-12-14 16:56:55 +09006 *
7 * Based on vexpress, Copyright (C) 2002 ARM Ltd, All Rights Reserved
8 *
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License version 2 as
11 * published by the Free Software Foundation.
12 */
13#include <linux/init.h>
Magnus Damm1c51ed42010-12-14 16:56:55 +090014#include <linux/smp.h>
Magnus Damm1c51ed42010-12-14 16:56:55 +090015
Marc Zyngiera62580e2011-09-08 13:15:22 +010016void __init shmobile_smp_init_cpus(unsigned int ncores)
Magnus Damm1c51ed42010-12-14 16:56:55 +090017{
Magnus Damm1c51ed42010-12-14 16:56:55 +090018 unsigned int i;
19
Russell Kinga06f9162011-10-20 22:04:18 +010020 if (ncores > nr_cpu_ids) {
21 pr_warn("SMP: %u cores greater than maximum (%u), clipping\n",
22 ncores, nr_cpu_ids);
23 ncores = nr_cpu_ids;
24 }
25
Magnus Damm1c51ed42010-12-14 16:56:55 +090026 for (i = 0; i < ncores; i++)
27 set_cpu_possible(i, true);
28}