[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <5603B315.4050008@imgtec.com>
Date: Thu, 24 Sep 2015 09:23:49 +0100
From: Markos Chandras <Markos.Chandras@...tec.com>
To: Paul Burton <paul.burton@...tec.com>, <linux-mips@...ux-mips.org>
CC: Rusty Russell <rusty@...tcorp.com.au>,
"Steven J. Hill" <Steven.Hill@...tec.com>,
Andrew Bresticker <abrestic@...omium.org>,
"Bjorn Helgaas" <bhelgaas@...gle.com>,
David Hildenbrand <dahi@...ux.vnet.ibm.com>,
<linux-kernel@...r.kernel.org>,
Aaro Koskinen <aaro.koskinen@....fi>,
"James Hogan" <james.hogan@...tec.com>,
Ingo Molnar <mingo@...nel.org>,
Ralf Baechle <ralf@...ux-mips.org>,
Alex Smith <alex.smith@...tec.com>
Subject: Re: [PATCH 2/2] MIPS: initialise MAARs on secondary CPUs
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@...tec.com>
> Signed-off-by: Paul Burton <paul.burton@...tec.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@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists