* [PATCH] parisc/entry: fix space adjustment on interruption
@ 2025-10-30 7:56 Sven Schnelle
2025-10-30 14:21 ` Helge Deller
0 siblings, 1 reply; 2+ messages in thread
From: Sven Schnelle @ 2025-10-30 7:56 UTC (permalink / raw)
To: Helge Deller
Cc: John David Anglin, linux-parisc, linux-kernel,
James E.J. Bottomley, Sven Schnelle
In wide mode, the IASQ contain the upper part of the GVA
during interruption. This needs to be reversed before
the space is used - otherwise it contains parts of IAOQ.
See Page 2-13 "Processing Resources / Interruption Instruction
Address Queues" in the Parisc 2.0 Architecture Manual page 2-13
for an explanation.
The IAOQ/IASQ space_adjust was skipped for other interruptions
than itlb misses. However, the code in handle_interruption()
checks whether iasq[0] contains a valid space. Due to the not
masked out bits this match failed and the process was killed.
Also add space_adjust for IAOQ1/IASQ1 so ptregs contains sane values.
Signed-off-by: Sven Schnelle <svens@stackframe.org>
---
arch/parisc/kernel/entry.S | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/arch/parisc/kernel/entry.S b/arch/parisc/kernel/entry.S
index 36914138f5f88..e04c5d806c105 100644
--- a/arch/parisc/kernel/entry.S
+++ b/arch/parisc/kernel/entry.S
@@ -1059,8 +1059,6 @@ ENTRY_CFI(intr_save) /* for os_hpmc */
STREG %r17, PT_IOR(%r29)
#if defined(CONFIG_64BIT)
- b,n intr_save2
-
skip_save_ior:
/* We have a itlb miss, and when executing code above 4 Gb on ILP64, we
* need to adjust iasq/iaoq here in the same way we adjusted isr/ior
@@ -1069,10 +1067,17 @@ skip_save_ior:
bb,COND(>=),n %r8,PSW_W_BIT,intr_save2
LDREG PT_IASQ0(%r29), %r16
LDREG PT_IAOQ0(%r29), %r17
- /* adjust iasq/iaoq */
+ /* adjust iasq0/iaoq0 */
space_adjust %r16,%r17,%r1
STREG %r16, PT_IASQ0(%r29)
STREG %r17, PT_IAOQ0(%r29)
+
+ LDREG PT_IASQ1(%r29), %r16
+ LDREG PT_IAOQ1(%r29), %r17
+ /* adjust iasq1/iaoq1 */
+ space_adjust %r16,%r17,%r1
+ STREG %r16, PT_IASQ1(%r29)
+ STREG %r17, PT_IAOQ1(%r29)
#else
skip_save_ior:
#endif
--
2.51.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] parisc/entry: fix space adjustment on interruption
2025-10-30 7:56 [PATCH] parisc/entry: fix space adjustment on interruption Sven Schnelle
@ 2025-10-30 14:21 ` Helge Deller
0 siblings, 0 replies; 2+ messages in thread
From: Helge Deller @ 2025-10-30 14:21 UTC (permalink / raw)
To: Sven Schnelle
Cc: John David Anglin, linux-parisc, linux-kernel,
James E.J. Bottomley
On 10/30/25 08:56, Sven Schnelle wrote:
> In wide mode, the IASQ contain the upper part of the GVA
> during interruption. This needs to be reversed before
> the space is used - otherwise it contains parts of IAOQ.
> See Page 2-13 "Processing Resources / Interruption Instruction
> Address Queues" in the Parisc 2.0 Architecture Manual page 2-13
> for an explanation.
>
> The IAOQ/IASQ space_adjust was skipped for other interruptions
> than itlb misses. However, the code in handle_interruption()
> checks whether iasq[0] contains a valid space. Due to the not
> masked out bits this match failed and the process was killed.
>
> Also add space_adjust for IAOQ1/IASQ1 so ptregs contains sane values.
>
> Signed-off-by: Sven Schnelle <svens@stackframe.org>
> ---
> arch/parisc/kernel/entry.S | 11 ++++++++---
> 1 file changed, 8 insertions(+), 3 deletions(-)
applied.
Thanks!
Helge
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-10-30 14:21 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-10-30 7:56 [PATCH] parisc/entry: fix space adjustment on interruption Sven Schnelle
2025-10-30 14:21 ` Helge Deller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox