Re: [Kgdb-bugreport] [PATCH 08/14] tty/serial/kgdboc: Add and wire up clear_irqs callback

2012-09-19 Thread Alan Cox
On Mon, 10 Sep 2012 10:57:04 -0700 Anton Vorontsov wrote: > On Mon, Sep 10, 2012 at 12:16:24PM +0100, Alan Cox wrote: > > > serial port, the CPU receives NMI exception, and we fall into KDB > > > shell. So, it is our "debug console", and it is able to interrupt

Re: [Kgdb-bugreport] [RFC] tty/serial/kgdboc: Add and wire up clear_irqs callback

2012-09-19 Thread Alan Cox
> Of course, if Alan is OK with this, I'm more than OK too. :-) It may well be better. > (But the polling routines would need to clear all interrupts, not > just rx/tx. For example, if the controller indicated some error, and > nobody clears it, then we'll start reentering infinitely.) For a lot

Re: [Kgdb-bugreport] [PATCH v7 0/11] KGDB/KDB FIQ (NMI) debugger

2012-09-19 Thread Alan Cox
t_char routine. IIUC, Alan is less unhappy about it. As a > result, clear_irq() callback dropped. Ok that has my ack. Some of it is not pretty but debugger hooks that have to run behind the OS while debugging it never are. Acked-by: Alan Cox --

Re: [Kgdb-bugreport] [PATCH 06/14] tty/serial/core: Introduce poll_init callback

2012-09-19 Thread Alan Cox
> + tport = &state->port; > + if (!(tport->flags & ASYNC_INITIALIZED) && port->ops->poll_init) { > + mutex_lock(&tport->mutex); > + ret = port->ops->poll_init(port); > + /* > + * We don't set ASYNCB_INITIALIZED as we only initialized the > +

Re: [Kgdb-bugreport] [PATCH 08/12] tty/serial: Add kgdb_nmi driver

2012-09-19 Thread Alan Cox
> +struct kgdb_nmi_tty_priv { > + struct tty_port port; > + int opened; > + struct tasklet_struct tlet; > + STRUCT_KFIFO(char, KGDB_NMI_FIFO_SIZE) fifo; I don't see where "opened" is used. > +static const struct tty_operations kgdb_nmi_tty_ops = { > + .open = kgdb_n

Re: [Kgdb-bugreport] [PATCH 09/14] tty/serial/amba-pl011: Implement clear_irqs callback

2012-09-19 Thread Alan Cox
On Sun, 9 Sep 2012 21:14:04 -0700 Anton Vorontsov wrote: > It's all pretty straightforward, except for TXIM interrupt. The interrupt > has meaning "ready to transmit", so it's almost always raised, and the > only way to silence it is to mask it. But that's OK, ops->start_tx will > unmask it. > >

Re: [Kgdb-bugreport] [PATCH 10/14] tty/serial: Add kgdb_nmi driver

2012-09-19 Thread Alan Cox
On Sun, 9 Sep 2012 21:14:12 -0700 Anton Vorontsov wrote: > This special driver makes it possible to temporary use NMI debugger port > as a normal console by issuing 'nmi_console' command (assuming that the > port is attached to KGDB). No ref counting, no tty port, no compliance with the tty beha

Re: [Kgdb-bugreport] [PATCH 06/12] tty/serial/kgdboc: Add and wire up clear_irqs callback

2012-09-19 Thread Alan Cox
On Tue, 11 Sep 2012 02:35:00 -0700 Anton Vorontsov wrote: > This patch implements a new callback: clear_irqs. It is used for the This bit I still really don't like. I would like to know what the generic IRQ folks thing about it and if Thomas Gleixner has any brilliant ideas here. I don't think

Re: [Kgdb-bugreport] [PATCH 06/14] tty/serial/core: Introduce poll_init callback

2012-09-19 Thread Alan Cox
> > What stops a parallel open or close changing ASYNC_INITIALIZED after you > > test and before you lock ? > > Yeah, I should do the whole thing under the mutex. Can you use test_bit() as well. I'm trying to gradually push all the code that way so people habitually use set_bit() and we don't get

Re: [Kgdb-bugreport] [PATCH 08/14] tty/serial/kgdboc: Add and wire up clear_irqs callback

2012-09-19 Thread Alan Cox
> serial port, the CPU receives NMI exception, and we fall into KDB shell. > So, it is our "debug console", and it is able to interrupt (and thus > debug) even IRQ handlers themselves. You seem to have an assumption of single core here. What happens if the NMI hits CPU #0 and the serial IRQ hits

Re: [Kgdb-bugreport] [PATCH 6/7] kdb: Mark safe commands as KDB_SAFE and KDB_SAFE_NO_ARGS

2012-07-31 Thread Alan Cox
> The following commands were marked as "safe": > > Clear Breakpoint > Enable Breakpoint > Disable Breakpoint > Display exception frame > Stack traceback This is sufficient to steal cryptographic keys in many environments. In fact you merely need two or three breakpo

Re: [Kgdb-bugreport] kgdb 2.6.28 merge plans

2008-10-22 Thread Alan Cox
> This is a discussion that needs to be hashed out. It is a question of > where would you like it discussed (IE: new thread in lmkl, > [EMAIL PROTECTED])? Either of those. I'd also love to drive the sysrq hook out of every driver in the process. It seems the sysrq key, and debugger activation are

Re: [Kgdb-bugreport] kgdb 2.6.28 merge plans

2008-10-22 Thread Alan Cox
> tty: Fix sparse static warning for tty_driver_lookup_tty > kgdboc, tty: Add the rx polling call back capability > kgdboc, 8250: rx polling hook for the 8250 driver > kgdboc, amba-pl011: rx polling hook for the amba-pl011 driver This is not 2.6.28 tty layer or serial layer

Re: [Kgdb-bugreport] kgdb 2.6.28 merge plans

2008-10-21 Thread Alan Cox
> * kgdboc will request/allocate a tty so as to sync with > the user space with respect to having only one > invocation of the low level start up code. The tty stuff for this is not 2.6.28 material Alan - This SF.Net ema

Re: [Kgdb-bugreport] [PATCH 5/7] kgdboc, tty: use tty open to start low level drivers

2008-10-21 Thread Alan Cox
On Tue, 21 Oct 2008 14:14:51 -0500 Jason Wessel <[EMAIL PROTECTED]> wrote: > This patch adds two new hooks to the tty layer in tty_io.c to allow Gak > A few minor changes were needed in tty_io.c to deal with the fact that > the inode and fpath.dentry were NULL with the generic flip structure. G