linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Maarten Brock <m.brock@vanmierlo.com>
To: Michal Simek <michal.simek@xilinx.com>
Cc: Greg KH <gregkh@linuxfoundation.org>,
	johan@kernel.org, linux-kernel@vger.kernel.org, monstr@monstr.eu,
	git@xilinx.com, Jiri Slaby <jslaby@suse.com>,
	linux-arm-kernel@lists.infradead.org,
	linux-serial@vger.kernel.org, linux-serial-owner@vger.kernel.org
Subject: Re: [PATCH 0/7] serial: uartps: Revert dynamic port allocation
Date: Fri, 03 Apr 2020 17:48:42 +0200	[thread overview]
Message-ID: <211f564d5594994fc677d3fea4222997@vanmierlo.com> (raw)
In-Reply-To: <2983dbe2-16e6-4b7b-73a6-49d8c3d70510@xilinx.com>

On 2020-04-03 11:51, Michal Simek wrote:
> 
> Thanks. I am definitely interested to hear more how this could be done
> differently because that hardcoded limits are painful.
> On FPGAs you can have a lot of uarts for whatever reason and users are
> using DT aliases to have consistent naming.
> Specifically on Xilinx devices we are using uartps which is ttyPS,
> uartlite which is ttyUL, ns16500 which is ttyS and also pl011 which is
> ttyAMA.
> Only ttyAMA or ttyPS on one chip are possible.
> 
> And right now you can't have serial0 alias pointed ttyPS0 and another
> serial0 pointed to ttyUL0 or ttyS0. That's why others are shifted and 
> we
> can reach that hardcoded NR_UART limit easily.
> And this was the reason why I have done these patches in past to remove
> any limit from these drivers and if user asks for serial100 alias you
> simply get ttyPS100 node.

I would argue that the trouble originates from every uart driver using
its own naming scheme and thereby creating separate namespaces. If all
uarts would register as /dev/ttySnn then the serialN alias method would
work. These non-overlapping namespaces is something the linux kernel
driver community has allowed to happen.

If the namespaces are not abandoned and disallowed, then the serialN
alias method must no longer be used for any driver that does not create
/dev/ttySnn devices. Every namespace will require its own alias base.
Or forget about deriving the number from an alias and set the number in
a property in the device tree node itself. The latter has my preference.

Maarten


  reply	other threads:[~2020-04-03 16:19 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-03  9:24 [PATCH 0/7] serial: uartps: Revert dynamic port allocation Michal Simek
2020-04-03  9:24 ` [PATCH 1/7] Revert "serial: uartps: Fix uartps_major handling" Michal Simek
2020-04-03  9:24 ` [PATCH 2/7] Revert "serial: uartps: Use the same dynamic major number for all ports" Michal Simek
2020-04-03  9:24 ` [PATCH 3/7] Revert "serial: uartps: Fix error path when alloc failed" Michal Simek
2020-04-03  9:24 ` [PATCH 4/7] Revert "serial: uartps: Do not allow use aliases >= MAX_UART_INSTANCES" Michal Simek
2020-04-03  9:24 ` [PATCH 5/7] Revert "serial: uartps: Change uart ID port allocation" Michal Simek
2020-04-03  9:24 ` [PATCH 6/7] Revert "serial: uartps: Move Port ID to device data structure" Michal Simek
2020-04-03  9:24 ` [PATCH 7/7] Revert "serial: uartps: Register own uart console and driver structures" Michal Simek
2020-04-03  9:32 ` [PATCH 0/7] serial: uartps: Revert dynamic port allocation Greg KH
2020-04-03  9:37   ` Michal Simek
2020-04-03  9:44     ` Greg KH
2020-04-03  9:51       ` Michal Simek
2020-04-03 15:48         ` Maarten Brock [this message]
2020-04-03 15:56           ` Michal Simek

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=211f564d5594994fc677d3fea4222997@vanmierlo.com \
    --to=m.brock@vanmierlo.com \
    --cc=git@xilinx.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=johan@kernel.org \
    --cc=jslaby@suse.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-serial-owner@vger.kernel.org \
    --cc=linux-serial@vger.kernel.org \
    --cc=michal.simek@xilinx.com \
    --cc=monstr@monstr.eu \
    /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;
as well as URLs for NNTP newsgroup(s).