Patchwork target-mips: Allow DSP access to be disabled once enabled.

login
register
mail settings
Submitter Eric Johnson
Date Jan. 8, 2013, 6:26 a.m.
Message ID <1357626404-26955-1-git-send-email-ericj@mips.com>
Download mbox | patch
Permalink /patch/210292/
State New
Headers show

Comments

Eric Johnson - Jan. 8, 2013, 6:26 a.m.
Clear the DSP hflags at the start of compute_hflags.  Otherwise access
is not properly disabled once enabled.

Signed-off-by: Eric Johnson <ericj@mips.com>
---
 target-mips/cpu.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
Aurelien Jarno - Jan. 8, 2013, 3:45 p.m.
On Mon, Jan 07, 2013 at 10:26:44PM -0800, Eric Johnson wrote:
> Clear the DSP hflags at the start of compute_hflags.  Otherwise access
> is not properly disabled once enabled.
> 
> Signed-off-by: Eric Johnson <ericj@mips.com>
> ---
>  target-mips/cpu.h |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/target-mips/cpu.h b/target-mips/cpu.h
> index 31602ac..5963d62 100644
> --- a/target-mips/cpu.h
> +++ b/target-mips/cpu.h
> @@ -751,7 +751,7 @@ static inline void compute_hflags(CPUMIPSState *env)
>  {
>      env->hflags &= ~(MIPS_HFLAG_COP1X | MIPS_HFLAG_64 | MIPS_HFLAG_CP0 |
>                       MIPS_HFLAG_F64 | MIPS_HFLAG_FPU | MIPS_HFLAG_KSU |
> -                     MIPS_HFLAG_UX);
> +                     MIPS_HFLAG_UX | MIPS_HFLAG_DSP | MIPS_HFLAG_DSPR2);
>      if (!(env->CP0_Status & (1 << CP0St_EXL)) &&
>          !(env->CP0_Status & (1 << CP0St_ERL)) &&
>          !(env->hflags & MIPS_HFLAG_DM)) {
> 

Thanks, applied.

Patch

diff --git a/target-mips/cpu.h b/target-mips/cpu.h
index 31602ac..5963d62 100644
--- a/target-mips/cpu.h
+++ b/target-mips/cpu.h
@@ -751,7 +751,7 @@  static inline void compute_hflags(CPUMIPSState *env)
 {
     env->hflags &= ~(MIPS_HFLAG_COP1X | MIPS_HFLAG_64 | MIPS_HFLAG_CP0 |
                      MIPS_HFLAG_F64 | MIPS_HFLAG_FPU | MIPS_HFLAG_KSU |
-                     MIPS_HFLAG_UX);
+                     MIPS_HFLAG_UX | MIPS_HFLAG_DSP | MIPS_HFLAG_DSPR2);
     if (!(env->CP0_Status & (1 << CP0St_EXL)) &&
         !(env->CP0_Status & (1 << CP0St_ERL)) &&
         !(env->hflags & MIPS_HFLAG_DM)) {