lkml.org 
[lkml]   [2011]   [Jul]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH] x86, ioapic: Clean up ioapic/apic_id usage
On Thu, Jul 14, 2011 at 9:31 AM, Yinghai Lu <yinghai@kernel.org> wrote:
>
> While checking irte dump in dmesg, the print out is confused ioapic index
> and real io apic id.
>
> IOAPIC[0]: Set routing entry (1-1 -> 0x31 -> IRQ 1 Mode:0 Active:0 Dest:1)
> IOAPIC[1]: Set IRTE entry (P:1 FPD:0 Dst_Mode:1 Redir_hint:1 Trig_Mode:0 Dlvry_Mode:1 Avail:0 Vector:31 Dest:00000001 SID:00FF SQ:0 SVT:1)
> IOAPIC[0]: Set routing entry (1-2 -> 0x30 -> IRQ 0 Mode:0 Active:0 Dest:1)
> IOAPIC[1]: Set IRTE entry (P:1 FPD:0 Dst_Mode:1 Redir_hint:1 Trig_Mode:0 Dlvry_Mode:1 Avail:0 Vector:30 Dest:00000001 SID:00FF SQ:0 SVT:1)
>
> The system first ioapic id is 1.
>
> While looking at the code, apic_id sometime is referred to index of ioapic, but
> sometime is used for real apic id. and some even use apic for real apic id.
> It is very confusing.
>
> So try to limit apic_id to be real apic id for ioapic.
> and use ioapic for ioapic index in the array.

It seems like this patch is doing two things at once, and it would be
easier to understand & review if they were split into separate
patches:

1) The code cleanup that renames parameters & local variables so
they're used consistently, but makes no difference in operation or
dmesg output.
2) The printk changes to fix the dmesg output.

Bjorn


\
 
 \ /
  Last update: 2011-07-15 17:43    [W:0.827 / U:0.428 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site