All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Andreas Färber" <afaerber@suse.de>
To: Meador Inge <meadori@codesourcery.com>
Cc: qemu-devel@nongnu.org, aurelien@aurel32.net
Subject: Re: [Qemu-devel] [PATCH] target-mips: Enable access to required RDHWR hardware registers
Date: Tue, 21 Aug 2012 12:14:15 +0200	[thread overview]
Message-ID: <50335F77.4020900@suse.de> (raw)
In-Reply-To: <1345506102-8444-1-git-send-email-meadori@codesourcery.com>

Am 21.08.2012 01:41, schrieb Meador Inge:
> While running in the usermode emulator all of the MIPS32r2 *required*
> RDHWR hardware registers should be accessible (the Linux kernel enables
> access to these same registers).
> 
> Signed-off-by: Meador Inge <meadori@codesourcery.com>
> ---
>  target-mips/translate.c |    7 +++++--
>  1 files changed, 5 insertions(+), 2 deletions(-)
> 
> diff --git a/target-mips/translate.c b/target-mips/translate.c
> index 47daf85..849e75d 100644
> --- a/target-mips/translate.c
> +++ b/target-mips/translate.c
> @@ -12768,8 +12768,11 @@ void cpu_state_reset(CPUMIPSState *env)
>  
>  #if defined(CONFIG_USER_ONLY)
>      env->hflags = MIPS_HFLAG_UM;
> -    /* Enable access to the SYNCI_Step register.  */
> -    env->CP0_HWREna |= (1 << 1);
> +    if (env->insn_flags & ISA_MIPS32R2) {
> +        /* Enable access to the CPUNum, SYNCI_Step, CC, and CCRes RDHWR
> +           hardware registers.  */
> +        env->CP0_HWREna |= 0x0000000F;
> +    }

So what about the non-MIPS32r2 case? IIUC then the SYNCI_Step register
would no longer be accessible, which your commit message does not
mention. Intentional?

If this is a bugfix for v1.2.0 don't forget to mark "for-1.2".

Andreas

>      if (env->CP0_Config1 & (1 << CP0C1_FP)) {
>          env->hflags |= MIPS_HFLAG_FPU;
>      }
> 


-- 
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg

  reply	other threads:[~2012-08-21 10:14 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-20 23:41 [Qemu-devel] [PATCH] target-mips: Enable access to required RDHWR hardware registers Meador Inge
2012-08-21 10:14 ` Andreas Färber [this message]
2012-08-21 15:41   ` Meador Inge
2012-08-21 15:52     ` Aurelien Jarno
2012-08-21 16:04       ` Meador Inge

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=50335F77.4020900@suse.de \
    --to=afaerber@suse.de \
    --cc=aurelien@aurel32.net \
    --cc=meadori@codesourcery.com \
    --cc=qemu-devel@nongnu.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.