Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1562159 > unrolled thread

[PATCH 0/4] ARM: v7-A !MMU support, CONFIG_VECTORS_BASE removal (almost)

Started byafzal mohammed <afzal.mohd.ma@gmail.com>
First post2017-01-18 21:40 +0100
Last post2017-01-30 13:20 +0100
Articles 6 — 3 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH 0/4] ARM: v7-A !MMU support, CONFIG_VECTORS_BASE removal (almost) afzal mohammed <afzal.mohd.ma@gmail.com> - 2017-01-18 21:40 +0100
    [PATCH 4/4] ARM: nommu: remove Hivecs configuration is asm afzal mohammed <afzal.mohd.ma@gmail.com> - 2017-01-18 21:50 +0100
    [PATCH 3/4] ARM: nommu: display vectors base afzal mohammed <afzal.mohd.ma@gmail.com> - 2017-01-18 22:10 +0100
      Re: [PATCH 3/4] ARM: nommu: display vectors base Russell King - ARM Linux <linux@armlinux.org.uk> - 2017-01-18 23:30 +0100
        Re: [PATCH 3/4] ARM: nommu: display vectors base Afzal Mohammed <afzal.mohd.ma@gmail.com> - 2017-01-19 14:30 +0100
          Re: [PATCH 3/4] ARM: nommu: display vectors base Russell King - ARM Linux <linux@armlinux.org.uk> - 2017-01-30 13:20 +0100

#1562159 — [PATCH 0/4] ARM: v7-A !MMU support, CONFIG_VECTORS_BASE removal (almost)

Fromafzal mohammed <afzal.mohd.ma@gmail.com>
Date2017-01-18 21:40 +0100
Subject[PATCH 0/4] ARM: v7-A !MMU support, CONFIG_VECTORS_BASE removal (almost)
Message-ID<t15bt-o6-55@gated-at.bofh.it>
Hi,

ARM core changes to support !MMU Kernel on v7-A MMU processors. This
series also does the preparation for CONFIG_VECTORS_BASE removal.

Based on the feedback from Russell on the initial patches (part RFC),
it was decided to handle vector base dynamically in C & work towards
the the goal of removing VECTORS_BASE from Kconfig. MMU platform's
always have exception base address at 0xffff0000, while no-MMU CP15
scenario was handled dynamically in C. Hivecs handling for no-MMU CP15
that was done in asm has been moved to C as part of dynamic handling.
This now leaves only vector region setup, used by Cortex-R, to be made
devoid of VECTORS_BASE so as to remove it from Kconfig.

Vladimir is planning to rework MPU code, so it has been left untouched.
VECTORS_BASE is to be removed from Kconfig after the MPU region rework.

This series has been tested on top of mainline on,
1. Vybrid CM4 (!MMU)
2. Vybrid CA5 (MMU)

and on top of Vladimir's series[1] on,
1. Vybrid CM4 (!MMU)
2. Vybrid CA5 (MMU & !MMU)
3. AM437x IDK (MMU & !MMU)

Both above had an additional patch [2] as well, which is in next now.

Regards
afzal

