Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 20428
b: refs/heads/master
c: 7bbb794
h: refs/heads/master
v: v3
  • Loading branch information
Russell King authored and Russell King committed Feb 16, 2006
1 parent 63a43fa commit f6833b2
Show file tree
Hide file tree
Showing 6 changed files with 41 additions and 14 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: ba09cf2bcf9b74d852dcb5ea957ac6af2bc0e057
refs/heads/master: 7bbb79403163e047c6e333ff169db34e3c969e65
5 changes: 5 additions & 0 deletions trunk/arch/arm/kernel/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
#include <linux/root_dev.h>
#include <linux/cpu.h>
#include <linux/interrupt.h>
#include <linux/smp.h>

#include <asm/cpu.h>
#include <asm/elf.h>
Expand Down Expand Up @@ -771,6 +772,10 @@ void __init setup_arch(char **cmdline_p)
paging_init(&meminfo, mdesc);
request_standard_resources(&meminfo, mdesc);

#ifdef CONFIG_SMP
smp_init_cpus();
#endif

cpu_init();

/*
Expand Down
1 change: 0 additions & 1 deletion trunk/arch/arm/kernel/smp.c
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,6 @@ void __init smp_prepare_boot_cpu(void)

per_cpu(cpu_data, cpu).idle = current;

cpu_set(cpu, cpu_possible_map);
cpu_set(cpu, cpu_present_map);
cpu_set(cpu, cpu_online_map);
}
Expand Down
21 changes: 15 additions & 6 deletions trunk/arch/arm/mach-integrator/platsmp.c
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,18 @@ static void __init poke_milo(void)
mb();
}

/*
* Initialise the CPU possible map early - this describes the CPUs
* which may be present or become present in the system.
*/
void __init smp_init_cpus(void)
{
unsigned int i, ncores = get_core_count();

for (i = 0; i < ncores; i++)
cpu_set(i, cpu_possible_map);
}

void __init smp_prepare_cpus(unsigned int max_cpus)
{
unsigned int ncores = get_core_count();
Expand Down Expand Up @@ -176,14 +188,11 @@ void __init smp_prepare_cpus(unsigned int max_cpus)
max_cpus = ncores;

/*
* Initialise the possible/present maps.
* cpu_possible_map describes the set of CPUs which may be present
* cpu_present_map describes the set of CPUs populated
* Initialise the present map, which describes the set of CPUs
* actually populated at the present time.
*/
for (i = 0; i < max_cpus; i++) {
cpu_set(i, cpu_possible_map);
for (i = 0; i < max_cpus; i++)
cpu_set(i, cpu_present_map);
}

/*
* Do we need any more CPUs? If so, then let them know where
Expand Down
21 changes: 15 additions & 6 deletions trunk/arch/arm/mach-realview/platsmp.c
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,18 @@ static void __init poke_milo(void)
mb();
}

/*
* Initialise the CPU possible map early - this describes the CPUs
* which may be present or become present in the system.
*/
void __init smp_init_cpus(void)
{
unsigned int i, ncores = get_core_count();

for (i = 0; i < ncores; i++)
cpu_set(i, cpu_possible_map);
}

void __init smp_prepare_cpus(unsigned int max_cpus)
{
unsigned int ncores = get_core_count();
Expand Down Expand Up @@ -179,14 +191,11 @@ void __init smp_prepare_cpus(unsigned int max_cpus)
local_timer_setup(cpu);

/*
* Initialise the possible/present maps.
* cpu_possible_map describes the set of CPUs which may be present
* cpu_present_map describes the set of CPUs populated
* Initialise the present map, which describes the set of CPUs
* actually populated at the present time.
*/
for (i = 0; i < max_cpus; i++) {
cpu_set(i, cpu_possible_map);
for (i = 0; i < max_cpus; i++)
cpu_set(i, cpu_present_map);
}

/*
* Do we need any more CPUs? If so, then let them know where
Expand Down
5 changes: 5 additions & 0 deletions trunk/include/asm-arm/smp.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,11 @@ extern void show_ipi_list(struct seq_file *p);
*/
asmlinkage void do_IPI(struct pt_regs *regs);

/*
* Setup the SMP cpu_possible_map
*/
extern void smp_init_cpus(void);

/*
* Move global data into per-processor storage.
*/
Expand Down

0 comments on commit f6833b2

Please sign in to comment.