Magnus Damm | 1c51ed4 | 2010-12-14 16:56:55 +0900 | [diff] [blame] | 1 | /* |
| 2 | * SMP support for R-Mobile / SH-Mobile |
| 3 | * |
| 4 | * Copyright (C) 2010 Magnus Damm |
Paul Mundt | c413521 | 2011-01-07 12:03:22 +0900 | [diff] [blame] | 5 | * Copyright (C) 2011 Paul Mundt |
Magnus Damm | 1c51ed4 | 2010-12-14 16:56:55 +0900 | [diff] [blame] | 6 | * |
| 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 Damm | 1c51ed4 | 2010-12-14 16:56:55 +0900 | [diff] [blame] | 14 | #include <linux/smp.h> |
Magnus Damm | 1c51ed4 | 2010-12-14 16:56:55 +0900 | [diff] [blame] | 15 | |
Marc Zyngier | a62580e | 2011-09-08 13:15:22 +0100 | [diff] [blame] | 16 | void __init shmobile_smp_init_cpus(unsigned int ncores) |
Magnus Damm | 1c51ed4 | 2010-12-14 16:56:55 +0900 | [diff] [blame] | 17 | { |
Magnus Damm | 1c51ed4 | 2010-12-14 16:56:55 +0900 | [diff] [blame] | 18 | unsigned int i; |
| 19 | |
Russell King | a06f916 | 2011-10-20 22:04:18 +0100 | [diff] [blame] | 20 | 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 Damm | 1c51ed4 | 2010-12-14 16:56:55 +0900 | [diff] [blame] | 26 | for (i = 0; i < ncores; i++) |
| 27 | set_cpu_possible(i, true); |
| 28 | } |