Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 196656
b: refs/heads/master
c: abb17f9
h: refs/heads/master
v: v3
  • Loading branch information
Milton Miller authored and Benjamin Herrenschmidt committed May 21, 2010
1 parent a3f5124 commit da236ca
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 12 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: ca5d0674c37840366f04a7bbfbf78e7b5f3ce0a4
refs/heads/master: abb17f9c3a92c5acf30e749efdf0419b7f50a5b8
6 changes: 0 additions & 6 deletions trunk/arch/powerpc/kernel/setup_64.c
Original file line number Diff line number Diff line change
Expand Up @@ -573,12 +573,6 @@ void ppc64_boot_msg(unsigned int src, const char *msg)
printk("[boot]%04x %s\n", src, msg);
}

void cpu_die(void)
{
if (ppc_md.cpu_die)
ppc_md.cpu_die();
}

#ifdef CONFIG_SMP
#define PCPU_DYN_SIZE ()

Expand Down
6 changes: 6 additions & 0 deletions trunk/arch/powerpc/kernel/smp.c
Original file line number Diff line number Diff line change
Expand Up @@ -648,4 +648,10 @@ void cpu_hotplug_driver_unlock()
{
mutex_unlock(&powerpc_cpu_hotplug_driver_mutex);
}

void cpu_die(void)
{
if (ppc_md.cpu_die)
ppc_md.cpu_die();
}
#endif
2 changes: 2 additions & 0 deletions trunk/arch/powerpc/platforms/powermac/pmac.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ extern void pmac_setup_pci_dma(void);
extern void pmac_check_ht_link(void);

extern void pmac_setup_smp(void);
extern void pmac32_cpu_die(void);
extern void low_cpu_die(void) __attribute__((noreturn));

extern int pmac_nvram_init(void);
extern void pmac_pic_init(void);
Expand Down
11 changes: 8 additions & 3 deletions trunk/arch/powerpc/platforms/powermac/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -646,7 +646,7 @@ static int pmac_pci_probe_mode(struct pci_bus *bus)
/* access per cpu vars from generic smp.c */
DECLARE_PER_CPU(int, cpu_state);

static void pmac_cpu_die(void)
static void pmac64_cpu_die(void)
{
/*
* turn off as much as possible, we'll be
Expand Down Expand Up @@ -717,8 +717,13 @@ define_machine(powermac) {
.pcibios_after_init = pmac_pcibios_after_init,
.phys_mem_access_prot = pci_phys_mem_access_prot,
#endif
#if defined(CONFIG_HOTPLUG_CPU) && defined(CONFIG_PPC64)
.cpu_die = pmac_cpu_die,
#ifdef CONFIG_HOTPLUG_CPU
#ifdef CONFIG_PPC64
.cpu_die = pmac64_cpu_die,
#endif
#ifdef CONFIG_PPC32
.cpu_die = pmac32_cpu_die,
#endif
#endif
#if defined(CONFIG_HOTPLUG_CPU) && defined(CONFIG_PPC32)
.cpu_die = generic_mach_cpu_die,
Expand Down
5 changes: 3 additions & 2 deletions trunk/arch/powerpc/platforms/powermac/smp.c
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@
#include <asm/pmac_low_i2c.h>
#include <asm/pmac_pfunc.h>

#include "pmac.h"

#undef DEBUG

#ifdef DEBUG
Expand Down Expand Up @@ -878,10 +880,9 @@ int smp_core99_cpu_disable(void)
return 0;
}

extern void low_cpu_die(void) __attribute__((noreturn)); /* in sleep.S */
static int cpu_dead[NR_CPUS];

void cpu_die(void)
void pmac32_cpu_die(void)
{
local_irq_disable();
cpu_dead[smp_processor_id()] = 1;
Expand Down

0 comments on commit da236ca

Please sign in to comment.