* [PATCH] IRQ: Fix trace bug introduced by c/s 23816:7f357e1ef60a
@ 2011-09-26 16:33 Andrew Cooper
2011-09-27 11:54 ` George Dunlap
0 siblings, 1 reply; 3+ messages in thread
From: Andrew Cooper @ 2011-09-26 16:33 UTC (permalink / raw)
To: xen-devel; +Cc: Andrew Cooper
c/s 23816:7f357e1ef60a introduces cfg->old_vector and removes a loop
as a result.
Outside the loop, 'vector' is set to cfg->vector, but the loop aliased
'vector' to mean cfg->old_vector at the point at which this TRACE_3D
is executed.
Therefore, when the loop was removed, the code still compiled, although
the trace would record incorrect information.
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
diff -r a422e2a4451e -r 88b8953f5f5a xen/arch/x86/irq.c
--- a/xen/arch/x86/irq.c Sun Sep 18 00:26:52 2011 +0100
+++ b/xen/arch/x86/irq.c Mon Sep 26 17:31:32 2011 +0100
@@ -235,7 +235,7 @@ static void __clear_irq_vector(int irq)
cpus_and(tmp_mask, cfg->old_cpu_mask, cpu_online_map);
for_each_cpu_mask(cpu, tmp_mask) {
ASSERT( per_cpu(vector_irq, cpu)[cfg->old_vector] == irq );
- TRACE_3D(TRC_HW_IRQ_MOVE_FINISH, irq, vector, cpu);
+ TRACE_3D(TRC_HW_IRQ_MOVE_FINISH, irq, cfg->old_vector, cpu);
per_cpu(vector_irq, cpu)[cfg->old_vector] = -1;
}
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] IRQ: Fix trace bug introduced by c/s 23816:7f357e1ef60a
2011-09-26 16:33 [PATCH] IRQ: Fix trace bug introduced by c/s 23816:7f357e1ef60a Andrew Cooper
@ 2011-09-27 11:54 ` George Dunlap
2011-09-28 13:41 ` George Dunlap
0 siblings, 1 reply; 3+ messages in thread
From: George Dunlap @ 2011-09-27 11:54 UTC (permalink / raw)
To: Andrew Cooper; +Cc: xen-devel
Acked-by: George Dunlap <george.dunlap@eu.citrix.com>
On Mon, Sep 26, 2011 at 5:33 PM, Andrew Cooper
<andrew.cooper3@citrix.com> wrote:
> c/s 23816:7f357e1ef60a introduces cfg->old_vector and removes a loop
> as a result.
>
> Outside the loop, 'vector' is set to cfg->vector, but the loop aliased
> 'vector' to mean cfg->old_vector at the point at which this TRACE_3D
> is executed.
>
> Therefore, when the loop was removed, the code still compiled, although
> the trace would record incorrect information.
>
> Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
>
> diff -r a422e2a4451e -r 88b8953f5f5a xen/arch/x86/irq.c
> --- a/xen/arch/x86/irq.c Sun Sep 18 00:26:52 2011 +0100
> +++ b/xen/arch/x86/irq.c Mon Sep 26 17:31:32 2011 +0100
> @@ -235,7 +235,7 @@ static void __clear_irq_vector(int irq)
> cpus_and(tmp_mask, cfg->old_cpu_mask, cpu_online_map);
> for_each_cpu_mask(cpu, tmp_mask) {
> ASSERT( per_cpu(vector_irq, cpu)[cfg->old_vector] == irq );
> - TRACE_3D(TRC_HW_IRQ_MOVE_FINISH, irq, vector, cpu);
> + TRACE_3D(TRC_HW_IRQ_MOVE_FINISH, irq, cfg->old_vector, cpu);
> per_cpu(vector_irq, cpu)[cfg->old_vector] = -1;
> }
>
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xensource.com
> http://lists.xensource.com/xen-devel
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] IRQ: Fix trace bug introduced by c/s 23816:7f357e1ef60a
2011-09-27 11:54 ` George Dunlap
@ 2011-09-28 13:41 ` George Dunlap
0 siblings, 0 replies; 3+ messages in thread
From: George Dunlap @ 2011-09-28 13:41 UTC (permalink / raw)
To: Andrew Cooper; +Cc: xen-devel, Keir Fraser
Sorry, NACK-ing this for now, since it hasn't been applied, and I'm
about to post a patch that subsumes it.
-George
On Tue, Sep 27, 2011 at 12:54 PM, George Dunlap
<George.Dunlap@eu.citrix.com> wrote:
> Acked-by: George Dunlap <george.dunlap@eu.citrix.com>
>
> On Mon, Sep 26, 2011 at 5:33 PM, Andrew Cooper
> <andrew.cooper3@citrix.com> wrote:
>> c/s 23816:7f357e1ef60a introduces cfg->old_vector and removes a loop
>> as a result.
>>
>> Outside the loop, 'vector' is set to cfg->vector, but the loop aliased
>> 'vector' to mean cfg->old_vector at the point at which this TRACE_3D
>> is executed.
>>
>> Therefore, when the loop was removed, the code still compiled, although
>> the trace would record incorrect information.
>>
>> Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
>>
>> diff -r a422e2a4451e -r 88b8953f5f5a xen/arch/x86/irq.c
>> --- a/xen/arch/x86/irq.c Sun Sep 18 00:26:52 2011 +0100
>> +++ b/xen/arch/x86/irq.c Mon Sep 26 17:31:32 2011 +0100
>> @@ -235,7 +235,7 @@ static void __clear_irq_vector(int irq)
>> cpus_and(tmp_mask, cfg->old_cpu_mask, cpu_online_map);
>> for_each_cpu_mask(cpu, tmp_mask) {
>> ASSERT( per_cpu(vector_irq, cpu)[cfg->old_vector] == irq );
>> - TRACE_3D(TRC_HW_IRQ_MOVE_FINISH, irq, vector, cpu);
>> + TRACE_3D(TRC_HW_IRQ_MOVE_FINISH, irq, cfg->old_vector, cpu);
>> per_cpu(vector_irq, cpu)[cfg->old_vector] = -1;
>> }
>>
>>
>> _______________________________________________
>> Xen-devel mailing list
>> Xen-devel@lists.xensource.com
>> http://lists.xensource.com/xen-devel
>>
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2011-09-28 13:41 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-09-26 16:33 [PATCH] IRQ: Fix trace bug introduced by c/s 23816:7f357e1ef60a Andrew Cooper
2011-09-27 11:54 ` George Dunlap
2011-09-28 13:41 ` George Dunlap
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.