You need to sign in or sign up before continuing.
platsmp.c 711 字节
Newer Older
M
Magnus Damm 已提交
1 2 3 4
/*
 * SMP support for R-Mobile / SH-Mobile
 *
 * Copyright (C) 2010  Magnus Damm
5
 * Copyright (C) 2011  Paul Mundt
M
Magnus Damm 已提交
6 7 8 9 10 11 12 13 14 15
 *
 * 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>

16
void __init shmobile_smp_init_cpus(unsigned int ncores)
M
Magnus Damm 已提交
17 18 19
{
	unsigned int i;

20 21 22 23 24 25
	if (ncores > nr_cpu_ids) {
		pr_warn("SMP: %u cores greater than maximum (%u), clipping\n",
			ncores, nr_cpu_ids);
		ncores = nr_cpu_ids;
	}

M
Magnus Damm 已提交
26 27 28
	for (i = 0; i < ncores; i++)
		set_cpu_possible(i, true);
}