public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Ingo Molnar <mingo@kernel.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	"H. Peter Anvin" <hpa@zytor.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	Ingo Molnar <mingo@redhat.com>,
	x86@kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v1 4/6] x86/boot: Assume MMIO if serial base address supplied via earlyprintk
Date: Thu, 03 May 2018 13:45:58 +0300	[thread overview]
Message-ID: <1525344358.21176.643.camel@linux.intel.com> (raw)
In-Reply-To: <20180116155520.gqdztulncpsmu5zp@gmail.com>

On Tue, 2018-01-16 at 16:55 +0100, Ingo Molnar wrote:
> * Andy Shevchenko <andriy.shevchenko@linux.intel.com> wrote:
> 
> > On Tue, 2018-01-16 at 04:13 +0100, Ingo Molnar wrote:
> > > * Andy Shevchenko <andriy.shevchenko@linux.intel.com> wrote:
> > > 
> > > > If user supplied serial base address via kernel command line and
> > > > value
> > > > is higher than IO space limit (64k boundary), assume for now
> > > > that
> > > > MMIO
> > > > byte access is required.
> > > > 
> > > > Later we might expand or modify this if needed.
> > > 
> > > Is this a standard pattern for serial code configuration values?
> > 
> > I didn't get what you meant under "standard" here.
> > 
> > IO space limit comes from generic io.h header and AFAIU is a
> > hardware
> > limitation (outN (%dx), ...; inX (%dx); dx is 16 bit register).
> > 
> > Using mmio8 out of the IO space is dictated by the (modern) x86
> > platforms with non-standard (okay, high speed) UART location in
> > address
> > space.
> 
> So I was wondering whether we should just make mmio configuration an
> explicit 
> parameter instead of a 'range hack'.

I _think_ it can be done later without breaking any existed
configurations.

> Since we are introducing something entirely new the choice is ours.
> 
> Doing it that way would technically be cleaner, as, at least
> theoretically,
> there could be platforms with mmio addresses below 64k physical,
> right?

Correct, though we are talking about x86 world where I have no example
like this. Either we have LPC ports (I/O 0x3f8 and alike) or HS UARTS on
higher MMIO addresses. Note, that PCI code guarantees that range bump as
well when resources would be allocated for unassigned, by firmware, PCI
UART controllers.

> It's also more self-documenting if the new configuration/parameter
> says 'mmio' 
> explicitly.

I would look at it, though it might make things much more complicated to
implement. And yes, it wouldn't reduce fragility of the parser anyway.

Perhaps we can unify earlycon parser with earlyprintk one (not sure if
it's possible since this nice trick with sharing same code between
compressed and boot code).

-- 
Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Intel Finland Oy

  reply	other threads:[~2018-05-03 10:45 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-14 14:32 [PATCH v1 1/6] x86/boot: Convert early_serial_base to unsigned long Andy Shevchenko
2018-01-14 14:32 ` [PATCH v1 2/6] x86/boot: Introduce helpers for serial I/O Andy Shevchenko
2018-01-14 14:32 ` [PATCH v1 3/6] x86/boot: Add MMIO byte accessors Andy Shevchenko
2018-01-14 14:32 ` [PATCH v1 4/6] x86/boot: Assume MMIO if serial base address supplied via earlyprintk Andy Shevchenko
2018-01-16  3:13   ` Ingo Molnar
2018-01-16 10:55     ` Andy Shevchenko
2018-01-16 15:55       ` Ingo Molnar
2018-05-03 10:45         ` Andy Shevchenko [this message]
2018-01-14 14:32 ` [PATCH v1 5/6] x86/boot: Allow longer parameter list for earlyprintk Andy Shevchenko
2018-01-16  3:11   ` Ingo Molnar
2018-01-16 10:57     ` Andy Shevchenko
2018-01-16 15:51       ` Ingo Molnar
2018-05-03 11:48         ` Andy Shevchenko
2018-01-14 14:32 ` [PATCH v1 6/6] x86/boot: Support nocfg parameter " Andy Shevchenko
2018-01-16  3:12   ` Ingo Molnar
2018-01-16 11:00     ` Andy Shevchenko
2018-01-16 15:53       ` Ingo Molnar

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=1525344358.21176.643.camel@linux.intel.com \
    --to=andriy.shevchenko@linux.intel.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=mingo@redhat.com \
    --cc=tglx@linutronix.de \
    --cc=x86@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