public inbox for linuxppc-dev@ozlabs.org 
 help / color / mirror / Atom feed
From: Michael Ellerman <mpe@ellerman•id.au>
To: Nicholas Piggin <npiggin@gmail•com>, linuxppc-dev@lists•ozlabs.org
Cc: Nicholas Piggin <npiggin@gmail•com>
Subject: Re: [PATCH 4/9] powerpc/64s: SLB miss handler avoid r3 save/restore
Date: Mon, 19 Jun 2017 14:48:37 +1000	[thread overview]
Message-ID: <87tw3cvaze.fsf@concordia.ellerman.id.au> (raw)
In-Reply-To: <20170521131550.25813-5-npiggin@gmail.com>

Nicholas Piggin <npiggin@gmail•com> writes:

> diff --git a/arch/powerpc/kernel/exceptions-64s.S b/arch/powerpc/kernel/exceptions-64s.S
> index 486e205cc762..6ba4c4c6ae69 100644
> --- a/arch/powerpc/kernel/exceptions-64s.S
> +++ b/arch/powerpc/kernel/exceptions-64s.S
> @@ -625,6 +625,9 @@ EXC_COMMON_BEGIN(slb_miss_realmode)
>  	stw	r9,PACA_EXSLB+EX_CCR(r13)	/* save CR in exc. frame */
>  	std	r10,PACA_EXSLB+EX_LR(r13)	/* save LR */
>  
> +	andi.	r11,r11,MSR_RI	/* check for unrecoverable exception */
> +	beq-	2f
> +
>  	crset	4*cr0+eq
>  #ifdef CONFIG_PPC_STD_MMU_64
>  BEGIN_MMU_FTR_SECTION
> @@ -638,9 +641,6 @@ END_MMU_FTR_SECTION_IFCLR(MMU_FTR_TYPE_RADIX)
>  
>  	beq-	8f		/* if bad address, make full stack frame */
>  
> -	andi.	r10,r12,MSR_RI	/* check for unrecoverable exception */
> -	beq-	2f
> -

Moving that check before slb_allocate_realmode() makes me a bit nervous.

It's already a bug if we're taking an SLB miss with RI off, but I'm
worried that by not doing the SLB allocate we might turn what would be a
regular oops into an infinite loop of SLB misses. But my brain is too
sleep deprived today to decide either way.

cheers

  reply	other threads:[~2017-06-19  4:48 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-21 13:15 [PATCH 0/9] Reduce PACA save areas Nicholas Piggin
2017-05-21 13:15 ` [PATCH 1/9] powerpc/64s: slb_allocate_realmode() preserve r3 Nicholas Piggin
2017-06-22 13:12   ` [1/9] " Michael Ellerman
2017-05-21 13:15 ` [PATCH 2/9] powerpc/64s: SLB miss handler avoid saving faulting address into EX_DAR Nicholas Piggin
2017-05-21 13:15 ` [PATCH 3/9] powerpc/64s: SLB miss already has CTR saved for relocatable kernel Nicholas Piggin
2017-06-19 11:45   ` Michael Ellerman
2017-06-19 17:20     ` Nicholas Piggin
2017-05-21 13:15 ` [PATCH 4/9] powerpc/64s: SLB miss handler avoid r3 save/restore Nicholas Piggin
2017-06-19  4:48   ` Michael Ellerman [this message]
2017-06-19 16:54     ` Nicholas Piggin
2017-05-21 13:15 ` [PATCH 5/9] powerpc/64s: paca add EX_SIZE definition for exception save areas Nicholas Piggin
2017-05-21 13:15 ` [PATCH 6/9] powerpc/64s: paca EX_SRR0 is unused, remove it Nicholas Piggin
2017-05-21 13:15 ` [PATCH 7/9] powerpc/64s: paca EX_LR can be merged with EX_DAR Nicholas Piggin
2017-05-21 13:15 ` [PATCH 8/9] powerpc/64s: paca EX_R3 " Nicholas Piggin
2017-05-21 13:15 ` [PATCH 9/9] powerpc/64s: paca EX_CTR is not used with !RELOCATABLE, remove it Nicholas Piggin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87tw3cvaze.fsf@concordia.ellerman.id.au \
    --to=mpe@ellerman$(echo .)id.au \
    --cc=linuxppc-dev@lists$(echo .)ozlabs.org \
    --cc=npiggin@gmail$(echo .)com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox