linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] Another Errata 430973 Update
@ 2015-07-23  0:48 Sebastian Reichel
  2015-07-23  0:48 ` [PATCH 1/3] ARM: OMAP2+: N900: always enable IBE bit Sebastian Reichel
                   ` (2 more replies)
  0 siblings, 3 replies; 13+ messages in thread
From: Sebastian Reichel @ 2015-07-23  0:48 UTC (permalink / raw)
  To: Tony Lindgren, Russell King
  Cc: linux-arm-kernel, linux-omap, linux-kernel, Sebastian Reichel

Hi,

This patchset is a followup to e748994 and a6d74678, that unconditionally
enable the errata 430973 workaround for Cortex A8 CPUs.

The first patch removes the CONFIG_ARM_ERRATA_430973 guard in the Nokia N900's
IBE code, since all sold N900s are affected by the bug (AFAIK).

The next two patches update the errata's Kconfig entry, so that it's no longer
shown for multiplatform kernels and informs about the bootloader method.

-- Sebastian

Sebastian Reichel (3):
  ARM: OMAP2+: N900: always enable IBE bit
  ARM: update errata 430973 documentation
  ARM: errata 430973: move !ARCH_MULTIPLATFORM to Kconfig

 arch/arm/Kconfig                   |  5 +++++
 arch/arm/mach-omap2/board-rx51.c   |  2 --
 arch/arm/mach-omap2/pdata-quirks.c | 11 ++---------
 arch/arm/mm/proc-v7.S              |  2 +-
 4 files changed, 8 insertions(+), 12 deletions(-)

-- 
2.1.4


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [PATCH 1/3] ARM: OMAP2+: N900: always enable IBE bit
  2015-07-23  0:48 [PATCH 0/3] Another Errata 430973 Update Sebastian Reichel
@ 2015-07-23  0:48 ` Sebastian Reichel
  2015-07-23  7:28   ` Tony Lindgren
  2015-10-05 13:53   ` Pavel Machek
  2015-07-23  0:48 ` [PATCH 2/3] ARM: update errata 430973 documentation Sebastian Reichel
  2015-07-23  0:48 ` [PATCH 3/3] ARM: errata 430973: move !ARCH_MULTIPLATFORM to Kconfig Sebastian Reichel
  2 siblings, 2 replies; 13+ messages in thread
From: Sebastian Reichel @ 2015-07-23  0:48 UTC (permalink / raw)
  To: Tony Lindgren, Russell King
  Cc: linux-arm-kernel, linux-omap, linux-kernel, Sebastian Reichel

The kernel's workaround for Errata 430973 consists of a BTAC/BTB
flush at context switch. This requires the IBE bit being set, which
should normally be done by the bootloader.

Since the Nokia N900's bootloader is not easily replaceable,
a pdata quirk enables the IBE bit for the Nokia N900. Until
e748994f5cc5, the flush at context switch required
CONFIG_ARM_ERRATA_430973, so the same check has been used
for setting the IBE bit.

Since all sold N900s are assumed to be affected, the guard
can be removed now, so that the IBE bit is always set.

Signed-off-by: Sebastian Reichel <sre@kernel.org>
---
 arch/arm/mach-omap2/board-rx51.c   |  2 --
 arch/arm/mach-omap2/pdata-quirks.c | 11 ++---------
 2 files changed, 2 insertions(+), 11 deletions(-)

diff --git a/arch/arm/mach-omap2/board-rx51.c b/arch/arm/mach-omap2/board-rx51.c
index 2d1e5a6..3df01cc 100644
--- a/arch/arm/mach-omap2/board-rx51.c
+++ b/arch/arm/mach-omap2/board-rx51.c
@@ -108,11 +108,9 @@ static void __init rx51_init(void)
 	rx51_peripherals_init();
 
 	if (omap_type() == OMAP2_DEVICE_TYPE_SEC) {
-#ifdef CONFIG_ARM_ERRATA_430973
 		pr_info("RX-51: Enabling ARM errata 430973 workaround\n");
 		/* set IBE to 1 */
 		rx51_secure_update_aux_cr(BIT(6), 0);
-#endif
 	}
 
 	/* Ensure SDRC pins are mux'd for self-refresh */
diff --git a/arch/arm/mach-omap2/pdata-quirks.c b/arch/arm/mach-omap2/pdata-quirks.c
index 821171c..0aa438d 100644
--- a/arch/arm/mach-omap2/pdata-quirks.c
+++ b/arch/arm/mach-omap2/pdata-quirks.c
@@ -249,18 +249,11 @@ static void __init nokia_n900_legacy_init(void)
 	hsmmc2_internal_input_clk();
 
 	if (omap_type() == OMAP2_DEVICE_TYPE_SEC) {
-		if (IS_ENABLED(CONFIG_ARM_ERRATA_430973)) {
-			pr_info("RX-51: Enabling ARM errata 430973 workaround\n");
-			/* set IBE to 1 */
-			rx51_secure_update_aux_cr(BIT(6), 0);
-		} else {
-			pr_warn("RX-51: Not enabling ARM errata 430973 workaround\n");
-			pr_warn("Thumb binaries may crash randomly without this workaround\n");
-		}
+		pr_info("RX-51: Enabling ARM errata 430973 workaround\n");
+		rx51_secure_update_aux_cr(BIT(6), 0); /* set IBE to 1 */
 
 		pr_info("RX-51: Registring OMAP3 HWRNG device\n");
 		platform_device_register(&omap3_rom_rng_device);
-
 	}
 }
 
-- 
2.1.4


^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH 2/3] ARM: update errata 430973 documentation
  2015-07-23  0:48 [PATCH 0/3] Another Errata 430973 Update Sebastian Reichel
  2015-07-23  0:48 ` [PATCH 1/3] ARM: OMAP2+: N900: always enable IBE bit Sebastian Reichel
@ 2015-07-23  0:48 ` Sebastian Reichel
  2015-07-23  0:48 ` [PATCH 3/3] ARM: errata 430973: move !ARCH_MULTIPLATFORM to Kconfig Sebastian Reichel
  2 siblings, 0 replies; 13+ messages in thread
From: Sebastian Reichel @ 2015-07-23  0:48 UTC (permalink / raw)
  To: Tony Lindgren, Russell King
  Cc: linux-arm-kernel, linux-omap, linux-kernel, Sebastian Reichel

The Errata 430973 workaround config option only enables the
IBE bit, which should be done by the bootloader if possible.

Signed-off-by: Sebastian Reichel <sre@kernel.org>
---
 arch/arm/Kconfig | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 1c50210..0e4929b 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -1078,6 +1078,10 @@ config ARM_ERRATA_430973
 	  and also flushes the branch target cache at every context switch.
 	  Note that setting specific bits in the ACTLR register may not be
 	  available in non-secure mode.
+	  Instead of enabling this option, it is recommended to enable the
+	  workaround by setting the IBE bit from the bootloader, since the
+	  BTB/BTAC operations are always executed for context switches on
+	  Cortex-A8.
 
 config ARM_ERRATA_458693
 	bool "ARM errata: Processor deadlock when a false hazard is created"
-- 
2.1.4


^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH 3/3] ARM: errata 430973: move !ARCH_MULTIPLATFORM to Kconfig
  2015-07-23  0:48 [PATCH 0/3] Another Errata 430973 Update Sebastian Reichel
  2015-07-23  0:48 ` [PATCH 1/3] ARM: OMAP2+: N900: always enable IBE bit Sebastian Reichel
  2015-07-23  0:48 ` [PATCH 2/3] ARM: update errata 430973 documentation Sebastian Reichel
@ 2015-07-23  0:48 ` Sebastian Reichel
  2015-07-23 12:35   ` Russell King - ARM Linux
  2 siblings, 1 reply; 13+ messages in thread
From: Sebastian Reichel @ 2015-07-23  0:48 UTC (permalink / raw)
  To: Tony Lindgren, Russell King
  Cc: linux-arm-kernel, linux-omap, linux-kernel, Sebastian Reichel

Having the !ARCH_MULTIPLATFORM dependency in the Kconfig file results
in one option less to think about when configuring the kernel.

Signed-off-by: Sebastian Reichel <sre@kernel.org>
---
 arch/arm/Kconfig      | 1 +
 arch/arm/mm/proc-v7.S | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 0e4929b..f0e2d92 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -1066,6 +1066,7 @@ config ARM_ERRATA_411920
 config ARM_ERRATA_430973
 	bool "ARM errata: Stale prediction on replaced interworking branch"
 	depends on CPU_V7
+	depends on !ARCH_MULTIPLATFORM
 	help
 	  This option enables the workaround for the 430973 Cortex-A8
 	  r1p* erratum. If a code sequence containing an ARM/Thumb
diff --git a/arch/arm/mm/proc-v7.S b/arch/arm/mm/proc-v7.S
index 0716bbe..494e844 100644
--- a/arch/arm/mm/proc-v7.S
+++ b/arch/arm/mm/proc-v7.S
@@ -294,7 +294,7 @@ __v7_ca17mp_setup:
  *  r9: MIDR
  */
 __ca8_errata:
-#if defined(CONFIG_ARM_ERRATA_430973) && !defined(CONFIG_ARCH_MULTIPLATFORM)
+#ifdef CONFIG_ARM_ERRATA_430973
 	teq	r3, #0x00100000			@ only present in r1p*
 	mrceq	p15, 0, r0, c1, c0, 1		@ read aux control register
 	orreq	r0, r0, #(1 << 6)		@ set IBE to 1
-- 
2.1.4


^ permalink raw reply related	[flat|nested] 13+ messages in thread

* Re: [PATCH 1/3] ARM: OMAP2+: N900: always enable IBE bit
  2015-07-23  0:48 ` [PATCH 1/3] ARM: OMAP2+: N900: always enable IBE bit Sebastian Reichel
@ 2015-07-23  7:28   ` Tony Lindgren
  2015-10-05 13:53   ` Pavel Machek
  1 sibling, 0 replies; 13+ messages in thread
From: Tony Lindgren @ 2015-07-23  7:28 UTC (permalink / raw)
  To: Sebastian Reichel
  Cc: Russell King, linux-arm-kernel, linux-omap, linux-kernel

* Sebastian Reichel <sre@kernel.org> [150722 17:50]:
> The kernel's workaround for Errata 430973 consists of a BTAC/BTB
> flush at context switch. This requires the IBE bit being set, which
> should normally be done by the bootloader.
> 
> Since the Nokia N900's bootloader is not easily replaceable,
> a pdata quirk enables the IBE bit for the Nokia N900. Until
> e748994f5cc5, the flush at context switch required
> CONFIG_ARM_ERRATA_430973, so the same check has been used
> for setting the IBE bit.
> 
> Since all sold N900s are assumed to be affected, the guard
> can be removed now, so that the IBE bit is always set.

OK makes sense to me. It's best that you upload these into
Russell's patch tracking system after waiting for some more
comments. Please feel free to add for the whole series:

Acked-by: Tony Lindgren <tony@atomide.com>

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH 3/3] ARM: errata 430973: move !ARCH_MULTIPLATFORM to Kconfig
  2015-07-23  0:48 ` [PATCH 3/3] ARM: errata 430973: move !ARCH_MULTIPLATFORM to Kconfig Sebastian Reichel
@ 2015-07-23 12:35   ` Russell King - ARM Linux
  2015-07-24  0:16     ` Sebastian Reichel
  0 siblings, 1 reply; 13+ messages in thread
From: Russell King - ARM Linux @ 2015-07-23 12:35 UTC (permalink / raw)
  To: Sebastian Reichel
  Cc: Tony Lindgren, linux-arm-kernel, linux-omap, linux-kernel

On Thu, Jul 23, 2015 at 02:48:03AM +0200, Sebastian Reichel wrote:
> Having the !ARCH_MULTIPLATFORM dependency in the Kconfig file results
> in one option less to think about when configuring the kernel.

