public inbox for linux-serial@vger.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: Dan Raymond <draymond@foxvalley.net>
Cc: linux-serial@vger.kernel.org, ilpo.jarvinen@linux.intel.com
Subject: Re: [PATCH v3] tty/serial: create debugfs interface for UART register tracing
Date: Fri, 25 Aug 2023 10:06:53 +0200	[thread overview]
Message-ID: <2023082515-scored-rage-50a3@gregkh> (raw)
In-Reply-To: <eb8a598c-414e-aecf-e903-e2c01db1979a@foxvalley.net>

On Thu, Aug 24, 2023 at 02:59:01PM -0600, Dan Raymond wrote:
> Implement a UART register tracing facility using the debugfs.  This can be
> used as a "serial port sniffer" to monitor UART traffic and line settings
> with timestamps at microsecond granularity.  This can be useful for general
> serial port debugging or to debug the UART driver itself.
> 
> Signed-off-by: Dan Raymond <draymond@foxvalley.net>
> ---
> V1 -> V2:
>   - add Kconfig option to disable SERIAL_8250_DEBUG feature
>   - limit comments to 80 columns
>   - add defaults to documentation for debugfs files
>   - convert documentation to kernel-doc and link to Documentation/trace/index.rst
>   - switch user types (uint32_t) to kernel types (u32)
>   - reorganize reg_queue structure to prevent memory holes
>   - embed spinlock inside structure it protects
>   - reduce size of line[] buffer to avoid wasted memory
>   - use min_t() macro to select minimum of two integers
>   - simplify return statement from buffer_read()
>   - move comment for "round down to nearest power of 2"
>   - split double assignment of pointers into two lines
>   - use SZ_4K instead of 4096
> 
> V2 -> V3:
>   - change formatting of timestamp from "hh:mm:ss.mmmuuu" to "ssssssss.mmmuuu"
>   - create a new field in 'struct uart_port' instead of using 'private_data'

Better!  But please, look into using the tracing infrastructure and
functionality first.  Only if that is somehow not workable at all should
we regress into using stuff like debugfs for this.

thanks,

greg k-h

  reply	other threads:[~2023-08-25  8:27 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-24 20:59 [PATCH v3] tty/serial: create debugfs interface for UART register tracing Dan Raymond
2023-08-25  8:06 ` Greg KH [this message]
2023-09-13  5:59   ` Dan Raymond
2023-08-31 18:08 ` Andy Shevchenko
2023-08-31 18:33   ` Dan Raymond
2023-08-31 18:58     ` Greg KH
2023-08-31 22:59     ` Andy Shevchenko
2023-09-11 22:14       ` Dan Raymond
2023-09-11 22:53         ` Andy Shevchenko

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=2023082515-scored-rage-50a3@gregkh \
    --to=gregkh@linuxfoundation.org \
    --cc=draymond@foxvalley.net \
    --cc=ilpo.jarvinen@linux.intel.com \
    --cc=linux-serial@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