mips kgdb support rev 2
cover mips kgdb support rev 2
This is rev 2 of the kgdb support. Based on comments from Ralf, I elected to switch to die notification and entirely remove the trap_low, which was not getting dynamically unregistered in the first place after kgdb was unconfigured.
This greatly simplified the kgdb implementation for mips, and allowed for the deprecation of a couple more headers and a large chunk of assembly code.
Jason.
The following changes since commit 338b9bb3adac0d2c5a1e180491d9b001d624c402:
Linus Torvalds (1):
Merge branch 'x86/auditsc' of git://git.kernel.org/.../frob/linux-2.6-roland
are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/jwessel/linux-2.6-kgdb.git kgdb-next
Jason Wessel (2):
kgdb, mips: Remove existing kgdb implementation kgdb, mips: add arch support for the kernel's kgdb core
arch/mips/Kconfig | 7 +- arch/mips/Kconfig.debug | 22 - arch/mips/au1000/Kconfig | 1 - arch/mips/au1000/common/Makefile | 1 - arch/mips/au1000/common/dbg_io.c | 109 --- arch/mips/basler/excite/Makefile | 1 - arch/mips/basler/excite/excite_dbg_io.c | 121 --- arch/mips/basler/excite/excite_irq.c | 7 - arch/mips/basler/excite/excite_setup.c | 4 +- arch/mips/configs/db1000_defconfig | 1 - arch/mips/configs/db1100_defconfig | 1 - arch/mips/configs/db1200_defconfig | 1 - arch/mips/configs/db1500_defconfig | 1 - arch/mips/configs/db1550_defconfig | 1 - arch/mips/configs/excite_defconfig | 1 - arch/mips/configs/ip27_defconfig | 1 - arch/mips/configs/msp71xx_defconfig | 2 - arch/mips/configs/mtx1_defconfig | 1 - arch/mips/configs/pb1100_defconfig | 1 - arch/mips/configs/pb1500_defconfig | 1 - arch/mips/configs/pb1550_defconfig | 1 - arch/mips/configs/pnx8550-jbs_defconfig | 4 +- arch/mips/configs/pnx8550-stb810_defconfig | 4 +- arch/mips/configs/rbtx49xx_defconfig | 1 - arch/mips/configs/sb1250-swarm_defconfig | 1 - arch/mips/configs/yosemite_defconfig | 2 - arch/mips/emma2rh/markeins/platform.c | 1 - arch/mips/emma2rh/markeins/setup.c | 1 - arch/mips/kernel/Makefile | 2 +- arch/mips/kernel/gdb-low.S | 394 ---------- arch/mips/kernel/gdb-stub.c | 1155 ---------------------------- arch/mips/kernel/irq.c | 30 +- arch/mips/kernel/kgdb.c | 256 ++++++ arch/mips/kernel/traps.c | 21 + arch/mips/mti-malta/Makefile | 1 - arch/mips/mti-malta/malta-init.c | 54 -- arch/mips/mti-malta/malta-kgdb.c | 133 ---- arch/mips/mti-malta/malta-setup.c | 4 - arch/mips/nxp/pnx8550/common/Makefile | 1 - arch/mips/nxp/pnx8550/common/gdb_hook.c | 109 --- arch/mips/nxp/pnx8550/common/int.c | 1 - arch/mips/nxp/pnx8550/common/proc.c | 1 - arch/mips/nxp/pnx8550/common/setup.c | 12 - arch/mips/pmc-sierra/msp71xx/msp_serial.c | 73 -- arch/mips/pmc-sierra/yosemite/Makefile | 1 - arch/mips/pmc-sierra/yosemite/dbg_io.c | 180 ----- arch/mips/pmc-sierra/yosemite/irq.c | 9 - arch/mips/sgi-ip22/ip22-setup.c | 25 - arch/mips/sgi-ip27/Makefile | 1 - arch/mips/sgi-ip27/ip27-dbgio.c | 60 -- arch/mips/sibyte/bcm1480/irq.c | 80 -- arch/mips/sibyte/cfe/setup.c | 14 - arch/mips/sibyte/sb1250/irq.c | 60 -- arch/mips/sibyte/swarm/Makefile | 1 - arch/mips/sibyte/swarm/dbg_io.c | 76 -- arch/mips/txx9/Kconfig | 2 - arch/mips/txx9/generic/Makefile | 1 - arch/mips/txx9/generic/dbgio.c | 48 -- arch/mips/txx9/jmr3927/Makefile | 1 - arch/mips/txx9/jmr3927/kgdb_io.c | 105 --- include/asm-mips/gdb-stub.h | 215 ------ include/asm-mips/kdebug.h | 14 +- include/asm-mips/kgdb.h | 54 ++ 63 files changed, 362 insertions(+), 3132 deletions(-) delete mode 100644 arch/mips/au1000/common/dbg_io.c delete mode 100644 arch/mips/basler/excite/excite_dbg_io.c delete mode 100644 arch/mips/kernel/gdb-low.S delete mode 100644 arch/mips/kernel/gdb-stub.c create mode 100644 arch/mips/kernel/kgdb.c delete mode 100644 arch/mips/mti-malta/malta-kgdb.c delete mode 100644 arch/mips/nxp/pnx8550/common/gdb_hook.c delete mode 100644 arch/mips/pmc-sierra/yosemite/dbg_io.c delete mode 100644 arch/mips/sgi-ip27/ip27-dbgio.c delete mode 100644 arch/mips/sibyte/swarm/dbg_io.c delete mode 100644 arch/mips/txx9/generic/dbgio.c delete mode 100644 arch/mips/txx9/jmr3927/kgdb_io.c delete mode 100644 include/asm-mips/gdb-stub.h create mode 100644 include/asm-mips/kgdb.h
PATCH 1/2 kgdb, mips: Remove existing kgdb implementation
This patch explicitly removes the kgdb implementation, for mips which is intended to be followed by a patch that adds a kgdb implementation for mips that makes use of the kgdb core in the kernel.
--- arch/mips/Kconfig | 6 - arch/mips/Kconfig.debug | 22 - arch/mips/au1000/Kconfig | 1 - arch/mips/au1000/common/Makefile | 1 - arch/mips/au1000/common/dbg_io.c | 109 --- arch/mips/basler/excite/Makefile | 1 - arch/mips/basler/excite/excite_dbg_io.c | 121 --- arch/mips/basler/excite/excite_irq.c | 7 - arch/mips/basler/excite/excite_setup.c | 4 +- arch/mips/configs/db1000_defconfig | 1 - arch/mips/configs/db1100_defconfig | 1 - arch/mips/configs/db1200_defconfig | 1 - arch/mips/configs/db1500_defconfig | 1 - arch/mips/configs/db1550_defconfig | 1 - arch/mips/configs/excite_defconfig | 1 - arch/mips/configs/ip27_defconfig | 1 - arch/mips/configs/msp71xx_defconfig | 2 - arch/mips/configs/mtx1_defconfig | 1 - arch/mips/configs/pb1100_defconfig | 1 - arch/mips/configs/pb1500_defconfig | 1 - arch/mips/configs/pb1550_defconfig | 1 - arch/mips/configs/pnx8550-jbs_defconfig | 4 +- arch/mips/configs/pnx8550-stb810_defconfig | 4 +- arch/mips/configs/rbtx49xx_defconfig | 1 - arch/mips/configs/sb1250-swarm_defconfig | 1 - arch/mips/configs/yosemite_defconfig | 2 - arch/mips/emma2rh/markeins/platform.c | 1 - arch/mips/emma2rh/markeins/setup.c | 1 - arch/mips/kernel/Makefile | 1 - arch/mips/kernel/gdb-low.S | 394 ---------- arch/mips/kernel/gdb-stub.c | 1155 ---------------------------- arch/mips/kernel/irq.c | 21 - arch/mips/mti-malta/Makefile | 1 - arch/mips/mti-malta/malta-init.c | 54 -- arch/mips/mti-malta/malta-kgdb.c | 133 ---- arch/mips/mti-malta/malta-setup.c | 4 - arch/mips/nxp/pnx8550/common/Makefile | 1 - arch/mips/nxp/pnx8550/common/gdb_hook.c | 109 --- arch/mips/nxp/pnx8550/common/int.c | 1 - arch/mips/nxp/pnx8550/common/proc.c | 1 - arch/mips/nxp/pnx8550/common/setup.c | 12 - arch/mips/pmc-sierra/msp71xx/msp_serial.c | 73 -- arch/mips/pmc-sierra/yosemite/Makefile | 1 - arch/mips/pmc-sierra/yosemite/dbg_io.c | 180 ----- arch/mips/pmc-sierra/yosemite/irq.c | 9 - arch/mips/sgi-ip22/ip22-setup.c | 25 - arch/mips/sgi-ip27/Makefile | 1 - arch/mips/sgi-ip27/ip27-dbgio.c | 60 -- arch/mips/sibyte/bcm1480/irq.c | 80 -- arch/mips/sibyte/cfe/setup.c | 14 - arch/mips/sibyte/sb1250/irq.c | 60 -- arch/mips/sibyte/swarm/Makefile | 1 - arch/mips/sibyte/swarm/dbg_io.c | 76 -- arch/mips/txx9/Kconfig | 2 - arch/mips/txx9/generic/Makefile | 1 - arch/mips/txx9/generic/dbgio.c | 48 -- arch/mips/txx9/jmr3927/Makefile | 1 - arch/mips/txx9/jmr3927/kgdb_io.c | 105 --- include/asm-mips/gdb-stub.h | 215 ------ 59 files changed, 4 insertions(+), 3134 deletions(-) delete mode 100644 arch/mips/au1000/common/dbg_io.c delete mode 100644 arch/mips/basler/excite/excite_dbg_io.c delete mode 100644 arch/mips/kernel/gdb-low.S delete mode 100644 arch/mips/kernel/gdb-stub.c delete mode 100644 arch/mips/mti-malta/malta-kgdb.c delete mode 100644 arch/mips/nxp/pnx8550/common/gdb_hook.c delete mode 100644 arch/mips/pmc-sierra/yosemite/dbg_io.c delete mode 100644 arch/mips/sgi-ip27/ip27-dbgio.c delete mode 100644 arch/mips/sibyte/swarm/dbg_io.c delete mode 100644 arch/mips/txx9/generic/dbgio.c delete mode 100644 arch/mips/txx9/jmr3927/kgdb_io.c delete mode 100644 include/asm-mips/gdb-stub.h
arch/mips/Kconfig +0 -6
@@ -34,7 +34,6 @@ config BASLER_EXCITE select SYS_HAS_CPU_RM9000 select SYS_SUPPORTS_32BIT_KERNEL select SYS_SUPPORTS_BIG_ENDIAN - select SYS_SUPPORTS_KGDB help The eXcite is a smart camera platform manufactured by Basler Vision Technologies AG.
@@ -280,7 +279,6 @@ config PMC_MSP select SYS_HAS_CPU_MIPS32_R2 select SYS_SUPPORTS_32BIT_KERNEL select SYS_SUPPORTS_BIG_ENDIAN - select SYS_SUPPORTS_KGDB select IRQ_CPU select SERIAL_8250 select SERIAL_8250_CONSOLE
@@ -306,7 +304,6 @@ config PMC_YOSEMITE select SYS_SUPPORTS_64BIT_KERNEL select SYS_SUPPORTS_BIG_ENDIAN select SYS_SUPPORTS_HIGHMEM - select SYS_SUPPORTS_KGDB select SYS_SUPPORTS_SMP help Yosemite is an evaluation board for the RM9000x2 processor
@@ -359,7 +356,6 @@ config SGI_IP27 select SYS_HAS_CPU_R10000 select SYS_SUPPORTS_64BIT_KERNEL select SYS_SUPPORTS_BIG_ENDIAN - select SYS_SUPPORTS_KGDB select SYS_SUPPORTS_NUMA select SYS_SUPPORTS_SMP select GENERIC_HARDIRQS_NO__DO_IRQ
@@ -475,7 +471,6 @@ config SIBYTE_SWARM select SYS_HAS_CPU_SB1 select SYS_SUPPORTS_BIG_ENDIAN select SYS_SUPPORTS_HIGHMEM - select SYS_SUPPORTS_KGDB select SYS_SUPPORTS_LITTLE_ENDIAN select ZONE_DMA32 if 64BIT
@@ -868,7 +863,6 @@ config SOC_PNX8550 select SYS_HAS_EARLY_PRINTK select SYS_SUPPORTS_32BIT_KERNEL select GENERIC_HARDIRQS_NO__DO_IRQ - select SYS_SUPPORTS_KGDB select GENERIC_GPIO config SWAP_IO_SPACE
arch/mips/Kconfig.debug +0 -22
@@ -34,28 +34,6 @@ config SMTC_IDLE_HOOK_DEBUG arch/mips/kernel/smtc.c. This debugging option result in significant overhead so should be disabled in production kernels. -config KGDB - bool "Remote GDB kernel debugging" - depends on DEBUG_KERNEL && SYS_SUPPORTS_KGDB - select DEBUG_INFO - help - If you say Y here, it will be possible to remotely debug the MIPS - kernel using gdb. This enlarges your kernel image disk size by - several megabytes and requires a machine with more than 16 MB, - better 32 MB RAM to avoid excessive linking time. This is only - useful for kernel hackers. If unsure, say N. - -config SYS_SUPPORTS_KGDB - bool - -config GDB_CONSOLE - bool "Console output to GDB" - depends on KGDB - help - If you are using GDB for remote debugging over a serial port and - would like kernel messages to be formatted into GDB $O packets so - that GDB prints them as program output, say 'Y'. - config SB1XXX_CORELIS bool "Corelis Debugger" depends on SIBYTE_SB1xxx_SOC
arch/mips/au1000/Kconfig +0 -1
@@ -134,4 +134,3 @@ config SOC_AU1X00 select SYS_HAS_CPU_MIPS32_R1 select SYS_SUPPORTS_32BIT_KERNEL select SYS_SUPPORTS_APM_EMULATION - select SYS_SUPPORTS_KGDB
arch/mips/au1000/common/Makefile +0 -1
@@ -9,7 +9,6 @@ obj-y += prom.o irq.o puts.o time.o reset.o \ au1xxx_irqmap.o clocks.o platform.o power.o setup.o \ sleeper.o cputable.o dma.o dbdma.o gpio.o -obj-$(CONFIG_KGDB) += dbg_io.o obj-$(CONFIG_PCI) += pci.o EXTRA_CFLAGS += -Werror
arch/mips/au1000/common/dbg_io.c deleted +0 -109
109 lines not on this page · raw message
arch/mips/basler/excite/Makefile +0 -1
@@ -5,5 +5,4 @@ obj-$(CONFIG_BASLER_EXCITE) += excite_irq.o excite_prom.o excite_setup.o \ excite_device.o excite_procfs.o -obj-$(CONFIG_KGDB) += excite_dbg_io.o obj-m += excite_iodev.o
arch/mips/basler/excite/excite_dbg_io.c deleted +0 -121
121 lines not on this page · raw message
arch/mips/basler/excite/excite_irq.c +0 -7
@@ -50,10 +50,6 @@ void __init arch_init_irq(void)mips_cpu_irq_init ();rm7k_cpu_irq_init ();rm9k_cpu_irq_init (); - -#ifdef CONFIG_KGDB -excite_kgdb_init (); -#endif } asmlinkage void plat_irq_dispatch(void)
@@ -90,9 +86,6 @@ asmlinkage void plat_irq_dispatch(void) msgint = msgintflags & msgintmask & (0x1 << (TITAN_MSGINT %0x20 ));if ((pending & (1 <<TITAN_IRQ )) && msgint) {ocd_writel (msgint, INTP0Clear0 + (TITAN_MSGINT /0x20 *0x10 )); -#if defined(CONFIG_KGDB ) -excite_kgdb_inthdl (); -#endif do_IRQ (TITAN_IRQ );return ; }
arch/mips/basler/excite/excite_setup.c +2 -2
@@ -95,13 +95,13 @@ static int __init excite_init_console(void)/* Take the DUART out of reset */ titan_writel (0x00ff1cff ,CPRR ); -#if defined(CONFIG_KGDB ) || (CONFIG_SERIAL_8250_NR_UARTS >1 ) +#if (CONFIG_SERIAL_8250_NR_UARTS >1 )/* Enable both ports */ titan_writel (MASK_SER0 |MASK_SER1 ,UACFG );#else /* Enable port #0 only */ titan_writel (MASK_SER0 ,UACFG ); -#endif /* defined(CONFIG_KGDB) */ +#endif /* * Set up serial port #0. Do not use autodetection; the result is
arch/mips/configs/db1000_defconfig +0 -1
@@ -1092,7 +1092,6 @@ CONFIG_ENABLE_MUST_CHECK=y CONFIG_LOG_BUF_SHIFT=14 CONFIG_CROSSCOMPILE=y CONFIG_CMDLINE="" -CONFIG_SYS_SUPPORTS_KGDB=y # # Security options
arch/mips/configs/db1100_defconfig +0 -1
@@ -1092,7 +1092,6 @@ CONFIG_ENABLE_MUST_CHECK=y CONFIG_LOG_BUF_SHIFT=14 CONFIG_CROSSCOMPILE=y CONFIG_CMDLINE="" -CONFIG_SYS_SUPPORTS_KGDB=y # # Security options
arch/mips/configs/db1200_defconfig +0 -1
@@ -1174,7 +1174,6 @@ CONFIG_ENABLE_MUST_CHECK=y CONFIG_LOG_BUF_SHIFT=14 CONFIG_CROSSCOMPILE=y CONFIG_CMDLINE="mem=48M" -CONFIG_SYS_SUPPORTS_KGDB=y # # Security options
arch/mips/configs/db1500_defconfig +0 -1
@@ -1392,7 +1392,6 @@ CONFIG_ENABLE_MUST_CHECK=y CONFIG_LOG_BUF_SHIFT=14 CONFIG_CROSSCOMPILE=y CONFIG_CMDLINE="" -CONFIG_SYS_SUPPORTS_KGDB=y # # Security options
arch/mips/configs/db1550_defconfig +0 -1
@@ -1209,7 +1209,6 @@ CONFIG_ENABLE_MUST_CHECK=y CONFIG_LOG_BUF_SHIFT=14 CONFIG_CROSSCOMPILE=y CONFIG_CMDLINE="" -CONFIG_SYS_SUPPORTS_KGDB=y # # Security options
arch/mips/configs/excite_defconfig +0 -1
@@ -1269,7 +1269,6 @@ CONFIG_ENABLE_MUST_CHECK=y CONFIG_LOG_BUF_SHIFT=14 CONFIG_CROSSCOMPILE=y CONFIG_CMDLINE="" -CONFIG_SYS_SUPPORTS_KGDB=y # # Security options
arch/mips/configs/ip27_defconfig +0 -1
@@ -943,7 +943,6 @@ CONFIG_ENABLE_MUST_CHECK=y # CONFIG_DEBUG_KERNEL is not set CONFIG_CROSSCOMPILE=y CONFIG_CMDLINE="" -CONFIG_SYS_SUPPORTS_KGDB=y # # Security options
arch/mips/configs/msp71xx_defconfig +0 -2
@@ -1415,8 +1415,6 @@ CONFIG_FORCED_INLINING=y CONFIG_CROSSCOMPILE=y CONFIG_CMDLINE="" # CONFIG_DEBUG_STACK_USAGE is not set -# CONFIG_KGDB is not set -CONFIG_SYS_SUPPORTS_KGDB=y # CONFIG_RUNTIME_DEBUG is not set # CONFIG_MIPS_UNCACHED is not set
arch/mips/configs/mtx1_defconfig +0 -1
@@ -3020,7 +3020,6 @@ CONFIG_MAGIC_SYSRQ=y # CONFIG_DEBUG_KERNEL is not set CONFIG_CROSSCOMPILE=y CONFIG_CMDLINE="" -CONFIG_SYS_SUPPORTS_KGDB=y # # Security options
arch/mips/configs/pb1100_defconfig +0 -1
@@ -1085,7 +1085,6 @@ CONFIG_ENABLE_MUST_CHECK=y CONFIG_LOG_BUF_SHIFT=14 CONFIG_CROSSCOMPILE=y CONFIG_CMDLINE="" -CONFIG_SYS_SUPPORTS_KGDB=y # # Security options
arch/mips/configs/pb1500_defconfig +0 -1
@@ -1202,7 +1202,6 @@ CONFIG_ENABLE_MUST_CHECK=y CONFIG_LOG_BUF_SHIFT=14 CONFIG_CROSSCOMPILE=y CONFIG_CMDLINE="" -CONFIG_SYS_SUPPORTS_KGDB=y # # Security options
arch/mips/configs/pb1550_defconfig +0 -1
@@ -1195,7 +1195,6 @@ CONFIG_ENABLE_MUST_CHECK=y CONFIG_LOG_BUF_SHIFT=14 CONFIG_CROSSCOMPILE=y CONFIG_CMDLINE="" -CONFIG_SYS_SUPPORTS_KGDB=y # # Security options
arch/mips/configs/pnx8550-jbs_defconfig +1 -3
@@ -1216,10 +1216,8 @@ CONFIG_DEBUG_MUTEXES=y CONFIG_FORCED_INLINING=y # CONFIG_RCU_TORTURE_TEST is not set CONFIG_CROSSCOMPILE=y -CONFIG_CMDLINE="console=ttyS1,38400n8 kgdb=ttyS0 root=/dev/nfs ip=bootp" +CONFIG_CMDLINE="console=ttyS1,38400n8 root=/dev/nfs ip=bootp" # CONFIG_DEBUG_STACK_USAGE is not set -# CONFIG_KGDB is not set -CONFIG_SYS_SUPPORTS_KGDB=y # CONFIG_RUNTIME_DEBUG is not set #
arch/mips/configs/pnx8550-stb810_defconfig +1 -3
@@ -1206,10 +1206,8 @@ CONFIG_DEBUG_SLAB=y CONFIG_FORCED_INLINING=y # CONFIG_RCU_TORTURE_TEST is not set CONFIG_CROSSCOMPILE=y -CONFIG_CMDLINE="console=ttyS1,38400n8 kgdb=ttyS0 root=/dev/nfs ip=bootp" +CONFIG_CMDLINE="console=ttyS1,38400n8 root=/dev/nfs ip=bootp" # CONFIG_DEBUG_STACK_USAGE is not set -# CONFIG_KGDB is not set -CONFIG_SYS_SUPPORTS_KGDB=y # CONFIG_RUNTIME_DEBUG is not set #
arch/mips/configs/rbtx49xx_defconfig +0 -1
@@ -742,7 +742,6 @@ CONFIG_DEBUG_FS=y # CONFIG_DEBUG_KERNEL is not set # CONFIG_SAMPLES is not set CONFIG_CMDLINE="" -CONFIG_SYS_SUPPORTS_KGDB=y # # Security options
arch/mips/configs/sb1250-swarm_defconfig +0 -1
@@ -963,7 +963,6 @@ CONFIG_ENABLE_MUST_CHECK=y # CONFIG_DEBUG_KERNEL is not set # CONFIG_SAMPLES is not set CONFIG_CMDLINE="" -CONFIG_SYS_SUPPORTS_KGDB=y # CONFIG_SB1XXX_CORELIS is not set #
arch/mips/configs/yosemite_defconfig +0 -2
@@ -827,8 +827,6 @@ CONFIG_FORCED_INLINING=y CONFIG_CROSSCOMPILE=y CONFIG_CMDLINE="" # CONFIG_DEBUG_STACK_USAGE is not set -# CONFIG_KGDB is not set -CONFIG_SYS_SUPPORTS_KGDB=y # CONFIG_RUNTIME_DEBUG is not set #
arch/mips/emma2rh/markeins/platform.c +0 -1
@@ -34,7 +34,6 @@#include <asm/bcache.h> #include <asm/irq.h> #include <asm/reboot.h> -#include <asm/gdb-stub.h> #include <asm/traps.h> #include <asm/debug.h>
arch/mips/emma2rh/markeins/setup.c +0 -1
@@ -41,7 +41,6 @@#include <asm/bcache.h> #include <asm/irq.h> #include <asm/reboot.h> -#include <asm/gdb-stub.h> #include <asm/traps.h> #include <asm/debug.h>
arch/mips/kernel/Makefile +0 -1
@@ -71,7 +71,6 @@ obj-$(CONFIG_MIPS32_COMPAT) += linux32.o ptrace32.o signal32.o obj-$(CONFIG_MIPS32_N32) += binfmt_elfn32.o scall64-n32.o signal_n32.o obj-$(CONFIG_MIPS32_O32) += binfmt_elfo32.o scall64-o32.o -obj-$(CONFIG_KGDB) += gdb-low.o gdb-stub.o obj-$(CONFIG_PROC_FS) += proc.o obj-$(CONFIG_64BIT) += cpu-bugs64.o
arch/mips/kernel/gdb-low.S deleted +0 -394
394 lines not on this page · raw message
arch/mips/kernel/gdb-stub.c deleted +0 -1155
1,155 lines not on this page · raw message
arch/mips/kernel/irq.c +0 -21
@@ -126,19 +126,6 @@ asmlinkage void spurious_interrupt(void)atomic_inc (&irq_err_count); } -#ifdef CONFIG_KGDB -extern void breakpoint (void ); -extern void set_debug_traps (void ); - -static int kgdb_flag =1 ; -static int __init nokgdb (char *str) -{ - kgdb_flag =0 ; -return 1 ; -} -__setup ("nokgdb" , nokgdb); -#endif -void __init init_IRQ (void ) {int i;
@@ -147,12 +134,4 @@ void __init init_IRQ(void)set_irq_noprobe (i);arch_init_irq (); - -#ifdef CONFIG_KGDB -if (kgdb_flag) { -printk ("Wait for gdb client connection ...\n" ); -set_debug_traps (); -breakpoint (); - } -#endif }
arch/mips/mti-malta/Makefile +0 -1
@@ -13,7 +13,6 @@ obj-y := malta-amon.o malta-cmdline.o \ obj-$(CONFIG_EARLY_PRINTK) += malta-console.o obj-$(CONFIG_PCI) += malta-pci.o -obj-$(CONFIG_KGDB) += malta-kgdb.o # FIXME FIXME FIXME obj-$(CONFIG_MIPS_MT_SMTC) += malta_smtc.o
arch/mips/mti-malta/malta-init.c +0 -54
66 lines not on this page · raw message
arch/mips/mti-malta/malta-kgdb.c deleted +0 -133
133 lines not on this page · raw message
arch/mips/mti-malta/malta-setup.c +0 -4
@@ -199,10 +199,6 @@ void __init plat_mem_setup(void)*/ enable_dma (4 ); -#ifdef CONFIG_KGDB -kgdb_config (); -#endif -#ifdef CONFIG_DMA_COHERENT if (mips_revision_sconid !=MIPS_REVISION_SCON_BONITO )panic ("Hardware DMA cache coherency not supported" );
arch/mips/nxp/pnx8550/common/Makefile +0 -1
@@ -24,6 +24,5 @@ obj-y := setup.o prom.o int.o reset.o time.o proc.o platform.o obj-$(CONFIG_PCI) += pci.o -obj-$(CONFIG_KGDB) += gdb_hook.o EXTRA_CFLAGS += -Werror
arch/mips/nxp/pnx8550/common/gdb_hook.c deleted +0 -109
109 lines not on this page · raw message
arch/mips/nxp/pnx8550/common/int.c +0 -1
@@ -34,7 +34,6 @@#include <linux/module.h> #include <asm/io.h> -#include <asm/gdb-stub.h> #include <int.h> #include <uart.h>
arch/mips/nxp/pnx8550/common/proc.c +0 -1
@@ -22,7 +22,6 @@#include <linux/random.h> #include <asm/io.h> -#include <asm/gdb-stub.h> #include <int.h> #include <uart.h>
arch/mips/nxp/pnx8550/common/setup.c +0 -12
@@ -47,7 +47,6 @@ extern void pnx8550_machine_halt(void);extern void pnx8550_machine_power_off (void );extern struct resource ioport_resource;extern struct resource iomem_resource; -extern void rs_kgdb_hook (int tty_no);extern char *prom_getcmdline (void );struct resource standard_io_resources[] = {
@@ -142,16 +141,5 @@ void __init plat_mem_setup(void)ip3106_baud (UART_BASE , pnx8550_console_port) =5 ; } -#ifdef CONFIG_KGDB - argptr =prom_getcmdline (); -if ((argptr =strstr (argptr,"kgdb=ttyS" )) !=NULL ) { -int line; - argptr +=strlen ("kgdb=ttyS" ); - line = *argptr =='0' ?0 :1 ; -rs_kgdb_hook (line); -pr_info ("KGDB: Using ttyS%i for session, " -"please connect your debugger\n" , line ?1 :0 ); - } -#endif return ; }
arch/mips/pmc-sierra/msp71xx/msp_serial.c +0 -73
85 lines not on this page · raw message
arch/mips/pmc-sierra/yosemite/Makefile +0 -1
@@ -4,7 +4,6 @@ obj-y += irq.o prom.o py-console.o setup.o -obj-$(CONFIG_KGDB) += dbg_io.o obj-$(CONFIG_SMP) += smp.o EXTRA_CFLAGS += -Werror
arch/mips/pmc-sierra/yosemite/dbg_io.c deleted +0 -180
180 lines not on this page · raw message
arch/mips/pmc-sierra/yosemite/irq.c +0 -9
@@ -141,10 +141,6 @@ asmlinkage void plat_irq_dispatch(void) } } -#ifdef CONFIG_KGDB -extern void init_second_port (void ); -#endif -/* * Initialize the next level interrupt handler */
@@ -156,11 +152,6 @@ void __init arch_init_irq(void)rm7k_cpu_irq_init ();rm9k_cpu_irq_init (); -#ifdef CONFIG_KGDB -/* At this point, initialize the second serial port */ -init_second_port (); -#endif -#ifdef CONFIG_GDB_CONSOLE register_gdb_console ();#endif
arch/mips/sgi-ip22/ip22-setup.c +0 -25
@@ -20,7 +20,6 @@#include <asm/irq.h> #include <asm/reboot.h> #include <asm/time.h> -#include <asm/gdb-stub.h> #include <asm/io.h> #include <asm/traps.h> #include <asm/sgialib.h>
@@ -81,30 +80,6 @@ void __init plat_mem_setup(void)add_preferred_console ("arc" ,0 ,NULL ); } -#ifdef CONFIG_KGDB - { -char *kgdb_ttyd =prom_getcmdline (); - -if ((kgdb_ttyd =strstr (kgdb_ttyd,"kgdb=ttyd" )) !=NULL ) { -int line; - kgdb_ttyd +=strlen ("kgdb=ttyd" ); -if (*kgdb_ttyd !='1' && *kgdb_ttyd !='2' ) -printk (KERN_INFO "KGDB: Uknown serial line /dev/ttyd%c" -", falling back to /dev/ttyd1\n" , *kgdb_ttyd); - line = *kgdb_ttyd =='2' ?0 :1 ; -printk (KERN_INFO "KGDB: Using serial line /dev/ttyd%d for " -"session\n" , line ?1 :2 ); -rs_kgdb_hook (line); - -printk (KERN_INFO "KGDB: Using serial line /dev/ttyd%d for " -"session, please connect your debugger\n" , line ?1 :2 ); - - kgdb_enabled =1 ; -/* Breakpoints and stuff are in sgi_irq_setup() */ - } - } -#endif -#if defined(CONFIG_VT ) && defined(CONFIG_SGI_NEWPORT_CONSOLE ) {ULONG *gfxinfo;
arch/mips/sgi-ip27/Makefile +0 -1
@@ -7,7 +7,6 @@ obj-y := ip27-berr.o ip27-irq.o ip27-init.o ip27-klconfig.o ip27-klnuma.o \ ip27-xtalk.o obj-$(CONFIG_EARLY_PRINTK) += ip27-console.o -obj-$(CONFIG_KGDB) += ip27-dbgio.o obj-$(CONFIG_SMP) += ip27-smp.o EXTRA_CFLAGS += -Werror
arch/mips/sgi-ip27/ip27-dbgio.c deleted +0 -60
60 lines not on this page · raw message
arch/mips/sibyte/bcm1480/irq.c +0 -80
102 lines not on this page · raw message
arch/mips/sibyte/cfe/setup.c +0 -14
@@ -59,10 +59,6 @@ int cfe_cons_handle;extern unsigned long initrd_start, initrd_end;#endif -#ifdef CONFIG_KGDB -extern int kgdb_port; -#endif -static void __noreturn cfe_linux_exit (void *arg) {int warm = *(int *)arg;
@@ -246,9 +242,6 @@ void __init prom_init(void)int argc = fw_arg0;char **envp = (char **) fw_arg2;int *prom_vec = (int *) fw_arg3; -#ifdef CONFIG_KGDB -char *arg; -#endif _machine_restart = cfe_linux_restart; _machine_halt = cfe_linux_halt;
@@ -309,13 +302,6 @@ void __init prom_init(void) } } -#ifdef CONFIG_KGDB -if ((arg =strstr (arcs_cmdline,"kgdb=duart" )) !=NULL ) - kgdb_port = (arg[10 ] =='0' ) ?0 :1 ; -else - kgdb_port =1 ; -#endif -#ifdef CONFIG_BLK_DEV_INITRD {char *ptr;
arch/mips/sibyte/sb1250/irq.c +0 -60
21 lines not on this page · raw message
arch/mips/sibyte/swarm/dbg_io.c deleted +0 -76
76 lines not on this page · raw message
arch/mips/txx9/generic/dbgio.c deleted +0 -48
48 lines not on this page · raw message
arch/mips/txx9/jmr3927/kgdb_io.c deleted +0 -105
105 lines not on this page · raw message
include/asm-mips/gdb-stub.h deleted +0 -215
215 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
Signature · 1 line
1.5.5.1
Part of the diff is not shown here. View the raw message.
PATCH 2/2 kgdb, mips: add arch support for the kernel's kgdb core
The new kgdb architecture specific handler registers and unregisters dynamically for exceptions depending on when you configure a kgdb I/O driver.
Aside from initializing the exceptions earlier in the boot process, kgdb should have no impact on a device when it is compiled in so long as an I/O module is not configured for use.
There have been quite a number of contributors during the existence of this patch (see arch/mips/kernel/kgdb.c). Most recently Jason re-wrote the mips kgdb logic to use the die notification handlers.
--- arch/mips/Kconfig | 1 + arch/mips/kernel/Makefile | 1 + arch/mips/kernel/irq.c | 15 +++ arch/mips/kernel/kgdb.c | 256 +++++++++++++++++++++++++++++++++++++++++++++ arch/mips/kernel/traps.c | 21 ++++ include/asm-mips/kdebug.h | 14 +++- include/asm-mips/kgdb.h | 54 ++++++++++ 7 files changed, 361 insertions(+), 1 deletions(-) create mode 100644 arch/mips/kernel/kgdb.c create mode 100644 include/asm-mips/kgdb.h
arch/mips/Kconfig +1 -0
@@ -3,6 +3,7 @@ config MIPS default y select HAVE_IDE select HAVE_OPROFILE + select HAVE_ARCH_KGDB # Horrible source of confusion. Die, die, die ... select EMBEDDED select RTC_LIB
arch/mips/kernel/Makefile +1 -0
@@ -71,6 +71,7 @@ obj-$(CONFIG_MIPS32_COMPAT) += linux32.o ptrace32.o signal32.o obj-$(CONFIG_MIPS32_N32) += binfmt_elfn32.o scall64-n32.o signal_n32.o obj-$(CONFIG_MIPS32_O32) += binfmt_elfo32.o scall64-o32.o +obj-$(CONFIG_KGDB) += kgdb.o obj-$(CONFIG_PROC_FS) += proc.o obj-$(CONFIG_64BIT) += cpu-bugs64.o
arch/mips/kernel/irq.c +15 -0
@@ -21,11 +21,16 @@#include <linux/sched.h> #include <linux/seq_file.h> #include <linux/kallsyms.h> +#include <linux/kgdb.h> #include <asm/atomic.h> #include <asm/system.h> #include <asm/uaccess.h> +#ifdef CONFIG_KGDB +int kgdb_early_setup; +#endif +static unsigned long irq_map[NR_IRQS /BITS_PER_LONG ];int allocate_irqno (void )
@@ -130,8 +135,18 @@ void __init init_IRQ(void) {int i; +#ifdef CONFIG_KGDB +if (kgdb_early_setup) +return ; +#endif +for (i =0 ; i <NR_IRQS ; i++)set_irq_noprobe (i);arch_init_irq (); + +#ifdef CONFIG_KGDB +if (!kgdb_early_setup) + kgdb_early_setup =1 ; +#endif }
arch/mips/kernel/kgdb.c new file +256 -0
256 lines not on this page · raw message
arch/mips/kernel/traps.c +21 -0
@@ -23,6 +23,8 @@#include <linux/bootmem.h> #include <linux/interrupt.h> #include <linux/ptrace.h> +#include <linux/kgdb.h> +#include <linux/kdebug.h> #include <asm/bootinfo.h> #include <asm/branch.h>
@@ -425,6 +427,10 @@ asmlinkage void do_be(struct pt_regs *regs)printk (KERN_ALERT "%s bus error, epc == %0*lx, ra == %0*lx\n" , data ?"Data" :"Instruction" , field, regs->cp0_epc, field, regs->regs[31 ]); +if (notify_die (DIE_OOPS ,"bus error" , regs,SIGBUS ,0 ,0 ) + ==NOTIFY_STOP ) +return ; +die_if_kernel ("Oops" , regs);force_sig (SIGBUS , current); }
@@ -623,6 +629,9 @@ asmlinkage void do_fpe(struct pt_regs *regs, unsigned long fcr31) {siginfo_t info; +if (notify_die (DIE_FP ,"FP exception" , regs,SIGFPE ,0 ,0 ) + ==NOTIFY_STOP ) +return ;die_if_kernel ("FP exception in kernel code" , regs);if (fcr31 &FPU_CSR_UNI_X ) {
@@ -682,6 +691,9 @@ static void do_trap_or_bp(struct pt_regs *regs, unsigned int code,siginfo_t info;char b[40 ]; +if (notify_die (DIE_TRAP , str, regs, code,0 ,0 ) ==NOTIFY_STOP ) +return ; +/* * A short test says that IRIX 5.3 sends SIGTRAP for all trap * insns, even for trap and break codes that indicate arithmetic
@@ -762,6 +774,10 @@ asmlinkage void do_ri(struct pt_regs *regs)unsigned int opcode =0 ;int status =-1 ; +if (notify_die (DIE_RI ,"RI Fault" , regs,SIGSEGV ,0 ,0 ) + ==NOTIFY_STOP ) +return ; +die_if_kernel ("Reserved instruction in kernel code" , regs);if (unlikely (compute_return_epc (regs) <0 ))
@@ -1537,6 +1553,11 @@ void __init trap_init(void)extern char except_vec4;unsigned long i; +#if defined(CONFIG_KGDB ) +if (kgdb_early_setup) +return ;/* Already done */ +#endif +if (cpu_has_veic || cpu_has_vint) ebase = (unsigned long )alloc_bootmem_low_pages (0x200 +VECTORSPACING *64 );else
include/asm-mips/kdebug.h +13 -1
@@ -1 +1,13 @@ -#include <asm-generic/kdebug.h> +#ifndef _ASM_MIPS_KDEBUG_H +#define _ASM_MIPS_KDEBUG_H + +#include <linux/notifier.h> + +enum die_val { +DIE_OOPS =1 , +DIE_FP , +DIE_TRAP , +DIE_RI , +}; + +#endif /* _ASM_MIPS_KDEBUG_H */
include/asm-mips/kgdb.h new file +54 -0
54 lines not on this page · raw message
Signature · 1 line
1.5.5.1