lkml.org 
[lkml]   [2015]   [Sep]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 2/2] MIPS: initialise MAARs on secondary CPUs
From
Date
On 09/22/2015 08:08 PM, Paul Burton wrote:
> MAARs should be initialised on each CPU (or rather, core) in the system
> in order to achieve consistent behaviour & performance. Previously they
> have only been initialised on the boot CPU which leads to performance
> problems if tasks are later scheduled on a secondary CPU, particularly
> if those tasks make use of unaligned vector accesses where some CPUs
> don't handle any cases in hardware for non-speculative memory regions.
> Fix this by recording the MAAR configuration from the boot CPU and
> applying it to secondary CPUs as part of their bringup.
>
> Reported-by: Doug Gilmore <doug.gilmore@imgtec.com>
> Signed-off-by: Paul Burton <paul.burton@imgtec.com>
> ---
>
> arch/mips/include/asm/maar.h | 9 +++++++++
> arch/mips/kernel/smp.c | 2 ++
> arch/mips/mm/init.c | 28 +++++++++++++++++++++++++---
> 3 files changed, 36 insertions(+), 3 deletions(-)
>
> diff --git a/arch/mips/include/asm/maar.h b/arch/mips/include/asm/maar.h
> index b02891f..21d9607 100644
> --- a/arch/mips/include/asm/maar.h
> +++ b/arch/mips/include/asm/maar.h
> @@ -66,6 +66,15 @@ static inline void write_maar_pair(unsigned idx, phys_addr_t lower,
> }
>
> /**
> + * maar_init() - initialise MAARs
> + *
> + * Performs initialisation of MAARs for the current CPU, making use of the
> + * platforms implementation of platform_maar_init where necessary and
> + * duplicating the setup it provides on secondary CPUs.
> + */
> +extern void maar_init(void);
> +
> +/**
> * struct maar_config - MAAR configuration data
> * @lower: The lowest address that the MAAR pair will affect. Must be
> * aligned to a 2^16 byte boundary.
> diff --git a/arch/mips/kernel/smp.c b/arch/mips/kernel/smp.c
> index a31896c..bd4385a 100644
> --- a/arch/mips/kernel/smp.c
> +++ b/arch/mips/kernel/smp.c
> @@ -42,6 +42,7 @@
> #include <asm/mmu_context.h>
> #include <asm/time.h>
> #include <asm/setup.h>
> +#include <asm/maar.h>
>
> cpumask_t cpu_callin_map; /* Bitmask of started secondaries */
>
> @@ -157,6 +158,7 @@ asmlinkage void start_secondary(void)
> mips_clockevent_init();
> mp_ops->init_secondary();
> cpu_report();
> + maar_init();
>

Hi,

This breaks the ip27_defconfig in both upstream-sfr and linux-next

arch/mips/built-in.o: In function `start_secondary':
(.text+0x123e4): undefined reference to `maar_init'
Makefile:944: recipe for target 'vmlinux' failed


--
markos


\
 
 \ /
  Last update: 2015-09-24 10:41    [W:0.077 / U:0.524 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site