* [PATCH v2] MIPS: get rid of 'kgdb_early_setup' cruft
@ 2015-05-31 21:40 Sergei Shtylyov
2015-06-03 7:37 ` Ralf Baechle
0 siblings, 1 reply; 2+ messages in thread
From: Sergei Shtylyov @ 2015-05-31 21:40 UTC (permalink / raw)
To: ralf, linux-mips
Commit 854700115ecf ([MIPS] kgdb: add arch support for the kernel's kgdb core)
added the 'kgdb_early_setup' flag to avoid calling trap_init() and init_IRQ()
the second time, however the code that called these functions earlier, from
kgdb_arch_init(), had been already removed by that time, so the flag never
served any useful purpose. Remove the related code along with ugly #ifdef'ery
at last.
Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
---
The patch is against the recent Linus' repo. Tell me if you want it to be
rebased against some MIPS repo...
Changes in version 2:
- fixed typo in the summary.
arch/mips/include/asm/kgdb.h | 1 -
arch/mips/kernel/irq.c | 15 ---------------
arch/mips/kernel/kgdb.c | 4 ----
arch/mips/kernel/traps.c | 6 ------
4 files changed, 26 deletions(-)
Index: linux/arch/mips/include/asm/kgdb.h
===================================================================
--- linux.orig/arch/mips/include/asm/kgdb.h
+++ linux/arch/mips/include/asm/kgdb.h
@@ -33,7 +33,6 @@
#define CACHE_FLUSH_IS_SAFE 0
extern void arch_kgdb_breakpoint(void);
-extern int kgdb_early_setup;
extern void *saved_vectors[32];
extern void handle_exception(struct pt_regs *regs);
extern void breakinst(void);
Index: linux/arch/mips/kernel/irq.c
===================================================================
--- linux.orig/arch/mips/kernel/irq.c
+++ linux/arch/mips/kernel/irq.c
@@ -19,16 +19,11 @@
#include <linux/sched.h>
#include <linux/seq_file.h>
#include <linux/kallsyms.h>
-#include <linux/kgdb.h>
#include <linux/ftrace.h>
#include <linux/atomic.h>
#include <asm/uaccess.h>
-#ifdef CONFIG_KGDB
-int kgdb_early_setup;
-#endif
-
static DECLARE_BITMAP(irq_map, NR_IRQS);
int allocate_irqno(void)
@@ -93,20 +88,10 @@ void __init init_IRQ(void)
{
int i;
-#ifdef CONFIG_KGDB
- if (kgdb_early_setup)
- return;
-#endif
-
for (i = 0; i < NR_IRQS; i++)
irq_set_noprobe(i);
arch_init_irq();
-
-#ifdef CONFIG_KGDB
- if (!kgdb_early_setup)
- kgdb_early_setup = 1;
-#endif
}
#ifdef DEBUG_STACKOVERFLOW
Index: linux/arch/mips/kernel/kgdb.c
===================================================================
--- linux.orig/arch/mips/kernel/kgdb.c
+++ linux/arch/mips/kernel/kgdb.c
@@ -378,10 +378,6 @@ int kgdb_arch_handle_exception(int vecto
struct kgdb_arch arch_kgdb_ops;
-/*
- * We use kgdb_early_setup so that functions we need to call now don't
- * cause trouble when called again later.
- */
int kgdb_arch_init(void)
{
union mips_instruction insn = {
Index: linux/arch/mips/kernel/traps.c
===================================================================
--- linux.orig/arch/mips/kernel/traps.c
+++ linux/arch/mips/kernel/traps.c
@@ -29,7 +29,6 @@
#include <linux/bootmem.h>
#include <linux/interrupt.h>
#include <linux/ptrace.h>
-#include <linux/kgdb.h>
#include <linux/kdebug.h>
#include <linux/kprobes.h>
#include <linux/notifier.h>
@@ -2184,11 +2183,6 @@ void __init trap_init(void)
check_wait();
-#if defined(CONFIG_KGDB)
- if (kgdb_early_setup)
- return; /* Already done */
-#endif
-
if (cpu_has_veic || cpu_has_vint) {
unsigned long size = 0x200 + VECTORSPACING*64;
ebase = (unsigned long)
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH v2] MIPS: get rid of 'kgdb_early_setup' cruft
2015-05-31 21:40 [PATCH v2] MIPS: get rid of 'kgdb_early_setup' cruft Sergei Shtylyov
@ 2015-06-03 7:37 ` Ralf Baechle
0 siblings, 0 replies; 2+ messages in thread
From: Ralf Baechle @ 2015-06-03 7:37 UTC (permalink / raw)
To: Sergei Shtylyov; +Cc: linux-mips
On Mon, Jun 01, 2015 at 12:40:32AM +0300, Sergei Shtylyov wrote:
> Commit 854700115ecf ([MIPS] kgdb: add arch support for the kernel's kgdb core)
> added the 'kgdb_early_setup' flag to avoid calling trap_init() and init_IRQ()
> the second time, however the code that called these functions earlier, from
> kgdb_arch_init(), had been already removed by that time, so the flag never
> served any useful purpose. Remove the related code along with ugly #ifdef'ery
> at last.
>
> Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
>
> ---
> The patch is against the recent Linus' repo. Tell me if you want it to be
> rebased against some MIPS repo...
There's been a minor conflict which was trivial to reslve.
Thanks,
Ralf
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-06-03 7:37 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-05-31 21:40 [PATCH v2] MIPS: get rid of 'kgdb_early_setup' cruft Sergei Shtylyov
2015-06-03 7:37 ` Ralf Baechle
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.