Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 262720
b: refs/heads/master
c: 598c823
h: refs/heads/master
v: v3
  • Loading branch information
Anton Blanchard authored and Benjamin Herrenschmidt committed Aug 5, 2011
1 parent 936b355 commit eb2a1b7
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 19 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: 711ef84e80ec6f937ad59c7a00490421a5c92867
refs/heads/master: 598c8231ab54cfcc8ea6f52882cefee98b129bd1
4 changes: 2 additions & 2 deletions trunk/arch/powerpc/platforms/pseries/hotplug-cpu.c
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ static void pseries_mach_cpu_die(void)
get_lppaca()->idle = 0;

if (get_preferred_offline_state(cpu) == CPU_STATE_ONLINE) {
unregister_slb_shadow(hwcpu, __pa(get_slb_shadow()));
unregister_slb_shadow(hwcpu);

/*
* Call to start_secondary_resume() will not return.
Expand All @@ -150,7 +150,7 @@ static void pseries_mach_cpu_die(void)
WARN_ON(get_preferred_offline_state(cpu) != CPU_STATE_OFFLINE);

set_cpu_current_state(cpu, CPU_STATE_OFFLINE);
unregister_slb_shadow(hwcpu, __pa(get_slb_shadow()));
unregister_slb_shadow(hwcpu);
rtas_stop_self();

/* Should never get here... */
Expand Down
20 changes: 8 additions & 12 deletions trunk/arch/powerpc/platforms/pseries/kexec.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,34 +25,30 @@ static void pseries_kexec_cpu_down(int crash_shutdown, int secondary)
{
/* Don't risk a hypervisor call if we're crashing */
if (firmware_has_feature(FW_FEATURE_SPLPAR) && !crash_shutdown) {
unsigned long addr;
int ret;
int cpu = smp_processor_id();
int hwcpu = hard_smp_processor_id();

if (get_lppaca()->dtl_enable_mask) {
ret = unregister_dtl(hard_smp_processor_id());
ret = unregister_dtl(hwcpu);
if (ret) {
pr_err("WARNING: DTL deregistration for cpu "
"%d (hw %d) failed with %d\n",
smp_processor_id(),
hard_smp_processor_id(), ret);
cpu, hwcpu, ret);
}
}

addr = __pa(get_slb_shadow());
ret = unregister_slb_shadow(hard_smp_processor_id(), addr);
ret = unregister_slb_shadow(hwcpu);
if (ret) {
pr_err("WARNING: SLB shadow buffer deregistration "
"for cpu %d (hw %d) failed with %d\n",
smp_processor_id(),
hard_smp_processor_id(), ret);
cpu, hwcpu, ret);
}

addr = __pa(get_lppaca());
ret = unregister_vpa(hard_smp_processor_id(), addr);
ret = unregister_vpa(hwcpu);
if (ret) {
pr_err("WARNING: VPA deregistration for cpu %d "
"(hw %d) failed with %d\n", smp_processor_id(),
hard_smp_processor_id(), ret);
"(hw %d) failed with %d\n", cpu, hwcpu, ret);
}
}
}
Expand Down
8 changes: 4 additions & 4 deletions trunk/arch/powerpc/platforms/pseries/plpar_wrappers.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,19 +53,19 @@ static inline long vpa_call(unsigned long flags, unsigned long cpu,
return plpar_hcall_norets(H_REGISTER_VPA, flags, cpu, vpa);
}

static inline long unregister_vpa(unsigned long cpu, unsigned long vpa)
static inline long unregister_vpa(unsigned long cpu)
{
return vpa_call(0x5, cpu, vpa);
return vpa_call(0x5, cpu, 0);
}

static inline long register_vpa(unsigned long cpu, unsigned long vpa)
{
return vpa_call(0x1, cpu, vpa);
}

static inline long unregister_slb_shadow(unsigned long cpu, unsigned long vpa)
static inline long unregister_slb_shadow(unsigned long cpu)
{
return vpa_call(0x7, cpu, vpa);
return vpa_call(0x7, cpu, 0);
}

static inline long register_slb_shadow(unsigned long cpu, unsigned long vpa)
Expand Down

0 comments on commit eb2a1b7

Please sign in to comment.