All of lore.kernel.org
 help / color / mirror / Atom feed
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: development@efficientek.com
Cc: The development of GNU GRUB <grub-devel@gnu.org>,
	Matthias Lange <matthias.lange@kernkonzept.com>
Subject: Re: [PATCH 3/5] ns8250: Add base support for MMIO UARTs
Date: Sat, 20 Mar 2021 10:30:47 +1100	[thread overview]
Message-ID: <9f6dda4fb3f259dcabd1c9adf772835cdb5aa471.camel@kernel.crashing.org> (raw)
In-Reply-To: <20210319121623.1119889e@crass-HP-ZBook-15-G2>

On Fri, 2021-03-19 at 12:16 -0500, Glenn Washburn wrote:
> diff --git a/grub-core/term/serial.c b/grub-core/term/serial.c
> 
> > index f9271b092..7d4dbb2de 100644
> > --- a/grub-core/term/serial.c
> > +++ b/grub-core/term/serial.c
> > @@ -160,6 +160,18 @@ grub_serial_find (const char *name)
> >         if (!name)
> >        return NULL;
> >   
> > +      FOR_SERIAL_PORTS (port)
> > +     if (grub_strcmp (port->name, name) == 0)
> > +       break;
> > +    }
> > +  if (!port && grub_memcmp (name, "mmio", sizeof ("mmio") - 1) == 0
> > +      && grub_isxdigit (name [sizeof ("mmio") - 1]))
> 
> 
> It would look nicer if the prefix were "mmio:" to more clearly mark it
> as a prefix.

It would but it would diverge from what is done above for port IO
already.

If you look at the caller(s) of grub_serial_find, they basically build
a portNNN string and pass that, unless I misread the code dramatically.

So I wanted to keep this consistent. This is exposed to the user via
the gdb commands, it's not only an internal representation, so if we
want to change *both*, we would have to hack the gdb code to convert
portNNN to port:NNN

Cheers,
Ben.




  reply	other threads:[~2021-03-19 23:33 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-18 22:07 [PATCH 0/5] serial: Add MMIO & SPCR support for AWS EC2 metal instances Benjamin Herrenschmidt
2021-03-18 22:07 ` [PATCH 1/5] acpi: Export a generic grub_acpi_find_table Benjamin Herrenschmidt
2021-03-18 22:07 ` [PATCH 2/5] acpi: Add SPCR and generic address definitions Benjamin Herrenschmidt
2021-03-18 22:07 ` [PATCH 3/5] ns8250: Add base support for MMIO UARTs Benjamin Herrenschmidt
2021-03-19 17:16   ` Glenn Washburn
2021-03-19 23:30     ` Benjamin Herrenschmidt [this message]
2022-05-23 17:11   ` Sven Anderson
2022-05-25  3:13     ` Benjamin Herrenschmidt
2022-08-31  5:56     ` Benjamin Herrenschmidt
2022-08-31  8:26       ` Benjamin Herrenschmidt
2022-09-02  3:58         ` Benjamin Herrenschmidt
2021-03-18 22:07 ` [PATCH 4/5] ns8250: Add configuration parameter when adding ports Benjamin Herrenschmidt
2021-03-18 22:07 ` [PATCH 5/5] ns8250: Use ACPI SPCR table when available to configure serial Benjamin Herrenschmidt
2021-03-19  0:03 ` [PATCH 0/5] serial: Add MMIO & SPCR support for AWS EC2 metal instances Glenn Washburn
2021-03-19  1:27   ` Benjamin Herrenschmidt
2021-03-19 16:25     ` Glenn Washburn
2021-03-23 18:04 ` Daniel Kiper
2021-03-23 22:23   ` Benjamin Herrenschmidt

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=9f6dda4fb3f259dcabd1c9adf772835cdb5aa471.camel@kernel.crashing.org \
    --to=benh@kernel.crashing.org \
    --cc=development@efficientek.com \
    --cc=grub-devel@gnu.org \
    --cc=matthias.lange@kernkonzept.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.