mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Alan Cox <gnomes@lxorguk.ukuu.org.uk>
To: "Enrico Weigelt, metux IT consult" <enrico.weigelt@gr13.net>
Cc: linux-kernel@vger.kernel.org
Subject: Re: Directly accessing serial ports from drivers w/o TTYs ?
Date: Fri, 30 Jun 2017 18:23:55 +0100	[thread overview]
Message-ID: <20170630182355.42c2e22b@alans-desktop> (raw)
In-Reply-To: <cf910296-8bd9-aca8-079b-149580f1ddd0@gr13.net>

> I was thinking about something that looks like serdev from consumer
> side, but instead directly works on struct uart_port, w/o actually
> allocating a tty (and also the funny things like signals, etc).

uart_port is only a subset of tty devices and also relies upon tty for
some of the locking and other behaviour.

> > Why do you need to do otherwise ?  
> 
> Maybe it could offer better performance ?

Unless you have very tight latency requirements I would be surprised if
you could do that much better even on a slow machine. If you don't need
tty semantics then you can probably beat it hands down by writing your
own custom driver for the hardware that doesn't pretend to be a tty in
the first place.

The cost in the tty stack is pretty much all the Unix tty API and POSIX
guarantees.

Alan

      reply	other threads:[~2017-06-30 17:24 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-25 22:43 Enrico Weigelt, metux IT consult
2017-06-26 14:51 ` Alan Cox
2017-06-29 11:44   ` Enrico Weigelt, metux IT consult
2017-06-30 17:23     ` Alan Cox [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170630182355.42c2e22b@alans-desktop \
    --to=gnomes@lxorguk.ukuu.org.uk \
    --cc=enrico.weigelt@gr13.net \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome