Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 259080
b: refs/heads/master
c: 7ac87ab
h: refs/heads/master
v: v3
  • Loading branch information
Matt Evans authored and Benjamin Herrenschmidt committed Jun 17, 2011
1 parent b5f9840 commit d74a83a
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 7 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: 32d206eb5637d8cf73d9c70f7680de2a7193ce8b
refs/heads/master: 7ac87abb8166b99584149fcfb2efef5773a078e9
2 changes: 1 addition & 1 deletion trunk/arch/powerpc/include/asm/smp.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
#include <asm/percpu.h>

extern int boot_cpuid;
extern int boot_cpu_count;
extern int spinning_secondaries;

extern void cpu_die(void);

Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/powerpc/kernel/head_64.S
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ generic_secondary_common_init:
mtctr r23
bctrl

3: LOAD_REG_ADDR(r3, boot_cpu_count) /* Decrement boot_cpu_count */
3: LOAD_REG_ADDR(r3, spinning_secondaries) /* Decrement spinning_secondaries */
lwarx r4,0,r3
subi r4,r4,1
stwcx. r4,0,r3
Expand Down
8 changes: 8 additions & 0 deletions trunk/arch/powerpc/kernel/prom.c
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ unsigned long tce_alloc_start, tce_alloc_end;
u64 ppc64_rma_size;
#endif
static phys_addr_t first_memblock_size;
static int __initdata boot_cpu_count;

static int __init early_parse_mem(char *p)
{
Expand Down Expand Up @@ -748,6 +749,13 @@ void __init early_init_devtree(void *params)
*/
of_scan_flat_dt(early_init_dt_scan_cpus, NULL);

#if defined(CONFIG_SMP) && defined(CONFIG_PPC64)
/* We'll later wait for secondaries to check in; there are
* NCPUS-1 non-boot CPUs :-)
*/
spinning_secondaries = boot_cpu_count - 1;
#endif

DBG(" <- early_init_devtree()\n");
}

Expand Down
1 change: 0 additions & 1 deletion trunk/arch/powerpc/kernel/setup_32.c
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ extern void bootx_init(unsigned long r4, unsigned long phys);

int boot_cpuid = -1;
EXPORT_SYMBOL_GPL(boot_cpuid);
int __initdata boot_cpu_count;
int boot_cpuid_phys;

int smp_hw_index[NR_CPUS];
Expand Down
6 changes: 3 additions & 3 deletions trunk/arch/powerpc/kernel/setup_64.c
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
#endif

int boot_cpuid = 0;
int __initdata boot_cpu_count;
int __initdata spinning_secondaries;
u64 ppc64_pft_size;

/* Pick defaults since we might want to patch instructions
Expand Down Expand Up @@ -253,11 +253,11 @@ void smp_release_cpus(void)
for (i = 0; i < 100000; i++) {
mb();
HMT_low();
if (boot_cpu_count == 0)
if (spinning_secondaries == 0)
break;
udelay(1);
}
DBG("boot_cpu_count = %d\n", boot_cpu_count);
DBG("spinning_secondaries = %d\n", spinning_secondaries);

DBG(" <- smp_release_cpus()\n");
}
Expand Down

0 comments on commit d74a83a

Please sign in to comment.