Linux Serial subsystem development
 help / color / mirror / Atom feed
* Re: [PATCH] tty/8250_early: Prevent rounding error in uartclk to baud ratio
From: Alan Cox @ 2012-09-28 13:03 UTC (permalink / raw)
  To: Alexey Brodkin; +Cc: gregkh, linux-serial, linux-kernel, Vineet.Gupta1
In-Reply-To: <1348834748-31565-1-git-send-email-abrodkin@synopsys.com>

On Fri, 28 Sep 2012 16:19:08 +0400
Alexey Brodkin <Alexey.Brodkin@synopsys.com> wrote:

> Modify divisor to select the nearest baud rate divider rather than the
> lowest. It minimizes baud rate errors especially on low UART clock
> frequencies.
> 
> For example, if uartclk is 33000000 and baud is 115200 the ratio is
> about 17.9 The current code selects 17 (5% error) but should select 18
> (0.5% error).
> 
> On the same lines as following:
> http://www.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.9-rc3/2.6.9-rc3-mm2/broken-out/serial-pick-nearest-baud-rate-divider.patch
> 
> Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>

Seems sensible to me.

Acked-by: Alan Cox <alan@linux.intel.com>

^ permalink raw reply

* Re: [PATCH] tty/8250_early: Prevent rounding error in uartclk to baud ratio
From: Jiri Slaby @ 2012-09-28 13:01 UTC (permalink / raw)
  To: Alexey Brodkin; +Cc: gregkh, alan, linux-serial, linux-kernel, Vineet.Gupta1
In-Reply-To: <1348833784-31385-1-git-send-email-abrodkin@synopsys.com>

On 09/28/2012 02:03 PM, Alexey Brodkin wrote:
> Modify divisor to select the nearest baud rate divider rather than the
> lowest. It minimizes baud rate errors especially on low UART clock
> frequencies.
> 
> For example, if uartclk is 33000000 and baud is 115200 the ratio is
> about 17.9 The current code selects 17 (5% error) but should select 18
> (0.5% error).
> 
> On the same lines as following:
> http://www.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.9-rc3/2.6.9-rc3-mm2/broken-out/serial-pick-nearest-baud-rate-divider.patch
> 
> Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
> ---
>  drivers/tty/serial/8250_early.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/tty/serial/8250_early.c b/drivers/tty/serial/8250_early.c
> index eaafb98..cfc46b7 100644
> --- a/drivers/tty/serial/8250_early.c
> +++ b/drivers/tty/serial/8250_early.c
> @@ -140,7 +140,7 @@ static void __init init_port(struct early_serial8250_device *device)
>  	serial_out(port, UART_FCR, 0);		/* no fifo */
>  	serial_out(port, UART_MCR, 0x3);	/* DTR + RTS */
>  
> -	divisor = port->uartclk / (16 * device->baud);
> +	divisor = (port->uartclk + (8 * device->baud)) / (16 *	device->baud);

So this should be in fact DIV_ROUND_CLOSEST(), right?

But anyway I'm missing any explanation of *why* this is needed? This
should be part of the commit log. Is there any bug you are fixing here?

thanks,
-- 
js
suse labs

^ permalink raw reply

* Re: [PATCH] serial/arc-uart: Add new driver
From: Alan Cox @ 2012-09-28 13:02 UTC (permalink / raw)
  To: Vineet.Gupta1; +Cc: gregkh, linux-serial, linux-kernel
In-Reply-To: <1348835752-28426-1-git-send-email-vgupta@synopsys.com>

> +int __attribute__((weak)) running_on_iss;

Globals really ought to have sensible names, if they must exist at all.
Why is this needed ?

> +#define ARC_SERIAL_DEV_NAME	"ttyS"

ttyS is reserved by the 8250 driver. Use a different name

> /* ttySxx per Documentation/devices.txt */
> +#define ARC_SERIAL_MAJOR	4
> +#define ARC_SERIAL_MINOR	64

Use dynamic assignments

