Commit c4848112 authored by Pete Zaitcev's avatar Pete Zaitcev Committed by David S. Miller

[SPARC]: Kill remaining remnants of kgdb support.

parent c4bde5d7
......@@ -13,7 +13,7 @@ export-objs := sparc_ksyms.o
IRQ_OBJS := irq.o sun4m_irq.o sun4c_irq.o sun4d_irq.o
obj-y := entry.o wof.o wuf.o etrap.o rtrap.o traps.o ${IRQ_OBJS} \
process.o signal.o ioport.o setup.o idprom.o \
sys_sparc.o sunos_asm.o sparc-stub.o systbls.o \
sys_sparc.o sunos_asm.o systbls.o \
time.o windows.o cpu.o devices.o sclow.o \
tadpole.o tick14.o ptrace.o sys_solaris.o \
unaligned.o muldiv.o pcic.o semaphore.o sparc_ksyms.o
......
......@@ -53,6 +53,7 @@ in_trap_handler:
.text
.align 4
#if 0 /* kgdb is dropped from 2.5.33 */
! This function is called when any SPARC trap (except window overflow or
! underflow) occurs. It makes sure that the invalid register window is still
! available before jumping into C code. It will also restore the world if you
......@@ -119,7 +120,7 @@ C_LABEL(trap_low):
STORE_PT_PRIV(sp, l0, l1, l2)
RESTORE_ALL
#endif
#ifdef CONFIG_BLK_DEV_FD
.text
......
......@@ -34,7 +34,6 @@
#include <asm/segment.h>
#include <asm/system.h>
#include <asm/io.h>
#include <asm/kgdb.h>
#include <asm/processor.h>
#include <asm/oplib.h>
#include <asm/page.h>
......@@ -67,8 +66,6 @@ struct screen_info screen_info = {
*/
extern unsigned long trapbase;
extern int serial_console;
extern void breakpoint(void);
void (*prom_palette)(int);
asmlinkage void sys_sync(void); /* it's really int */
......@@ -105,28 +102,15 @@ void prom_sync_me(void)
return;
}
extern void rs_kgdb_hook(int tty_num); /* sparc/serial.c */
unsigned int boot_flags __initdata = 0;
#define BOOTME_DEBUG 0x1
#define BOOTME_SINGLE 0x2
#define BOOTME_KGDBA 0x4
#define BOOTME_KGDBB 0x8
#define BOOTME_KGDB 0xc
static int console_fb __initdata = 0;
/* Exported for mm/init.c:paging_init. */
unsigned long cmdline_memory_size __initdata = 0;
void kernel_enter_debugger(void)
{
if (boot_flags & BOOTME_KGDB) {
printk("KGDB: Entered\n");
breakpoint();
}
}
static void
prom_console_write(struct console *con, const char *s, unsigned n)
{
......@@ -142,11 +126,6 @@ static struct console prom_debug_console = {
int obp_system_intr(void)
{
if (boot_flags & BOOTME_KGDB) {
printk("KGDB: system interrupted\n");
breakpoint();
return 1;
}
if (boot_flags & BOOTME_DEBUG) {
printk("OBP: system interrupted\n");
prom_halt();
......@@ -196,24 +175,6 @@ static void __init boot_flags_init(char *commands)
commands++;
while (*commands && *commands != ' ')
process_switch(*commands++);
} else if (strlen(commands) >= 9
&& !strncmp(commands, "kgdb=tty", 8)) {
switch (commands[8]) {
#ifdef CONFIG_SUN_SERIAL
case 'a':
boot_flags |= BOOTME_KGDBA;
prom_printf("KGDB: Using serial line /dev/ttya.\n");
break;
case 'b':
boot_flags |= BOOTME_KGDBB;
prom_printf("KGDB: Using serial line /dev/ttyb.\n");
break;
#endif
default:
printk("KGDB: Unknown tty line.\n");
break;
}
commands += 9;
} else {
if (!strncmp(commands, "console=", 8)) {
commands += 8;
......@@ -413,23 +374,11 @@ void __init setup_arch(char **cmdline_p)
#endif
}
if ((boot_flags & BOOTME_KGDBA)) {
rs_kgdb_hook(0);
}
if ((boot_flags & BOOTME_KGDBB)) {
rs_kgdb_hook(1);
}
if((boot_flags&BOOTME_DEBUG) && (linux_dbvec!=0) &&
((*(short *)linux_dbvec) != -1)) {
printk("Booted under KADB. Syncing trap table.\n");
(*(linux_dbvec->teach_debugger))();
}
if((boot_flags & BOOTME_KGDB)) {
set_debug_traps();
prom_printf ("Breakpoint!\n");
breakpoint();
}
init_mm.context = (unsigned long) NO_CONTEXT;
init_task.thread.kregs = &fake_swapper_regs;
......
......@@ -188,22 +188,16 @@ static inline void copy_ttentry(struct tt_entry *src, struct tt_entry *dest)
/* Initialize the kgdb_savettable so that debugging can commence */
static void eh_init(void)
{
int i, flags;
int i;
save_and_cli(flags);
for(i=0; i < 256; i++)
copy_ttentry(&sparc_ttable[i], &kgdb_savettable[i]);
restore_flags(flags);
}
/* Install an exception handler for kgdb */
static void exceptionHandler(int tnum, trapfunc_t trap_entry)
{
unsigned long te_addr = (unsigned long) trap_entry;
int flags;
/* We are dorking with a live trap table, all irqs off */
save_and_cli(flags);
/* Make new vector */
sparc_ttable[tnum].inst_one =
......@@ -212,8 +206,6 @@ static void exceptionHandler(int tnum, trapfunc_t trap_entry)
sparc_ttable[tnum].inst_two = SPARC_RD_PSR_L0;
sparc_ttable[tnum].inst_three = SPARC_NOP;
sparc_ttable[tnum].inst_four = SPARC_NOP;
restore_flags(flags);
}
/* Convert ch from a hex digit to an int */
......@@ -406,7 +398,7 @@ set_debug_traps(void)
struct hard_trap_info *ht;
unsigned long flags;
save_and_cli(flags);
local_irq_save(flags);
#if 0
/* Have to sort this out. This cannot be done after initialization. */
BTFIXUPSET_CALL(flush_cache_all, flush_cache_all_nop, BTFIXUPCALL_NOP);
......@@ -438,7 +430,7 @@ set_debug_traps(void)
#endif
initialized = 1; /* connect! */
restore_flags(flags);
local_irq_restore(flags);
}
/* Convert the SPARC hardware trap type code to a unix signal number. */
......
......@@ -382,13 +382,6 @@ static void sunzilog_receive_chars(struct uart_sunzilog_port *up,
sun_do_break();
return;
}
#ifndef CONFIG_SPARC64
/* Look for kgdb 'stop' character. */
if (ZS_IS_KGDB(up) && (ch == '\003')) {
breakpoint();
return;
}
#endif
/* A real serial line, record the character and status. */
*tty->flip.char_buf_ptr = ch;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment