Christian Gagneraud | 1 Feb 14:55 2009
Picon

Performance issue with 8250/16550 on ARM/PC104 boards (?)

Hi all,

I'm working on a data acquisition system which need to record data at 
5 Hz, these data come from analog and discrete boards and from serial 
instruments as well.
This is implemented on ARM/PC104 based embedded systems.
I have noticed that i have lot of input overrun when i use any PC104 
16550 based serial boards.

First of all, i m completely sure that the CPU is not overloaded, 
definitely the system spend almost all its time waiting for data 
(processes/threads spend more time sleeping in the select syscall, and 
the load average of the system is ridiculously low, smth like 0.0/0.2).
Secondly, i'm not asking to sample 10 serial ports running at insane 
baudrates. Currently one instrument send data at 115200, one at 19200 
and a third one at 4800.
Thirdly, The gathered data are written to a text file as they arrived 
and parsed.
Finally it is clear for me that in the userspace nothing much 
happened, but in kernel space there's "quite lot" of work to be done 
(handling a continuous flow of data/irq).

I've tried so far 2 different boards from 2 different companies, and i 
came to the same result, the 8250/16550 drivers through a PC104 bus 
are slow, too slow... At least it looks to me it is the case...

The last board i have tested had 8 built-in serial port, implemented 
in a FPGA, these are proprietary IP core that comes with their own 
(open source) drivers, each serial port has a dedicated interrupt 
line. When i run my application with these serial ports everything is 
(Continue reading)

Wenji Huang | 2 Feb 10:10 2009
Picon

[PATCH] Fix the warning of uninitialized value in driver/serial/8250.c

This patch is to remove the the warning of uninitialized i in 
driver/serial/8250.c

Signed-off-by: Wenji Huang <wenji.huang <at> oracle.com>