> -#if defined(CONFIG_ARM_ERRATA_430973) && !defined(CONFIG_ARCH_MULTIPLATFORM)
> +#ifdef CONFIG_ARM_ERRATA_430973
>  	teq	r3, #0x00100000			@ only present in r1p*
>  	mrceq	p15, 0, r0, c1, c0, 1		@ read aux control register
>  	orreq	r0, r0, #(1 << 6)		@ set IBE to 1

NAK.  Please read the mailing list history, I'm not repeating myself
again on this.  Thanks.

-- 
FTTC broadband for 0.8mile line: currently at 10.5Mbps down 400kbps up
according to speedtest.net.

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH 3/3] ARM: errata 430973: move !ARCH_MULTIPLATFORM to Kconfig
  2015-07-23 12:35   ` Russell King - ARM Linux
@ 2015-07-24  0:16     ` Sebastian Reichel
  2015-07-26 22:51       ` Russell King - ARM Linux
  0 siblings, 1 reply; 13+ messages in thread
From: Sebastian Reichel @ 2015-07-24  0:16 UTC (permalink / raw)
  To: Russell King - ARM Linux
  Cc: Tony Lindgren, linux-arm-kernel, linux-omap, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 938 bytes --]

Hi Russel,

On Thu, Jul 23, 2015 at 01:35:53PM +0100, Russell King - ARM Linux wrote:
> On Thu, Jul 23, 2015 at 02:48:03AM +0200, Sebastian Reichel wrote:
> > Having the !ARCH_MULTIPLATFORM dependency in the Kconfig file results
> > in one option less to think about when configuring the kernel.
> 
> > -#if defined(CONFIG_ARM_ERRATA_430973) && !defined(CONFIG_ARCH_MULTIPLATFORM)
> > +#ifdef CONFIG_ARM_ERRATA_430973
> >  	teq	r3, #0x00100000			@ only present in r1p*
> >  	mrceq	p15, 0, r0, c1, c0, 1		@ read aux control register
> >  	orreq	r0, r0, #(1 << 6)		@ set IBE to 1
> 
> NAK.  Please read the mailing list history, I'm not repeating myself
> again on this.  Thanks.

It's a bit hard to search the mailing list history without a bit
more information.

I guess you prefer to just add the !ARCH_MULTIPLATFORM dependency to
the Kconfig entry without removing the additional check in the code?

-- Sebastian

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH 3/3] ARM: errata 430973: move !ARCH_MULTIPLATFORM to Kconfig
  2015-07-24  0:16     ` Sebastian Reichel
@ 2015-07-26 22:51       ` Russell King - ARM Linux
  2015-07-27  1:14         ` Sebastian Reichel
  0 siblings, 1 reply; 13+ messages in thread
From: Russell King - ARM Linux @ 2015-07-26 22:51 UTC (permalink / raw)
  To: Sebastian Reichel
  Cc: Tony Lindgren, linux-arm-kernel, linux-omap, linux-kernel

On Fri, Jul 24, 2015 at 02:16:06AM +0200, Sebastian Reichel wrote:
> Hi Russel,
> 
> On Thu, Jul 23, 2015 at 01:35:53PM +0100, Russell King - ARM Linux wrote:
> > On Thu, Jul 23, 2015 at 02:48:03AM +0200, Sebastian Reichel wrote:
> > > Having the !ARCH_MULTIPLATFORM dependency in the Kconfig file results
> > > in one option less to think about when configuring the kernel.
> > 
> > > -#if defined(CONFIG_ARM_ERRATA_430973) && !defined(CONFIG_ARCH_MULTIPLATFORM)
> > > +#ifdef CONFIG_ARM_ERRATA_430973
> > >  	teq	r3, #0x00100000			@ only present in r1p*
> > >  	mrceq	p15, 0, r0, c1, c0, 1		@ read aux control register
> > >  	orreq	r0, r0, #(1 << 6)		@ set IBE to 1
> > 
> > NAK.  Please read the mailing list history, I'm not repeating myself
> > again on this.  Thanks.
> 
> It's a bit hard to search the mailing list history without a bit
> more information.

You were Cc'd on the previous round of review...

> I guess you prefer to just add the !ARCH_MULTIPLATFORM dependency to
> the Kconfig entry without removing the additional check in the code?

I was referring to the above change.

However, having discussed with Will Deacon and checked the manuals, I
think the change is okay after all: the auxillary control register is
banked on secure parts, and the bit we'll be trying to change will be
read-only in non-secure mode - and importantly won't fault.

So, the change is fine, thanks.

-- 
FTTC broadband for 0.8mile line: currently at 10.5Mbps down 400kbps up
according to speedtest.net.

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH 3/3] ARM: errata 430973: move !ARCH_MULTIPLATFORM to Kconfig
  2015-07-26 22:51       ` Russell King - ARM Linux
@ 2015-07-27  1:14         ` Sebastian Reichel
  2015-07-27  9:59           ` Ben Dooks
  0 siblings, 1 reply; 13+ messages in thread
From: Sebastian Reichel @ 2015-07-27  1:14 UTC (permalink / raw)
  To: Russell King - ARM Linux
  Cc: Tony Lindgren, linux-arm-kernel, linux-omap, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 2519 bytes --]

Hi,

On Sun, Jul 26, 2015 at 11:51:45PM +0100, Russell King - ARM Linux wrote:
> On Fri, Jul 24, 2015 at 02:16:06AM +0200, Sebastian Reichel wrote:
> > On Thu, Jul 23, 2015 at 01:35:53PM +0100, Russell King - ARM Linux wrote:
> > > On Thu, Jul 23, 2015 at 02:48:03AM +0200, Sebastian Reichel wrote:
> > > > Having the !ARCH_MULTIPLATFORM dependency in the Kconfig file results
> > > > in one option less to think about when configuring the kernel.
> > > 
> > > > -#if defined(CONFIG_ARM_ERRATA_430973) && !defined(CONFIG_ARCH_MULTIPLATFORM)
> > > > +#ifdef CONFIG_ARM_ERRATA_430973
> > > >  	teq	r3, #0x00100000			@ only present in r1p*
> > > >  	mrceq	p15, 0, r0, c1, c0, 1		@ read aux control register
> > > >  	orreq	r0, r0, #(1 << 6)		@ set IBE to 1
> > > 
> > > NAK.  Please read the mailing list history, I'm not repeating myself
> > > again on this.  Thanks.
> > 
> > It's a bit hard to search the mailing list history without a bit
> > more information.
> 
> You were Cc'd on the previous round of review...

But that discussion was about removing the check alltogether iirc.
This patch does not remove the !ARCH_MULTIPLATFORM check. It just
*moves* it from the sourcecode to the errata's Kconfig entry.

The intention was to hide the Kconfig option on multiplatform
kernels, since it's completely useless there after the N900
boardcode has been changed (PATCH 1/3).

> > I guess you prefer to just add the !ARCH_MULTIPLATFORM dependency to
> > the Kconfig entry without removing the additional check in the code?
> 
> I was referring to the above change.
>
> However, having discussed with Will Deacon and checked the manuals, I
> think the change is okay after all: the auxillary control register is
> banked on secure parts, and the bit we'll be trying to change will be
> read-only in non-secure mode - and importantly won't fault.
>
> So, the change is fine, thanks.

I think you missed the part adding the !ARCH_MULTIPLATFORM
dependency in Kconfig for ARM_ERRATA_430973. I only removed
the check in the sourcecode, since it is no longer required
with the dependency being in Kconfig.

So I guess there are 3 options now:

 1. Add !ARCH_MULTIPLATFORM dependency to Kconfig,
    keep extra check in the sourcecode
 2. Add !ARCH_MULTIPLATFORM dependency to Kconfig,
    remove extra check in the sourcecode
 3. Remove !ARCH_MULTIPLATFORM dependency alltogether

I will send an appropriate patch, if you tell me your preferred
option.

-- Sebastian

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH 3/3] ARM: errata 430973: move !ARCH_MULTIPLATFORM to Kconfig
  2015-07-27  1:14         ` Sebastian Reichel
@ 2015-07-27  9:59           ` Ben Dooks
  2015-07-27 10:43             ` Russell King - ARM Linux
  2015-07-27 17:36             ` Sebastian Reichel
  0 siblings, 2 replies; 13+ messages in thread
From: Ben Dooks @ 2015-07-27  9:59 UTC (permalink / raw)
  To: Sebastian Reichel, Russell King - ARM Linux
  Cc: Tony Lindgren, linux-omap, linux-kernel, linux-arm-kernel

On 27/07/15 02:14, Sebastian Reichel wrote:
> Hi,
> 
> On Sun, Jul 26, 2015 at 11:51:45PM +0100, Russell King - ARM Linux 
> wrote:
>> On Fri, Jul 24, 2015 at 02:16:06AM +0200, Sebastian Reichel 
>> wrote:
>>> On Thu, Jul 23, 2015 at 01:35:53PM +0100, Russell King - ARM 
>>> Linux wrote:
>>>> On Thu, Jul 23, 2015 at 02:48:03AM +0200, Sebastian Reichel 
>>>> wrote:
>>>>> Having the !ARCH_MULTIPLATFORM dependency in the Kconfig 
>>>>> file results in one option less to think about when 
>>>>> configuring the kernel.
>>>> 
>>>>> -#if defined(CONFIG_ARM_ERRATA_430973) && 
>>>>> !defined(CONFIG_ARCH_MULTIPLATFORM) +#ifdef 
>>>>> CONFIG_ARM_ERRATA_430973 teq	r3, #0x00100000			@ only 
>>>>> present in r1p* mrceq	p15, 0, r0, c1, c0, 1		@ read aux 
>>>>> control register orreq	r0, r0, #(1 << 6)		@ set IBE to 1
>>>> 
>>>> NAK.  Please read the mailing list history, I'm not
>>>> repeating myself again on this.  Thanks.
>>> 
>>> It's a bit hard to search the mailing list history without a 
>>> bit more information.
>> 
>> You were Cc'd on the previous round of review...
> 
> But that discussion was about removing the check alltogether iirc.
>  This patch does not remove the !ARCH_MULTIPLATFORM check. It just
>  *moves* it from the sourcecode to the errata's Kconfig entry.
> 
> The intention was to hide the Kconfig option on multiplatform 
> kernels, since it's completely useless there after the N900 
> boardcode has been changed (PATCH 1/3).
> 
>>> I guess you prefer to just add the !ARCH_MULTIPLATFORM 
>>> dependency to the Kconfig entry without removing the
>>> additional check in the code?
>> 
>> I was referring to the above change.
>> 
>> However, having discussed with Will Deacon and checked the 
>> manuals, I think the change is okay after all: the auxillary 
>> control register is banked on secure parts, and the bit we'll be 
>> trying to change will be read-only in non-secure mode - and 
>> importantly won't fault.
>> 
>> So, the change is fine, thanks.
> 
> I think you missed the part adding the !ARCH_MULTIPLATFORM 
> dependency in Kconfig for ARM_ERRATA_430973. I only removed the 
> check in the sourcecode, since it is no longer required with the 
> dependency being in Kconfig.
> 
> So I guess there are 3 options now:
> 
> 1. Add !ARCH_MULTIPLATFORM dependency to Kconfig, keep extra check 
> in the sourcecode 2. Add !ARCH_MULTIPLATFORM dependency to Kconfig,
> remove extra check in the sourcecode 3. Remove !ARCH_MULTIPLATFORM
> dependency alltogether
> 
> I will send an appropriate patch, if you tell me your preferred 
> option.

This isn't the only place ARM_ERRATA_430973 is used, and if
you make it configurable on !ARCH_MULTIPLATFORM then it makes
it impossible to use a ARCH_MULTIPLATFORM kernel on something
that is an Cortex-A8.

See arch/arm/mm/proc-v7-2level.S

-- 
Ben Dooks				http://www.codethink.co.uk/
Senior Engineer				Codethink - Providing Genius

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH 3/3] ARM: errata 430973: move !ARCH_MULTIPLATFORM to Kconfig
  2015-07-27  9:59           ` Ben Dooks
@ 2015-07-27 10:43             ` Russell King - ARM Linux
  2015-07-27 17:36             ` Sebastian Reichel
  1 sibling, 0 replies; 13+ messages in thread
From: Russell King - ARM Linux @ 2015-07-27 10:43 UTC (permalink / raw)
  To: Ben Dooks
  Cc: Sebastian Reichel, Tony Lindgren, linux-omap, linux-kernel,
	linux-arm-kernel

On Mon, Jul 27, 2015 at 10:59:56AM +0100, Ben Dooks wrote:
> This isn't the only place ARM_ERRATA_430973 is used, and if
> you make it configurable on !ARCH_MULTIPLATFORM then it makes
> it impossible to use a ARCH_MULTIPLATFORM kernel on something
> that is an Cortex-A8.
> 
> See arch/arm/mm/proc-v7-2level.S

That has been fixed so that the BTAC/BTB always gets flushed on each
context switch for all Cortex-A8 CPUs, but none of the other v7 CPUs.

-- 
FTTC broadband for 0.8mile line: currently at 10.5Mbps down 400kbps up
according to speedtest.net.

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH 3/3] ARM: errata 430973: move !ARCH_MULTIPLATFORM to Kconfig
  2015-07-27  9:59           ` Ben Dooks
  2015-07-27 10:43             ` Russell King - ARM Linux
@ 2015-07-27 17:36             ` Sebastian Reichel
  1 sibling, 0 replies; 13+ messages in thread
From: Sebastian Reichel @ 2015-07-27 17:36 UTC (permalink / raw)
  To: Ben Dooks
  Cc: Russell King - ARM Linux, Tony Lindgren, linux-omap,
	linux-kernel, linux-arm-kernel

[-- Attachment #1: Type: text/plain, Size: 1084 bytes --]

Hi Ben,

On Mon, Jul 27, 2015 at 10:59:56AM +0100, Ben Dooks wrote:
> > I think you missed the part adding the !ARCH_MULTIPLATFORM 
> > dependency in Kconfig for ARM_ERRATA_430973. I only removed the 
> > check in the sourcecode, since it is no longer required with the 
> > dependency being in Kconfig.
> > 
> > So I guess there are 3 options now:
> > 
> > 1. Add !ARCH_MULTIPLATFORM dependency to Kconfig, keep extra check 
> > in the sourcecode 2. Add !ARCH_MULTIPLATFORM dependency to Kconfig,
> > remove extra check in the sourcecode 3. Remove !ARCH_MULTIPLATFORM
> > dependency alltogether
> > 
> > I will send an appropriate patch, if you tell me your preferred 
> > option.
> 
> This isn't the only place ARM_ERRATA_430973 is used, [...]

The dependency on ARM_ERRATA_430973 has been removed from
arch/arm/mm/proc-v7-2level.S in 4.1 (commit id e748994), so
that it always flushes. The only additional places are in the
Nokia N900 boardcode and the N900 pdata-quirk, which are
removed in PATCH 1/3.

So actually it is the only place.

-- Sebastian

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH 1/3] ARM: OMAP2+: N900: always enable IBE bit
  2015-07-23  0:48 ` [PATCH 1/3] ARM: OMAP2+: N900: always enable IBE bit Sebastian Reichel
  2015-07-23  7:28   ` Tony Lindgren
@ 2015-10-05 13:53   ` Pavel Machek
  1 sibling, 0 replies; 13+ messages in thread
From: Pavel Machek @ 2015-10-05 13:53 UTC (permalink / raw)
  To: Sebastian Reichel
  Cc: Tony Lindgren, Russell King, linux-omap, linux-kernel, linux-arm-kernel

Hi!

> The kernel's workaround for Errata 430973 consists of a BTAC/BTB
> flush at context switch. This requires the IBE bit being set, which
> should normally be done by the bootloader.
> 
> Since the Nokia N900's bootloader is not easily replaceable,
> a pdata quirk enables the IBE bit for the Nokia N900. Until
> e748994f5cc5, the flush at context switch required
> CONFIG_ARM_ERRATA_430973, so the same check has been used
> for setting the IBE bit.
> 
> Since all sold N900s are assumed to be affected, the guard
> can be removed now, so that the IBE bit is always set.

Is the qemu affected?

Does qemu have enough secure support not to fail on this?

Best regards,

							Pavel
> 
> Signed-off-by: Sebastian Reichel <sre@kernel.org>
> ---
>  arch/arm/mach-omap2/board-rx51.c   |  2 --
>  arch/arm/mach-omap2/pdata-quirks.c | 11 ++---------
>  2 files changed, 2 insertions(+), 11 deletions(-)
> 
> diff --git a/arch/arm/mach-omap2/board-rx51.c b/arch/arm/mach-omap2/board-rx51.c
> index 2d1e5a6..3df01cc 100644
> --- a/arch/arm/mach-omap2/board-rx51.c
> +++ b/arch/arm/mach-omap2/board-rx51.c
> @@ -108,11 +108,9 @@ static void __init rx51_init(void)
>  	rx51_peripherals_init();
>  
>  	if (omap_type() == OMAP2_DEVICE_TYPE_SEC) {
> -#ifdef CONFIG_ARM_ERRATA_430973
>  		pr_info("RX-51: Enabling ARM errata 430973 workaround\n");
>  		/* set IBE to 1 */
>  		rx51_secure_update_aux_cr(BIT(6), 0);
> -#endif
>  	}
>  
>  	/* Ensure SDRC pins are mux'd for self-refresh */
> diff --git a/arch/arm/mach-omap2/pdata-quirks.c b/arch/arm/mach-omap2/pdata-quirks.c
> index 821171c..0aa438d 100644
> --- a/arch/arm/mach-omap2/pdata-quirks.c
> +++ b/arch/arm/mach-omap2/pdata-quirks.c
> @@ -249,18 +249,11 @@ static void __init nokia_n900_legacy_init(void)
>  	hsmmc2_internal_input_clk();
>  
>  	if (omap_type() == OMAP2_DEVICE_TYPE_SEC) {
> -		if (IS_ENABLED(CONFIG_ARM_ERRATA_430973)) {
> -			pr_info("RX-51: Enabling ARM errata 430973 workaround\n");
> -			/* set IBE to 1 */
> -			rx51_secure_update_aux_cr(BIT(6), 0);
> -		} else {
> -			pr_warn("RX-51: Not enabling ARM errata 430973 workaround\n");
> -			pr_warn("Thumb binaries may crash randomly without this workaround\n");
> -		}
> +		pr_info("RX-51: Enabling ARM errata 430973 workaround\n");
> +		rx51_secure_update_aux_cr(BIT(6), 0); /* set IBE to 1 */
>  
>  		pr_info("RX-51: Registring OMAP3 HWRNG device\n");
>  		platform_device_register(&omap3_rom_rng_device);
> -
>  	}
>  }
>  
> -- 
> 2.1.4
> 
> 
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2015-10-05 13:53 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-07-23  0:48 [PATCH 0/3] Another Errata 430973 Update Sebastian Reichel
2015-07-23  0:48 ` [PATCH 1/3] ARM: OMAP2+: N900: always enable IBE bit Sebastian Reichel
2015-07-23  7:28   ` Tony Lindgren
2015-10-05 13:53   ` Pavel Machek
2015-07-23  0:48 ` [PATCH 2/3] ARM: update errata 430973 documentation Sebastian Reichel
2015-07-23  0:48 ` [PATCH 3/3] ARM: errata 430973: move !ARCH_MULTIPLATFORM to Kconfig Sebastian Reichel
2015-07-23 12:35   ` Russell King - ARM Linux
2015-07-24  0:16     ` Sebastian Reichel
2015-07-26 22:51       ` Russell King - ARM Linux
2015-07-27  1:14         ` Sebastian Reichel
2015-07-27  9:59           ` Ben Dooks
2015-07-27 10:43             ` Russell King - ARM Linux
2015-07-27 17:36             ` Sebastian Reichel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).