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


Groups > linux.kernel > #1231943

Re: [PATCH 2/2] MIPS: initialise MAARs on secondary CPUs

From Markos Chandras <Markos.Chandras@imgtec.com>
Newsgroups linux.kernel
Subject Re: [PATCH 2/2] MIPS: initialise MAARs on secondary CPUs
Date 2015-09-24 10:30 +0200
Message-ID <qca4G-60q-21@gated-at.bofh.it> (permalink)
References <qbB6W-5Uu-23@gated-at.bofh.it> <qbBgC-665-9@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[PATCH 0/2] MAAR SMP fix Paul Burton <paul.burton@imgtec.com> - 2015-09-22 21:10 +0200
  [PATCH 2/2] MIPS: initialise MAARs on secondary CPUs Paul Burton <paul.burton@imgtec.com> - 2015-09-22 21:20 +0200
    Re: [PATCH 2/2] MIPS: initialise MAARs on secondary CPUs Markos Chandras <Markos.Chandras@imgtec.com> - 2015-09-24 10:30 +0200

csiph-web