kdb
[Top] [All Lists]

Re: A small fix.

To: Keith Owens <kaos@xxxxxxx>
Subject: Re: A small fix.
From: Matthew Dobson <colpatch@xxxxxxxxxx>
Date: Thu, 27 Jun 2002 11:51:36 -0700
Cc: kdb@xxxxxxxxxxx, Michael Hohnbaum <hbaum@xxxxxxxxxx>, Patricia Gaughen <gone@xxxxxxxxxx>
Organization: IBM LTC
References: <13281.1025057571@kao2.melbourne.sgi.com>
Reply-to: colpatch@xxxxxxxxxx
Sender: owner-kdb@xxxxxxxxxxx
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.0) Gecko/20020607
Keith Owens wrote:
On Tue, 25 Jun 2002 17:24:00 -0700, Matthew Dobson <colpatch@xxxxxxxxxx> wrote:

This patch gets stack backtracing to work
That patch is fine.
Great!

diff -Nur linux-2.5.9-van+kdb/arch/i386/kernel/smp.c linux-2.5.9-kdb/arch/i386/kernel/smp.c
--- linux-2.5.9-van+kdb/arch/i386/kernel/smp.c Mon Jun 24 11:33:51 2002
+++ linux-2.5.9-kdb/arch/i386/kernel/smp.c Tue Jun 11 13:59:47 2002
@@ -236,7 +237,15 @@
* program the ICR */
cfg = __prepare_ICR(0, vector);
-
+
+#ifdef CONFIG_KDB
+ if (vector == KDB_VECTOR) {
+ /*
+ * Setup KDB IPI to be delivered as an NMI
+ */
+ cfg = (cfg&~APIC_VECTOR_MASK)|APIC_DM_NMI;
+ }
+#endif /* CONFIG_KDB */
/*
* Send the IPI. The write to APIC_ICR fires this off.
*/


There are three calls to __prepare_ICR() in smp.c.  kdb already patches
__send_IPI_shortcut(), your patch updates send_IPI_mask_sequence.  What
about send_IPI_mask_bitmask, does that need to be tweaked as well?
I'm not sure. My guess would be yes, since all the rest needed a tweak. The only thing is, send_IPI_mask_bitmask is only called via send_IPI_mask, when we're not in clustered_apic_mode. This case only occurs in flush_tlb_others and smp_send_reschedule... I'm not 100% sure, but I don't think KDB is sending any vectors though those call paths? If that's the case then it can be left alone. I know for our hardware, we're operating in clustered_apic_mode, so send_IPI_mask_bitmask should never be called.

Cheers!

-Matt


<Prev in Thread] Current Thread [Next in Thread>