> +static void arc_serial_rx_chars(struct arc_uart_port *uart)
> +{
> +	struct tty_struct *tty = NULL;
> +	unsigned int status, ch, flg = 0;
> +
> +	tty = uart->port.state->port.tty;

Please get rid of the unneeded initialisers for things like tty - they
just hide bugs later.

For locking purposes you need to be doing

	tty = tty_port_tty_get(&uart->port.state->port);

	if (tty) {

		stuff

		tty_kref_put(tty);


so that the tty cannot vanish under you on a hangup. As you reference
it in several spots it might make sense to do that once if either
RXIENB/TXIENB is set and then pass it to the tx/rx handlers ?


> +static void arc_serial_break_ctl(struct uart_port *port, int
> break_state) +{
> +	/* ARC UART doesn't support sendind Break signal */

sending ..

> +static void arc_serial_set_ldisc(struct uart_port *port, int ld)
> +{
> +	/* this might need implementing for the touch driver */
> +}

Is this a left over comment or somehting else ?

> +static void
> +arc_serial_set_termios(struct uart_port *port, struct ktermios
> *termios,
> +		       struct ktermios *old)
> +{
> +	struct arc_uart_port *uart = (struct arc_uart_port *)port;
> +	unsigned int baud, uartl, uarth, hw_val;
> +	unsigned long flags;
> +

Two things here. Firstly you want to write the actual baud back to the
termios (tty_termios_encode_baud_rate) unless B0 is set.

Secondly if you don't support hardware flow control, character size
setting etc then you need to set those bits back so the caller knows.
Two ways to do that. Either initialise the default termios for the tty
type to the correct values and use tty_termios_copy_hw() or set them in
the termios handler.

Alan

^ permalink raw reply

* [PATCH] serial/arc-uart: Add new driver
From: Vineet.Gupta1 @ 2012-09-28 12:35 UTC (permalink / raw)
  To: alan, gregkh; +Cc: linux-serial, linux-kernel, Vineet Gupta

From: Vineet Gupta <vgupta@synopsys.com>

Driver for non-standard on-chip UART, instantiated in the ARC (Synopsys)
FPGA Boards such as ARCAngel4/ML50x

This is based off of current Linus tree, build tested for x86.

Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
---
 drivers/tty/serial/Kconfig    |   25 ++
 drivers/tty/serial/Makefile   |    1 +
 drivers/tty/serial/arc_uart.c |  742 +++++++++++++++++++++++++++++++++++++++++
 include/linux/serial_core.h   |    3 +
 4 files changed, 771 insertions(+), 0 deletions(-)
 create mode 100644 drivers/tty/serial/arc_uart.c

diff --git a/drivers/tty/serial/Kconfig b/drivers/tty/serial/Kconfig
index 4720b4b..af4bd69 100644
--- a/drivers/tty/serial/Kconfig
+++ b/drivers/tty/serial/Kconfig
@@ -1360,4 +1360,29 @@ config SERIAL_EFM32_UART_CONSOLE
 	depends on SERIAL_EFM32_UART=y
 	select SERIAL_CORE_CONSOLE
 
+config SERIAL_ARC
+	bool "ARC UART driver support"
+	select SERIAL_CORE
+	default y
+	help
+	  Driver for on-chip UART for ARC(Synopsys) for the legacy
+	  FPGA Boards (ML50x/ARCAngel4)
+
+config SERIAL_ARC_CONSOLE
+	bool
+	select SERIAL_CORE_CONSOLE
+	depends on SERIAL_ARC=y
+	default y
+	help
+	  Enable system Console on ARC UART
+
+config SERIAL_ARC_NR_PORTS
+	int 'Number of ports'
+	range 1 3
+	default 1
+	depends on SERIAL_ARC
+	help
+	  Set this to the number of serial ports you want the driver
+	  to support.
+
 endmenu
diff --git a/drivers/tty/serial/Makefile b/drivers/tty/serial/Makefile
index 7257c5d..2b70b5f 100644
--- a/drivers/tty/serial/Makefile
+++ b/drivers/tty/serial/Makefile
@@ -79,3 +79,4 @@ obj-$(CONFIG_SERIAL_XILINX_PS_UART) += xilinx_uartps.o
 obj-$(CONFIG_SERIAL_SIRFSOC) += sirfsoc_uart.o
 obj-$(CONFIG_SERIAL_AR933X)   += ar933x_uart.o
 obj-$(CONFIG_SERIAL_EFM32_UART) += efm32-uart.o
+obj-$(CONFIG_SERIAL_ARC)	+= arc_uart.o
diff --git a/drivers/tty/serial/arc_uart.c b/drivers/tty/serial/arc_uart.c
new file mode 100644
index 0000000..4f2e57b
--- /dev/null
+++ b/drivers/tty/serial/arc_uart.c
@@ -0,0 +1,742 @@
+/*
+ * ARC On-Chip(fpga) UART Driver
+ *
+ * Copyright (C) 2010-2012 Synopsys, Inc. (www.synopsys.com)
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ * vineetg: July 10th 2012
+ *  -Decoupled the driver from arch/arc
+ *    +Using platform_get_resource() for irq/membase (thx to bfin_uart.c)
+ *    +Using early_platform_xxx() for early console (thx to mach-shmobile/xxx)
+ *
+ * Vineetg: Aug 21st 2010
+ *  -Is uart_tx_stopped() not done in tty write path as it has already been
+ *   taken care of, in serial core
+ *
+ * Vineetg: Aug 18th 2010
+ *  -New Serial Core based ARC UART driver
+ *  -Derived largely from blackfin driver albiet with some major tweaks
+ *
+ * TODO:
+ *  -check if sysreq works
+ */
+
+#if defined(CONFIG_SERIAL_ARC_CONSOLE) && defined(CONFIG_MAGIC_SYSRQ)
+#define SUPPORT_SYSRQ
+#endif
+
+#include <linux/module.h>
+#include <linux/serial.h>
+#include <linux/console.h>
+#include <linux/sysrq.h>
+#include <linux/platform_device.h>
+#include <linux/tty.h>
+#include <linux/tty_flip.h>
+#include <linux/serial_core.h>
+#include <linux/io.h>
+
+/*************************************
+ * ARC UART Hardware Specs
+ ************************************/
+#define ARC_UART_TX_FIFO_SIZE  1
+
+/*
+ * UART Register set (this is not a Standards Compliant IP)
+ * Also each reg is Word aligned, but only 8 bits wide
+ */
+#define R_ID0	0
+#define R_ID1	1
+#define R_ID2	2
+#define R_ID3	3
+#define R_DATA	4
+#define R_STS	5
+#define R_BAUDL	6
+#define R_BAUDH	7
+
+/* Bits for UART Status Reg (R/W) */
+#define RXIENB  0x04	/* Receive Interrupt Enable */
+#define TXIENB  0x40	/* Transmit Interrupt Enable */
+
+#define RXEMPTY 0x20	/* Receive FIFO Empty: No char receivede */
+#define TXEMPTY 0x80	/* Transmit FIFO Empty, thus char can be written into */
+
+#define RXFULL  0x08	/* Receive FIFO full */
+#define RXFULL1 0x10	/* Receive FIFO has space for 1 char (tot space=4) */
+
+#define RXFERR  0x01	/* Frame Error: Stop Bit not detected */
+#define RXOERR  0x02	/* OverFlow Err: Char recv but RXFULL still set */
+
+/* Uart bit fiddling helpers: lowest level */
+#define RBASE(uart, reg)      ((unsigned int *)uart->port.membase + reg)
+#define UART_REG_SET(u, r, v) writeb((v), RBASE(u, r))
+#define UART_REG_GET(u, r)    readb(RBASE(u, r))
+
+#define UART_REG_OR(u, r, v)  UART_REG_SET(u, r, UART_REG_GET(u, r) | (v))
+#define UART_REG_CLR(u, r, v) UART_REG_SET(u, r, UART_REG_GET(u, r) & ~(v))
+
+/* Uart bit fiddling helpers: API level */
+#define UART_SET_DATA(uart, val)   UART_REG_SET(uart, R_DATA, val)
+#define UART_GET_DATA(uart)        UART_REG_GET(uart, R_DATA)
+
+#define UART_SET_BAUDH(uart, val)  UART_REG_SET(uart, R_BAUDH, val)
+#define UART_SET_BAUDL(uart, val)  UART_REG_SET(uart, R_BAUDL, val)
+
+#define UART_CLR_STATUS(uart, val) UART_REG_CLR(uart, R_STS, val)
+#define UART_GET_STATUS(uart)      UART_REG_GET(uart, R_STS)
+
+#define UART_ALL_IRQ_DISABLE(uart) UART_REG_CLR(uart, R_STS, RXIENB|TXIENB)
+#define UART_RX_IRQ_DISABLE(uart)  UART_REG_CLR(uart, R_STS, RXIENB)
+#define UART_TX_IRQ_DISABLE(uart)  UART_REG_CLR(uart, R_STS, TXIENB)
+
+#define UART_ALL_IRQ_ENABLE(uart)  UART_REG_OR(uart, R_STS, RXIENB|TXIENB)
+#define UART_RX_IRQ_ENABLE(uart)   UART_REG_OR(uart, R_STS, RXIENB)
+#define UART_TX_IRQ_ENABLE(uart)   UART_REG_OR(uart, R_STS, TXIENB)
+
+#define ARC_SERIAL_DEV_NAME	"ttyS"
+
+/* ttySxx per Documentation/devices.txt */
+#define ARC_SERIAL_MAJOR	4
+#define ARC_SERIAL_MINOR	64
+
+struct arc_uart_port {
+	struct uart_port port;
+	unsigned long baud;
+};
+
+static struct arc_uart_port arc_uart_ports[CONFIG_SERIAL_ARC_NR_PORTS];
+
+#ifdef CONFIG_SERIAL_ARC_CONSOLE
+static struct console arc_serial_console;
+#define ARC_SERIAL_CONSOLE	(&arc_serial_console)
+#else
+#define ARC_SERIAL_CONSOLE	NULL
+#endif
+
+int __attribute__((weak)) running_on_iss;
+
+#define DRIVER_NAME	"arc-uart"
+
+static struct uart_driver arc_uart_driver = {
+	.owner		= THIS_MODULE,
+	.driver_name	= DRIVER_NAME,
+	.dev_name	= ARC_SERIAL_DEV_NAME,
+	.major		= ARC_SERIAL_MAJOR,
+	.minor		= ARC_SERIAL_MINOR,
+	.nr		= CONFIG_SERIAL_ARC_NR_PORTS,
+	.cons		= ARC_SERIAL_CONSOLE,
+};
+
+static void arc_serial_stop_rx(struct uart_port *port)
+{
+	struct arc_uart_port *uart = (struct arc_uart_port *)port;
+
+	UART_RX_IRQ_DISABLE(uart);
+}
+
+static void arc_serial_stop_tx(struct uart_port *port)
+{
+	struct arc_uart_port *uart = (struct arc_uart_port *)port;
+
+	while (!(UART_GET_STATUS(uart) & TXEMPTY))
+		cpu_relax();
+
+	UART_TX_IRQ_DISABLE(uart);
+}
+
+/*
+ * Return TIOCSER_TEMT when transmitter is not busy.
+ */
+static unsigned int arc_serial_tx_empty(struct uart_port *port)
+{
+	struct arc_uart_port *uart = (struct arc_uart_port *)port;
+	unsigned int stat;
+
+	stat = UART_GET_STATUS(uart);
+	if (stat & TXEMPTY)
+		return TIOCSER_TEMT;
+	else
+		return 0;
+
+}
+
+/*
+ * Driver internal routine, used by both tty(serial core) as well as tx-isr
+ *  -Called under spinlock in either cases
+ *  -also tty->stopped / tty->hw_stopped has already been checked
+ *     = by uart_start( ) before calling us
+ *     = tx_ist checks that too before calling
+ */
+static void arc_serial_tx_chars(struct arc_uart_port *uart)
+{
+	struct circ_buf *xmit = &uart->port.state->xmit;
+	int sent = 0;
+	unsigned char ch;
+
+	if (unlikely(uart->port.x_char)) {
+		UART_SET_DATA(uart, uart->port.x_char);
+		uart->port.icount.tx++;
+		uart->port.x_char = 0;
+		sent = 1;
+	} else if (xmit->tail != xmit->head) {	/* TODO: uart_circ_empty */
+		ch = xmit->buf[xmit->tail];
+		xmit->tail = (xmit->tail + 1) & (UART_XMIT_SIZE - 1);
+		uart->port.icount.tx++;
+		while (!(UART_GET_STATUS(uart) & TXEMPTY))
+			cpu_relax();
+		UART_SET_DATA(uart, ch);
+		sent = 1;
+	}
+
+	/*
+	 * If num chars in xmit buffer are too few, ask tty layer for more.
+	 * By Hard ISR to schedule processing in software interrupt part
+	 */
+	if (uart_circ_chars_pending(xmit) < WAKEUP_CHARS)
+		uart_write_wakeup(&uart->port);
+
+	/*if (uart_circ_chars_pending(xmit)) */
+	if (sent)
+		UART_TX_IRQ_ENABLE(uart);
+
+}
+
+/*
+ * port is locked and interrupts are disabled
+ * uart_start( ) calls us under the port spinlock irqsave
+ */
+static void arc_serial_start_tx(struct uart_port *port)
+{
+	struct arc_uart_port *uart = (struct arc_uart_port *)port;
+
+	arc_serial_tx_chars(uart);
+}
+
+static void arc_serial_rx_chars(struct arc_uart_port *uart)
+{
+	struct tty_struct *tty = NULL;
+	unsigned int status, ch, flg = 0;
+
+	tty = uart->port.state->port.tty;
+
+	/*
+	 * UART has 4 deep RX-FIFO. Driver's recongnition of this fact
+	 * is very subtle. Here's how ...
+	 * Upon getting a RX-Intr, such that RX-EMPTY=0, meaning data available,
+	 * driver reads the DATA Reg and keeps doing that in a loop, until
+	 * RX-EMPTY=1. Multiple chars being avail, with a single Interrupt,
+	 * before RX-EMPTY=0, implies some sort of buffering going on in the
+	 * controller, which is indeed the Rx-FIFO.
+	 */
+	while (!((status = UART_GET_STATUS(uart)) & RXEMPTY)) {
+
+		ch = UART_GET_DATA(uart);
+		uart->port.icount.rx++;
+
+		if (unlikely(status & (RXOERR | RXFERR))) {
+			if (status & RXOERR) {
+				uart->port.icount.overrun++;
+				flg = TTY_OVERRUN;
+				UART_CLR_STATUS(uart, RXOERR);
+			}
+
+			if (status & RXFERR) {
+				uart->port.icount.frame++;
+				flg = TTY_FRAME;
+				UART_CLR_STATUS(uart, RXFERR);
+			}
+		} else
+			flg = TTY_NORMAL;
+
+		if (unlikely(uart_handle_sysrq_char(&uart->port, ch)))
+			goto done;
+
+		uart_insert_char(&uart->port, status, RXOERR, ch, flg);
+
+done:
+		tty_flip_buffer_push(tty);
+	}
+}
+
+/*
+ * A note on the Interrupt handling state machine of this driver
+ *
+ * kernel printk writes funnel thru the console driver framework and in order
+ * to keep things simple as well as efficient, it writes to UART in polled
+ * mode, in one shot, and exits.
+ *
+ * OTOH, Userland output (via tty layer), uses interrupt based writes as there
+ * can be undeterministic delay between char writes.
+ *
+ * Thus Rx-interrupts are always enabled, while tx-interrupts are by default
+ * disabled.
+ *
+ * When tty has some data to send out, serial core calls driver's start_tx
+ * which
+ *   -checks-if-tty-buffer-has-char-to-send
+ *   -writes-data-to-uart
+ *   -enable-tx-intr
+ *
+ * Once data bits are pushed out, controller raises the Tx-room-avail-Interrupt.
+ * The first thing Tx ISR does is disable further Tx interrupts (as this could
+ * be the last char to send, before settling down into the quiet polled mode).
+ * It then calls the exact routine used by tty layer write to send out any
+ * more char in tty buffer. In case of sending, it re-enables Tx-intr. In case
+ * of no data, it remains disabled.
+ * This is how the transmit state machine is dynamically switched on/off
+ */
+
+static irqreturn_t arc_serial_isr(int irq, void *dev_id)
+{
+	struct arc_uart_port *uart = dev_id;
+	unsigned int status;
+
+	status = UART_GET_STATUS(uart);
+
+	/*
+	 * Single IRQ for both Rx (data available) Tx (room available) Interrupt
+	 * notifications from the UART Controller.
+	 * To demultiplex between the two, we check the relevant bits
+	 */
+	if ((status & RXIENB) && !(status & RXEMPTY)) {
+
+		/* already in ISR, no need of xx_irqsave */
+		spin_lock(&uart->port.lock);
+		arc_serial_rx_chars(uart);
+		spin_unlock(&uart->port.lock);
+	}
+
+	if ((status & TXIENB) && (status & TXEMPTY)) {
+
+		/* Unconditionally disable further Tx-Interrupts.
+		 * will be enabled by tx_chars() if needed.
+		 */
+		UART_TX_IRQ_DISABLE(uart);
+
+		spin_lock(&uart->port.lock);
+
+		if (!uart_tx_stopped(&uart->port))
+			arc_serial_tx_chars(uart);
+
+		spin_unlock(&uart->port.lock);
+	}
+
+	return IRQ_HANDLED;
+}
+
+static unsigned int arc_serial_get_mctrl(struct uart_port *port)
+{
+	/*
+	 * Pretend we have a Modem status reg and following bits are
+	 *  always set, to satify the serial core state machine
+	 *  (DSR) Data Set Ready
+	 *  (CTS) Clear To Send
+	 *  (CAR) Carrier Detect
+	 */
+	return TIOCM_CTS | TIOCM_DSR | TIOCM_CAR;
+}
+
+static void arc_serial_set_mctrl(struct uart_port *port, unsigned int mctrl)
+{
+	/* MCR not present */
+}
+
+/* Enable Modem Status Interrupts */
+
+static void arc_serial_enable_ms(struct uart_port *port)
+{
+	/* MSR not present */
+}
+
+static void arc_serial_break_ctl(struct uart_port *port, int break_state)
+{
+	/* ARC UART doesn't support sendind Break signal */
+}
+
+static int arc_serial_startup(struct uart_port *port)
+{
+	struct arc_uart_port *uart = (struct arc_uart_port *)port;
+
+	/* Before we hook up the ISR, Disable all UART Interrupts */
+	UART_ALL_IRQ_DISABLE(uart);
+
+	if (request_irq(uart->port.irq, arc_serial_isr, 0, "arc uart rx-tx",
+			uart)) {
+		pr_warn("Unable to attach ARC UART interrupt\n");
+		return -EBUSY;
+	}
+
+	UART_RX_IRQ_ENABLE(uart); /* Only Rx IRQ enabled to begin with */
+
+	return 0;
+}
+
+/* This is not really needed */
+static void arc_serial_shutdown(struct uart_port *port)
+{
+	struct arc_uart_port *uart = (struct arc_uart_port *)port;
+	free_irq(uart->port.irq, uart);
+}
+
+static void arc_serial_set_ldisc(struct uart_port *port, int ld)
+{
+	/* this might need implementing for the touch driver */
+}
+
+static void
+arc_serial_set_termios(struct uart_port *port, struct ktermios *termios,
+		       struct ktermios *old)
+{
+	struct arc_uart_port *uart = (struct arc_uart_port *)port;
+	unsigned int baud, uartl, uarth, hw_val;
+	unsigned long flags;
+
+	/*
+	 * Use the generic handler so that any specially encoded baud rates
+	 * such as SPD_xx flags or "%B0" can be handled
+	 * Max Baud I suppose will not be more than current 115K * 4
+	 * Formula for ARC UART is: hw-val = ((CLK/(BAUD*4)) -1)
+	 * spread over two 8-bit registers
+	 */
+	baud = uart_get_baud_rate(port, termios, old, 0, 460800);
+
+	hw_val = port->uartclk / (uart->baud * 4) - 1;
+	uartl = hw_val & 0xFF;
+	uarth = (hw_val >> 8) & 0xFF;
+
+	/*
+	 * ISS UART emulation has a subtle bug:
+	 * A existing value of Baudh = 0 is used as a indication to startup
+	 * it's internal state machine.
+	 * Thus if baudh is set to 0, 2 times, it chokes.
+	 * This happens with BAUD=115200 and the formaula above
+	 * Until that is fixed, when running on ISS, we will set baudh to !0
+	 */
+	if (running_on_iss)
+		uarth = 1;
+
+	spin_lock_irqsave(&port->lock, flags);
+
+	UART_ALL_IRQ_DISABLE(uart);
+
+	UART_SET_BAUDL(uart, uartl);
+	UART_SET_BAUDH(uart, uarth);
+
+	UART_RX_IRQ_ENABLE(uart);
+
+	/* Port speed changed, update the per-port timeout. */
+	uart_update_timeout(port, termios->c_cflag, baud);
+
+	spin_unlock_irqrestore(&port->lock, flags);
+}
+
+static const char *arc_serial_type(struct uart_port *port)
+{
+	struct arc_uart_port *uart = (struct arc_uart_port *)port;
+
+	return uart->port.type == PORT_ARC ? DRIVER_NAME : NULL;
+}
+
+/*
+ * Release the memory region(s) being used by 'port'.
+ */
+static void arc_serial_release_port(struct uart_port *port)
+{
+}
+
+/*
+ * Request the memory region(s) being used by 'port'.
+ */
+static int arc_serial_request_port(struct uart_port *port)
+{
+	return 0;
+}
+
+/*
+ * Verify the new serial_struct (for TIOCSSERIAL).
+ */
+static int
+arc_serial_verify_port(struct uart_port *port, struct serial_struct *ser)
+{
+	return 0;
+}
+
+/*
+ * Configure/autoconfigure the port.
+ */
+static void arc_serial_config_port(struct uart_port *port, int flags)
+{
+	struct arc_uart_port *uart = (struct arc_uart_port *)port;
+
+	if (flags & UART_CONFIG_TYPE &&
+	    arc_serial_request_port(&uart->port) == 0)
+		uart->port.type = PORT_ARC;
+}
+
+static void arc_serial_poll_putchar(struct uart_port *port, unsigned char chr)
+{
+	struct arc_uart_port *uart = (struct arc_uart_port *)port;
+
+	while (!(UART_GET_STATUS(uart) & TXEMPTY))
+		cpu_relax();
+
+	UART_SET_DATA(uart, chr);
+}
+
+#ifdef CONFIG_CONSOLE_POLL
+static int arc_serial_poll_getchar(struct uart_port *port)
+{
+	struct arc_uart_port *uart = (struct arc_uart_port *)port;
+	unsigned char chr;
+
+	while (!(UART_GET_STATUS(uart) & RXEMPTY))
+		cpu_relax();
+
+	chr = UART_GET_DATA(uart);
+	return chr;
+}
+#endif
+
+static struct uart_ops arc_serial_pops = {
+	.tx_empty	= arc_serial_tx_empty,
+	.set_mctrl	= arc_serial_set_mctrl,
+	.get_mctrl	= arc_serial_get_mctrl,
+	.stop_tx	= arc_serial_stop_tx,
+	.start_tx	= arc_serial_start_tx,
+	.stop_rx	= arc_serial_stop_rx,
+	.enable_ms	= arc_serial_enable_ms,
+	.break_ctl	= arc_serial_break_ctl,
+	.startup	= arc_serial_startup,
+	.shutdown	= arc_serial_shutdown,
+	.set_termios	= arc_serial_set_termios,
+	.set_ldisc	= arc_serial_set_ldisc,
+	.type		= arc_serial_type,
+	.release_port	= arc_serial_release_port,
+	.request_port	= arc_serial_request_port,
+	.config_port	= arc_serial_config_port,
+	.verify_port	= arc_serial_verify_port,
+#ifdef CONFIG_CONSOLE_POLL
+	.poll_put_char = arc_serial_poll_putchar,
+	.poll_get_char = arc_serial_poll_getchar,
+#endif
+};
+
+static int __devinit
+arc_uart_init_one(struct platform_device *pdev, struct arc_uart_port *uart)
+{
+	struct resource *res, *res2;
+	unsigned long *plat_data;
+
+	if (pdev->id < 0 || pdev->id >= CONFIG_SERIAL_ARC_NR_PORTS) {
+		dev_err(&pdev->dev, "Wrong uart platform device id.\n");
+		return -ENOENT;
+	}
+
+	plat_data = ((unsigned long *)(pdev->dev.platform_data));
+	uart->baud = plat_data[0];
+
+	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
+	if (!res)
+		return -ENODEV;
+
+	res2 = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
+	if (!res2)
+		return -ENODEV;
+
+	uart->port.mapbase = res->start;
+	uart->port.membase = ioremap_nocache(res->start, resource_size(res));
+	if (!uart->port.membase)
+		/* No point of pr_err since UART itself is hosed here */
+		return -ENXIO;
+
+	uart->port.irq = res2->start;
+	uart->port.dev = &pdev->dev;
+	uart->port.iotype = UPIO_MEM;
+	uart->port.flags = UPF_BOOT_AUTOCONF;
+	uart->port.line = pdev->id;
+	uart->port.ops = &arc_serial_pops;
+
+	uart->port.uartclk = plat_data[1];
+	uart->port.fifosize = ARC_UART_TX_FIFO_SIZE;
+
+	/*
+	 * uart_insert_char( ) uses it in decideding whether to ignore a
+	 * char or not. Explicitly setting it here, removes the subtelty
+	 */
+	uart->port.ignore_status_mask = 0;
+
+
+	return 0;
+}
+
+#ifdef CONFIG_SERIAL_ARC_CONSOLE
+
+static int __devinit arc_serial_console_setup(struct console *co, char *options)
+{
+	struct uart_port *port;
+	int baud = 115200;
+	int bits = 8;
+	int parity = 'n';
+	int flow = 'n';
+
+	if (co->index < 0 || co->index >= CONFIG_SERIAL_ARC_NR_PORTS)
+		return -ENODEV;
+
+	/*
+	 * The uart port backing the console (e.g. ttyS1) might not have been
+	 * init yet. If so, defer the console setup to after the port.
+	 */
+	port = &arc_uart_ports[co->index].port;
+	if (!port->membase)
+		return -ENODEV;
+
+	if (options)
+		uart_parse_options(options, &baud, &parity, &bits, &flow);
+
+	/*
+	 * Serial core will call port->ops->set_termios( )
+	 * which will set the baud reg
+	 */
+	return uart_set_options(port, co, baud, parity, bits, flow);
+}
+
+static void arc_serial_console_putchar(struct uart_port *port, int ch)
+{
+	arc_serial_poll_putchar(port, (unsigned char)ch);
+}
+
+/*
+ * Interrupts are disabled on entering
+ */
+static void arc_serial_console_write(struct console *co, const char *s,
+				     unsigned int count)
+{
+	struct uart_port *port = &arc_uart_ports[co->index].port;
+	unsigned long flags;
+
+	spin_lock_irqsave(&port->lock, flags);
+	uart_console_write(port, s, count, arc_serial_console_putchar);
+	spin_unlock_irqrestore(&port->lock, flags);
+}
+
+static struct console arc_serial_console = {
+	.name	= ARC_SERIAL_DEV_NAME,
+	.write	= arc_serial_console_write,
+	.device	= uart_console_device,
+	.setup	= arc_serial_console_setup,
+	.flags	= CON_PRINTBUFFER,
+	.index	= -1,
+	.data	= &arc_uart_driver
+};
+
+static __init void early_serial_write(struct console *con, const char *s,
+					unsigned int n)
+{
+	struct uart_port *port = &arc_uart_ports[con->index].port;
+	unsigned int i;
+
+	for (i = 0; i < n; i++, s++) {
+		if (*s == '\n')
+			arc_serial_poll_putchar(port, '\r');
+		arc_serial_poll_putchar(port, *s);
+	}
+}
+
+static struct __initdata console arc_early_serial_console = {
+	.name = "early_ARCuart",
+	.write = early_serial_write,
+	.flags = CON_PRINTBUFFER | CON_BOOT,
+	.index = -1
+};
+
+static int __devinit arc_serial_probe_earlyprintk(struct platform_device *pdev)
+{
+	arc_early_serial_console.index = pdev->id;
+
+	arc_uart_init_one(pdev, &arc_uart_ports[pdev->id]);
+
+	arc_serial_console_setup(&arc_early_serial_console, NULL);
+
+	register_console(&arc_early_serial_console);
+	return 0;
+}
+#endif
+
+
+static int __devinit arc_serial_probe(struct platform_device *pdev)
+{
+	struct arc_uart_port *uart;
+	int rc;
+
+	if (is_early_platform_device(pdev))
+		return arc_serial_probe_earlyprintk(pdev);
+
+	uart = &arc_uart_ports[pdev->id];
+	rc = arc_uart_init_one(pdev, uart);
+	if (rc)
+		return rc;
+
+	return uart_add_one_port(&arc_uart_driver, &uart->port);
+}
+
+static int __devexit arc_serial_remove(struct platform_device *pdev)
+{
+	/* This will never be called */
+	return 0;
+}
+
+static struct platform_driver arc_platform_driver = {
+	.probe = arc_serial_probe,
+	.remove = __devexit_p(arc_serial_remove),
+	.driver = {
+		.name = DRIVER_NAME,
+		.owner = THIS_MODULE,
+	 },
+};
+
+#ifdef CONFIG_SERIAL_ARC_CONSOLE
+/*
+ * Register an early platform driver of "earlyprintk" class.
+ * ARCH platform code installs the driver and probes the early devices
+ * The installation could rely on user specifying earlyprintk=xyx in cmd line
+ * or it could be done independently, for all "earlyprintk" class drivers.
+ * [see arch/arc/plat-arcfpga/platform.c]
+ */
+early_platform_init("earlyprintk", &arc_platform_driver);
+
+#endif  /* CONFIG_SERIAL_ARC_CONSOLE */
+
+static int __init arc_serial_init(void)
+{
+	int ret;
+
+	pr_info("Serial: ARC serial driver: platform register\n");
+
+	ret = uart_register_driver(&arc_uart_driver);
+	if (ret)
+		return ret;
+
+	ret = platform_driver_register(&arc_platform_driver);
+	if (ret) {
+		pr_debug("uart register failed\n");
+		uart_unregister_driver(&arc_uart_driver);
+	}
+
+	return ret;
+}
+
+static void __exit arc_serial_exit(void)
+{
+	platform_driver_unregister(&arc_platform_driver);
+	uart_unregister_driver(&arc_uart_driver);
+}
+
+module_init(arc_serial_init);
+module_exit(arc_serial_exit);
+
+MODULE_LICENSE("GPL");
+MODULE_ALIAS("plat-arcfpga/uart");
+MODULE_AUTHOR("Vineet Gupta");
+MODULE_DESCRIPTION("ARC(Synopsys) On-Chip(fpga) serial driver");
diff --git a/include/linux/serial_core.h b/include/linux/serial_core.h
index 0253c20..706a042 100644
--- a/include/linux/serial_core.h
+++ b/include/linux/serial_core.h
@@ -214,6 +214,9 @@
 /* Energy Micro efm32 SoC */
 #define PORT_EFMUART   100
 
+/* ARC (Synopsys) on-chip UART */
+#define PORT_ARC       101
+
 #ifdef __KERNEL__
 
 #include <linux/compiler.h>
-- 
1.7.4.1


^ permalink raw reply related

* [PATCH] tty/8250_early: Prevent rounding error in uartclk to baud ratio
From: Alexey Brodkin @ 2012-09-28 12:19 UTC (permalink / raw)
  To: gregkh, alan; +Cc: linux-serial, linux-kernel, Vineet.Gupta1, Alexey.Brodkin

Modify divisor to select the nearest baud rate divider rather than the
lowest. It minimizes baud rate errors especially on low UART clock
frequencies.

For example, if uartclk is 33000000 and baud is 115200 the ratio is
about 17.9 The current code selects 17 (5% error) but should select 18
(0.5% error).

On the same lines as following:
http://www.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.9-rc3/2.6.9-rc3-mm2/broken-out/serial-pick-nearest-baud-rate-divider.patch

Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
---
 drivers/tty/serial/8250_early.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/tty/serial/8250_early.c b/drivers/tty/serial/8250_early.c
index eaafb98..cfc46b7 100644
--- a/drivers/tty/serial/8250_early.c
+++ b/drivers/tty/serial/8250_early.c
@@ -140,7 +140,7 @@ static void __init init_port(struct early_serial8250_device *device)
 	serial_out(port, UART_FCR, 0);		/* no fifo */
 	serial_out(port, UART_MCR, 0x3);	/* DTR + RTS */
 
-	divisor = port->uartclk / (16 * device->baud);
+	divisor = (port->uartclk + (8 * device->baud)) / (16 *	device->baud);
 	c = serial_in(port, UART_LCR);
 	serial_out(port, UART_LCR, c | UART_LCR_DLAB);
 	serial_out(port, UART_DLL, divisor & 0xff);
-- 
1.7.9.5


^ permalink raw reply related

* [PATCH] tty/8250_early: Prevent rounding error in uartclk to baud ratio
From: Alexey Brodkin @ 2012-09-28 12:03 UTC (permalink / raw)
  To: gregkh, alan, linux-serial, linux-kernel, Vineet.Gupta1,
	Alexey.Brodkin

Modify divisor to select the nearest baud rate divider rather than the
lowest. It minimizes baud rate errors especially on low UART clock
frequencies.

For example, if uartclk is 33000000 and baud is 115200 the ratio is
about 17.9 The current code selects 17 (5% error) but should select 18
(0.5% error).

On the same lines as following:
http://www.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.9-rc3/2.6.9-rc3-mm2/broken-out/serial-pick-nearest-baud-rate-divider.patch

Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
---
 drivers/tty/serial/8250_early.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/tty/serial/8250_early.c b/drivers/tty/serial/8250_early.c
index eaafb98..cfc46b7 100644
--- a/drivers/tty/serial/8250_early.c
+++ b/drivers/tty/serial/8250_early.c
@@ -140,7 +140,7 @@ static void __init init_port(struct early_serial8250_device *device)
 	serial_out(port, UART_FCR, 0);		/* no fifo */
 	serial_out(port, UART_MCR, 0x3);	/* DTR + RTS */
 
-	divisor = port->uartclk / (16 * device->baud);
+	divisor = (port->uartclk + (8 * device->baud)) / (16 *	device->baud);
 	c = serial_in(port, UART_LCR);
 	serial_out(port, UART_LCR, c | UART_LCR_DLAB);
 	serial_out(port, UART_DLL, divisor & 0xff);
-- 
1.7.9.5


^ permalink raw reply related

* Re: [PATCH-v3] tty: prevent unnecessary work queue lock checking on flip buffer copy
From: Greg KH @ 2012-09-27 16:53 UTC (permalink / raw)
  To: Alan Cox; +Cc: Ivo Sieben, Alan Cox, linux-serial, RT
In-Reply-To: <20120927141522.7d3e26de@pyramind.ukuu.org.uk>

On Thu, Sep 27, 2012 at 02:15:22PM +0100, Alan Cox wrote:
> On Thu, 27 Sep 2012 13:58:21 +0200
> Ivo Sieben <meltedpianoman@gmail.com> wrote:
> 
> > When low_latency flag is set the TTY receive flip buffer is copied to the
> > line discipline directly instead of using a work queue in the background.
> > Therefor only in case a workqueue is actually used for copying data to the
> > line discipline we'll have to flush the workqueue.
> > 
> > This prevents unnecessary spin lock/unlock on the workqueue spin lock that
> > can cause additional scheduling overhead on a PREEMPT_RT system. On a 200
> > MHz AT91SAM9261 processor setup this fixes about 100us of scheduling
> > overhead on the TTY read call.
> > 
> > Signed-off-by: Ivo Sieben <meltedpianoman@gmail.com>
> 
> Acked-by: Alan Cox <alan@linux.intel.com>
> 
> (but for 3.8 not 3.7 ...)

Yes, I will hold onto this until 3.7-rc1 is out, thanks.

greg k-h

^ permalink raw reply

* Re: [PATCH-v3] tty: prevent unnecessary work queue lock checking on flip buffer copy
From: Alan Cox @ 2012-09-27 13:15 UTC (permalink / raw)
  To: Ivo Sieben; +Cc: Alan Cox, Greg KH, linux-serial, RT
In-Reply-To: <1348747101-13462-1-git-send-email-meltedpianoman@gmail.com>

On Thu, 27 Sep 2012 13:58:21 +0200
Ivo Sieben <meltedpianoman@gmail.com> wrote:

> When low_latency flag is set the TTY receive flip buffer is copied to the
> line discipline directly instead of using a work queue in the background.
> Therefor only in case a workqueue is actually used for copying data to the
> line discipline we'll have to flush the workqueue.
> 
> This prevents unnecessary spin lock/unlock on the workqueue spin lock that
> can cause additional scheduling overhead on a PREEMPT_RT system. On a 200
> MHz AT91SAM9261 processor setup this fixes about 100us of scheduling
> overhead on the TTY read call.
> 
> Signed-off-by: Ivo Sieben <meltedpianoman@gmail.com>

Acked-by: Alan Cox <alan@linux.intel.com>

(but for 3.8 not 3.7 ...)

^ permalink raw reply

* [PATCH-v3] tty: prevent unnecessary work queue lock checking on flip buffer copy
From: Ivo Sieben @ 2012-09-27 12:02 UTC (permalink / raw)
  To: Alan Cox, Greg KH, linux-serial, RT; +Cc: Ivo Sieben
In-Reply-To: <1348747101-13462-1-git-send-email-meltedpianoman@gmail.com>

When low_latency flag is set the TTY receive flip buffer is copied to the
line discipline directly instead of using a work queue in the background.
Therefor only in case a workqueue is actually used for copying data to the
line discipline we'll have to flush the workqueue.

This prevents unnecessary spin lock/unlock on the workqueue spin lock that
can cause additional scheduling overhead on a PREEMPT_RT system. On a 200
MHz AT91SAM9261 processor setup this fixes about 100us of scheduling
overhead on the TTY read call.

Signed-off-by: Ivo Sieben <meltedpianoman@gmail.com>
---
 v3:
 Prevented the flush the easy way: workque is not flused when low latency
 flag is set. This means that drivers that use the tty_schedule_flip()
 functions instead of the tty_flip_buffer_push() should never have the
 low_latency flag set, otherwise the workqueue won't be flushed. Added a
 WARN_ON() to detect those drivers.

 For PREEMPT_RT systems: this optimization will only work when the user has
 actually enabled the ASYNC_LOW_LATENCY option for the serial driver, otherwise
 the workqueue will still be flushed although it is not used since the PREMPT_RT
 patch makes the tty_flip_buffer_push() function to always bypass the workqueue.

 drivers/tty/tty_buffer.c |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/drivers/tty/tty_buffer.c b/drivers/tty/tty_buffer.c
index 6146e8b..b952de1 100644
--- a/drivers/tty/tty_buffer.c
+++ b/drivers/tty/tty_buffer.c
@@ -342,6 +342,8 @@ EXPORT_SYMBOL(tty_insert_flip_string_flags);
  *	Takes any pending buffers and transfers their ownership to the
  *	ldisc side of the queue. It then schedules those characters for
  *	processing by the line discipline.
+ *	Note that this function can only be used when the low_latency flag
+ *	is unset. Otherwise the workqueue won't be flushed.
  *
  *	Locking: Takes tty->buf.lock
  */
@@ -349,6 +351,7 @@ EXPORT_SYMBOL(tty_insert_flip_string_flags);
 void tty_schedule_flip(struct tty_struct *tty)
 {
 	unsigned long flags;
+	WARN_ON(tty->low_latency);
 	spin_lock_irqsave(&tty->buf.lock, flags);
 	if (tty->buf.tail != NULL)
 		tty->buf.tail->commit = tty->buf.tail->used;
@@ -514,7 +517,8 @@ static void flush_to_ldisc(struct work_struct *work)
  */
 void tty_flush_to_ldisc(struct tty_struct *tty)
 {
-	flush_work(&tty->buf.work);
+	if (!tty->low_latency)
+		flush_work(&tty->buf.work);
 }
 
 /**
-- 
1.7.9.5



^ permalink raw reply related

* [PATCH-v3] tty: prevent unnecessary work queue lock checking on flip buffer copy
From: Ivo Sieben @ 2012-09-27 11:58 UTC (permalink / raw)
  To: Alan Cox, Greg KH, linux-serial, RT; +Cc: Ivo Sieben
In-Reply-To: <20120925154707.33aa2fa4@pyramind.ukuu.org.uk>

When low_latency flag is set the TTY receive flip buffer is copied to the
line discipline directly instead of using a work queue in the background.
Therefor only in case a workqueue is actually used for copying data to the
line discipline we'll have to flush the workqueue.

This prevents unnecessary spin lock/unlock on the workqueue spin lock that
can cause additional scheduling overhead on a PREEMPT_RT system. On a 200
MHz AT91SAM9261 processor setup this fixes about 100us of scheduling
overhead on the TTY read call.

Signed-off-by: Ivo Sieben <meltedpianoman@gmail.com>
---
 v3:
 todo

 drivers/tty/tty_buffer.c |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/drivers/tty/tty_buffer.c b/drivers/tty/tty_buffer.c
index 6146e8b..b952de1 100644
--- a/drivers/tty/tty_buffer.c
+++ b/drivers/tty/tty_buffer.c
@@ -342,6 +342,8 @@ EXPORT_SYMBOL(tty_insert_flip_string_flags);
  *	Takes any pending buffers and transfers their ownership to the
  *	ldisc side of the queue. It then schedules those characters for
  *	processing by the line discipline.
+ *	Note that this function can only be used when the low_latency flag
+ *	is unset. Otherwise the workqueue won't be flushed.
  *
  *	Locking: Takes tty->buf.lock
  */
@@ -349,6 +351,7 @@ EXPORT_SYMBOL(tty_insert_flip_string_flags);
 void tty_schedule_flip(struct tty_struct *tty)
 {
 	unsigned long flags;
+	WARN_ON(tty->low_latency);
 	spin_lock_irqsave(&tty->buf.lock, flags);
 	if (tty->buf.tail != NULL)
 		tty->buf.tail->commit = tty->buf.tail->used;
@@ -514,7 +517,8 @@ static void flush_to_ldisc(struct work_struct *work)
  */
 void tty_flush_to_ldisc(struct tty_struct *tty)
 {
-	flush_work(&tty->buf.work);
+	if (!tty->low_latency)
+		flush_work(&tty->buf.work);
 }
 
 /**
-- 
1.7.9.5



^ permalink raw reply related

* Re: [tty:tty-next 36/40] kernel/debug/kdb/kdb_main.c:2839:4: warning: passing argument 2 of 'kdb_register_repeat' from incompatible pointer type
From: Fengguang Wu @ 2012-09-27  2:59 UTC (permalink / raw)
  To: Anton Vorontsov
  Cc: Yuanhan Liu, kernel-janitors, Greg Kroah-Hartman, linux-serial,
	Jason Wessel
In-Reply-To: <20120927025242.GA10435@lizard>

> > > Also, "arch/cris/arch-v32/kernel/kgdb.c" -- it seems like it is its own
> > > implementation of KGDB. :-) But it's CONFIG_ETRAX_KGDB...
> > 
> > Doing the regular 'make' triggers these errors:
> > 
> > arch/cris/arch-v10/kernel/kgdb.c:1273:6: warning: missing terminating " character [enabled by default]
> 
> Yup, as I said, arch/cris/arch-v10/kernel/kgdb.c have nothing to do with
> kernel/debug/'s KGDB/KDB stuff. It seem to be a very-very old, completely
> separate implementation of GDB protocol.

OK.

Thanks,
Fengguang

^ permalink raw reply

* Re: [tty:tty-next 36/40] kernel/debug/kdb/kdb_main.c:2839:4: warning: passing argument 2 of 'kdb_register_repeat' from incompatible pointer type
From: Anton Vorontsov @ 2012-09-27  2:52 UTC (permalink / raw)
  To: Fengguang Wu
  Cc: Yuanhan Liu, kernel-janitors, Greg Kroah-Hartman, linux-serial,
	Jason Wessel
In-Reply-To: <20120927023647.GA12399@localhost>

On Thu, Sep 27, 2012 at 10:36:47AM +0800, Fengguang Wu wrote:
[...]
> > I suspect there are some toolchain issues, or arch/cris/ does something
> > weird with the build system.
> 
> Ah silly me! I'm doing "make M=kernel/debug/kdb" which leads to all
> the error/warnings. This can be fixed trivially. :)

:-)

That explains it.

> > Also, "arch/cris/arch-v32/kernel/kgdb.c" -- it seems like it is its own
> > implementation of KGDB. :-) But it's CONFIG_ETRAX_KGDB...
> 
> Doing the regular 'make' triggers these errors:
> 
> arch/cris/arch-v10/kernel/kgdb.c:1273:6: warning: missing terminating " character [enabled by default]

Yup, as I said, arch/cris/arch-v10/kernel/kgdb.c have nothing to do with
kernel/debug/'s KGDB/KDB stuff. It seem to be a very-very old, completely
separate implementation of GDB protocol.

Thanks,
Anton.

^ permalink raw reply

* Re: [tty:tty-next 36/40] kernel/debug/kdb/kdb_main.c:2839:4: warning: passing argument 2 of 'kdb_register_repeat' from incompatible pointer type
From: Fengguang Wu @ 2012-09-27  2:36 UTC (permalink / raw)
  To: Anton Vorontsov
  Cc: Yuanhan Liu, kernel-janitors, Greg Kroah-Hartman, linux-serial,
	Jason Wessel
In-Reply-To: <20120927021119.GA29097@lizard>

On Wed, Sep 26, 2012 at 07:11:19PM -0700, Anton Vorontsov wrote:
> On Wed, Sep 26, 2012 at 06:39:32PM -0700, Anton Vorontsov wrote:
> > On Thu, Sep 27, 2012 at 09:29:16AM +0800, Fengguang Wu wrote:
> > > FYI, there are new compile warnings show up in
> > > 
> > > tree:   git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty.git tty-next
> > > head:   0c57dfcc6c1d037243c2f8fbf62eab3633326ec0
> > > commit: 729043e82cdd403a131127254528afea8031ebab [36/40] kdb: Turn KGDB_KDB=n stubs into static inlines
> > > config: cris-allyesconfig
> > > 
> > > All warnings (together with lots of *old* errors):
> > 
> > As we switched from empty macros to proper type-checking functions, the
> > new warnings most probably are all OK, but just to be sure...
> > 
> > Which are the new warnings? Do you have old build logs to compare?
> 
> I guess these are the new ones:
> 
> > > kernel/debug/kdb/kdb_main.c:2839:4: warning: passing argument 2 of 'kdb_register_repeat' from incompatible pointer type [enabled by default]
> > > kernel/debug/kdb/kdb_main.c:2696:5: note: expected 'kdb_func_t' but argument is of type 'struct kdbmsg_t *'
> > > kernel/debug/kdb/kdb_main.c:2841:4: warning: passing argument 2 of 'kdb_register_repeat' from incompatible pointer type [enabled by default]
> 
> They're all OK. Before my patch, kgdb_register_repeat() was an empty
> macro. But since we now do proper functions, the new warnings pop up.

Yes.

> Also, there's something interesting:
> 
> > > kernel/debug/kdb/kdb_main.c:2696:5: error: redefinition of 'kdb_register_repeat'
> > > include/linux/kdb.h:156:19: note: previous definition of 'kdb_register_repeat' was here
> 
> This means that we're trying to build KDB, but kdb.h don't see
> CONFIG_KGDB_KDB.
> 
> More over, 'make ARCH=cris allyesconfig' producing .config with KGDB=n
> and KGDB_KDB=n. And criss doesn't select HAVE_ARCH_KGDB.
 
It's true.

> I suspect there are some toolchain issues, or arch/cris/ does something
> weird with the build system.

Ah silly me! I'm doing "make M=kernel/debug/kdb" which leads to all
the error/warnings. This can be fixed trivially. :)

> Also, "arch/cris/arch-v32/kernel/kgdb.c" -- it seems like it is its own
> implementation of KGDB. :-) But it's CONFIG_ETRAX_KGDB...

Doing the regular 'make' triggers these errors:

arch/cris/arch-v10/kernel/kgdb.c:1273:6: warning: missing terminating " character [enabled by default]
arch/cris/arch-v10/kernel/kgdb.c:1273:1: error: missing terminating " character
arch/cris/arch-v10/kernel/kgdb.c:1274:3: error: expected string literal before '.' token
arch/cris/arch-v10/kernel/kgdb.c:1359:1: warning: missing terminating " character [enabled by default]
arch/cris/arch-v10/kernel/kgdb.c:1359:1: error: missing terminating " character
arch/cris/arch-v10/kernel/kgdb.c:1370:6: warning: missing terminating " character [enabled by default]
arch/cris/arch-v10/kernel/kgdb.c:1370:1: error: missing terminating " character
arch/cris/arch-v10/kernel/kgdb.c:1457:1: warning: missing terminating " character [enabled by default]
arch/cris/arch-v10/kernel/kgdb.c:1457:1: error: missing terminating " character
arch/cris/arch-v10/kernel/kgdb.c:508:1: warning: 'copy_registers' defined but not used [-Wunused-function]
arch/cris/arch-v10/kernel/kgdb.c:255:13: warning: 'copy_registers_from_stack' declared 'static' but never defined [-Wunused-function]
arch/cris/arch-v10/kernel/kgdb.c:259:13: warning: 'copy_registers_to_stack' declared 'static' but never defined [-Wunused-function]
arch/cris/arch-v10/kernel/kgdb.c:267:12: warning: 'write_stack_register' declared 'static' but never defined [-Wunused-function]
arch/cris/arch-v10/kernel/kgdb.c:924:1: warning: 'handle_exception' defined but not used [-Wunused-function]
arch/cris/arch-v10/kernel/kgdb.c:425:12: warning: 'current_thread_c' defined but not used [-Wunused-variable]
arch/cris/arch-v10/kernel/kgdb.c:426:12: warning: 'current_thread_g' defined but not used [-Wunused-variable]
arch/cris/arch-v10/kernel/kgdb.c:430:18: warning: 'reg_g' defined but not used [-Wunused-variable]
arch/cris/arch-v10/kernel/kgdb.c:442:22: warning: 'is_dyn_brkp' defined but not used [-Wunused-variable]
arch/cris/arch-v10/kernel/kgdb.c:679:12: warning: 'do_printk' defined but not used [-Wunused-variable]
make[2]: *** [arch/cris/arch-v10/kernel/kgdb.o] Error 1

> So, I don't even think KGDB/KDB should be fixed anyhow, since cris doesn't
> select HAVE_ARCH_KGDB, thus 'depends on !CRIS' doesn't make sense.

OK. Sorry for the noises!

Thanks,
Fengguang

^ permalink raw reply

* Re: [tty:tty-next 36/40] kernel/debug/kdb/kdb_main.c:2839:4: warning: passing argument 2 of 'kdb_register_repeat' from incompatible pointer type
From: Greg Kroah-Hartman @ 2012-09-27  2:15 UTC (permalink / raw)
  To: Fengguang Wu
  Cc: Anton Vorontsov, Yuanhan Liu, kernel-janitors, linux-serial,
	Jason Wessel
In-Reply-To: <20120927013622.GA9936@localhost>

On Thu, Sep 27, 2012 at 09:36:22AM +0800, Fengguang Wu wrote:
> On Wed, Sep 26, 2012 at 06:32:23PM -0700, Greg KH wrote:
> > On Thu, Sep 27, 2012 at 09:29:16AM +0800, Fengguang Wu wrote:
> > > Hi Anton,
> > > 
> > > FYI, there are new compile warnings show up in
> > > 
> > > tree:   git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty.git tty-next
> > > head:   0c57dfcc6c1d037243c2f8fbf62eab3633326ec0
> > > commit: 729043e82cdd403a131127254528afea8031ebab [36/40] kdb: Turn KGDB_KDB=n stubs into static inlines
> > > config: cris-allyesconfig
> > 
> > Does the CRIS platform even support KDB?  Perhaps that is why this is
> > failing so badly?
> 
> Yes, I guess so.. Ignore it, or fix it by changing Kconfig to disable
> KDB in the unsupported archs?

Sounds like a good idea, Jason?

greg k-h

^ permalink raw reply

* Re: [tty:tty-next 36/40] kernel/debug/kdb/kdb_main.c:2839:4: warning: passing argument 2 of 'kdb_register_repeat' from incompatible pointer type
From: Anton Vorontsov @ 2012-09-27  2:11 UTC (permalink / raw)
  To: Fengguang Wu
  Cc: Yuanhan Liu, kernel-janitors, Greg Kroah-Hartman, linux-serial,
	Jason Wessel
In-Reply-To: <20120927013930.GA27336@lizard>

On Wed, Sep 26, 2012 at 06:39:32PM -0700, Anton Vorontsov wrote:
> On Thu, Sep 27, 2012 at 09:29:16AM +0800, Fengguang Wu wrote:
> > FYI, there are new compile warnings show up in
> > 
> > tree:   git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty.git tty-next
> > head:   0c57dfcc6c1d037243c2f8fbf62eab3633326ec0
> > commit: 729043e82cdd403a131127254528afea8031ebab [36/40] kdb: Turn KGDB_KDB=n stubs into static inlines
> > config: cris-allyesconfig
> > 
> > All warnings (together with lots of *old* errors):
> 
> As we switched from empty macros to proper type-checking functions, the
> new warnings most probably are all OK, but just to be sure...
> 
> Which are the new warnings? Do you have old build logs to compare?

I guess these are the new ones:

> > kernel/debug/kdb/kdb_main.c:2839:4: warning: passing argument 2 of 'kdb_register_repeat' from incompatible pointer type [enabled by default]
> > kernel/debug/kdb/kdb_main.c:2696:5: note: expected 'kdb_func_t' but argument is of type 'struct kdbmsg_t *'
> > kernel/debug/kdb/kdb_main.c:2841:4: warning: passing argument 2 of 'kdb_register_repeat' from incompatible pointer type [enabled by default]

They're all OK. Before my patch, kgdb_register_repeat() was an empty
macro. But since we now do proper functions, the new warnings pop up.

Also, there's something interesting:

> > kernel/debug/kdb/kdb_main.c:2696:5: error: redefinition of 'kdb_register_repeat'
> > include/linux/kdb.h:156:19: note: previous definition of 'kdb_register_repeat' was here

This means that we're trying to build KDB, but kdb.h don't see
CONFIG_KGDB_KDB.

More over, 'make ARCH=cris allyesconfig' producing .config with KGDB=n
and KGDB_KDB=n. And criss doesn't select HAVE_ARCH_KGDB.

I suspect there are some toolchain issues, or arch/cris/ does something
weird with the build system.

Also, "arch/cris/arch-v32/kernel/kgdb.c" -- it seems like it is its own
implementation of KGDB. :-) But it's CONFIG_ETRAX_KGDB...

So, I don't even think KGDB/KDB should be fixed anyhow, since cris doesn't
select HAVE_ARCH_KGDB, thus 'depends on !CRIS' doesn't make sense.

Thanks,
Anton.

^ permalink raw reply

* Re: [tty:tty-next 36/40] kernel/debug/kdb/kdb_main.c:2839:4: warning: passing argument 2 of 'kdb_register_repeat' from incompatible pointer type
From: Fengguang Wu @ 2012-09-27  2:01 UTC (permalink / raw)
  To: Anton Vorontsov
  Cc: Yuanhan Liu, kernel-janitors, Greg Kroah-Hartman, linux-serial,
	Jason Wessel
In-Reply-To: <20120927013930.GA27336@lizard>

On Wed, Sep 26, 2012 at 06:39:33PM -0700, Anton Vorontsov wrote:
> On Thu, Sep 27, 2012 at 09:29:16AM +0800, Fengguang Wu wrote:
> > FYI, there are new compile warnings show up in
> > 
> > tree:   git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty.git tty-next
> > head:   0c57dfcc6c1d037243c2f8fbf62eab3633326ec0
> > commit: 729043e82cdd403a131127254528afea8031ebab [36/40] kdb: Turn KGDB_KDB=n stubs into static inlines
> > config: cris-allyesconfig
> > 
> > All warnings (together with lots of *old* errors):
> 
> As we switched from empty macros to proper type-checking functions, the
> new warnings most probably are all OK, but just to be sure...

OK.

> Which are the new warnings? Do you have old build logs to compare?

Here are the new warnings that show up in the tty-next HEAD. I'm not
sure it's worth looking into though (they are probably mostly side
effects created by the undefined macros errors). The x86 builds are
clean.

kernel/debug/kdb/kdb_bp.c:484:1: warning: control reaches end of non-void function [-Wreturn-type]
kernel/debug/kdb/kdb_bt.c:126:6: warning: assignment makes pointer from integer without a cast [enabled by default]
kernel/debug/kdb/kdb_bt.c:179:4: warning: format '%p' expects argument of type 'void *', but argument 3 has type 'int' [-Wformat]
kernel/debug/kdb/kdb_debugger.c:23:2: warning: initialization makes integer from pointer without a cast [enabled by default]
kernel/debug/kdb/kdb_debugger.c:23:2: warning: (near initialization for 'kdb_poll_funcs[0]') [enabled by default]
kernel/debug/kdb/kdb_io.c:62:10: warning: comparison between pointer and integer [enabled by default]
kernel/debug/kdb/kdb_main.c:991:10: warning: assignment makes integer from pointer without a cast [enabled by default]
kernel/debug/kdb/kdb_main.c:1091:20: warning: assignment makes pointer from integer without a cast [enabled by default]
kernel/debug/kdb/kdb_main.c:958:25: warning: comparison between pointer and integer [enabled by default]
kernel/debug/kdb/kdb_main.c:1972:2: warning: comparison of distinct pointer types lacks a cast [enabled by default]
kernel/debug/kdb/kdb_main.c:1785:5: warning: "DBG_MAX_REG_NUM" is not defined [-Wundef]
kernel/debug/kdb/kdb_main.c:2276:8: warning: format '%p' expects argument of type 'void *', but argument 2 has type 'int' [-Wformat]
kernel/debug/kdb/kdb_main.c:2905:5: warning: format '%s' expects argument of type 'char *', but argument 2 has type 'kdbmsg_t' [-Wformat]
kernel/debug/kdb/kdb_main.c:2431:8: warning: format '%s' expects argument of type 'char *', but argument 2 has type 'struct kdbmsg_t *' [-Wformat]
kernel/debug/kdb/kdb_main.c:1972:2: warning: initialization from incompatible pointer type [enabled by default]
kernel/debug/kdb/kdb_main.c:1515:46: warning: initialization makes integer from pointer without a cast [enabled by default]
kernel/debug/kdb/kdb_main.c:2839:4: warning: passing argument 2 of 'kdb_register_repeat' from incompatible pointer type [enabled by default]
kernel/debug/kdb/kdb_main.c:658:2: warning: passing argument 2 of 'kdb_strdup' makes integer from pointer without a cast [enabled by default]
kernel/debug/kdb/kdb_main.c:1031:3: warning: passing argument 3 of 'kdb_symbol_print' makes integer from pointer without a cast [enabled by default]
kernel/debug/kdb/kdb_main.c:685:9: warning: passing argument 2 of 'kmalloc' makes integer from pointer without a cast [enabled by default]
kernel/debug/kdb/kdb_main.c:650:2: warning: passing argument 2 of 'kzalloc' makes integer from pointer without a cast [enabled by default]
kernel/debug/kdb/kdb_main.c:966:4: warning: passing argument 2 of 'strcmp' from incompatible pointer type [enabled by default]
kernel/debug/kdb/kdb_main.c:981:10: warning: passing argument 1 of 'strlen' from incompatible pointer type [enabled by default]
kernel/debug/kdb/kdb_main.c:961:10: warning: passing argument 2 of 'strncmp' from incompatible pointer type [enabled by default]
kernel/debug/kdb/kdb_main.c:961:10: warning: passing argument 3 of 'strncmp' makes integer from pointer without a cast [enabled by default]
kernel/debug/kdb/kdb_main.c:1723:42: warning: pointer/integer type mismatch in conditional expression [enabled by default]
kernel/debug/kdb/kdb_main.c:267:3: warning: return makes integer from pointer without a cast [enabled by default]
kernel/debug/kdb/kdb_main.c:1079:2: warning: statement with no effect [-Wunused-value]
kernel/debug/kdb/kdb_main.c:2224:9: warning: unused variable 'mask_M' [-Wunused-variable]
kernel/debug/kdb/kdb_support.c:96:7: warning: assignment makes pointer from integer without a cast [enabled by default]
kernel/debug/kdb/kdb_support.c:803:6: warning: conflicting types for 'debug_kfree' [enabled by default]

> And KDB is (and was) obviously broken for cris, should we disable it via
> Kconfig?

That would be great for me! Otherwise the build system will probably
see old/new problems popping up from time to time in this code.

Thanks,
Fengguang

^ permalink raw reply

* Re: [tty:tty-next 36/40] kernel/debug/kdb/kdb_main.c:2839:4: warning: passing argument 2 of 'kdb_register_repeat' from incompatible pointer type
From: Anton Vorontsov @ 2012-09-27  1:39 UTC (permalink / raw)
  To: Fengguang Wu
  Cc: Yuanhan Liu, kernel-janitors, Greg Kroah-Hartman, linux-serial,
	Jason Wessel
In-Reply-To: <20120927012916.GA9207@localhost>

On Thu, Sep 27, 2012 at 09:29:16AM +0800, Fengguang Wu wrote:
> FYI, there are new compile warnings show up in
> 
> tree:   git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty.git tty-next
> head:   0c57dfcc6c1d037243c2f8fbf62eab3633326ec0
> commit: 729043e82cdd403a131127254528afea8031ebab [36/40] kdb: Turn KGDB_KDB=n stubs into static inlines
> config: cris-allyesconfig
> 
> All warnings (together with lots of *old* errors):

As we switched from empty macros to proper type-checking functions, the
new warnings most probably are all OK, but just to be sure...

Which are the new warnings? Do you have old build logs to compare?

And KDB is (and was) obviously broken for cris, should we disable it via
Kconfig?

Thanks,
Anton.

^ permalink raw reply

* Re: [tty:tty-next 36/40] kernel/debug/kdb/kdb_main.c:2839:4: warning: passing argument 2 of 'kdb_register_repeat' from incompatible pointer type
From: Fengguang Wu @ 2012-09-27  1:36 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Anton Vorontsov, Yuanhan Liu, kernel-janitors, linux-serial,
	Jason Wessel
In-Reply-To: <20120927013223.GA20262@kroah.com>

On Wed, Sep 26, 2012 at 06:32:23PM -0700, Greg KH wrote:
> On Thu, Sep 27, 2012 at 09:29:16AM +0800, Fengguang Wu wrote:
> > Hi Anton,
> > 
> > FYI, there are new compile warnings show up in
> > 
> > tree:   git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty.git tty-next
> > head:   0c57dfcc6c1d037243c2f8fbf62eab3633326ec0
> > commit: 729043e82cdd403a131127254528afea8031ebab [36/40] kdb: Turn KGDB_KDB=n stubs into static inlines
> > config: cris-allyesconfig
> 
> Does the CRIS platform even support KDB?  Perhaps that is why this is
> failing so badly?

Yes, I guess so.. Ignore it, or fix it by changing Kconfig to disable
KDB in the unsupported archs?

Thanks,
Fengguang

^ permalink raw reply

* Re: [tty:tty-next 36/40] kernel/debug/kdb/kdb_main.c:2839:4: warning: passing argument 2 of 'kdb_register_repeat' from incompatible pointer type
From: Greg Kroah-Hartman @ 2012-09-27  1:32 UTC (permalink / raw)
  To: Fengguang Wu
  Cc: Anton Vorontsov, Yuanhan Liu, kernel-janitors, linux-serial,
	Jason Wessel
In-Reply-To: <20120927012916.GA9207@localhost>

On Thu, Sep 27, 2012 at 09:29:16AM +0800, Fengguang Wu wrote:
> Hi Anton,
> 
> FYI, there are new compile warnings show up in
> 
> tree:   git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty.git tty-next
> head:   0c57dfcc6c1d037243c2f8fbf62eab3633326ec0
> commit: 729043e82cdd403a131127254528afea8031ebab [36/40] kdb: Turn KGDB_KDB=n stubs into static inlines
> config: cris-allyesconfig

Does the CRIS platform even support KDB?  Perhaps that is why this is
failing so badly?

greg k-h

^ permalink raw reply

* [tty:tty-next 36/40] kernel/debug/kdb/kdb_main.c:2839:4: warning: passing argument 2 of 'kdb_register_repeat' from incompatible pointer type
From: Fengguang Wu @ 2012-09-27  1:29 UTC (permalink / raw)
  To: Anton Vorontsov
  Cc: Yuanhan Liu, kernel-janitors, Greg Kroah-Hartman, linux-serial,
	Jason Wessel

Hi Anton,

FYI, there are new compile warnings show up in

tree:   git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty.git tty-next
head:   0c57dfcc6c1d037243c2f8fbf62eab3633326ec0
commit: 729043e82cdd403a131127254528afea8031ebab [36/40] kdb: Turn KGDB_KDB=n stubs into static inlines
config: cris-allyesconfig

All warnings (together with lots of *old* errors):

kernel/debug/kdb/kdb_bp.c: In function 'kdb_parsebp':
kernel/debug/kdb/kdb_bp.c:56:18: error: 'BP_ACCESS_WATCHPOINT' undeclared (first use in this function)
kernel/debug/kdb/kdb_bp.c:56:18: note: each undeclared identifier is reported only once for each function it appears in
kernel/debug/kdb/kdb_bp.c:58:18: error: 'BP_WRITE_WATCHPOINT' undeclared (first use in this function)
kernel/debug/kdb/kdb_bp.c:60:18: error: 'BP_HARDWARE_BREAKPOINT' undeclared (first use in this function)
kernel/debug/kdb/kdb_bp.c:62:11: error: 'KDB_ARGCOUNT' undeclared (first use in this function)
kernel/debug/kdb/kdb_bp.c:78:12: error: 'KDB_BADLENGTH' undeclared (first use in this function)
kernel/debug/kdb/kdb_bp.c: In function '_kdb_bp_remove':
kernel/debug/kdb/kdb_bp.c:100:9: error: 'arch_kgdb_ops' undeclared (first use in this function)
kernel/debug/kdb/kdb_bp.c: In function 'kdb_handle_bp':
kernel/debug/kdb/kdb_bp.c:110:6: error: 'kdb_flags' undeclared (first use in this function)
kernel/debug/kdb/kdb_bp.c: In function '_kdb_bp_install':
kernel/debug/kdb/kdb_bp.c:132:6: error: 'kdb_flags' undeclared (first use in this function)
kernel/debug/kdb/kdb_bp.c:148:9: error: 'arch_kgdb_ops' undeclared (first use in this function)
kernel/debug/kdb/kdb_bp.c: In function 'kdb_bp_install':
kernel/debug/kdb/kdb_bp.c:183:7: error: 'kdb_flags' undeclared (first use in this function)
kernel/debug/kdb/kdb_bp.c: In function 'kdb_bp_remove':
kernel/debug/kdb/kdb_bp.c:214:7: error: 'kdb_flags' undeclared (first use in this function)
kernel/debug/kdb/kdb_bp.c: In function 'kdb_printbp':
kernel/debug/kdb/kdb_bp.c:244:38: error: 'KDB_SP_DEFAULT' undeclared (first use in this function)
kernel/debug/kdb/kdb_bp.c: In function 'kdb_bp':
kernel/debug/kdb/kdb_bp.c:309:10: error: 'KDB_BADINT' undeclared (first use in this function)
kernel/debug/kdb/kdb_bp.c:320:10: error: 'KDB_TOOMANYBPT' undeclared (first use in this function)
kernel/debug/kdb/kdb_bp.c:323:22: error: 'BP_HARDWARE_BREAKPOINT' undeclared (first use in this function)
kernel/debug/kdb/kdb_bp.c:328:22: error: 'BP_BREAKPOINT' undeclared (first use in this function)
kernel/debug/kdb/kdb_bp.c:343:11: error: 'KDB_DUPBPT' undeclared (first use in this function)
kernel/debug/kdb/kdb_bp.c: In function 'kdb_bc':
kernel/debug/kdb/kdb_bp.c:402:10: error: 'KDB_ARGCOUNT' undeclared (first use in this function)
kernel/debug/kdb/kdb_bp.c:483:19: error: 'KDB_BPTNOTFOUND' undeclared (first use in this function)
kernel/debug/kdb/kdb_bp.c: In function 'kdb_ss':
kernel/debug/kdb/kdb_bp.c:521:10: error: 'KDB_ARGCOUNT' undeclared (first use in this function)
kernel/debug/kdb/kdb_bp.c: In function 'kdb_initbptab':
kernel/debug/kdb/kdb_bp.c:552:6: error: 'arch_kgdb_ops' undeclared (first use in this function)
kernel/debug/kdb/kdb_bp.c:552:28: error: 'KGDB_HW_BREAKPOINT' undeclared (first use in this function)
kernel/debug/kdb/kdb_bp.c: In function 'kdb_bc':
kernel/debug/kdb/kdb_bp.c:484:1: warning: control reaches end of non-void function [-Wreturn-type]
--
kernel/debug/kdb/kdb_main.c:981:19: error: request for member 'cmd_name' in something not a structure or union
kernel/debug/kdb/kdb_main.c:981:10: warning: passing argument 1 of 'strlen' from incompatible pointer type [enabled by default]
include/linux/string.h:81:24: note: expected 'const char *' but argument is of type 'struct kdbmsg_t *'
kernel/debug/kdb/kdb_main.c:981:10: warning: passing argument 2 of 'strncmp' from incompatible pointer type [enabled by default]
include/linux/string.h:45:12: note: expected 'const char *' but argument is of type 'struct kdbmsg_t *'
kernel/debug/kdb/kdb_main.c:991:16: error: request for member 'cmd_func' in something not a structure or union
kernel/debug/kdb/kdb_main.c:991:27: error: called object '*(struct kdbmsg_t *)&<erroneous-expression>' is not a function
kernel/debug/kdb/kdb_main.c:991:10: warning: assignment makes integer from pointer without a cast [enabled by default]
kernel/debug/kdb/kdb_main.c:995:13: error: request for member 'cmd_repeat' in something not a structure or union
kernel/debug/kdb/kdb_main.c:1027:4: warning: return makes integer from pointer without a cast [enabled by default]
kernel/debug/kdb/kdb_main.c:1031:33: error: 'KDB_SP_DEFAULT' undeclared (first use in this function)
kernel/debug/kdb/kdb_main.c:1031:3: warning: passing argument 3 of 'kdb_symbol_print' makes integer from pointer without a cast [enabled by default]
kernel/debug/kdb/kdb_private.h:115:13: note: expected 'unsigned int' but argument is of type 'struct kdbmsg_t *'
kernel/debug/kdb/kdb_main.c: In function 'kdb_dumpregs':
kernel/debug/kdb/kdb_main.c:1079:2: error: 'kdb_trap_printk' undeclared (first use in this function)
kernel/debug/kdb/kdb_main.c:1079:17: error: lvalue required as increment operand
kernel/debug/kdb/kdb_main.c:1079:2: warning: statement with no effect [-Wunused-value]
kernel/debug/kdb/kdb_main.c:1081:17: error: lvalue required as decrement operand
kernel/debug/kdb/kdb_main.c:1081:2: warning: statement with no effect [-Wunused-value]
kernel/debug/kdb/kdb_main.c: In function 'kdb_set_current_task':
kernel/debug/kdb/kdb_main.c:1090:2: error: implicit declaration of function 'kdb_task_has_cpu' [-Werror=implicit-function-declaration]
kernel/debug/kdb/kdb_main.c:1091:3: error: implicit declaration of function 'KDB_TSKREGS' [-Werror=implicit-function-declaration]
kernel/debug/kdb/kdb_main.c:1091:3: error: implicit declaration of function 'kdb_process_cpu' [-Werror=implicit-function-declaration]
kernel/debug/kdb/kdb_main.c:1091:20: warning: assignment makes pointer from integer without a cast [enabled by default]
kernel/debug/kdb/kdb_main.c: At top level:
kernel/debug/kdb/kdb_main.c:1117:22: error: unknown type name 'kdb_reason_t'
kernel/debug/kdb/kdb_main.c:1118:8: error: unknown type name 'kdb_dbtrap_t'
kernel/debug/kdb/kdb_main.c:1335:19: error: unknown type name 'kdb_reason_t'
kernel/debug/kdb/kdb_main.c:1335:40: error: unknown type name 'kdb_reason_t'
kernel/debug/kdb/kdb_main.c:1336:8: error: unknown type name 'kdb_dbtrap_t'
kernel/debug/kdb/kdb_main.c: In function 'kdb_md':
kernel/debug/kdb/kdb_main.c:1515:46: error: 'KDB_WORD_SIZE' undeclared (first use in this function)
kernel/debug/kdb/kdb_main.c:1515:46: warning: initialization makes integer from pointer without a cast [enabled by default]
kernel/debug/kdb/kdb_main.c:1534:4: warning: return makes integer from pointer without a cast [enabled by default]
kernel/debug/kdb/kdb_main.c:1562:3: warning: return makes integer from pointer without a cast [enabled by default]
kernel/debug/kdb/kdb_main.c:1566:4: warning: return makes integer from pointer without a cast [enabled by default]
kernel/debug/kdb/kdb_main.c:1582:4: warning: return makes integer from pointer without a cast [enabled by default]
kernel/debug/kdb/kdb_main.c:1612:3: warning: return makes integer from pointer without a cast [enabled by default]
kernel/debug/kdb/kdb_main.c:1617:19: warning: comparison between pointer and integer [enabled by default]
kernel/debug/kdb/kdb_main.c:1618:3: warning: return makes integer from pointer without a cast [enabled by default]
kernel/debug/kdb/kdb_main.c:1634:3: warning: return makes integer from pointer without a cast [enabled by default]
kernel/debug/kdb/kdb_main.c:1645:16: warning: assignment makes integer from pointer without a cast [enabled by default]
kernel/debug/kdb/kdb_main.c:1658:16: error: 'CMD_INTERRUPT' undeclared (first use in this function)
kernel/debug/kdb/kdb_main.c: In function 'kdb_mm':
kernel/debug/kdb/kdb_main.c:1704:3: warning: return makes integer from pointer without a cast [enabled by default]
kernel/debug/kdb/kdb_main.c:1707:3: warning: return makes integer from pointer without a cast [enabled by default]
kernel/debug/kdb/kdb_main.c:1715:3: warning: return makes integer from pointer without a cast [enabled by default]
kernel/debug/kdb/kdb_main.c:1721:3: warning: return makes integer from pointer without a cast [enabled by default]
kernel/debug/kdb/kdb_main.c:1723:45: error: 'KDB_WORD_SIZE' undeclared (first use in this function)
kernel/debug/kdb/kdb_main.c:1723:42: warning: pointer/integer type mismatch in conditional expression [enabled by default]
kernel/debug/kdb/kdb_main.c:1723:8: warning: assignment makes integer from pointer without a cast [enabled by default]
kernel/debug/kdb/kdb_main.c: In function 'kdb_go':
kernel/debug/kdb/kdb_main.c:1748:3: warning: return makes integer from pointer without a cast [enabled by default]
kernel/debug/kdb/kdb_main.c:1757:3: warning: return makes integer from pointer without a cast [enabled by default]
kernel/debug/kdb/kdb_main.c:1761:15: error: 'CATASTROPHIC' undeclared (first use in this function)
kernel/debug/kdb/kdb_main.c: In function 'kdb_rd':
kernel/debug/kdb/kdb_main.c:1785:5: warning: "DBG_MAX_REG_NUM" is not defined [-Wundef]
kernel/debug/kdb/kdb_main.c: In function 'kdb_rm':
kernel/debug/kdb/kdb_main.c:1854:5: warning: "DBG_MAX_REG_NUM" is not defined [-Wundef]
kernel/debug/kdb/kdb_main.c: In function 'kdb_sr':
kernel/debug/kdb/kdb_main.c:1922:3: warning: return makes integer from pointer without a cast [enabled by default]
kernel/debug/kdb/kdb_main.c:1923:2: error: 'kdb_trap_printk' undeclared (first use in this function)
kernel/debug/kdb/kdb_main.c:1923:17: error: lvalue required as increment operand
kernel/debug/kdb/kdb_main.c:1923:2: warning: statement with no effect [-Wunused-value]
kernel/debug/kdb/kdb_main.c:1925:17: error: lvalue required as decrement operand
kernel/debug/kdb/kdb_main.c:1925:2: warning: statement with no effect [-Wunused-value]
kernel/debug/kdb/kdb_main.c: In function 'kdb_ef':
kernel/debug/kdb/kdb_main.c:1948:3: warning: return makes integer from pointer without a cast [enabled by default]
kernel/debug/kdb/kdb_main.c: In function 'kdb_lsmod':
kernel/debug/kdb/kdb_main.c:1969:3: warning: return makes integer from pointer without a cast [enabled by default]
kernel/debug/kdb/kdb_main.c:1972:2: error: 'kdb_modules' undeclared (first use in this function)
kernel/debug/kdb/kdb_main.c:1972:2: error: 'kdbmsg_t' has no member named 'next'
kernel/debug/kdb/kdb_main.c:1972:2: warning: initialization from incompatible pointer type [enabled by default]
kernel/debug/kdb/kdb_main.c:1972:2: warning: comparison of distinct pointer types lacks a cast [enabled by default]
kernel/debug/kdb/kdb_main.c: In function 'kdb_dmesg':
kernel/debug/kdb/kdb_main.c:2043:3: warning: return makes integer from pointer without a cast [enabled by default]
kernel/debug/kdb/kdb_main.c: In function 'kdb_disable_nmi':
kernel/debug/kdb/kdb_main.c:2120:2: error: 'arch_kgdb_ops' undeclared (first use in this function)
kernel/debug/kdb/kdb_main.c:2120:15: error: request for member 'enable_nmi' in something not a structure or union
kernel/debug/kdb/kdb_main.c:2120:26: error: called object '<erroneous-expression>' is not a function
kernel/debug/kdb/kdb_main.c:2120:2: warning: statement with no effect [-Wunused-value]
kernel/debug/kdb/kdb_main.c: In function 'kdb_param_enable_nmi':
kernel/debug/kdb/kdb_main.c:2128:2: error: 'arch_kgdb_ops' undeclared (first use in this function)
kernel/debug/kdb/kdb_main.c:2128:15: error: request for member 'enable_nmi' in something not a structure or union
kernel/debug/kdb/kdb_main.c:2128:26: error: called object '<erroneous-expression>' is not a function
kernel/debug/kdb/kdb_main.c:2128:2: warning: statement with no effect [-Wunused-value]
kernel/debug/kdb/kdb_main.c: In function 'kdb_cpu_status':
kernel/debug/kdb/kdb_main.c:2155:4: error: implicit declaration of function 'kdb_task_state_char' [-Werror=implicit-function-declaration]
kernel/debug/kdb/kdb_main.c:2155:4: error: implicit declaration of function 'KDB_TSK' [-Werror=implicit-function-declaration]
kernel/debug/kdb/kdb_main.c: In function 'kdb_cpu':
kernel/debug/kdb/kdb_main.c:2197:3: warning: return makes integer from pointer without a cast [enabled by default]
kernel/debug/kdb/kdb_main.c:2207:3: warning: return makes integer from pointer without a cast [enabled by default]
kernel/debug/kdb/kdb_main.c: In function 'kdb_ps_suppressed':
kernel/debug/kdb/kdb_main.c:2223:2: error: implicit declaration of function 'kdb_task_state_string' [-Werror=implicit-function-declaration]
kernel/debug/kdb/kdb_main.c:2229:3: error: implicit declaration of function 'kdb_task_state' [-Werror=implicit-function-declaration]
kernel/debug/kdb/kdb_main.c:2232:2: error: implicit declaration of function 'kdb_do_each_thread' [-Werror=implicit-function-declaration]
kernel/debug/kdb/kdb_main.c:2232:27: error: expected ';' before '{' token
kernel/debug/kdb/kdb_main.c:2224:9: warning: unused variable 'mask_M' [-Wunused-variable]
kernel/debug/kdb/kdb_main.c: In function 'kdb_ps1':
kernel/debug/kdb/kdb_main.c:2274:21: warning: comparison between pointer and integer [enabled by default]
kernel/debug/kdb/kdb_main.c:2276:8: warning: format '%p' expects argument of type 'void *', but argument 2 has type 'int' [-Wformat]
kernel/debug/kdb/kdb_main.c: In function 'kdb_ps':
kernel/debug/kdb/kdb_main.c:2294:16: error: 'CMD_INTERRUPT' undeclared (first use in this function)
kernel/debug/kdb/kdb_main.c:2302:27: error: expected ';' before '{' token
kernel/debug/kdb/kdb_main.c: In function 'kdb_pid':
kernel/debug/kdb/kdb_main.c:2324:3: warning: return makes integer from pointer without a cast [enabled by default]
kernel/debug/kdb/kdb_main.c:2328:6: warning: assignment makes pointer from integer without a cast [enabled by default]
kernel/debug/kdb/kdb_main.c:2332:5: warning: return makes integer from pointer without a cast [enabled by default]
kernel/debug/kdb/kdb_main.c: In function 'kdb_ll':
kernel/debug/kdb/kdb_main.c:2365:3: warning: return makes integer from pointer without a cast [enabled by default]
kernel/debug/kdb/kdb_main.c:2383:32: error: 'GFP_KDB' undeclared (first use in this function)
kernel/debug/kdb/kdb_main.c:2383:2: warning: passing argument 2 of 'kdb_strdup' makes integer from pointer without a cast [enabled by default]
kernel/debug/kdb/kdb_private.h:114:14: note: expected 'gfp_t' but argument is of type 'struct kdbmsg_t *'
kernel/debug/kdb/kdb_main.c:2394:16: error: 'CMD_INTERRUPT' undeclared (first use in this function)
kernel/debug/kdb/kdb_main.c: In function 'kdb_help':
kernel/debug/kdb/kdb_main.c:2422:2: error: unknown type name 'kdbtab_t'
kernel/debug/kdb/kdb_main.c:2429:9: error: request for member 'cmd_name' in something not a structure or union
kernel/debug/kdb/kdb_main.c:2430:43: error: request for member 'cmd_name' in something not a structure or union
kernel/debug/kdb/kdb_main.c:2431:10: error: request for member 'cmd_usage' in something not a structure or union
kernel/debug/kdb/kdb_main.c:2431:25: error: request for member 'cmd_help' in something not a structure or union
kernel/debug/kdb/kdb_main.c:2431:8: warning: format '%s' expects argument of type 'char *', but argument 2 has type 'struct kdbmsg_t *' [-Wformat]
kernel/debug/kdb/kdb_main.c:2431:8: warning: format '%s' expects argument of type 'char *', but argument 3 has type 'struct kdbmsg_t *' [-Wformat]
kernel/debug/kdb/kdb_main.c:2431:8: warning: format '%s' expects argument of type 'char *', but argument 4 has type 'struct kdbmsg_t *' [-Wformat]
kernel/debug/kdb/kdb_main.c:2432:16: error: 'CMD_INTERRUPT' undeclared (first use in this function)
kernel/debug/kdb/kdb_main.c: In function 'kdb_kill':
kernel/debug/kdb/kdb_main.c:2449:3: warning: return makes integer from pointer without a cast [enabled by default]
kernel/debug/kdb/kdb_main.c:2453:3: warning: return makes integer from pointer without a cast [enabled by default]
kernel/debug/kdb/kdb_main.c:2462:3: warning: return makes integer from pointer without a cast [enabled by default]
kernel/debug/kdb/kdb_main.c:2480:2: error: implicit declaration of function 'kdb_send_sig_info' [-Werror=implicit-function-declaration]
kernel/debug/kdb/kdb_main.c: In function 'kdb_summary':
kernel/debug/kdb/kdb_main.c:2549:3: warning: return makes integer from pointer without a cast [enabled by default]
kernel/debug/kdb/kdb_main.c: In function 'kdb_per_cpu':
kernel/debug/kdb/kdb_main.c:2604:3: warning: return makes integer from pointer without a cast [enabled by default]
kernel/debug/kdb/kdb_main.c:2616:18: error: 'KDB_WORD_SIZE' undeclared (first use in this function)
kernel/debug/kdb/kdb_main.c:2616:16: warning: assignment makes integer from pointer without a cast [enabled by default]
kernel/debug/kdb/kdb_main.c:2617:24: warning: comparison between pointer and integer [enabled by default]
kernel/debug/kdb/kdb_main.c:2618:3: warning: return makes integer from pointer without a cast [enabled by default]
kernel/debug/kdb/kdb_main.c:2626:4: warning: return makes integer from pointer without a cast [enabled by default]
kernel/debug/kdb/kdb_main.c:2643:16: error: 'CMD_INTERRUPT' undeclared (first use in this function)
kernel/debug/kdb/kdb_main.c:2657:17: warning: comparison between pointer and integer [enabled by default]
kernel/debug/kdb/kdb_main.c: At top level:
kernel/debug/kdb/kdb_main.c:2696:5: error: redefinition of 'kdb_register_repeat'
include/linux/kdb.h:156:19: note: previous definition of 'kdb_register_repeat' was here
kernel/debug/kdb/kdb_main.c: In function 'kdb_register_repeat':
kernel/debug/kdb/kdb_main.c:2704:2: error: unknown type name 'kdbtab_t'
kernel/debug/kdb/kdb_main.c:2710:9: error: request for member 'cmd_name' in something not a structure or union
kernel/debug/kdb/kdb_main.c:2710:33: error: request for member 'cmd_name' in something not a structure or union
kernel/debug/kdb/kdb_main.c:2710:3: warning: passing argument 1 of 'strcmp' from incompatible pointer type [enabled by default]
include/linux/string.h:42:12: note: expected 'const char *' but argument is of type 'struct kdbmsg_t *'
kernel/debug/kdb/kdb_main.c:2721:9: error: request for member 'cmd_name' in something not a structure or union
kernel/debug/kdb/kdb_main.c:2726:3: error: unknown type name 'kdbtab_t'
kernel/debug/kdb/kdb_main.c:2727:41: error: 'GFP_KDB' undeclared (first use in this function)
kernel/debug/kdb/kdb_main.c:2727:5: warning: passing argument 2 of 'kmalloc' makes integer from pointer without a cast [enabled by default]
include/linux/slub_def.h:267:30: note: expected 'gfp_t' but argument is of type 'struct kdbmsg_t *'
kernel/debug/kdb/kdb_main.c:2745:4: error: request for member 'cmd_name' in something not a structure or union
kernel/debug/kdb/kdb_main.c:2745:2: warning: statement with no effect [-Wunused-value]
kernel/debug/kdb/kdb_main.c:2746:4: error: request for member 'cmd_func' in something not a structure or union
kernel/debug/kdb/kdb_main.c:2746:2: warning: statement with no effect [-Wunused-value]
kernel/debug/kdb/kdb_main.c:2747:4: error: request for member 'cmd_usage' in something not a structure or union
kernel/debug/kdb/kdb_main.c:2747:2: warning: statement with no effect [-Wunused-value]
kernel/debug/kdb/kdb_main.c:2748:4: error: request for member 'cmd_help' in something not a structure or union
kernel/debug/kdb/kdb_main.c:2748:2: warning: statement with no effect [-Wunused-value]
kernel/debug/kdb/kdb_main.c:2749:4: error: request for member 'cmd_flags' in something not a structure or union
kernel/debug/kdb/kdb_main.c:2749:2: warning: statement with no effect [-Wunused-value]
kernel/debug/kdb/kdb_main.c:2750:4: error: request for member 'cmd_minlen' in something not a structure or union
kernel/debug/kdb/kdb_main.c:2750:2: warning: statement with no effect [-Wunused-value]
kernel/debug/kdb/kdb_main.c:2751:4: error: request for member 'cmd_repeat' in something not a structure or union
kernel/debug/kdb/kdb_main.c:2751:2: warning: statement with no effect [-Wunused-value]
kernel/debug/kdb/kdb_main.c: At top level:
kernel/debug/kdb/kdb_main.c:2770:5: error: redefinition of 'kdb_register'
include/linux/kdb.h:154:19: note: previous definition of 'kdb_register' was here
kernel/debug/kdb/kdb_main.c:2790:5: error: redefinition of 'kdb_unregister'
include/linux/kdb.h:159:19: note: previous definition of 'kdb_unregister' was here
kernel/debug/kdb/kdb_main.c: In function 'kdb_unregister':
kernel/debug/kdb/kdb_main.c:2793:2: error: unknown type name 'kdbtab_t'
kernel/debug/kdb/kdb_main.c:2799:9: error: request for member 'cmd_name' in something not a structure or union
kernel/debug/kdb/kdb_main.c:2799:33: error: request for member 'cmd_name' in something not a structure or union
kernel/debug/kdb/kdb_main.c:2799:3: warning: passing argument 1 of 'strcmp' from incompatible pointer type [enabled by default]
include/linux/string.h:42:12: note: expected 'const char *' but argument is of type 'struct kdbmsg_t *'
kernel/debug/kdb/kdb_main.c:2800:6: error: request for member 'cmd_name' in something not a structure or union
kernel/debug/kdb/kdb_main.c:2800:4: warning: statement with no effect [-Wunused-value]
kernel/debug/kdb/kdb_main.c: In function 'kdb_inittab':
kernel/debug/kdb/kdb_main.c:2814:2: error: unknown type name 'kdbtab_t'
kernel/debug/kdb/kdb_main.c:2817:5: error: request for member 'cmd_name' in something not a structure or union
kernel/debug/kdb/kdb_main.c:2817:3: warning: statement with no effect [-Wunused-value]
kernel/debug/kdb/kdb_main.c:2838:28: error: 'kdb_bt' undeclared (first use in this function)
kernel/debug/kdb/kdb_main.c:2839:4: warning: passing argument 2 of 'kdb_register_repeat' from incompatible pointer type [enabled by default]
kernel/debug/kdb/kdb_main.c:2696:5: note: expected 'kdb_func_t' but argument is of type 'struct kdbmsg_t *'
kernel/debug/kdb/kdb_main.c:2841:4: warning: passing argument 2 of 'kdb_register_repeat' from incompatible pointer type [enabled by default]
kernel/debug/kdb/kdb_main.c:2696:5: note: expected 'kdb_func_t' but argument is of type 'struct kdbmsg_t *'
kernel/debug/kdb/kdb_main.c:2843:4: warning: passing argument 2 of 'kdb_register_repeat' from incompatible pointer type [enabled by default]
kernel/debug/kdb/kdb_main.c:2696:5: note: expected 'kdb_func_t' but argument is of type 'struct kdbmsg_t *'
kernel/debug/kdb/kdb_main.c:2845:4: warning: passing argument 2 of 'kdb_register_repeat' from incompatible pointer type [enabled by default]
kernel/debug/kdb/kdb_main.c:2696:5: note: expected 'kdb_func_t' but argument is of type 'struct kdbmsg_t *'
kernel/debug/kdb/kdb_main.c:2848:8: warning: passing argument 2 of 'kdb_register_repeat' from incompatible pointer type [enabled by default]
kernel/debug/kdb/kdb_main.c:2696:5: note: expected 'kdb_func_t' but argument is of type 'struct kdbmsg_t *'
kernel/debug/kdb/kdb_main.c:2881:6: error: 'arch_kgdb_ops' undeclared (first use in this function)
kernel/debug/kdb/kdb_main.c:2881:19: error: request for member 'enable_nmi' in something not a structure or union
kernel/debug/kdb/kdb_main.c: In function 'kdb_cmd_init':
kernel/debug/kdb/kdb_main.c:2901:14: error: 'kdb_cmds' undeclared (first use in this function)
kernel/debug/kdb/kdb_main.c:2901:14: error: used struct type value where scalar is required
kernel/debug/kdb/kdb_main.c:2902:3: error: incompatible type for argument 1 of 'kdb_parse'
kernel/debug/kdb/kdb_main.c:851:5: note: expected 'const char *' but argument is of type 'kdbmsg_t'
kernel/debug/kdb/kdb_main.c:2902:8: warning: assignment makes integer from pointer without a cast [enabled by default]
kernel/debug/kdb/kdb_main.c:2905:5: warning: format '%s' expects argument of type 'char *', but argument 2 has type 'kdbmsg_t' [-Wformat]
kernel/debug/kdb/kdb_main.c: At top level:
kernel/debug/kdb/kdb_main.c:2914:13: error: redefinition of 'kdb_init'
include/linux/kdb.h:153:20: note: previous definition of 'kdb_init' was here
kernel/debug/kdb/kdb_main.c: In function 'kdb_init':
kernel/debug/kdb/kdb_main.c:2925:4: error: implicit declaration of function 'kdb_initbptab' [-Werror=implicit-function-declaration]
kernel/debug/kdb/kdb_main.c: At top level:
kernel/debug/kdb/kdb_main.c:589:13: warning: 'kdb_cmderror' defined but not used [-Wunused-function]
kernel/debug/kdb/kdb_main.c:1038:12: warning: 'handle_ctrl_cmd' defined but not used [-Wunused-function]
cc1: some warnings being treated as errors

vim +2839 kernel/debug/kdb/kdb_main.c
  2823		  "Display Raw Memory", 0, KDB_REPEAT_NO_ARGS);
  2824		kdb_register_repeat("mdp", kdb_md, "<paddr> <bytes>",
  2825		  "Display Physical Memory", 0, KDB_REPEAT_NO_ARGS);
  2826		kdb_register_repeat("mds", kdb_md, "<vaddr>",
  2827		  "Display Memory Symbolically", 0, KDB_REPEAT_NO_ARGS);
  2828		kdb_register_repeat("mm", kdb_mm, "<vaddr> <contents>",
  2829		  "Modify Memory Contents", 0, KDB_REPEAT_NO_ARGS);
  2830		kdb_register_repeat("go", kdb_go, "[<vaddr>]",
  2831		  "Continue Execution", 1, KDB_REPEAT_NONE);
  2832		kdb_register_repeat("rd", kdb_rd, "",
  2833		  "Display Registers", 0, KDB_REPEAT_NONE);
  2834		kdb_register_repeat("rm", kdb_rm, "<reg> <contents>",
  2835		  "Modify Registers", 0, KDB_REPEAT_NONE);
  2836		kdb_register_repeat("ef", kdb_ef, "<vaddr>",
  2837		  "Display exception frame", 0, KDB_REPEAT_NONE);
  2838		kdb_register_repeat("bt", kdb_bt, "[<vaddr>]",
> 2839		  "Stack traceback", 1, KDB_REPEAT_NONE);
  2840		kdb_register_repeat("btp", kdb_bt, "<pid>",
  2841		  "Display stack for process <pid>", 0, KDB_REPEAT_NONE);
  2842		kdb_register_repeat("bta", kdb_bt, "[DRSTCZEUIMA]",
  2843		  "Display stack all processes", 0, KDB_REPEAT_NONE);
  2844		kdb_register_repeat("btc", kdb_bt, "",
  2845		  "Backtrace current process on each cpu", 0, KDB_REPEAT_NONE);
  2846		kdb_register_repeat("btt", kdb_bt, "<vaddr>",
  2847		  "Backtrace process given its struct task address", 0,

---
0-DAY kernel build testing backend         Open Source Technology Centre
Fengguang Wu, Yuanhan Liu                              Intel Corporation

^ permalink raw reply

* Re: [PATCH 08/11] ARM: Move some macros from entry-armv to entry-header
From: Anton Vorontsov @ 2012-09-26 22:32 UTC (permalink / raw)
  To: Stephen Boyd
  Cc: Greg Kroah-Hartman, Russell King, linaro-kernel, patches,
	Brian Swetland, Jason Wessel, linux-kernel,
	Arve Hjønnevåg, John Stultz, linux-serial, Colin Cross,
	kgdb-bugreport, kernel-team, linux-arm-kernel, Alan Cox
In-Reply-To: <50637C24.90206@codeaurora.org>

On Wed, Sep 26, 2012 at 03:05:24PM -0700, Stephen Boyd wrote:
> > Just move the macros into header file as we would want to use them for
> > KGDB FIQ entry code.
> >
> > The following macros were moved:
> >
> >  - svc_entry
> >  - usr_entry
> >  - kuser_cmpxchg_check
> >  - vector_stub
> >
> > To make kuser_cmpxchg_check actually work across different files, we
> > also have to make kuser_cmpxchg64_fixup global.
> >
> > Signed-off-by: Anton Vorontsov <anton.vorontsov@linaro.org>
> 
> Why can't we put the fiq entry code from the next patch into
> entry-armv.S? Sorry if this has been asked before but I don't see any
> reasoning in the commit text.

Thanks for taking a look!

This is a prerequisite to just logically separate KGDB FIQ code from the
entry code.

Or to put it the other way around: KGDB FIQ is just another user of the
FIQs, nothing quite special in it to put it alongside the entry code. :-)

But if Russell or other folks feel that having KGDB FIQ asm code in
entry-armv.S makes sense, I'd definitely do this.

Thanks,
Anton.

^ permalink raw reply

* Re: [PATCH 08/11] ARM: Move some macros from entry-armv to entry-header
From: Stephen Boyd @ 2012-09-26 22:05 UTC (permalink / raw)
  To: Anton Vorontsov
  Cc: Greg Kroah-Hartman, Russell King, linaro-kernel, patches,
	Brian Swetland, Jason Wessel, linux-kernel,
	Arve Hjønnevåg, John Stultz, linux-serial, Colin Cross,
	kgdb-bugreport, kernel-team, linux-arm-kernel, Alan Cox
In-Reply-To: <1348522080-32629-8-git-send-email-anton.vorontsov@linaro.org>

On 09/24/12 14:27, Anton Vorontsov wrote:
> Just move the macros into header file as we would want to use them for
> KGDB FIQ entry code.
>
> The following macros were moved:
>
>  - svc_entry
>  - usr_entry
>  - kuser_cmpxchg_check
>  - vector_stub
>
> To make kuser_cmpxchg_check actually work across different files, we
> also have to make kuser_cmpxchg64_fixup global.
>
> Signed-off-by: Anton Vorontsov <anton.vorontsov@linaro.org>

Why can't we put the fiq entry code from the next patch into
entry-armv.S? Sorry if this has been asked before but I don't see any
reasoning in the commit text.

-- 
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
hosted by The Linux Foundation


^ permalink raw reply

* Re: [PATCH v9 0/11] KGDB/KDB FIQ (NMI) debugger
From: Anton Vorontsov @ 2012-09-26 20:57 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Russell King, Alan Cox, Jason Wessel, Arve Hjønnevåg,
	Colin Cross, Brian Swetland, John Stultz, linux-kernel,
	linux-arm-kernel, linaro-kernel, patches, kernel-team,
	kgdb-bugreport, linux-serial
In-Reply-To: <20120926205420.GA2510@kroah.com>

On Wed, Sep 26, 2012 at 01:54:20PM -0700, Greg Kroah-Hartman wrote:
> On Mon, Sep 24, 2012 at 02:26:50PM -0700, Anton Vorontsov wrote:
> > Here comes v9...
> > 
> > Greg, patches 1-7 have gotten all the needed acks from Alan and Jason, so
> > it would be awesome if you could apply them to your tty-next tree.
> 
> All 7 patches of these are now applied, thanks.

Thanks a lot, Greg!

^ permalink raw reply

* Re: [PATCH v9 0/11] KGDB/KDB FIQ (NMI) debugger
From: Greg Kroah-Hartman @ 2012-09-26 20:54 UTC (permalink / raw)
  To: Anton Vorontsov
  Cc: Russell King, Alan Cox, Jason Wessel, Arve Hjønnevåg,
	Colin Cross, Brian Swetland, John Stultz, linux-kernel,
	linux-arm-kernel, linaro-kernel, patches, kernel-team,
	kgdb-bugreport, linux-serial
In-Reply-To: <20120924212648.GA27605@lizard>

On Mon, Sep 24, 2012 at 02:26:50PM -0700, Anton Vorontsov wrote:
> Hi all,
> 
> Here comes v9...
> 
> Greg, patches 1-7 have gotten all the needed acks from Alan and Jason, so
> it would be awesome if you could apply them to your tty-next tree.

All 7 patches of these are now applied, thanks.

greg k-h

^ permalink raw reply

* Re: [RFT/PATCH] serial: omap: prevent resume if device is not suspended.
From: Greg KH @ 2012-09-26 20:30 UTC (permalink / raw)
  To: Poddar, Sourav
  Cc: alan, tony, khilman, linux-omap, linux-arm-kernel, linux-serial,
	linux-kernel, santosh.shilimkar, balbi, paul
In-Reply-To: <CAKdam572krJZcayRdJ_AciCUZH3LuzD9yoHenhxrB6j9xDZ6JQ@mail.gmail.com>

On Tue, Sep 25, 2012 at 01:52:03PM +0530, Poddar, Sourav wrote:
> Hi Greg,
> 
> Ping on this?

It was a RFT patch, with a huge thread.  What's the resolution here?
Did people figure out the real problem here or not?  If so, care to
resend the proper patch so I know what to apply?

thanks,

greg k-h

^ permalink raw reply


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox