Re: [PATCH][2.6.8-rc1-mm1] decode local APIC errors

From: Mikael Pettersson
Date: Tue Jul 27 2004 - 15:41:05 EST


On Tue, 27 Jul 2004 20:21:34 +0200 (CEST), Mikael Pettersson wrote:
>On Tue, 27 Jul 2004, Mikael Pettersson wrote:
>
>> I got tired of having to manually decode local APIC
>> error codes in problem reports sent to LKML, so I
>> rewrote arch/i386/kernel/apic:smp_error_interrupt()
>> to do the decoding for us. Instead of:
>>
>> APIC error on CPU0: 04(00)
>>
>> this patch makes the kernel print:
>>
>> APIC error on CPU0: Send Accept Error (0x00)
>>
>> The code handles multiple set error flags, and will
>> also report if any unknown or reserved bits are set.
>
> Hmm, no objection in principle, but calling printk() for a string that
>does not end with a trailing '\n' leads to log being messed up if another
>message is placed from elsewhere inbetween. Using sprintf() to construct
>the message may be an unnecessary complication, though.

You're right, separate printk()s don't work, and formatting the
text to a buffer gets into other problems(*).

Andrew, please feel free to toss my crappy patch in /dev/null...

(*) A static buffer needs locking, but an on-stack
buffer needs to be small, requiring shortened flag names,
making the error messages unreadable again. Sigh.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/