2010-12-14 15:56:55 +08:00
|
|
|
/*
|
|
|
|
* SMP support for R-Mobile / SH-Mobile
|
|
|
|
*
|
|
|
|
* Copyright (C) 2010 Magnus Damm
|
2011-01-07 11:03:22 +08:00
|
|
|
* Copyright (C) 2011 Paul Mundt
|
2010-12-14 15:56:55 +08:00
|
|
|
*
|
|
|
|
* Based on vexpress, Copyright (C) 2002 ARM Ltd, All Rights Reserved
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License version 2 as
|
|
|
|
* published by the Free Software Foundation.
|
|
|
|
*/
|
|
|
|
#include <linux/init.h>
|
|
|
|
#include <linux/smp.h>
|
|
|
|
|
2011-09-08 20:15:22 +08:00
|
|
|
void __init shmobile_smp_init_cpus(unsigned int ncores)
|
2010-12-14 15:56:55 +08:00
|
|
|
{
|
|
|
|
unsigned int i;
|
|
|
|
|
2011-10-21 05:04:18 +08:00
|
|
|
if (ncores > nr_cpu_ids) {
|
|
|
|
pr_warn("SMP: %u cores greater than maximum (%u), clipping\n",
|
|
|
|
ncores, nr_cpu_ids);
|
|
|
|
ncores = nr_cpu_ids;
|
|
|
|
}
|
|
|
|
|
2010-12-14 15:56:55 +08:00
|
|
|
for (i = 0; i < ncores; i++)
|
|
|
|
set_cpu_possible(i, true);
|
|
|
|
}
|