diff -Nurh drivers/serial/8250.c.Orig drivers/serial/8250.c
--- drivers/serial/8250.c.Orig  2009-02-02 14:02:47.000000000 -0500
+++ drivers/serial/8250.c       2009-02-02 14:03:30.000000000 -0500
 <at>  <at>  -1678,7 +1678,7  <at>  <at> 

  static void serial_unlink_irq_chain(struct uart_8250_port *up)
  {
-       struct irq_info *i;
+       struct irq_info *i = NULL;
         struct hlist_node *n;
         struct hlist_head *h;

--
To unsubscribe from this list: send the line "unsubscribe linux-serial" in
the body of a message to majordomo <at> vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Laurent Pinchart | 2 Feb 11:03 2009

Re: [PATCH] Fix the warning of uninitialized value in driver/serial/8250.c

On Monday 02 February 2009 10:10:06 Wenji Huang wrote:
> This patch is to remove the the warning of uninitialized i in
> driver/serial/8250.c
>
> Signed-off-by: Wenji Huang <wenji.huang <at> oracle.com>
>
> diff -Nurh drivers/serial/8250.c.Orig drivers/serial/8250.c
> --- drivers/serial/8250.c.Orig  2009-02-02 14:02:47.000000000 -0500
> +++ drivers/serial/8250.c       2009-02-02 14:03:30.000000000 -0500
>  <at>  <at>  -1678,7 +1678,7  <at>  <at> 
>
>   static void serial_unlink_irq_chain(struct uart_8250_port *up)
>   {
> -       struct irq_info *i;
> +       struct irq_info *i = NULL;
>          struct hlist_node *n;
>          struct hlist_head *h;

gcc is wrong, i can't be used uninitialized in that function. You should use 
the following construct instead to suppress the warning without generating any 
code.

	struct irq_info *uninitialized_var(i);

Best regards,

--

-- 
Laurent Pinchart
CSE Semaphore Belgium

(Continue reading)

Alan Cox | 3 Feb 18:22 2009
Picon

Re: [PATCH] Fix the warning of uninitialized value in driver/serial/8250.c

On Mon, 02 Feb 2009 17:10:06 +0800
Wenji Huang <wenji.huang <at> oracle.com> wrote:

> This patch is to remove the the warning of uninitialized i in 
> driver/serial/8250.c
> 
> Signed-off-by: Wenji Huang <wenji.huang <at> oracle.com>

NAK - your gcc is wrong. Use a newer gcc and the warning goes away.

--
To unsubscribe from this list: send the line "unsubscribe linux-serial" in
the body of a message to majordomo <at> vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Alan Cox | 3 Feb 18:21 2009
Picon

Re: [PATCH] Fix the warning of uninitialized value in driver/serial/8250.c

> gcc is wrong, i can't be used uninitialized in that function. You should use 
> the following construct instead to suppress the warning without generating any 
> code.

No need for that either - newer gcc gets it right.
--
To unsubscribe from this list: send the line "unsubscribe linux-serial" in
the body of a message to majordomo <at> vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Komuro | 7 Feb 08:02 2009

[PATCH] serial_cs: support 3com 3C562 lan&modem multi-function card


serial_cs:
  	fix serial_cs to support 3com 3C562 lan&modem multi-function
        pcmcia-card again.

        This code was deleted by Dominik(2006/12/05),
	  but actually it is necessary for this card
        to get the correct configuration register information.

Signed-off-by: Komuro <komurojun-mbn <at> nifty.com>

---

--- linux-2.6.28-stock/drivers/serial/serial_cs.c.orig	2009-01-01 08:03:42.000000000 +0900
+++ linux-2.6.28-stock/drivers/serial/serial_cs.c	2009-01-01 09:55:37.000000000 +0900
 <at>  <at>  -681,7 +681,7  <at>  <at>  static int serial_config(struct pcmcia_d
 	u_char *buf;
 	cisparse_t *parse;
 	cistpl_cftable_entry_t *cf;
-	int i;
+	int i, last_ret, last_fn;

 	DEBUG(0, "serial_config(0x%p)\n", link);

 <at>  <at>  -699,6 +699,17  <at>  <at>  static int serial_config(struct pcmcia_d
 	tuple->TupleDataMax = 255;
 	tuple->Attributes = 0;

+	/* Get configuration register information */
+	tuple->DesiredTuple = CISTPL_CONFIG;
(Continue reading)

Jiri Slaby | 8 Feb 22:58 2009
Picon

Re: [PATCH 1/2] PCI: quirks, don't mark one netmos as class other

Jesse Barnes wrote:
> On Monday, December 08, 2008 7:19 am Jiri Slaby wrote:
>> Let it as serial, since it doesn't have subdevice in the form of 0x00PS.
>>
>> Signed-off-by: Jiri Slaby <jirislaby <at> gmail.com>
>> Cc: Jesse Barnes <jbarnes <at> virtuousgeek.org>
> 
> Applied to my linux-next branch, thanks.

Hi, did this get lost by a chance? I don't see it in your -next branch
anymore. Neither in any other branch nor upstream.

BTW I got:
This patch was dropped because it was merged into mainline or a subsystem tree
from Andrew, so it had to be somewhere, I suppose...
Andrew Morton | 8 Feb 23:45 2009

Re: [PATCH 1/2] PCI: quirks, don't mark one netmos as class other

On Sun, 08 Feb 2009 22:58:39 +0100 Jiri Slaby <jirislaby <at> gmail.com> wrote:

> Jesse Barnes wrote:
> > On Monday, December 08, 2008 7:19 am Jiri Slaby wrote:
> >> Let it as serial, since it doesn't have subdevice in the form of 0x00PS.
> >>
> >> Signed-off-by: Jiri Slaby <jirislaby <at> gmail.com>
> >> Cc: Jesse Barnes <jbarnes <at> virtuousgeek.org>
> > 
> > Applied to my linux-next branch, thanks.
> 
> Hi, did this get lost by a chance? I don't see it in your -next branch
> anymore. Neither in any other branch nor upstream.
> 
> BTW I got:
> This patch was dropped because it was merged into mainline or a subsystem tree
> from Andrew, so it had to be somewhere, I suppose...

yes, it got lost.  I resurrected it.
Matthias Fuchs | 9 Feb 08:35 2009
Picon

Re: [PATCH] serial: Detect XR16C2852 UARTs correctly

> Without this patch Exar XR16C2852 UARTs are detected
> as Motorola 8xxx DUARTs (16550A compatible).
> 
> By checking the fifo size it is possible to
> continue probing for the correct UART type.
> 
> Signed-off-by: Matthias Fuchs <mfuchs <at> ma-fu.de>
> ---
>  drivers/serial/8250.c |   22 +++++++++++++++++++---
>  1 files changed, 19 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/serial/8250.c b/drivers/serial/8250.c
> index 303272a..ec27086 100644
> --- a/drivers/serial/8250.c
> +++ b/drivers/serial/8250.c
>  <at>  <at>  -782,7 +782,7  <at>  <at>  static void autoconfig_has_efr(struct uart_8250_port *up)
>  	 * reading back DLL and DLM.  The chip type depends on the DLM
>  	 * value read back:
>  	 *  0x10 - XR16C850 and the DLL contains the chip revision.
> -	 *  0x12 - XR16C2850.
> +	 *  0x12 - XR16C2850 + XR16C2852.
>  	 *  0x14 - XR16C854.
>  	 */
>  	id1 = autoconfig_read_divisor_id(up);
>  <at>  <at>  -869,11 +869,27  <at>  <at>  static void autoconfig_16550a(struct uart_8250_port *up)
>  			DEBUG_AUTOCONF("EFRv1 ");
>  			up->port.type = PORT_16650;
>  			up->capabilities |= UART_CAP_EFR | UART_CAP_SLEEP;
> +			serial_outp(up, UART_EFR, 0);
> +			return;
(Continue reading)

Jesse Barnes | 9 Feb 18:17 2009

Re: [PATCH 1/2] PCI: quirks, don't mark one netmos as class other

On Sunday, February 8, 2009 2:45 pm Andrew Morton wrote:
> On Sun, 08 Feb 2009 22:58:39 +0100 Jiri Slaby <jirislaby <at> gmail.com> wrote:
> > Jesse Barnes wrote:
> > > On Monday, December 08, 2008 7:19 am Jiri Slaby wrote:
> > >> Let it as serial, since it doesn't have subdevice in the form of
> > >> 0x00PS.
> > >>
> > >> Signed-off-by: Jiri Slaby <jirislaby <at> gmail.com>
> > >> Cc: Jesse Barnes <jbarnes <at> virtuousgeek.org>
> > >
> > > Applied to my linux-next branch, thanks.
> >
> > Hi, did this get lost by a chance? I don't see it in your -next branch
> > anymore. Neither in any other branch nor upstream.
> >
> > BTW I got:
> > This patch was dropped because it was merged into mainline or a subsystem
> > tree from Andrew, so it had to be somewhere, I suppose...
>
> yes, it got lost.  I resurrected it.

Sorry I must have been thinking about another patch when I replied; the 
contents don't look familiar.  Anyway I'll pick it up now.

Thanks,
--

-- 
Jesse Barnes, Intel Open Source Technology Center

Gmane