Skip to content

Commit 9d2bc1a

Browse files
committed
Merge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc
* 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc: powerpc/pseries: Fix kexec regression caused by CPPR tracking
2 parents 8bd7380 + 36350e0 commit 9d2bc1a

File tree

1 file changed

+12
-2
lines changed
  • arch/powerpc/platforms/pseries

1 file changed

+12
-2
lines changed

arch/powerpc/platforms/pseries/xics.c

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -784,9 +784,13 @@ static void xics_set_cpu_priority(unsigned char cppr)
784784
{
785785
struct xics_cppr *os_cppr = &__get_cpu_var(xics_cppr);
786786

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

789-
os_cppr->stack[os_cppr->index] = cppr;
793+
os_cppr->stack[0] = cppr;
790794

791795
if (firmware_has_feature(FW_FEATURE_LPAR))
792796
lpar_cppr_info(cppr);
@@ -821,8 +825,14 @@ void xics_setup_cpu(void)
821825

822826
void xics_teardown_cpu(void)
823827
{
828+
struct xics_cppr *os_cppr = &__get_cpu_var(xics_cppr);
824829
int cpu = smp_processor_id();
825830

831+
/*
832+
* we have to reset the cppr index to 0 because we're
833+
* not going to return from the IPI
834+
*/
835+
os_cppr->index = 0;
826836
xics_set_cpu_priority(0);
827837

828838
/* Clear any pending IPI request */

0 commit comments

Comments
 (0)