Re: [patch 1/1] x86_64: Rename KDB_VECTOR to DEBUGGER_VECTOR

2005-08-08 Thread Keith Owens
On Tue, 9 Aug 2005 01:16:37 +0200, 
Andi Kleen <[EMAIL PROTECTED]> wrote:
>On Tue, Aug 09, 2005 at 09:14:52AM +1000, Keith Owens wrote:
>> On Mon, 8 Aug 2005 21:28:50 +0200, 
>> Andi Kleen <[EMAIL PROTECTED]> wrote:
>> >On Mon, Aug 08, 2005 at 12:27:10PM -0700, Tom Rini wrote:
>> >>  {
>> >>   unsigned int icr =  APIC_DM_FIXED | shortcut | vector | dest;
>> >> - if (vector == KDB_VECTOR)
>> >> + if (vector == NMI_VECTOR)
>> >>   icr = (icr & (~APIC_VECTOR_MASK)) | APIC_DM_NMI;
>> >
>> >That if () should be removed since it's useless.
>> >Can you do that please?
>> 
>> Why is 'if ()' useless?  Remove the if test and all ipis get sent as
>> NMI, we definitely do not want that.
>
>The if () with its following line. The same result can be gotten
>by passing suitable arguments.

Arguments to what?  The path for sending the NMI_VECTOR is
send_IPI_allbutself -> {cluster,flat,physflat}_send_IPI_allbutself ->
{__send_IPI_shortcut, physflat_send_IPI_mask, cluster_send_IPI_mask} ->
send_IPI_mask_sequence -> __prepare_ICR.

Pushing the check for NMI_VECTOR any higher than __prepare_ICR needs
multiple tests for NMI_VECTOR.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [patch 1/1] x86_64: Rename KDB_VECTOR to DEBUGGER_VECTOR

2005-08-08 Thread Andi Kleen
On Tue, Aug 09, 2005 at 09:14:52AM +1000, Keith Owens wrote:
> On Mon, 8 Aug 2005 21:28:50 +0200, 
> Andi Kleen <[EMAIL PROTECTED]> wrote:
> >On Mon, Aug 08, 2005 at 12:27:10PM -0700, Tom Rini wrote:
> >>  {
> >>unsigned int icr =  APIC_DM_FIXED | shortcut | vector | dest;
> >> -  if (vector == KDB_VECTOR)
> >> +  if (vector == NMI_VECTOR)
> >>icr = (icr & (~APIC_VECTOR_MASK)) | APIC_DM_NMI;
> >
> >That if () should be removed since it's useless.
> >Can you do that please?
> 
> Why is 'if ()' useless?  Remove the if test and all ipis get sent as
> NMI, we definitely do not want that.

The if () with its following line. The same result can be gotten
by passing suitable arguments.

-Andi
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [patch 1/1] x86_64: Rename KDB_VECTOR to DEBUGGER_VECTOR

2005-08-08 Thread Keith Owens
On Mon, 8 Aug 2005 21:28:50 +0200, 
Andi Kleen <[EMAIL PROTECTED]> wrote:
>On Mon, Aug 08, 2005 at 12:27:10PM -0700, Tom Rini wrote:
>>  {
>>  unsigned int icr =  APIC_DM_FIXED | shortcut | vector | dest;
>> -if (vector == KDB_VECTOR)
>> +if (vector == NMI_VECTOR)
>>  icr = (icr & (~APIC_VECTOR_MASK)) | APIC_DM_NMI;
>
>That if () should be removed since it's useless.
>Can you do that please?

Why is 'if ()' useless?  Remove the if test and all ipis get sent as
NMI, we definitely do not want that.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [patch 1/1] x86_64: Rename KDB_VECTOR to DEBUGGER_VECTOR

2005-08-08 Thread Andi Kleen
On Mon, Aug 08, 2005 at 12:27:10PM -0700, Tom Rini wrote:
>  {
>   unsigned int icr =  APIC_DM_FIXED | shortcut | vector | dest;
> - if (vector == KDB_VECTOR)
> + if (vector == NMI_VECTOR)
>   icr = (icr & (~APIC_VECTOR_MASK)) | APIC_DM_NMI;

That if () should be removed since it's useless.
Can you do that please?

-Andi
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[patch 1/1] x86_64: Rename KDB_VECTOR to DEBUGGER_VECTOR

2005-08-08 Thread Tom Rini

CC: Andi Kleen <[EMAIL PROTECTED]>, Keith Owens <[EMAIL PROTECTED]>
The existing hook from KDB in the IPI code is really just a hook for the
NMI vector.  We rename the vector thusly and then it's up to the
debugger to handle things from default_do_nmi().

---

 linux-2.6.13-rc6-trini/arch/x86_64/kernel/i8259.c  |2 +-
 linux-2.6.13-rc6-trini/arch/x86_64/kernel/smp.c|2 +-
 linux-2.6.13-rc6-trini/arch/x86_64/kernel/traps.c  |2 +-
 linux-2.6.13-rc6-trini/include/asm-x86_64/hw_irq.h |2 +-
 linux-2.6.13-rc6-trini/include/asm-x86_64/ipi.h|2 +-
 5 files changed, 5 insertions(+), 5 deletions(-)

diff -puN arch/x86_64/kernel/i8259.c~x86_64-rename_kdb_vector 
arch/x86_64/kernel/i8259.c
--- linux-2.6.13-rc6/arch/x86_64/kernel/i8259.c~x86_64-rename_kdb_vector
2005-08-08 12:22:37.0 -0700
+++ linux-2.6.13-rc6-trini/arch/x86_64/kernel/i8259.c   2005-08-08 
12:22:37.0 -0700
@@ -544,7 +544,7 @@ void __init init_IRQ(void)
int vector = FIRST_EXTERNAL_VECTOR + i;
if (i >= NR_IRQS)
break;
-   if (vector != IA32_SYSCALL_VECTOR && vector != KDB_VECTOR) { 
+   if (vector != IA32_SYSCALL_VECTOR && vector != NMI_VECTOR) {
set_intr_gate(vector, interrupt[i]);
}
}
diff -puN arch/x86_64/kernel/smp.c~x86_64-rename_kdb_vector 
arch/x86_64/kernel/smp.c
--- linux-2.6.13-rc6/arch/x86_64/kernel/smp.c~x86_64-rename_kdb_vector  
2005-08-08 12:22:37.0 -0700
+++ linux-2.6.13-rc6-trini/arch/x86_64/kernel/smp.c 2005-08-08 
12:22:37.0 -0700
@@ -252,7 +252,7 @@ void flush_tlb_all(void)
 
 void smp_kdb_stop(void)
 {
-   send_IPI_allbutself(KDB_VECTOR);
+   send_IPI_allbutself(NMI_VECTOR);
 }
 
 /*
diff -puN arch/x86_64/kernel/traps.c~x86_64-rename_kdb_vector 
arch/x86_64/kernel/traps.c
--- linux-2.6.13-rc6/arch/x86_64/kernel/traps.c~x86_64-rename_kdb_vector
2005-08-08 12:22:37.0 -0700
+++ linux-2.6.13-rc6-trini/arch/x86_64/kernel/traps.c   2005-08-08 
12:22:37.0 -0700
@@ -931,7 +931,7 @@ void __init trap_init(void)
set_system_gate(IA32_SYSCALL_VECTOR, ia32_syscall);
 #endif

-   set_intr_gate(KDB_VECTOR, call_debug);
+   set_intr_gate(NMI_VECTOR, call_debug);

/*
 * Should be a barrier for any external CPU state.
diff -puN include/asm-x86_64/hw_irq.h~x86_64-rename_kdb_vector 
include/asm-x86_64/hw_irq.h
--- linux-2.6.13-rc6/include/asm-x86_64/hw_irq.h~x86_64-rename_kdb_vector   
2005-08-08 12:22:37.0 -0700
+++ linux-2.6.13-rc6-trini/include/asm-x86_64/hw_irq.h  2005-08-08 
12:22:37.0 -0700
@@ -54,7 +54,7 @@ struct hw_interrupt_type;
 #define RESCHEDULE_VECTOR  0xfc
 #define TASK_MIGRATION_VECTOR  0xfb
 #define CALL_FUNCTION_VECTOR   0xfa
-#define KDB_VECTOR 0xf9
+#define NMI_VECTOR 0xf9
 
 #define THERMAL_APIC_VECTOR0xf0
 
diff -puN include/asm-x86_64/ipi.h~x86_64-rename_kdb_vector 
include/asm-x86_64/ipi.h
--- linux-2.6.13-rc6/include/asm-x86_64/ipi.h~x86_64-rename_kdb_vector  
2005-08-08 12:22:37.0 -0700
+++ linux-2.6.13-rc6-trini/include/asm-x86_64/ipi.h 2005-08-08 
12:22:37.0 -0700
@@ -32,7 +32,7 @@
 static inline unsigned int __prepare_ICR (unsigned int shortcut, int vector, 
unsigned int dest)
 {
unsigned int icr =  APIC_DM_FIXED | shortcut | vector | dest;
-   if (vector == KDB_VECTOR)
+   if (vector == NMI_VECTOR)
icr = (icr & (~APIC_VECTOR_MASK)) | APIC_DM_NMI;
return icr;
 }
_
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[patch 1/1] x86_64: Rename KDB_VECTOR to DEBUGGER_VECTOR

2005-08-08 Thread Tom Rini

CC: Andi Kleen [EMAIL PROTECTED], Keith Owens [EMAIL PROTECTED]
The existing hook from KDB in the IPI code is really just a hook for the
NMI vector.  We rename the vector thusly and then it's up to the
debugger to handle things from default_do_nmi().

---

 linux-2.6.13-rc6-trini/arch/x86_64/kernel/i8259.c  |2 +-
 linux-2.6.13-rc6-trini/arch/x86_64/kernel/smp.c|2 +-
 linux-2.6.13-rc6-trini/arch/x86_64/kernel/traps.c  |2 +-
 linux-2.6.13-rc6-trini/include/asm-x86_64/hw_irq.h |2 +-
 linux-2.6.13-rc6-trini/include/asm-x86_64/ipi.h|2 +-
 5 files changed, 5 insertions(+), 5 deletions(-)

diff -puN arch/x86_64/kernel/i8259.c~x86_64-rename_kdb_vector 
arch/x86_64/kernel/i8259.c
--- linux-2.6.13-rc6/arch/x86_64/kernel/i8259.c~x86_64-rename_kdb_vector
2005-08-08 12:22:37.0 -0700
+++ linux-2.6.13-rc6-trini/arch/x86_64/kernel/i8259.c   2005-08-08 
12:22:37.0 -0700
@@ -544,7 +544,7 @@ void __init init_IRQ(void)
int vector = FIRST_EXTERNAL_VECTOR + i;
if (i = NR_IRQS)
break;
-   if (vector != IA32_SYSCALL_VECTOR  vector != KDB_VECTOR) { 
+   if (vector != IA32_SYSCALL_VECTOR  vector != NMI_VECTOR) {
set_intr_gate(vector, interrupt[i]);
}
}
diff -puN arch/x86_64/kernel/smp.c~x86_64-rename_kdb_vector 
arch/x86_64/kernel/smp.c
--- linux-2.6.13-rc6/arch/x86_64/kernel/smp.c~x86_64-rename_kdb_vector  
2005-08-08 12:22:37.0 -0700
+++ linux-2.6.13-rc6-trini/arch/x86_64/kernel/smp.c 2005-08-08 
12:22:37.0 -0700
@@ -252,7 +252,7 @@ void flush_tlb_all(void)
 
 void smp_kdb_stop(void)
 {
-   send_IPI_allbutself(KDB_VECTOR);
+   send_IPI_allbutself(NMI_VECTOR);
 }
 
 /*
diff -puN arch/x86_64/kernel/traps.c~x86_64-rename_kdb_vector 
arch/x86_64/kernel/traps.c
--- linux-2.6.13-rc6/arch/x86_64/kernel/traps.c~x86_64-rename_kdb_vector
2005-08-08 12:22:37.0 -0700
+++ linux-2.6.13-rc6-trini/arch/x86_64/kernel/traps.c   2005-08-08 
12:22:37.0 -0700
@@ -931,7 +931,7 @@ void __init trap_init(void)
set_system_gate(IA32_SYSCALL_VECTOR, ia32_syscall);
 #endif

-   set_intr_gate(KDB_VECTOR, call_debug);
+   set_intr_gate(NMI_VECTOR, call_debug);

/*
 * Should be a barrier for any external CPU state.
diff -puN include/asm-x86_64/hw_irq.h~x86_64-rename_kdb_vector 
include/asm-x86_64/hw_irq.h
--- linux-2.6.13-rc6/include/asm-x86_64/hw_irq.h~x86_64-rename_kdb_vector   
2005-08-08 12:22:37.0 -0700
+++ linux-2.6.13-rc6-trini/include/asm-x86_64/hw_irq.h  2005-08-08 
12:22:37.0 -0700
@@ -54,7 +54,7 @@ struct hw_interrupt_type;
 #define RESCHEDULE_VECTOR  0xfc
 #define TASK_MIGRATION_VECTOR  0xfb
 #define CALL_FUNCTION_VECTOR   0xfa
-#define KDB_VECTOR 0xf9
+#define NMI_VECTOR 0xf9
 
 #define THERMAL_APIC_VECTOR0xf0
 
diff -puN include/asm-x86_64/ipi.h~x86_64-rename_kdb_vector 
include/asm-x86_64/ipi.h
--- linux-2.6.13-rc6/include/asm-x86_64/ipi.h~x86_64-rename_kdb_vector  
2005-08-08 12:22:37.0 -0700
+++ linux-2.6.13-rc6-trini/include/asm-x86_64/ipi.h 2005-08-08 
12:22:37.0 -0700
@@ -32,7 +32,7 @@
 static inline unsigned int __prepare_ICR (unsigned int shortcut, int vector, 
unsigned int dest)
 {
unsigned int icr =  APIC_DM_FIXED | shortcut | vector | dest;
-   if (vector == KDB_VECTOR)
+   if (vector == NMI_VECTOR)
icr = (icr  (~APIC_VECTOR_MASK)) | APIC_DM_NMI;
return icr;
 }
_
-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [patch 1/1] x86_64: Rename KDB_VECTOR to DEBUGGER_VECTOR

2005-08-08 Thread Andi Kleen
On Mon, Aug 08, 2005 at 12:27:10PM -0700, Tom Rini wrote:
  {
   unsigned int icr =  APIC_DM_FIXED | shortcut | vector | dest;
 - if (vector == KDB_VECTOR)
 + if (vector == NMI_VECTOR)
   icr = (icr  (~APIC_VECTOR_MASK)) | APIC_DM_NMI;

That if () should be removed since it's useless.
Can you do that please?

-Andi
-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [patch 1/1] x86_64: Rename KDB_VECTOR to DEBUGGER_VECTOR

2005-08-08 Thread Keith Owens
On Mon, 8 Aug 2005 21:28:50 +0200, 
Andi Kleen [EMAIL PROTECTED] wrote:
On Mon, Aug 08, 2005 at 12:27:10PM -0700, Tom Rini wrote:
  {
  unsigned int icr =  APIC_DM_FIXED | shortcut | vector | dest;
 -if (vector == KDB_VECTOR)
 +if (vector == NMI_VECTOR)
  icr = (icr  (~APIC_VECTOR_MASK)) | APIC_DM_NMI;

That if () should be removed since it's useless.
Can you do that please?

Why is 'if ()' useless?  Remove the if test and all ipis get sent as
NMI, we definitely do not want that.

-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [patch 1/1] x86_64: Rename KDB_VECTOR to DEBUGGER_VECTOR

2005-08-08 Thread Andi Kleen
On Tue, Aug 09, 2005 at 09:14:52AM +1000, Keith Owens wrote:
 On Mon, 8 Aug 2005 21:28:50 +0200, 
 Andi Kleen [EMAIL PROTECTED] wrote:
 On Mon, Aug 08, 2005 at 12:27:10PM -0700, Tom Rini wrote:
   {
 unsigned int icr =  APIC_DM_FIXED | shortcut | vector | dest;
  -  if (vector == KDB_VECTOR)
  +  if (vector == NMI_VECTOR)
 icr = (icr  (~APIC_VECTOR_MASK)) | APIC_DM_NMI;
 
 That if () should be removed since it's useless.
 Can you do that please?
 
 Why is 'if ()' useless?  Remove the if test and all ipis get sent as
 NMI, we definitely do not want that.

The if () with its following line. The same result can be gotten
by passing suitable arguments.

-Andi
-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [patch 1/1] x86_64: Rename KDB_VECTOR to DEBUGGER_VECTOR

2005-08-08 Thread Keith Owens
On Tue, 9 Aug 2005 01:16:37 +0200, 
Andi Kleen [EMAIL PROTECTED] wrote:
On Tue, Aug 09, 2005 at 09:14:52AM +1000, Keith Owens wrote:
 On Mon, 8 Aug 2005 21:28:50 +0200, 
 Andi Kleen [EMAIL PROTECTED] wrote:
 On Mon, Aug 08, 2005 at 12:27:10PM -0700, Tom Rini wrote:
   {
unsigned int icr =  APIC_DM_FIXED | shortcut | vector | dest;
  - if (vector == KDB_VECTOR)
  + if (vector == NMI_VECTOR)
icr = (icr  (~APIC_VECTOR_MASK)) | APIC_DM_NMI;
 
 That if () should be removed since it's useless.
 Can you do that please?
 
 Why is 'if ()' useless?  Remove the if test and all ipis get sent as
 NMI, we definitely do not want that.

The if () with its following line. The same result can be gotten
by passing suitable arguments.

Arguments to what?  The path for sending the NMI_VECTOR is
send_IPI_allbutself - {cluster,flat,physflat}_send_IPI_allbutself -
{__send_IPI_shortcut, physflat_send_IPI_mask, cluster_send_IPI_mask} -
send_IPI_mask_sequence - __prepare_ICR.

Pushing the check for NMI_VECTOR any higher than __prepare_ICR needs
multiple tests for NMI_VECTOR.

-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/