Skip to content

Commit

Permalink
Merge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git…
Browse files Browse the repository at this point in the history
…/benh/powerpc

* 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc:
  powerpc/pseries: Fix kexec regression caused by CPPR tracking
  • Loading branch information
Linus Torvalds committed Feb 8, 2010
2 parents 8bd7380 + 36350e0 commit 9d2bc1a
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions arch/powerpc/platforms/pseries/xics.c
Original file line number Diff line number Diff line change
Expand Up @@ -784,9 +784,13 @@ static void xics_set_cpu_priority(unsigned char cppr)
{
struct xics_cppr *os_cppr = &__get_cpu_var(xics_cppr);

BUG_ON(os_cppr->index != 0);
/*
* we only really want to set the priority when there's
* just one cppr value on the stack
*/
WARN_ON(os_cppr->index != 0);

os_cppr->stack[os_cppr->index] = cppr;
os_cppr->stack[0] = cppr;

if (firmware_has_feature(FW_FEATURE_LPAR))
lpar_cppr_info(cppr);
Expand Down Expand Up @@ -821,8 +825,14 @@ void xics_setup_cpu(void)

void xics_teardown_cpu(void)
{
struct xics_cppr *os_cppr = &__get_cpu_var(xics_cppr);
int cpu = smp_processor_id();

/*
* we have to reset the cppr index to 0 because we're
* not going to return from the IPI
*/
os_cppr->index = 0;
xics_set_cpu_priority(0);

/* Clear any pending IPI request */
Expand Down

0 comments on commit 9d2bc1a

Please sign in to comment.