From: afzal.mohd.ma@gmail.com (Afzal Mohammed)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH WIP 4/4] ARM: remove compile time vector base for CP15 case
Date: Sat, 7 Jan 2017 23:32:27 +0530 [thread overview]
Message-ID: <20170107180227.GA8130@afzalpc> (raw)
In-Reply-To: <20170107173832.GN14217@n2100.armlinux.org.uk>
Hi,
On Sat, Jan 07, 2017 at 05:38:32PM +0000, Russell King - ARM Linux wrote:
> On Sat, Jan 07, 2017 at 10:52:28PM +0530, afzal mohammed wrote:
> > TODO:
> > Kill off VECTORS_BASE completely - this would require to handle MMU
> > case as well as ARM_MPU scenario dynamically.
> Why do you think MMU doesn't already handle it?
i meant here w.r.t displaying vector base address in
arch/arm/mm/init.c, i.e. dynamically get it based on Hivecs setting as
either 0xffff0000 or 0x00000000
>
> > config VECTORS_BASE
> > hex
> > - default 0xffff0000 if MMU || CPU_HIGH_VECTOR
> > - default DRAM_BASE if REMAP_VECTORS_TO_RAM
> > + default 0xffff0000 if MMU
> > default 0x00000000
>
> When MMU=y, the resulting VECTORS_BASE is always 0xffff0000. The only
> case where this ends up zero after your change is when MMU=n.
> The MMU case does have to cater for CPUs wanting vectors at 0xffff0000
> and at 0x00000000, and this is handled via the page tables - but this
> has nothing to do with CONFIG_VECTORS_BASE. CONFIG_VECTORS_BASE
> exists primarily for noMMU.
i had thought that for MMU case if Hivecs is not enabled,
CONFIG_VECTOR_BASE has to be considered as 0x00000000 at least for the
purpose of displaying exception base address.
One thing i have not yet understood is how CPU can take exception with
it base address as 0x00000000 (for Hivecs not enabled case) virtual
address as it is below Kernel memory map.
> For the Berlin and mm/dump code, we could very easily just have a
> #define VECTORS_BASE 0xffff0000 in a header file and drop the CONFIG_
> prefix.
Okay, thanks for the tip.
Regards
afzal
WARNING: multiple messages have this Message-ID (diff)
From: Afzal Mohammed <afzal.mohd.ma@gmail.com>
To: Russell King - ARM Linux <linux@armlinux.org.uk>
Cc: Vladimir Murzin <vladimir.murzin@arm.com>,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH WIP 4/4] ARM: remove compile time vector base for CP15 case
Date: Sat, 7 Jan 2017 23:32:27 +0530 [thread overview]
Message-ID: <20170107180227.GA8130@afzalpc> (raw)
In-Reply-To: <20170107173832.GN14217@n2100.armlinux.org.uk>
Hi,
On Sat, Jan 07, 2017 at 05:38:32PM +0000, Russell King - ARM Linux wrote:
> On Sat, Jan 07, 2017 at 10:52:28PM +0530, afzal mohammed wrote:
> > TODO:
> > Kill off VECTORS_BASE completely - this would require to handle MMU
> > case as well as ARM_MPU scenario dynamically.
> Why do you think MMU doesn't already handle it?
i meant here w.r.t displaying vector base address in
arch/arm/mm/init.c, i.e. dynamically get it based on Hivecs setting as
either 0xffff0000 or 0x00000000
>
> > config VECTORS_BASE
> > hex
> > - default 0xffff0000 if MMU || CPU_HIGH_VECTOR
> > - default DRAM_BASE if REMAP_VECTORS_TO_RAM
> > + default 0xffff0000 if MMU
> > default 0x00000000
>
> When MMU=y, the resulting VECTORS_BASE is always 0xffff0000. The only
> case where this ends up zero after your change is when MMU=n.
> The MMU case does have to cater for CPUs wanting vectors at 0xffff0000
> and at 0x00000000, and this is handled via the page tables - but this
> has nothing to do with CONFIG_VECTORS_BASE. CONFIG_VECTORS_BASE
> exists primarily for noMMU.
i had thought that for MMU case if Hivecs is not enabled,
CONFIG_VECTOR_BASE has to be considered as 0x00000000 at least for the
purpose of displaying exception base address.
One thing i have not yet understood is how CPU can take exception with
it base address as 0x00000000 (for Hivecs not enabled case) virtual
address as it is below Kernel memory map.
> For the Berlin and mm/dump code, we could very easily just have a
> #define VECTORS_BASE 0xffff0000 in a header file and drop the CONFIG_
> prefix.
Okay, thanks for the tip.
Regards
afzal
next prev parent reply other threads:[~2017-01-07 18:02 UTC|newest]
Thread overview: 48+ 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:10 ` Afzal Mohammed
2016-12-11 13:11 ` [PATCH 1/2] ARM: nommu: allow enabling REMAP_VECTORS_TO_RAM Afzal Mohammed
2016-12-11 13:11 ` Afzal Mohammed
2016-12-13 9:17 ` Vladimir Murzin
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 13:12 ` Afzal Mohammed
2016-12-11 14:42 ` Afzal Mohammed
2016-12-11 14:42 ` Afzal Mohammed
2016-12-13 9:38 ` Vladimir Murzin
2016-12-13 9:38 ` Vladimir Murzin
2016-12-13 18:44 ` Afzal Mohammed
2016-12-13 18:44 ` Afzal Mohammed
2016-12-13 10:02 ` Russell King - ARM Linux
2016-12-13 10:02 ` Russell King - ARM Linux
2016-12-13 18:35 ` Afzal Mohammed
2016-12-13 18:35 ` Afzal Mohammed
2017-01-07 17:13 ` Afzal Mohammed
2017-01-07 17:13 ` Afzal Mohammed
2017-01-07 17:20 ` [PATCH WIP 1/4] ARM: nommu: dynamic exception base address setting afzal mohammed
2017-01-07 17:20 ` afzal mohammed
2017-01-07 17:21 ` [PATCH WIP 2/4] ARM: nommu: remove Hivecs configuration is asm afzal mohammed
2017-01-07 17:21 ` 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 ` 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:22 ` afzal mohammed
2017-01-07 17:38 ` Russell King - ARM Linux
2017-01-07 17:38 ` Russell King - ARM Linux
2017-01-07 18:02 ` Afzal Mohammed [this message]
2017-01-07 18:02 ` Afzal Mohammed
2017-01-07 18:07 ` Afzal Mohammed
2017-01-07 18:07 ` Afzal Mohammed
2017-01-07 18:24 ` Russell King - ARM Linux
2017-01-07 18:24 ` Russell King - ARM Linux
2017-01-08 9:58 ` Afzal Mohammed
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-15 11:47 ` Afzal Mohammed
2017-01-16 9:53 ` Vladimir Murzin
2017-01-16 9:53 ` Vladimir Murzin
2017-01-16 12:34 ` Afzal Mohammed
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 18:44 ` Afzal Mohammed
2016-12-12 20:42 ` Peter Korsgaard
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=20170107180227.GA8130@afzalpc \
--to=afzal.mohd.ma@gmail.com \
--cc=linux-arm-kernel@lists.infradead.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 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.