diff mbox

[02/33] gdbserver: Don't deliver TIMER interrupts when SSTEP_NOIRQ either.

Message ID 1304023875-25040-3-git-send-email-rth@twiddle.net
State New
Headers show

Commit Message

Richard Henderson April 28, 2011, 8:50 p.m. UTC
This would affect Sparc as well.

Signed-off-by: Richard Henderson <rth@twiddle.net>
Cc: Blue Swirl <blauwirbel@gmail.com>
---
 cpu-exec.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

Comments

Blue Swirl April 29, 2011, 8:53 p.m. UTC | #1
On Thu, Apr 28, 2011 at 11:50 PM, Richard Henderson <rth@twiddle.net> wrote:
> This would affect Sparc as well.
>
> Signed-off-by: Richard Henderson <rth@twiddle.net>
> Cc: Blue Swirl <blauwirbel@gmail.com>
> ---
>  cpu-exec.c |    1 +
>  1 files changed, 1 insertions(+), 0 deletions(-)
>
> diff --git a/cpu-exec.c b/cpu-exec.c
> index 395cd8c..e1b85d6 100644
> --- a/cpu-exec.c
> +++ b/cpu-exec.c
> @@ -361,6 +361,7 @@ int cpu_exec(CPUState *env1)
>                     if (unlikely(env->singlestep_enabled & SSTEP_NOIRQ)) {
>                         /* Mask out external interrupts for this step. */
>                         interrupt_request &= ~(CPU_INTERRUPT_HARD |
> +                                               CPU_INTERRUPT_TIMER |

Grepping for CPU_INTERRUPT_TIMER shows that the flag isn't ever set,
only cleared or checked. How
about removing the flag instead?
Richard Henderson April 29, 2011, 10:39 p.m. UTC | #2
On 04/29/2011 01:53 PM, Blue Swirl wrote:
>> +                                               CPU_INTERRUPT_TIMER |
> 
> Grepping for CPU_INTERRUPT_TIMER shows that the flag isn't ever set,
> only cleared or checked. How
> about removing the flag instead?

Certainly Sparc and MIPS shouldn't check it if they don't set it.

For Alpha, I do want to easily discriminate between device, timer,
and inter-processor interrupts.  I'm currently (ab)using the i386
CPU_INTERRUPT_SMI name for the IPI; I could abuse, say, FIQ for
my timer bit, but it seems nicer to simply keep the TIMER name.


r~
Blue Swirl April 30, 2011, 6:35 a.m. UTC | #3
On Sat, Apr 30, 2011 at 1:39 AM, Richard Henderson <rth@twiddle.net> wrote:
> On 04/29/2011 01:53 PM, Blue Swirl wrote:
>>> +                                               CPU_INTERRUPT_TIMER |
>>
>> Grepping for CPU_INTERRUPT_TIMER shows that the flag isn't ever set,
>> only cleared or checked. How
>> about removing the flag instead?
>
> Certainly Sparc and MIPS shouldn't check it if they don't set it.

It's not used by any architecture now.

> For Alpha, I do want to easily discriminate between device, timer,
> and inter-processor interrupts.  I'm currently (ab)using the i386
> CPU_INTERRUPT_SMI name for the IPI; I could abuse, say, FIQ for
> my timer bit, but it seems nicer to simply keep the TIMER name.

Since Alpha would be the first user, you can even rename it if you like.
diff mbox

Patch

diff --git a/cpu-exec.c b/cpu-exec.c
index 395cd8c..e1b85d6 100644
--- a/cpu-exec.c
+++ b/cpu-exec.c
@@ -361,6 +361,7 @@  int cpu_exec(CPUState *env1)
                     if (unlikely(env->singlestep_enabled & SSTEP_NOIRQ)) {
                         /* Mask out external interrupts for this step. */
                         interrupt_request &= ~(CPU_INTERRUPT_HARD |
+                                               CPU_INTERRUPT_TIMER |
                                                CPU_INTERRUPT_FIQ |
                                                CPU_INTERRUPT_SMI |
                                                CPU_INTERRUPT_NMI);