[1] "[RFC v2 PATCH 00/23] Allow NOMMU for MULTIPLATFORM",
    http://lists.infradead.org/pipermail/linux-arm-kernel/2016-November/470966.html
    (git://linux-arm.org/linux-vm.git nommu-rfc-v2)

[2] "[PATCH 1/2] ARM: nommu: allow enabling REMAP_VECTORS_TO_RAM"
    http://lists.infradead.org/pipermail/linux-arm-kernel/2016-December/473593.html

afzal mohammed (4):
  ARM: mmu: decouple VECTORS_BASE from Kconfig
  ARM: nommu: dynamic exception base address setting
  ARM: nommu: display vectors base
  ARM: nommu: remove Hivecs configuration is asm

 arch/arm/include/asm/memory.h  |  2 ++
 arch/arm/kernel/head-nommu.S   |  5 ----
 arch/arm/mach-berlin/platsmp.c |  3 +-
 arch/arm/mm/dump.c             |  5 ++--
 arch/arm/mm/init.c             |  9 ++++--
 arch/arm/mm/mm.h               |  5 ++--
 arch/arm/mm/nommu.c            | 64 ++++++++++++++++++++++++++++++++++++++++--
 7 files changed, 79 insertions(+), 14 deletions(-)

-- 
2.11.0

[toc] | [next] | [standalone]


#1562166 — [PATCH 4/4] ARM: nommu: remove Hivecs configuration is asm

Fromafzal mohammed <afzal.mohd.ma@gmail.com>
Date2017-01-18 21:50 +0100
Subject[PATCH 4/4] ARM: nommu: remove Hivecs configuration is asm
Message-ID<t15l7-rI-3@gated-at.bofh.it>
In reply to#1562159
Now that exception based address is handled dynamically for
processors with CP15, remove Highvecs configuration in assembly.

Signed-off-by: afzal mohammed <afzal.mohd.ma@gmail.com>
---
 arch/arm/kernel/head-nommu.S | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/arch/arm/kernel/head-nommu.S b/arch/arm/kernel/head-nommu.S
index 6b4eb27b8758..2e21e08de747 100644
--- a/arch/arm/kernel/head-nommu.S
+++ b/arch/arm/kernel/head-nommu.S
@@ -152,11 +152,6 @@ __after_proc_init:
 #ifdef CONFIG_CPU_ICACHE_DISABLE
 	bic	r0, r0, #CR_I
 #endif
-#ifdef CONFIG_CPU_HIGH_VECTOR
-	orr	r0, r0, #CR_V
-#else
-	bic	r0, r0, #CR_V
-#endif
 	mcr	p15, 0, r0, c1, c0, 0		@ write control reg
 #elif defined (CONFIG_CPU_V7M)
 	/* For V7M systems we want to modify the CCR similarly to the SCTLR */
-- 
2.11.0

[toc] | [prev] | [next] | [standalone]


#1562178 — [PATCH 3/4] ARM: nommu: display vectors base

Fromafzal mohammed <afzal.mohd.ma@gmail.com>
Date2017-01-18 22:10 +0100
Subject[PATCH 3/4] ARM: nommu: display vectors base
Message-ID<t15Eu-O4-25@gated-at.bofh.it>
In reply to#1562159
The exception base address is now dynamically estimated for no-MMU
case, display it.

Signed-off-by: afzal mohammed <afzal.mohd.ma@gmail.com>
---
 arch/arm/mm/init.c | 5 +++++
 arch/arm/mm/mm.h   | 5 +++--
 2 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/arch/arm/mm/init.c b/arch/arm/mm/init.c
index cf47f86f79ed..9e11f255c3bf 100644
--- a/arch/arm/mm/init.c
+++ b/arch/arm/mm/init.c
@@ -522,7 +522,12 @@ void __init mem_init(void)
 			"      .data : 0x%p" " - 0x%p" "   (%4td kB)\n"
 			"       .bss : 0x%p" " - 0x%p" "   (%4td kB)\n",
 
+#ifdef CONFIG_MMU
 			MLK(UL(VECTORS_BASE), UL(VECTORS_BASE) + (PAGE_SIZE)),
+#else
+			MLK_ROUNDUP(vectors_base, vectors_base + PAGE_SIZE),
+#endif
+
 #ifdef CONFIG_HAVE_TCM
 			MLK(DTCM_OFFSET, (unsigned long) dtcm_end),
 			MLK(ITCM_OFFSET, (unsigned long) itcm_end),
diff --git a/arch/arm/mm/mm.h b/arch/arm/mm/mm.h
index ce727d47275c..546f09437fca 100644
--- a/arch/arm/mm/mm.h
+++ b/arch/arm/mm/mm.h
@@ -79,8 +79,9 @@ struct static_vm {
 extern struct list_head static_vmlist;
 extern struct static_vm *find_static_vm_vaddr(void *vaddr);
 extern __init void add_static_vm_early(struct static_vm *svm);
-
-#endif
+#else /* CONFIG_MMU */
+extern unsigned long vectors_base;
+#endif /* CONFIG_MMU */
 
 #ifdef CONFIG_ZONE_DMA
 extern phys_addr_t arm_dma_limit;
-- 
2.11.0

[toc] | [prev] | [next] | [standalone]


#1562229 — Re: [PATCH 3/4] ARM: nommu: display vectors base

FromRussell King - ARM Linux <linux@armlinux.org.uk>
Date2017-01-18 23:30 +0100
SubjectRe: [PATCH 3/4] ARM: nommu: display vectors base
Message-ID<t16TU-1vQ-13@gated-at.bofh.it>
In reply to#1562178
On Thu, Jan 19, 2017 at 02:08:37AM +0530, afzal mohammed wrote:
> The exception base address is now dynamically estimated for no-MMU
> case, display it.
> 
> Signed-off-by: afzal mohammed <afzal.mohd.ma@gmail.com>
> ---
>  arch/arm/mm/init.c | 5 +++++
>  arch/arm/mm/mm.h   | 5 +++--
>  2 files changed, 8 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/arm/mm/init.c b/arch/arm/mm/init.c
> index cf47f86f79ed..9e11f255c3bf 100644
> --- a/arch/arm/mm/init.c
> +++ b/arch/arm/mm/init.c
> @@ -522,7 +522,12 @@ void __init mem_init(void)
>  			"      .data : 0x%p" " - 0x%p" "   (%4td kB)\n"
>  			"       .bss : 0x%p" " - 0x%p" "   (%4td kB)\n",
>  
> +#ifdef CONFIG_MMU
>  			MLK(UL(VECTORS_BASE), UL(VECTORS_BASE) + (PAGE_SIZE)),
> +#else
> +			MLK_ROUNDUP(vectors_base, vectors_base + PAGE_SIZE),

I think MLK() will do here - no need to use the rounding-up version
as PAGE_SIZE is a multiple of 1k.

-- 
RMK's Patch system: http://www.armlinux.org.uk/developer/patches/
FTTC broadband for 0.8mile line: currently at 9.6Mbps down 400kbps up
according to speedtest.net.

[toc] | [prev] | [next] | [standalone]


#1562702 — Re: [PATCH 3/4] ARM: nommu: display vectors base

FromAfzal Mohammed <afzal.mohd.ma@gmail.com>
Date2017-01-19 14:30 +0100
SubjectRe: [PATCH 3/4] ARM: nommu: display vectors base
Message-ID<t1kWS-23z-7@gated-at.bofh.it>
In reply to#1562229
Hi,

On Wed, Jan 18, 2017 at 10:13:15PM +0000, Russell King - ARM Linux wrote:
> On Thu, Jan 19, 2017 at 02:08:37AM +0530, afzal mohammed wrote:

> > +			MLK_ROUNDUP(vectors_base, vectors_base + PAGE_SIZE),
> 
> I think MLK() will do here - no need to use the rounding-up version
> as PAGE_SIZE is a multiple of 1k.

Yes, i will replace it.

Earlier, used MLK(), got some build error, now checking again, no
build error, i should have messed up something at that time.

Regards
afzal

[toc] | [prev] | [next] | [standalone]


#1569687 — Re: [PATCH 3/4] ARM: nommu: display vectors base

FromRussell King - ARM Linux <linux@armlinux.org.uk>
Date2017-01-30 13:20 +0100
SubjectRe: [PATCH 3/4] ARM: nommu: display vectors base
Message-ID<t5j6a-3SD-5@gated-at.bofh.it>
In reply to#1562702
On Thu, Jan 19, 2017 at 06:46:32PM +0530, Afzal Mohammed wrote:
> Hi,
> 
> On Wed, Jan 18, 2017 at 10:13:15PM +0000, Russell King - ARM Linux wrote:
> > On Thu, Jan 19, 2017 at 02:08:37AM +0530, afzal mohammed wrote:
> 
> > > +			MLK_ROUNDUP(vectors_base, vectors_base + PAGE_SIZE),
> > 
> > I think MLK() will do here - no need to use the rounding-up version
> > as PAGE_SIZE is a multiple of 1k.
> 
> Yes, i will replace it.
> 
> Earlier, used MLK(), got some build error, now checking again, no
> build error, i should have messed up something at that time.

Sorry for the delayed response.

With that change, you can get rid of this preprocessor conditional.
Arrange to have VECTORS_BASE defined to vectors_base in the nommu
part of asm/memory.h.  You'll also need to move the extern of that
there too.

Thanks.

-- 
RMK's Patch system: http://www.armlinux.org.uk/developer/patches/
FTTC broadband for 0.8mile line: currently at 9.6Mbps down 400kbps up
according to speedtest.net.

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web