Patchwork [CFT,02/12] cris, microblaze: use cpu_has_work

login
register
mail settings
Submitter Paolo Bonzini
Date Feb. 8, 2011, 5:18 p.m.
Message ID <1297185509-20996-3-git-send-email-pbonzini@redhat.com>
Download mbox | patch
Permalink /patch/82392/
State New
Headers show

Comments

Paolo Bonzini - Feb. 8, 2011, 5:18 p.m.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 target-cris/exec.h       |    4 +---
 target-microblaze/exec.h |    4 +---
 2 files changed, 2 insertions(+), 6 deletions(-)
Edgar Iglesias - Feb. 8, 2011, 7:42 p.m.
On Tue, Feb 08, 2011 at 06:18:19PM +0100, Paolo Bonzini wrote:
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>

Thanks, I've applied this one.

Cheers



> ---
>  target-cris/exec.h       |    4 +---
>  target-microblaze/exec.h |    4 +---
>  2 files changed, 2 insertions(+), 6 deletions(-)
> 
> diff --git a/target-cris/exec.h b/target-cris/exec.h
> index 93ce768..34c0132 100644
> --- a/target-cris/exec.h
> +++ b/target-cris/exec.h
> @@ -37,9 +37,7 @@ static inline int cpu_halted(CPUState *env) {
>  	if (!env->halted)
>  		return 0;
>  
> -	/* IRQ, NMI and GURU execeptions wakes us up.  */
> -	if (env->interrupt_request
> -	    & (CPU_INTERRUPT_HARD | CPU_INTERRUPT_NMI)) {
> +	if (cpu_has_work(env)) {
>  		env->halted = 0;
>  		return 0;
>  	}
> diff --git a/target-microblaze/exec.h b/target-microblaze/exec.h
> index 87b2494..ab19828 100644
> --- a/target-microblaze/exec.h
> +++ b/target-microblaze/exec.h
> @@ -36,9 +36,7 @@ static inline int cpu_halted(CPUState *env) {
>  	if (!env->halted)
>  		return 0;
>  
> -	/* IRQ, NMI and GURU execeptions wakes us up.  */
> -	if (env->interrupt_request
> -	    & (CPU_INTERRUPT_HARD | CPU_INTERRUPT_NMI)) {
> +	if (cpu_has_work(env)) {
>  		env->halted = 0;
>  		return 0;
>  	}
> -- 
> 1.7.3.5
> 
> 
>

Patch

diff --git a/target-cris/exec.h b/target-cris/exec.h
index 93ce768..34c0132 100644
--- a/target-cris/exec.h
+++ b/target-cris/exec.h
@@ -37,9 +37,7 @@  static inline int cpu_halted(CPUState *env) {
 	if (!env->halted)
 		return 0;
 
-	/* IRQ, NMI and GURU execeptions wakes us up.  */
-	if (env->interrupt_request
-	    & (CPU_INTERRUPT_HARD | CPU_INTERRUPT_NMI)) {
+	if (cpu_has_work(env)) {
 		env->halted = 0;
 		return 0;
 	}
diff --git a/target-microblaze/exec.h b/target-microblaze/exec.h
index 87b2494..ab19828 100644
--- a/target-microblaze/exec.h
+++ b/target-microblaze/exec.h
@@ -36,9 +36,7 @@  static inline int cpu_halted(CPUState *env) {
 	if (!env->halted)
 		return 0;
 
-	/* IRQ, NMI and GURU execeptions wakes us up.  */
-	if (env->interrupt_request
-	    & (CPU_INTERRUPT_HARD | CPU_INTERRUPT_NMI)) {
+	if (cpu_has_work(env)) {
 		env->halted = 0;
 		return 0;
 	}