kgdb: remove post_primary_code references
[sfrench/cifs-2.6.git] / arch / x86 / kernel / kgdb.c
index b2258ca9100349c2618d00e4aadf8c7cdd62bb26..acba57169938e5f786d30b0a4d7f44ec3e134e20 100644 (file)
 #include <asm/debugreg.h>
 #include <asm/apicdef.h>
 #include <asm/system.h>
-
 #include <asm/apic.h>
 
-/*
- * Put the error code here just in case the user cares:
- */
-static int gdb_x86errcode;
-
-/*
- * Likewise, the vector number here (since GDB only gets the signal
- * number through the usual means, and that's not very specific):
- */
-static int gdb_x86vector = -1;
-
 /**
  *     pt_regs_to_gdb_regs - Convert ptrace regs to GDB regs
  *     @gdb_regs: A pointer to hold the registers in the order GDB wants.
@@ -399,23 +387,6 @@ void kgdb_disable_hw_debug(struct pt_regs *regs)
        }
 }
 
-/**
- *     kgdb_post_primary_code - Save error vector/code numbers.
- *     @regs: Original pt_regs.
- *     @e_vector: Original error vector.
- *     @err_code: Original error code.
- *
- *     This is needed on architectures which support SMP and KGDB.
- *     This function is called after all the slave cpus have been put
- *     to a know spin state and the primary CPU has control over KGDB.
- */
-void kgdb_post_primary_code(struct pt_regs *regs, int e_vector, int err_code)
-{
-       /* primary processor is completely in the debugger */
-       gdb_x86vector = e_vector;
-       gdb_x86errcode = err_code;
-}
-
 #ifdef CONFIG_SMP
 /**
  *     kgdb_roundup_cpus - Get other CPUs into a holding pattern
@@ -690,6 +661,11 @@ unsigned long kgdb_arch_pc(int exception, struct pt_regs *regs)
        return instruction_pointer(regs);
 }
 
+void kgdb_arch_set_pc(struct pt_regs *regs, unsigned long ip)
+{
+       regs->ip = ip;
+}
+
 struct kgdb_arch arch_kgdb_ops = {
        /* Breakpoint instruction: */
        .gdb_bpt_instr          = { 0xcc },