All of lore.kernel.org
 help / color / mirror / Atom feed
From: deller@kernel.org
To: richard.henderson@linaro.org, qemu-devel@nongnu.org
Cc: deller@gmx.de
Subject: [PATCH 3/4] target/hppa: 64-bit CPUs start with space register hashing enabled
Date: Tue, 28 Jan 2025 23:45:43 +0100	[thread overview]
Message-ID: <20250128224817.24715-4-deller@kernel.org> (raw)
In-Reply-To: <20250128224817.24715-1-deller@kernel.org>

From: Helge Deller <deller@gmx.de>

Turn on space register hashing for 64-bit CPUs when reset.

Signed-off-by: Helge Deller <deller@gmx.de>
---
 target/hppa/cpu.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/target/hppa/cpu.c b/target/hppa/cpu.c
index b0bc9d35e4..c86f9190d2 100644
--- a/target/hppa/cpu.c
+++ b/target/hppa/cpu.c
@@ -28,6 +28,7 @@
 #include "exec/translation-block.h"
 #include "fpu/softfloat.h"
 #include "tcg/tcg.h"
+#include "hw/hppa/hppa_hardware.h"
 
 static void hppa_cpu_set_pc(CPUState *cs, vaddr value)
 {
@@ -217,6 +218,10 @@ static void hppa_cpu_reset_hold(Object *obj, ResetType type)
     memset(env, 0, offsetof(CPUHPPAState, end_reset_fields));
 
     cpu_hppa_loaded_fr0(env);
+
+    /* 64-bit machines start with space-register hashing enabled in %dr2 */
+    env->dr[2] = hppa_is_pa20(env) ? HPPA64_DIAG_SPHASH_ENABLE : 0;
+
     cpu_hppa_put_psw(env, PSW_M);
 }
 
-- 
2.47.0



  parent reply	other threads:[~2025-01-28 22:49 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-28 22:45 [PATCH v2] target/hppa: Implement CPU diagnose registers for 64-bit HP-UX deller
2025-01-28 22:45 ` [PATCH 1/4] target/hppa: Add CPU diagnose registers deller
2025-01-29  1:43   ` Richard Henderson
2025-01-28 22:45 ` [PATCH 2/4] target/hppa: Add instruction decoding for mfdiag and mtdiag deller
2025-01-29  1:46   ` Richard Henderson
2025-01-28 22:45 ` deller [this message]
2025-01-29  1:46   ` [PATCH 3/4] target/hppa: 64-bit CPUs start with space register hashing enabled Richard Henderson
2025-01-28 22:45 ` [PATCH 4/4] target/hppa: Implement space register hashing for 64-bit HP-UX deller
2025-01-29  1:50   ` Richard Henderson
2025-01-29  1:52   ` Richard Henderson
2025-01-29  2:00     ` Richard Henderson
2025-01-29  4:07       ` Helge Deller
2025-01-29  5:33         ` Richard Henderson
2025-01-29 15:30           ` Helge Deller
2025-01-30  1:10             ` Richard Henderson

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=20250128224817.24715-4-deller@kernel.org \
    --to=deller@kernel.org \
    --cc=deller@gmx.de \
    --cc=qemu-devel@nongnu.org \
    --cc=richard.henderson@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.