All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 13/14] powerpc/64s: Fix comment on interrupt handler prologue
@ 2022-07-25  6:31 Rohan McLure
  2022-08-08  5:06 ` Andrew Donnellan
  2022-08-08 11:27 ` Christophe Leroy
  0 siblings, 2 replies; 4+ messages in thread
From: Rohan McLure @ 2022-07-25  6:31 UTC (permalink / raw)
  To: linuxppc-dev; +Cc: Rohan McLure, npiggin

Interrupt handlers on 64s systems will often need to save register state
from the interrupted process to make space for loading special purpose
registers or for internal state.

Fix a comment documenting a common code path macro in the beginning of
interrupt handlers where r10 is saved to the PACA to afford space for
the value of the CFAR. Comment is currently written as if r10-r12 are
saved to PACA, but in fact only r10 is saved.

Signed-off-by: Rohan McLure <rmclure@linux.ibm.com>
---
V1 -> V2: Given its own commit
---
 arch/powerpc/kernel/exceptions-64s.S | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/powerpc/kernel/exceptions-64s.S b/arch/powerpc/kernel/exceptions-64s.S
index b66dd6f775a4..102896fc6a86 100644
--- a/arch/powerpc/kernel/exceptions-64s.S
+++ b/arch/powerpc/kernel/exceptions-64s.S
@@ -281,7 +281,7 @@ BEGIN_FTR_SECTION
 	mfspr	r9,SPRN_PPR
 END_FTR_SECTION_IFSET(CPU_FTR_HAS_PPR)
 	HMT_MEDIUM
-	std	r10,IAREA+EX_R10(r13)		/* save r10 - r12 */
+	std	r10,IAREA+EX_R10(r13)		/* save r10 */
 	.if ICFAR
 BEGIN_FTR_SECTION
 	mfspr	r10,SPRN_CFAR
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH v2 13/14] powerpc/64s: Fix comment on interrupt handler prologue
  2022-07-25  6:31 [PATCH v2 13/14] powerpc/64s: Fix comment on interrupt handler prologue Rohan McLure
@ 2022-08-08  5:06 ` Andrew Donnellan
  2022-08-08 11:27 ` Christophe Leroy
  1 sibling, 0 replies; 4+ messages in thread
From: Andrew Donnellan @ 2022-08-08  5:06 UTC (permalink / raw)
  To: Rohan McLure, linuxppc-dev; +Cc: npiggin

On Mon, 2022-07-25 at 16:31 +1000, Rohan McLure wrote:
> Interrupt handlers on 64s systems will often need to save register
> state
> from the interrupted process to make space for loading special
> purpose
> registers or for internal state.
> 
> Fix a comment documenting a common code path macro in the beginning
> of
> interrupt handlers where r10 is saved to the PACA to afford space for
> the value of the CFAR. Comment is currently written as if r10-r12 are
> saved to PACA, but in fact only r10 is saved.
> 
> Signed-off-by: Rohan McLure <rmclure@linux.ibm.com>

Reviewed-by: Andrew Donnellan <ajd@linux.ibm.com>

-- 
Andrew Donnellan    OzLabs, ADL Canberra
ajd@linux.ibm.com   IBM Australia Limited


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH v2 13/14] powerpc/64s: Fix comment on interrupt handler prologue
  2022-07-25  6:31 [PATCH v2 13/14] powerpc/64s: Fix comment on interrupt handler prologue Rohan McLure
  2022-08-08  5:06 ` Andrew Donnellan
@ 2022-08-08 11:27 ` Christophe Leroy
  2022-08-11  1:42   ` Rohan McLure
  1 sibling, 1 reply; 4+ messages in thread
From: Christophe Leroy @ 2022-08-08 11:27 UTC (permalink / raw)
  To: Rohan McLure, linuxppc-dev; +Cc: npiggin



Le 25/07/2022 à 08:31, Rohan McLure a écrit :
> Interrupt handlers on 64s systems will often need to save register state
> from the interrupted process to make space for loading special purpose
> registers or for internal state.
> 
> Fix a comment documenting a common code path macro in the beginning of
> interrupt handlers where r10 is saved to the PACA to afford space for
> the value of the CFAR. Comment is currently written as if r10-r12 are
> saved to PACA, but in fact only r10 is saved.

Maybe it would be interesting to know from which patch the error comes.


> 
> Signed-off-by: Rohan McLure <rmclure@linux.ibm.com>
> ---
> V1 -> V2: Given its own commit
> ---
>   arch/powerpc/kernel/exceptions-64s.S | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/powerpc/kernel/exceptions-64s.S b/arch/powerpc/kernel/exceptions-64s.S
> index b66dd6f775a4..102896fc6a86 100644
> --- a/arch/powerpc/kernel/exceptions-64s.S
> +++ b/arch/powerpc/kernel/exceptions-64s.S
> @@ -281,7 +281,7 @@ BEGIN_FTR_SECTION
>   	mfspr	r9,SPRN_PPR
>   END_FTR_SECTION_IFSET(CPU_FTR_HAS_PPR)
>   	HMT_MEDIUM
> -	std	r10,IAREA+EX_R10(r13)		/* save r10 - r12 */
> +	std	r10,IAREA+EX_R10(r13)		/* save r10 */
>   	.if ICFAR
>   BEGIN_FTR_SECTION
>   	mfspr	r10,SPRN_CFAR

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH v2 13/14] powerpc/64s: Fix comment on interrupt handler prologue
  2022-08-08 11:27 ` Christophe Leroy
@ 2022-08-11  1:42   ` Rohan McLure
  0 siblings, 0 replies; 4+ messages in thread
From: Rohan McLure @ 2022-08-11  1:42 UTC (permalink / raw)
  To: Christophe Leroy; +Cc: linuxppc-dev, npiggin

> Maybe it would be interesting to know from which patch the error comes.

It’s hard to attribute this to a single commit, but the distance between r10’s save
location and r11-r12’s save location has definitely grown over time. The comment is
introduced in commit 7180e3e636de
("[POWERPC] force 64bit mode in fwnmi handlers to workaround firmware bugs”) way back in 2006.

In v3 will insert another comment to better signal where r11-r12 are saved.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-08-11  1:43 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-25  6:31 [PATCH v2 13/14] powerpc/64s: Fix comment on interrupt handler prologue Rohan McLure
2022-08-08  5:06 ` Andrew Donnellan
2022-08-08 11:27 ` Christophe Leroy
2022-08-11  1:42   ` Rohan McLure

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.