Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 356337
b: refs/heads/master
c: fb91256
h: refs/heads/master
i:
  356335: 6d02074
v: v3
  • Loading branch information
Li Zhong authored and Benjamin Herrenschmidt committed Jan 10, 2013
1 parent cc3641c commit 4b8b8e1
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 323a6bf1d6f4ec7907d9d8aacb4ae9590f755dda
refs/heads/master: fb9125680d0e7c23eae7c6000acc91ea26acab9c
8 changes: 8 additions & 0 deletions trunk/arch/powerpc/platforms/pseries/hotplug-cpu.c
Original file line number Diff line number Diff line change
Expand Up @@ -127,16 +127,24 @@ static void pseries_mach_cpu_die(void)
get_lppaca()->donate_dedicated_cpu = 1;

while (get_preferred_offline_state(cpu) == CPU_STATE_INACTIVE) {
while (!prep_irq_for_idle()) {
local_irq_enable();
local_irq_disable();
}

extended_cede_processor(cede_latency_hint);
}

local_irq_disable();

if (!get_lppaca()->shared_proc)
get_lppaca()->donate_dedicated_cpu = 0;
get_lppaca()->idle = 0;

if (get_preferred_offline_state(cpu) == CPU_STATE_ONLINE) {
unregister_slb_shadow(hwcpu);

hard_irq_disable();
/*
* Call to start_secondary_resume() will not return.
* Kernel stack will be reset and start_secondary()
Expand Down
8 changes: 8 additions & 0 deletions trunk/arch/powerpc/platforms/pseries/plpar_wrappers.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
#define _PSERIES_PLPAR_WRAPPERS_H

#include <linux/string.h>
#include <linux/irqflags.h>

#include <asm/hvcall.h>
#include <asm/paca.h>
Expand Down Expand Up @@ -41,7 +42,14 @@ static inline long extended_cede_processor(unsigned long latency_hint)
u8 old_latency_hint = get_cede_latency_hint();

set_cede_latency_hint(latency_hint);

rc = cede_processor();
#ifdef CONFIG_TRACE_IRQFLAGS
/* Ensure that H_CEDE returns with IRQs on */
if (WARN_ON(!(mfmsr() & MSR_EE)))
__hard_irq_enable();
#endif

set_cede_latency_hint(old_latency_hint);

return rc;
Expand Down

0 comments on commit 4b8b8e1

Please sign in to comment.