Linux kbuild/kconfig development
 help / color / mirror / Atom feed
From: Russell King - ARM Linux <linux@armlinux.org.uk>
To: Nicolas Pitre <nicolas.pitre@linaro.org>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>,
	Greg Ungerer <gerg@linux-m68k.org>,
	Linux ARM <linux-arm-kernel@lists.infradead.org>,
	Vladimir Murzin <vladimir.murzin@arm.com>,
	Chris Brandt <Chris.Brandt@renesas.com>,
	Arnd Bergmann <arnd@arndb.de>,
	linux-kbuild <linux-kbuild@vger.kernel.org>
Subject: Re: [PATCHv4 4/4] ARM: versatile: support configuring versatile machine for no-MMU
Date: Fri, 22 Jun 2018 17:11:01 +0100	[thread overview]
Message-ID: <20180622161101.GW17671@n2100.armlinux.org.uk> (raw)
In-Reply-To: <nycvar.YSQ.7.76.1806221146140.16670@knanqh.ubzr>

On Fri, Jun 22, 2018 at 11:57:32AM -0400, Nicolas Pitre wrote:
> That is no longer a kernel config/build issue if you the system 
> integrator put an XIP kernel on a target with the wrong DT.
> 
> The XIP kernel does require that you provide the actual memory base 
> address as a constant to the build system but that could be extracted 
> directly from the DT data if having a kconfig prompt for that is too 
> unwieldy. The new kconfig macro language in mainline could even be 
> leveraged to do that at config time.

That is actually incorrect - you're too used to the dynamic fixup of
virt_to_phys() and friends now!

Given that XIP is typically used in environments where the kernel text
is very much unmodifyable, we disable CONFIG_ARM_PATCH_PHYS_VIRT.  When
disabled, we use a constant translation, based upon the build-time
CONFIG_PHYS_OFFSET and CONFIG_PAGE_OFFSET settings.

The early assembler relies upon these settings - which must be known
before we enable the MMU.  As such, DT parsing is not available to us
at that point (as we can't run any C code, because we won't be calling
it at the address it was linked for.)

I suppose someone who was sufficiently motivated could write assembly-
based parsing of DT to extract the memory regions and work out what the
right settings are.  Is there really the motivation to do that - there
was a burst of XIP interest a few releases ago but it seems to have
tailed off.

-- 
RMK's Patch system: http://www.armlinux.org.uk/developer/patches/
FTTC broadband for 0.8mile line in suburbia: sync at 8.8Mbps down 630kbps up
According to speedtest.net: 8.21Mbps down 510kbps up

  reply	other threads:[~2018-06-22 16:11 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20180618141905.7789-1-gerg@linux-m68k.org>
     [not found] ` <20180618141905.7789-5-gerg@linux-m68k.org>
     [not found]   ` <CAMuHMdUyCEq0U_CJindwcSEF+0dR-SJc1v8zGT-CcUqVkdOeVw@mail.gmail.com>
2018-06-21 16:24     ` [PATCHv4 4/4] ARM: versatile: support configuring versatile machine for no-MMU Nicolas Pitre
2018-06-21 16:45       ` Chris Brandt
2018-06-22  6:27         ` Geert Uytterhoeven
2018-06-22 13:26           ` Chris Brandt
2018-06-22 11:01       ` Russell King - ARM Linux
2018-06-22 15:25         ` Nicolas Pitre
2018-06-22 15:33           ` Geert Uytterhoeven
2018-06-22 15:57             ` Nicolas Pitre
2018-06-22 16:11               ` Russell King - ARM Linux [this message]
2018-06-22 16:21                 ` Nicolas Pitre
2018-06-22 16:40                   ` Russell King - ARM Linux
2018-06-22 16:54                     ` Nicolas Pitre
2018-06-22 17:09                       ` Russell King - ARM Linux
2018-06-22 17:25                         ` Nicolas Pitre
2018-06-22 16:40                 ` Chris Brandt
2018-06-22 16:44               ` Chris Brandt
2018-06-22 17:05                 ` Nicolas Pitre
2018-06-22 17:23                   ` Chris Brandt
2018-06-22 17:47                     ` Nicolas Pitre
2018-06-22 18:38                     ` Russell King - ARM Linux
2018-06-22 20:25                       ` Chris Brandt
2018-06-22 20:28                         ` Geert Uytterhoeven
2018-06-22 20:33                         ` Russell King - ARM Linux

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=20180622161101.GW17671@n2100.armlinux.org.uk \
    --to=linux@armlinux.org.uk \
    --cc=Chris.Brandt@renesas.com \
    --cc=arnd@arndb.de \
    --cc=geert@linux-m68k.org \
    --cc=gerg@linux-m68k.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=nicolas.pitre@linaro.org \
    --cc=vladimir.murzin@arm.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox