Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 225878
b: refs/heads/master
c: bbc3d14
h: refs/heads/master
v: v3
  • Loading branch information
Russell King committed Dec 20, 2010
1 parent 6c9c4f2 commit 31da70f
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 34 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 28e18293cf0f8d23a0950d7b1d2212d11af494dc
refs/heads/master: bbc3d14e9aca023bb98e580aa1c9350af8effdb1
21 changes: 11 additions & 10 deletions trunk/arch/arm/mach-omap2/omap-smp.c
Original file line number Diff line number Diff line change
Expand Up @@ -120,16 +120,6 @@ void __init smp_init_cpus(void)

ncores = get_core_count();

for (i = 0; i < ncores; i++)
set_cpu_possible(i, true);
}

void __init smp_prepare_cpus(unsigned int max_cpus)
{
unsigned int ncores = get_core_count();
unsigned int cpu = smp_processor_id();
int i;

/* sanity check */
if (ncores == 0) {
printk(KERN_ERR
Expand All @@ -144,6 +134,17 @@ void __init smp_prepare_cpus(unsigned int max_cpus)
ncores, NR_CPUS);
ncores = NR_CPUS;
}

for (i = 0; i < ncores; i++)
set_cpu_possible(i, true);
}

void __init smp_prepare_cpus(unsigned int max_cpus)
{
unsigned int ncores = num_possible_cpus();
unsigned int cpu = smp_processor_id();
int i;

smp_store_cpu_info(cpu);

/*
Expand Down
20 changes: 10 additions & 10 deletions trunk/arch/arm/mach-realview/platsmp.c
Original file line number Diff line number Diff line change
Expand Up @@ -160,16 +160,6 @@ void __init smp_init_cpus(void)
{
unsigned int i, ncores = get_core_count();

for (i = 0; i < ncores; i++)
set_cpu_possible(i, true);
}

void __init smp_prepare_cpus(unsigned int max_cpus)
{
unsigned int ncores = get_core_count();
unsigned int cpu = smp_processor_id();
int i;

/* sanity check */
if (ncores == 0) {
printk(KERN_ERR
Expand All @@ -186,6 +176,16 @@ void __init smp_prepare_cpus(unsigned int max_cpus)
ncores = NR_CPUS;
}

for (i = 0; i < ncores; i++)
set_cpu_possible(i, true);
}

void __init smp_prepare_cpus(unsigned int max_cpus)
{
unsigned int ncores = num_possible_cpus();
unsigned int cpu = smp_processor_id();
int i;

smp_store_cpu_info(cpu);

/*
Expand Down
26 changes: 13 additions & 13 deletions trunk/arch/arm/mach-ux500/platsmp.c
Original file line number Diff line number Diff line change
Expand Up @@ -128,31 +128,31 @@ void __init smp_init_cpus(void)
{
unsigned int i, ncores = get_core_count();

for (i = 0; i < ncores; i++)
set_cpu_possible(i, true);
}

void __init smp_prepare_cpus(unsigned int max_cpus)
{
unsigned int ncores = get_core_count();
unsigned int cpu = smp_processor_id();
int i;

/* sanity check */
if (ncores == 0) {
printk(KERN_ERR
"U8500: strange CM count of 0? Default to 1\n");
ncores = 1;
}

if (ncores > num_possible_cpus()) {
if (ncores > NR_CPUS) {
printk(KERN_WARNING
"U8500: no. of cores (%d) greater than configured "
"maximum of %d - clipping\n",
ncores, num_possible_cpus());
ncores = num_possible_cpus();
ncores, NR_CPUS);
ncores = NR_CPUS;
}

for (i = 0; i < ncores; i++)
set_cpu_possible(i, true);
}

void __init smp_prepare_cpus(unsigned int max_cpus)
{
unsigned int ncores = num_possible_cpus();
unsigned int cpu = smp_processor_id();
int i;

smp_store_cpu_info(cpu);

/*
Expand Down

0 comments on commit 31da70f

Please sign in to comment.