linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Afzal Mohammed <afzal.mohd.ma@gmail.com>
To: Russell King - ARM Linux <linux@armlinux.org.uk>
Cc: Vladimir Murzin <vladimir.murzin@arm.com>,
	Arnd Bergmann <arnd@arndb.de>,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH RFC 2/2] ARM: nommu: remap exception base address to RAM
Date: Sat, 7 Jan 2017 22:43:39 +0530	[thread overview]
Message-ID: <20170107171339.GA5044@afzalpc> (raw)
In-Reply-To: <20161213100226.GW14217@n2100.armlinux.org.uk>

Hi,

On Tue, Dec 13, 2016 at 10:02:26AM +0000, Russell King - ARM Linux wrote:

> Is there really any need to do this in head.S ?  I believe it's
> entirely possible to do it later - arch/arm/mm/nommu.c:paging_init().

As memblock_reserve() for exception address was done before
paging_init(), seems it has to be done by arm_mm_memblock_reserve() in
arch/arm/mm/nommu.c, WIP patch follows, but not that happy -
conditional compilation's make it not so readable, still better to
see in C.

> Also, if the region setup for the vectors was moved as well, it would
> then be possible to check the ID registers to determine whether this
> is supported, and make the decision where to locate the vectors base
> more dynamically.

This would affect Cortex-R's, which is a bit concerning due to lack of
those platforms with me, let me try to get it right. Seems
translating __setup_mpu() altogether to C & installing at a later, but
suitable place might be better.

And feeling something strange about Cortex-R support in mainline,
don't know whether it boots out of the box, there are no Cortex-R cpu
compatibles in dts(i), but devicetree documentation documents it.
Still wrecking Cortex-R's could get counted as a regression as dts is
not considered Kernel. Looks like there is a Cortex-R mafia around
mainline ;)

> That leaves one pr_notice() call using the CONFIG_VECTORS_BASE
> constant...

Seems you want to completely kick out CONFIG_VECTORS_BASE.

Saw 2 interesting MMU cases,
1. in devicemaps_init(), if Hivecs is not set, it is being mapped to
virtual address zero, was wondering how MMU Kernel can handle
exceptions with zero address base (& still prints 0xffff0000 as vector
base)
2. One of the platform does a ioremap of CONFIG_VECTORS_BASE

Once i take care of the above, the ugly conditional compilation in
3/4th patch (@arch/arm/mm/init.c) of WIP patch series that follows
will be removed.

Please let know if you have any comments on the above.


Also !MMU Kernel could boot on 3 ARM v7-A platforms - AM335x Beagle
Bone (A8), AM437x IDK (A9) & Vybrid VF610 (on A5 core, note that it
has M4 core too) with same Kernel image*.

Vybrid did not need any platform specific tweaks, just 1/2th patch
(put in patch system as 8635/1) & WIP series over Vladimir's one,
while TI Sitara AMx3's needed one w.r.t remap.

Please bear my delay - to fill the stomach, work not on Linux and then
the vacations.

Regards
afzal

* Since initramfs was used, tty port had to be changed in initramfs
build for Vybrid, but Kernel except for above initramfs change, was
identical.

  parent reply	other threads:[~2017-01-07 17:14 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-11 13:10 [PATCH 0/2] ARM: v7-A !MMU fixes for fun (&fame) Afzal Mohammed
2016-12-11 13:11 ` [PATCH 1/2] ARM: nommu: allow enabling REMAP_VECTORS_TO_RAM Afzal Mohammed
2016-12-13  9:17   ` Vladimir Murzin
2016-12-11 13:12 ` [PATCH RFC 2/2] ARM: nommu: remap exception base address to RAM Afzal Mohammed
2016-12-11 14:42   ` Afzal Mohammed
2016-12-13  9:38   ` Vladimir Murzin
2016-12-13 18:44     ` Afzal Mohammed
2016-12-13 10:02   ` Russell King - ARM Linux
2016-12-13 18:35     ` Afzal Mohammed
2017-01-07 17:13     ` Afzal Mohammed [this message]
2017-01-07 17:20       ` [PATCH WIP 1/4] ARM: nommu: dynamic exception base address setting afzal mohammed
2017-01-07 17:21       ` [PATCH WIP 2/4] ARM: nommu: remove Hivecs configuration is asm afzal mohammed
2017-01-07 17:22       ` [PATCH WIP 3/4] ARM: mm: nommu: display dynamic exception base afzal mohammed
2017-01-07 17:22       ` [PATCH WIP 4/4] ARM: remove compile time vector base for CP15 case afzal mohammed
2017-01-07 17:38         ` Russell King - ARM Linux
2017-01-07 18:02           ` Afzal Mohammed
2017-01-07 18:07             ` Afzal Mohammed
2017-01-07 18:24             ` Russell King - ARM Linux
2017-01-08  9:58               ` Afzal Mohammed
2017-01-15 11:47       ` [PATCH RFC 2/2] ARM: nommu: remap exception base address to RAM Afzal Mohammed
2017-01-16  9:53         ` Vladimir Murzin
2017-01-16 12:34           ` Afzal Mohammed
2016-12-12 18:44 ` [PATCH 0/2] ARM: v7-A !MMU fixes for fun (&fame) Afzal Mohammed
2016-12-12 20:42   ` Peter Korsgaard

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=20170107171339.GA5044@afzalpc \
    --to=afzal.mohd.ma@gmail.com \
    --cc=arnd@arndb.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --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;
as well as URLs for NNTP newsgroup(s).