From: Russell King - ARM Linux <linux@arm.linux.org.uk> To: Tony Lindgren <tony@atomide.com> Cc: Ivaylo Dimitrov <ivo.g.dimitrov.75@gmail.com>, Matthijs van Duin <matthijsvanduin@gmail.com>, Sebastian Reichel <sre@kernel.org>, Pavel Machek <pavel@ucw.cz>, "linux-omap@vger.kernel.org" <linux-omap@vger.kernel.org>, "linux-arm-kernel@lists.infradead.org" <linux-arm-kernel@lists.infradead.org> Subject: Re: ARM errata 430973 on multi platform kernels Date: Thu, 9 Apr 2015 14:48:43 +0100 [thread overview] Message-ID: <20150409134843.GQ4027@n2100.arm.linux.org.uk> (raw) In-Reply-To: <20150408230658.GO4027@n2100.arm.linux.org.uk> On Thu, Apr 09, 2015 at 12:06:58AM +0100, Russell King - ARM Linux wrote: > On Tue, Apr 07, 2015 at 08:22:08AM -0700, Tony Lindgren wrote: > > Works for me. The above needs the following fix folded in to build: > > > > --- a/arch/arm/mm/proc-v7.S > > +++ b/arch/arm/mm/proc-v7.S > > @@ -532,7 +532,7 @@ __v7_ca9mp_proc_info: > > __v7_ca8_proc_info: > > .long 0x410fc080 > > .long 0xff0ffff0 > > - __v7_proc __v7_ca8mp_proc_info, proc_fns = ca8_processor_functions > > + __v7_proc __v7_ca8_proc_info, __v7_setup, proc_fns = ca8_processor_functions > > .size __v7_ca8_proc_info, . - __v7_ca8_proc_info > > > > #endif /* CONFIG_ARM_LPAE */ > > Thanks, merged into the original patch. Do you want to give me an ack for this, thanks? 8<=== From: Russell King <rmk+kernel@arm.linux.org.uk> Subject: [PATCH] ARM: proc-v7: avoid errata 430973 workaround for non-Cortex A8 CPUs Avoid the errata 430973 workaround for non-Cortex A8 CPUs. Having this workaround enabled introduces an additional branch target buffer flush into the context switching path, something we wish to avoid. To allow this errata to be enabled in multiplatform kernels while reducing its impact, rearrange the Cortex-A8 CPU support to avoid impacting on other Version 7 CPUs. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> --- arch/arm/mm/proc-v7-2level.S | 12 ++++++++---- arch/arm/mm/proc-v7.S | 28 ++++++++++++++++++++++++++++ 2 files changed, 36 insertions(+), 4 deletions(-) diff --git a/arch/arm/mm/proc-v7-2level.S b/arch/arm/mm/proc-v7-2level.S index bc86be205c04..fa385140715f 100644 --- a/arch/arm/mm/proc-v7-2level.S +++ b/arch/arm/mm/proc-v7-2level.S @@ -37,15 +37,18 @@ * It is assumed that: * - we are not using split page tables */ -ENTRY(cpu_v7_switch_mm) +ENTRY(cpu_ca8_switch_mm) #ifdef CONFIG_MMU mov r2, #0 - mmid r1, r1 @ get mm->context.id - ALT_SMP(orr r0, r0, #TTB_FLAGS_SMP) - ALT_UP(orr r0, r0, #TTB_FLAGS_UP) #ifdef CONFIG_ARM_ERRATA_430973 mcr p15, 0, r2, c7, c5, 6 @ flush BTAC/BTB #endif +#endif +ENTRY(cpu_v7_switch_mm) +#ifdef CONFIG_MMU + mmid r1, r1 @ get mm->context.id + ALT_SMP(orr r0, r0, #TTB_FLAGS_SMP) + ALT_UP(orr r0, r0, #TTB_FLAGS_UP) #ifdef CONFIG_PID_IN_CONTEXTIDR mrc p15, 0, r2, c13, c0, 1 @ read current context ID lsr r2, r2, #8 @ extract the PID @@ -61,6 +64,7 @@ ENTRY(cpu_v7_switch_mm) #endif bx lr ENDPROC(cpu_v7_switch_mm) +ENDPROC(cpu_ca8_switch_mm) /* * cpu_v7_set_pte_ext(ptep, pte) diff --git a/arch/arm/mm/proc-v7.S b/arch/arm/mm/proc-v7.S index b1d19ea5e1af..003190ae9cd8 100644 --- a/arch/arm/mm/proc-v7.S +++ b/arch/arm/mm/proc-v7.S @@ -153,6 +153,21 @@ ENDPROC(cpu_v7_do_resume) #endif /* + * Cortex-A8 + */ + globl_equ cpu_ca8_proc_init, cpu_v7_proc_init + globl_equ cpu_ca8_proc_fin, cpu_v7_proc_fin + globl_equ cpu_ca8_reset, cpu_v7_reset + globl_equ cpu_ca8_do_idle, cpu_v7_do_idle + globl_equ cpu_ca8_dcache_clean_area, cpu_v7_dcache_clean_area + globl_equ cpu_ca8_set_pte_ext, cpu_v7_set_pte_ext + globl_equ cpu_ca8_suspend_size, cpu_v7_suspend_size +#ifdef CONFIG_ARM_CPU_SUSPEND + globl_equ cpu_ca8_do_suspend, cpu_v7_do_suspend + globl_equ cpu_ca8_do_resume, cpu_v7_do_resume +#endif + +/* * Cortex-A9 processor functions */ globl_equ cpu_ca9mp_proc_init, cpu_v7_proc_init @@ -471,7 +486,10 @@ __v7_setup_stack: @ define struct processor (see <asm/proc-fns.h> and proc-macros.S) define_processor_functions v7, dabort=v7_early_abort, pabort=v7_pabort, suspend=1 +#ifndef CONFIG_ARM_LPAE + define_processor_functions ca8, dabort=v7_early_abort, pabort=v7_pabort, suspend=1 define_processor_functions ca9mp, dabort=v7_early_abort, pabort=v7_pabort, suspend=1 +#endif #ifdef CONFIG_CPU_PJ4B define_processor_functions pj4b, dabort=v7_early_abort, pabort=v7_pabort, suspend=1 #endif @@ -527,6 +545,16 @@ __v7_ca9mp_proc_info: __v7_proc __v7_ca9mp_proc_info, __v7_ca9mp_setup, proc_fns = ca9mp_processor_functions .size __v7_ca9mp_proc_info, . - __v7_ca9mp_proc_info + /* + * ARM Ltd. Cortex A8 processor. + */ + .type __v7_ca8_proc_info, #object +__v7_ca8_proc_info: + .long 0x410fc080 + .long 0xff0ffff0 + __v7_proc __v7_ca8_proc_info, __v7_setup, proc_fns = ca8_processor_functions + .size __v7_ca8_proc_info, . - __v7_ca8_proc_info + #endif /* CONFIG_ARM_LPAE */ /* -- 1.8.3.1 -- FTTC broadband for 0.8mile line: currently at 10.5Mbps down 400kbps up according to speedtest.net.
WARNING: multiple messages have this Message-ID (diff)
From: linux@arm.linux.org.uk (Russell King - ARM Linux) To: linux-arm-kernel@lists.infradead.org Subject: ARM errata 430973 on multi platform kernels Date: Thu, 9 Apr 2015 14:48:43 +0100 [thread overview] Message-ID: <20150409134843.GQ4027@n2100.arm.linux.org.uk> (raw) In-Reply-To: <20150408230658.GO4027@n2100.arm.linux.org.uk> On Thu, Apr 09, 2015 at 12:06:58AM +0100, Russell King - ARM Linux wrote: > On Tue, Apr 07, 2015 at 08:22:08AM -0700, Tony Lindgren wrote: > > Works for me. The above needs the following fix folded in to build: > > > > --- a/arch/arm/mm/proc-v7.S > > +++ b/arch/arm/mm/proc-v7.S > > @@ -532,7 +532,7 @@ __v7_ca9mp_proc_info: > > __v7_ca8_proc_info: > > .long 0x410fc080 > > .long 0xff0ffff0 > > - __v7_proc __v7_ca8mp_proc_info, proc_fns = ca8_processor_functions > > + __v7_proc __v7_ca8_proc_info, __v7_setup, proc_fns = ca8_processor_functions > > .size __v7_ca8_proc_info, . - __v7_ca8_proc_info > > > > #endif /* CONFIG_ARM_LPAE */ > > Thanks, merged into the original patch. Do you want to give me an ack for this, thanks? 8<=== From: Russell King <rmk+kernel@arm.linux.org.uk> Subject: [PATCH] ARM: proc-v7: avoid errata 430973 workaround for non-Cortex A8 CPUs Avoid the errata 430973 workaround for non-Cortex A8 CPUs. Having this workaround enabled introduces an additional branch target buffer flush into the context switching path, something we wish to avoid. To allow this errata to be enabled in multiplatform kernels while reducing its impact, rearrange the Cortex-A8 CPU support to avoid impacting on other Version 7 CPUs. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> --- arch/arm/mm/proc-v7-2level.S | 12 ++++++++---- arch/arm/mm/proc-v7.S | 28 ++++++++++++++++++++++++++++ 2 files changed, 36 insertions(+), 4 deletions(-) diff --git a/arch/arm/mm/proc-v7-2level.S b/arch/arm/mm/proc-v7-2level.S index bc86be205c04..fa385140715f 100644 --- a/arch/arm/mm/proc-v7-2level.S +++ b/arch/arm/mm/proc-v7-2level.S @@ -37,15 +37,18 @@ * It is assumed that: * - we are not using split page tables */ -ENTRY(cpu_v7_switch_mm) +ENTRY(cpu_ca8_switch_mm) #ifdef CONFIG_MMU mov r2, #0 - mmid r1, r1 @ get mm->context.id - ALT_SMP(orr r0, r0, #TTB_FLAGS_SMP) - ALT_UP(orr r0, r0, #TTB_FLAGS_UP) #ifdef CONFIG_ARM_ERRATA_430973 mcr p15, 0, r2, c7, c5, 6 @ flush BTAC/BTB #endif +#endif +ENTRY(cpu_v7_switch_mm) +#ifdef CONFIG_MMU + mmid r1, r1 @ get mm->context.id + ALT_SMP(orr r0, r0, #TTB_FLAGS_SMP) + ALT_UP(orr r0, r0, #TTB_FLAGS_UP) #ifdef CONFIG_PID_IN_CONTEXTIDR mrc p15, 0, r2, c13, c0, 1 @ read current context ID lsr r2, r2, #8 @ extract the PID @@ -61,6 +64,7 @@ ENTRY(cpu_v7_switch_mm) #endif bx lr ENDPROC(cpu_v7_switch_mm) +ENDPROC(cpu_ca8_switch_mm) /* * cpu_v7_set_pte_ext(ptep, pte) diff --git a/arch/arm/mm/proc-v7.S b/arch/arm/mm/proc-v7.S index b1d19ea5e1af..003190ae9cd8 100644 --- a/arch/arm/mm/proc-v7.S +++ b/arch/arm/mm/proc-v7.S @@ -153,6 +153,21 @@ ENDPROC(cpu_v7_do_resume) #endif /* + * Cortex-A8 + */ + globl_equ cpu_ca8_proc_init, cpu_v7_proc_init + globl_equ cpu_ca8_proc_fin, cpu_v7_proc_fin + globl_equ cpu_ca8_reset, cpu_v7_reset + globl_equ cpu_ca8_do_idle, cpu_v7_do_idle + globl_equ cpu_ca8_dcache_clean_area, cpu_v7_dcache_clean_area + globl_equ cpu_ca8_set_pte_ext, cpu_v7_set_pte_ext + globl_equ cpu_ca8_suspend_size, cpu_v7_suspend_size +#ifdef CONFIG_ARM_CPU_SUSPEND + globl_equ cpu_ca8_do_suspend, cpu_v7_do_suspend + globl_equ cpu_ca8_do_resume, cpu_v7_do_resume +#endif + +/* * Cortex-A9 processor functions */ globl_equ cpu_ca9mp_proc_init, cpu_v7_proc_init @@ -471,7 +486,10 @@ __v7_setup_stack: @ define struct processor (see <asm/proc-fns.h> and proc-macros.S) define_processor_functions v7, dabort=v7_early_abort, pabort=v7_pabort, suspend=1 +#ifndef CONFIG_ARM_LPAE + define_processor_functions ca8, dabort=v7_early_abort, pabort=v7_pabort, suspend=1 define_processor_functions ca9mp, dabort=v7_early_abort, pabort=v7_pabort, suspend=1 +#endif #ifdef CONFIG_CPU_PJ4B define_processor_functions pj4b, dabort=v7_early_abort, pabort=v7_pabort, suspend=1 #endif @@ -527,6 +545,16 @@ __v7_ca9mp_proc_info: __v7_proc __v7_ca9mp_proc_info, __v7_ca9mp_setup, proc_fns = ca9mp_processor_functions .size __v7_ca9mp_proc_info, . - __v7_ca9mp_proc_info + /* + * ARM Ltd. Cortex A8 processor. + */ + .type __v7_ca8_proc_info, #object +__v7_ca8_proc_info: + .long 0x410fc080 + .long 0xff0ffff0 + __v7_proc __v7_ca8_proc_info, __v7_setup, proc_fns = ca8_processor_functions + .size __v7_ca8_proc_info, . - __v7_ca8_proc_info + #endif /* CONFIG_ARM_LPAE */ /* -- 1.8.3.1 -- FTTC broadband for 0.8mile line: currently at 10.5Mbps down 400kbps up according to speedtest.net.
next prev parent reply other threads:[~2015-04-09 13:48 UTC|newest] Thread overview: 123+ messages / expand[flat|nested] mbox.gz Atom feed top 2015-03-01 19:07 [PATCH RESEND] ARM: dts: OMAP3-N900: Add microphone bias voltages Jarkko Nikula 2015-03-30 16:30 ` Jarkko Nikula [not found] ` <55197A12.1050009-FVTvWyuFUl3QT0dZR+AlfA@public.gmane.org> 2015-03-30 16:42 ` Tony Lindgren 2015-03-30 17:45 ` Jarkko Nikula [not found] ` <55198BA4.5010207-FVTvWyuFUl3QT0dZR+AlfA@public.gmane.org> 2015-03-30 17:50 ` Tony Lindgren 2015-03-31 12:32 ` Sebastian Reichel 2015-04-01 19:47 ` Tony Lindgren 2015-04-03 16:35 ` ARM errata 430973 on multi platform kernels (was: OMAP3-N900: Add microphone bias voltages) Sebastian Reichel 2015-04-03 18:39 ` Tony Lindgren 2015-04-03 18:39 ` Tony Lindgren 2015-04-03 19:21 ` Robert Nelson 2015-04-03 19:21 ` Robert Nelson 2015-04-05 13:00 ` Sebastian Reichel 2015-04-05 13:00 ` Sebastian Reichel 2015-04-05 13:26 ` Pali Rohár 2015-04-05 13:26 ` Pali Rohár 2015-04-05 13:45 ` Sebastian Reichel 2015-04-05 13:45 ` Sebastian Reichel 2015-04-05 13:52 ` Pali Rohár 2015-04-05 13:52 ` Pali Rohár 2015-04-06 17:38 ` Sebastian Reichel 2015-04-06 17:38 ` Sebastian Reichel 2015-04-03 20:42 ` Pavel Machek 2015-04-03 20:42 ` Pavel Machek 2015-04-03 22:08 ` ARM errata 430973 on multi platform kernels Ivaylo Dimitrov 2015-04-03 22:08 ` Ivaylo Dimitrov 2015-04-03 22:15 ` Tony Lindgren 2015-04-03 22:15 ` Tony Lindgren 2015-04-03 22:47 ` Ivaylo Dimitrov 2015-04-03 22:47 ` Ivaylo Dimitrov 2015-04-03 22:52 ` Tony Lindgren 2015-04-03 22:52 ` Tony Lindgren 2015-04-05 4:13 ` Matthijs van Duin 2015-04-05 4:13 ` Matthijs van Duin 2015-04-05 7:23 ` Ivaylo Dimitrov 2015-04-05 7:23 ` Ivaylo Dimitrov 2015-04-05 16:50 ` Matthijs van Duin 2015-04-05 16:50 ` Matthijs van Duin 2015-04-05 16:52 ` Matthijs van Duin 2015-04-05 16:52 ` Matthijs van Duin 2015-04-05 21:08 ` Ivaylo Dimitrov 2015-04-05 21:08 ` Ivaylo Dimitrov 2015-04-05 23:52 ` Matthijs van Duin 2015-04-05 23:52 ` Matthijs van Duin 2015-04-06 15:19 ` Tony Lindgren 2015-04-06 15:19 ` Tony Lindgren 2015-04-06 15:40 ` Tony Lindgren 2015-04-06 15:40 ` Tony Lindgren 2015-04-06 17:14 ` Ivaylo Dimitrov 2015-04-06 17:14 ` Ivaylo Dimitrov 2015-04-06 17:42 ` Tony Lindgren 2015-04-06 17:42 ` Tony Lindgren 2015-04-06 18:14 ` Matthijs van Duin 2015-04-06 18:14 ` Matthijs van Duin 2015-04-07 2:23 ` Tony Lindgren 2015-04-07 2:23 ` Tony Lindgren 2015-04-07 3:12 ` Sebastian Reichel 2015-04-07 3:12 ` Sebastian Reichel 2015-04-07 3:49 ` Matthijs van Duin 2015-04-07 3:49 ` Matthijs van Duin 2015-04-07 14:48 ` Tony Lindgren 2015-04-07 14:48 ` Tony Lindgren 2015-04-09 22:37 ` Grazvydas Ignotas 2015-04-09 22:37 ` Grazvydas Ignotas 2015-04-09 22:44 ` Tony Lindgren 2015-04-09 22:44 ` Tony Lindgren 2015-04-09 23:44 ` Nishanth Menon 2015-04-09 23:44 ` Nishanth Menon 2015-04-10 22:05 ` Grazvydas Ignotas 2015-04-10 22:05 ` Grazvydas Ignotas 2015-04-10 23:08 ` Tony Lindgren 2015-04-10 23:08 ` Tony Lindgren 2015-04-16 16:53 ` Matthijs van Duin 2015-04-16 16:53 ` Matthijs van Duin 2015-04-07 13:58 ` Russell King - ARM Linux 2015-04-07 13:58 ` Russell King - ARM Linux 2015-04-07 13:57 ` Russell King - ARM Linux 2015-04-07 13:57 ` Russell King - ARM Linux 2015-04-07 15:22 ` Tony Lindgren 2015-04-07 15:22 ` Tony Lindgren 2015-04-07 15:44 ` Tony Lindgren 2015-04-07 15:44 ` Tony Lindgren 2015-04-08 23:08 ` Russell King - ARM Linux 2015-04-08 23:08 ` Russell King - ARM Linux 2015-04-08 23:15 ` Tony Lindgren 2015-04-08 23:15 ` Tony Lindgren 2015-04-08 23:06 ` Russell King - ARM Linux 2015-04-08 23:06 ` Russell King - ARM Linux 2015-04-09 13:48 ` Russell King - ARM Linux [this message] 2015-04-09 13:48 ` Russell King - ARM Linux 2015-04-09 15:09 ` Tony Lindgren 2015-04-09 15:09 ` Tony Lindgren 2015-04-09 15:30 ` Russell King - ARM Linux 2015-04-09 15:30 ` Russell King - ARM Linux 2015-04-15 16:31 ` Sebastian Reichel 2015-04-15 16:31 ` Sebastian Reichel 2015-04-16 16:08 ` Tony Lindgren 2015-04-16 16:08 ` Tony Lindgren 2015-04-17 18:41 ` Sebastian Reichel 2015-04-17 18:41 ` Sebastian Reichel 2015-04-20 23:40 ` Tony Lindgren 2015-04-20 23:40 ` Tony Lindgren 2015-04-23 10:25 ` Russell King - ARM Linux 2015-04-23 10:25 ` Russell King - ARM Linux 2015-04-23 14:17 ` Tony Lindgren 2015-04-23 14:17 ` Tony Lindgren 2015-04-28 18:13 ` Russell King - ARM Linux 2015-04-28 18:13 ` Russell King - ARM Linux 2015-04-29 14:40 ` Tony Lindgren 2015-04-29 14:40 ` Tony Lindgren 2015-05-04 14:24 ` Tony Lindgren 2015-05-04 14:24 ` Tony Lindgren 2015-04-24 8:54 ` Matthijs van Duin 2015-04-24 8:54 ` Matthijs van Duin 2015-04-28 18:11 ` Russell King - ARM Linux 2015-04-28 18:11 ` Russell King - ARM Linux 2015-05-02 6:51 ` Matthijs van Duin 2015-05-02 6:51 ` Matthijs van Duin 2015-04-05 13:39 ` Sebastian Reichel 2015-04-05 13:39 ` Sebastian Reichel 2015-04-06 15:24 ` Tony Lindgren 2015-04-06 15:24 ` Tony Lindgren 2015-05-04 16:07 ` [PATCH RESEND] ARM: dts: OMAP3-N900: Add microphone bias voltages Tony Lindgren
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=20150409134843.GQ4027@n2100.arm.linux.org.uk \ --to=linux@arm.linux.org.uk \ --cc=ivo.g.dimitrov.75@gmail.com \ --cc=linux-arm-kernel@lists.infradead.org \ --cc=linux-omap@vger.kernel.org \ --cc=matthijsvanduin@gmail.com \ --cc=pavel@ucw.cz \ --cc=sre@kernel.org \ --cc=tony@atomide.com \ /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: linkBe 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.