Re: [RFC PATCH] ARM: Add imprecise abort enable/disable macro

2014-02-11 Thread Dave Martin
On Mon, Feb 10, 2014 at 04:38:09PM +, Ben Dooks wrote: > On 10/02/14 15:21, Dave Martin wrote: [...] > >Does PCI have any way of finding out which parts of the configuration > >space are there before you are forced to go poking around in invalid > >address space? > > > >I'm guessing there

Re: [RFC PATCH] ARM: Add imprecise abort enable/disable macro

2014-02-11 Thread Dave Martin
On Mon, Feb 10, 2014 at 04:38:09PM +, Ben Dooks wrote: On 10/02/14 15:21, Dave Martin wrote: [...] Does PCI have any way of finding out which parts of the configuration space are there before you are forced to go poking around in invalid address space? I'm guessing there may not be,

Re: [RFC PATCH] ARM: Add imprecise abort enable/disable macro

2014-02-10 Thread Dave Martin
On Mon, Feb 10, 2014 at 04:37:00PM +, Russell King - ARM Linux wrote: > On Mon, Feb 10, 2014 at 04:28:22PM +, Dave Martin wrote: > > On Mon, Feb 10, 2014 at 03:19:34PM +, Russell King - ARM Linux wrote: > > > On Mon, Feb 10, 2014 at 02:42:28PM +, Dave Martin wrote: > > > > Should

Re: [RFC PATCH] ARM: Add imprecise abort enable/disable macro

2014-02-10 Thread Ben Dooks
On 10/02/14 15:21, Dave Martin wrote: On Mon, Feb 10, 2014 at 02:54:22PM +, Ben Dooks wrote: On 10/02/14 14:16, Dave Martin wrote: On Fri, Feb 07, 2014 at 05:19:15PM +0100, Fabrice GASNIER wrote: This patch adds imprecise abort enable/disable macros. It also enables imprecise aborts when

Re: [RFC PATCH] ARM: Add imprecise abort enable/disable macro

2014-02-10 Thread Fabrice Gasnier
On 02/10/2014 04:24 PM, Russell King - ARM Linux wrote: On Mon, Feb 10, 2014 at 03:12:47PM +, Dave Martin wrote: Firstly, blindly adding 4 to PC is obviouly not right, partly because we might be running an unrelated thread by the time the abort fires, and also because the affected

Re: [RFC PATCH] ARM: Add imprecise abort enable/disable macro

2014-02-10 Thread Russell King - ARM Linux
On Mon, Feb 10, 2014 at 04:28:22PM +, Dave Martin wrote: > On Mon, Feb 10, 2014 at 03:19:34PM +, Russell King - ARM Linux wrote: > > On Mon, Feb 10, 2014 at 02:42:28PM +, Dave Martin wrote: > > > Should we require CPSR.A to me masked in Booting, for all CPUs that have > > > it? > > >

Re: [RFC PATCH] ARM: Add imprecise abort enable/disable macro

2014-02-10 Thread Dave Martin
On Mon, Feb 10, 2014 at 03:19:34PM +, Russell King - ARM Linux wrote: > On Mon, Feb 10, 2014 at 02:42:28PM +, Dave Martin wrote: > > Should we require CPSR.A to me masked in Booting, for all CPUs that have > > it? > > If it's not masked at boot, then there can't be an imprecise exception

Re: [RFC PATCH] ARM: Add imprecise abort enable/disable macro

2014-02-10 Thread Russell King - ARM Linux
On Mon, Feb 10, 2014 at 03:12:47PM +, Dave Martin wrote: > Firstly, blindly adding 4 to PC is obviouly not right, partly because we > might be running an unrelated thread by the time the abort fires, and > also because the affected instruction might not be 4 bytes in size in a > Thumb kernel.

Re: [RFC PATCH] ARM: Add imprecise abort enable/disable macro

2014-02-10 Thread Dave Martin
On Mon, Feb 10, 2014 at 02:54:22PM +, Ben Dooks wrote: > On 10/02/14 14:16, Dave Martin wrote: > >On Fri, Feb 07, 2014 at 05:19:15PM +0100, Fabrice GASNIER wrote: > >>This patch adds imprecise abort enable/disable macros. > >>It also enables imprecise aborts when starting kernel. > > >

Re: [RFC PATCH] ARM: Add imprecise abort enable/disable macro

2014-02-10 Thread Russell King - ARM Linux
On Mon, Feb 10, 2014 at 02:42:28PM +, Dave Martin wrote: > Should we require CPSR.A to me masked in Booting, for all CPUs that have > it? If it's not masked at boot, then there can't be an imprecise exception pending. That's unlike interrupts, where a device could trigger an interrupt at any

Re: [RFC PATCH] ARM: Add imprecise abort enable/disable macro

2014-02-10 Thread Dave Martin
On Mon, Feb 10, 2014 at 03:44:50PM +0100, Fabrice Gasnier wrote: > On 02/10/2014 03:16 PM, Dave Martin wrote: > >On Fri, Feb 07, 2014 at 05:19:15PM +0100, Fabrice GASNIER wrote: > >>This patch adds imprecise abort enable/disable macros. > >>It also enables imprecise aborts when starting kernel. >

Re: [RFC PATCH] ARM: Add imprecise abort enable/disable macro

2014-02-10 Thread Ben Dooks
On 10/02/14 14:16, Dave Martin wrote: On Fri, Feb 07, 2014 at 05:19:15PM +0100, Fabrice GASNIER wrote: This patch adds imprecise abort enable/disable macros. It also enables imprecise aborts when starting kernel. Relying on imprecise aborts for hardware probing would be considered bad

Re: [RFC PATCH] ARM: Add imprecise abort enable/disable macro

2014-02-10 Thread Fabrice Gasnier
On 02/10/2014 03:16 PM, Dave Martin wrote: On Fri, Feb 07, 2014 at 05:19:15PM +0100, Fabrice GASNIER wrote: This patch adds imprecise abort enable/disable macros. It also enables imprecise aborts when starting kernel. Relying on imprecise aborts for hardware probing would be considered bad

Re: [RFC PATCH] ARM: Add imprecise abort enable/disable macro

2014-02-10 Thread Dave Martin
On Mon, Feb 10, 2014 at 01:56:59PM +, Russell King - ARM Linux wrote: > On Mon, Feb 10, 2014 at 11:17:10AM +, Will Deacon wrote: > > On Mon, Feb 10, 2014 at 08:50:16AM +, Fabrice Gasnier wrote: > > > On 02/07/2014 06:09 PM, Will Deacon wrote: > > > > On Fri, Feb 07, 2014 at 04:19:15PM

Re: [RFC PATCH] ARM: Add imprecise abort enable/disable macro

2014-02-10 Thread Dave Martin
On Fri, Feb 07, 2014 at 05:19:15PM +0100, Fabrice GASNIER wrote: > This patch adds imprecise abort enable/disable macros. > It also enables imprecise aborts when starting kernel. Relying on imprecise aborts for hardware probing would be considered bad hardware and/or software design for

Re: [RFC PATCH] ARM: Add imprecise abort enable/disable macro

2014-02-10 Thread Will Deacon
On Mon, Feb 10, 2014 at 01:56:59PM +, Russell King - ARM Linux wrote: > On Mon, Feb 10, 2014 at 11:17:10AM +, Will Deacon wrote: > > On Mon, Feb 10, 2014 at 08:50:16AM +, Fabrice Gasnier wrote: > > > On 02/07/2014 06:09 PM, Will Deacon wrote: > > > > On Fri, Feb 07, 2014 at 04:19:15PM

Re: [RFC PATCH] ARM: Add imprecise abort enable/disable macro

2014-02-10 Thread Russell King - ARM Linux
On Fri, Feb 07, 2014 at 05:09:03PM +, Will Deacon wrote: > On Fri, Feb 07, 2014 at 04:19:15PM +, Fabrice GASNIER wrote: > > +#define local_abt_enable() \ > > + ({ \ > > + unsigned long temp;

Re: [RFC PATCH] ARM: Add imprecise abort enable/disable macro

2014-02-10 Thread Russell King - ARM Linux
On Mon, Feb 10, 2014 at 11:17:10AM +, Will Deacon wrote: > On Mon, Feb 10, 2014 at 08:50:16AM +, Fabrice Gasnier wrote: > > On 02/07/2014 06:09 PM, Will Deacon wrote: > > > On Fri, Feb 07, 2014 at 04:19:15PM +, Fabrice GASNIER wrote: > > >> diff --git a/arch/arm/kernel/traps.c

Re: [RFC PATCH] ARM: Add imprecise abort enable/disable macro

2014-02-10 Thread Fabrice Gasnier
On 02/10/2014 12:17 PM, Will Deacon wrote: On Mon, Feb 10, 2014 at 08:50:16AM +, Fabrice Gasnier wrote: On 02/07/2014 06:09 PM, Will Deacon wrote: On Fri, Feb 07, 2014 at 04:19:15PM +, Fabrice GASNIER wrote: diff --git a/arch/arm/kernel/traps.c b/arch/arm/kernel/traps.c index

Re: [RFC PATCH] ARM: Add imprecise abort enable/disable macro

2014-02-10 Thread Fabrice Gasnier
On 02/10/2014 10:00 AM, Ben Dooks wrote: On 10/02/14 08:50, Fabrice Gasnier wrote: On 02/07/2014 06:09 PM, Will Deacon wrote: On Fri, Feb 07, 2014 at 04:19:15PM +, Fabrice GASNIER wrote: This patch adds imprecise abort enable/disable macros. It also enables imprecise aborts when starting

Re: [RFC PATCH] ARM: Add imprecise abort enable/disable macro

2014-02-10 Thread Will Deacon
On Mon, Feb 10, 2014 at 08:50:16AM +, Fabrice Gasnier wrote: > On 02/07/2014 06:09 PM, Will Deacon wrote: > > On Fri, Feb 07, 2014 at 04:19:15PM +, Fabrice GASNIER wrote: > >> diff --git a/arch/arm/kernel/traps.c b/arch/arm/kernel/traps.c > >> index 4636d56..ef15709 100644 > >> ---

Re: [RFC PATCH] ARM: Add imprecise abort enable/disable macro

2014-02-10 Thread Ben Dooks
On 10/02/14 08:50, Fabrice Gasnier wrote: On 02/07/2014 06:09 PM, Will Deacon wrote: On Fri, Feb 07, 2014 at 04:19:15PM +, Fabrice GASNIER wrote: This patch adds imprecise abort enable/disable macros. It also enables imprecise aborts when starting kernel. Signed-off-by: Fabrice Gasnier

Re: [RFC PATCH] ARM: Add imprecise abort enable/disable macro

2014-02-10 Thread Fabrice Gasnier
On 02/07/2014 06:09 PM, Will Deacon wrote: On Fri, Feb 07, 2014 at 04:19:15PM +, Fabrice GASNIER wrote: This patch adds imprecise abort enable/disable macros. It also enables imprecise aborts when starting kernel. Signed-off-by: Fabrice Gasnier --- arch/arm/include/asm/irqflags.h | 33

Re: [RFC PATCH] ARM: Add imprecise abort enable/disable macro

2014-02-10 Thread Fabrice Gasnier
On 02/07/2014 06:09 PM, Will Deacon wrote: On Fri, Feb 07, 2014 at 04:19:15PM +, Fabrice GASNIER wrote: This patch adds imprecise abort enable/disable macros. It also enables imprecise aborts when starting kernel. Signed-off-by: Fabrice Gasnier fabrice.gasn...@st.com ---

Re: [RFC PATCH] ARM: Add imprecise abort enable/disable macro

2014-02-10 Thread Ben Dooks
On 10/02/14 08:50, Fabrice Gasnier wrote: On 02/07/2014 06:09 PM, Will Deacon wrote: On Fri, Feb 07, 2014 at 04:19:15PM +, Fabrice GASNIER wrote: This patch adds imprecise abort enable/disable macros. It also enables imprecise aborts when starting kernel. Signed-off-by: Fabrice Gasnier

Re: [RFC PATCH] ARM: Add imprecise abort enable/disable macro

2014-02-10 Thread Will Deacon
On Mon, Feb 10, 2014 at 08:50:16AM +, Fabrice Gasnier wrote: On 02/07/2014 06:09 PM, Will Deacon wrote: On Fri, Feb 07, 2014 at 04:19:15PM +, Fabrice GASNIER wrote: diff --git a/arch/arm/kernel/traps.c b/arch/arm/kernel/traps.c index 4636d56..ef15709 100644 ---

Re: [RFC PATCH] ARM: Add imprecise abort enable/disable macro

2014-02-10 Thread Fabrice Gasnier
On 02/10/2014 10:00 AM, Ben Dooks wrote: On 10/02/14 08:50, Fabrice Gasnier wrote: On 02/07/2014 06:09 PM, Will Deacon wrote: On Fri, Feb 07, 2014 at 04:19:15PM +, Fabrice GASNIER wrote: This patch adds imprecise abort enable/disable macros. It also enables imprecise aborts when starting

Re: [RFC PATCH] ARM: Add imprecise abort enable/disable macro

2014-02-10 Thread Fabrice Gasnier
On 02/10/2014 12:17 PM, Will Deacon wrote: On Mon, Feb 10, 2014 at 08:50:16AM +, Fabrice Gasnier wrote: On 02/07/2014 06:09 PM, Will Deacon wrote: On Fri, Feb 07, 2014 at 04:19:15PM +, Fabrice GASNIER wrote: diff --git a/arch/arm/kernel/traps.c b/arch/arm/kernel/traps.c index

Re: [RFC PATCH] ARM: Add imprecise abort enable/disable macro

2014-02-10 Thread Russell King - ARM Linux
On Mon, Feb 10, 2014 at 11:17:10AM +, Will Deacon wrote: On Mon, Feb 10, 2014 at 08:50:16AM +, Fabrice Gasnier wrote: On 02/07/2014 06:09 PM, Will Deacon wrote: On Fri, Feb 07, 2014 at 04:19:15PM +, Fabrice GASNIER wrote: diff --git a/arch/arm/kernel/traps.c

Re: [RFC PATCH] ARM: Add imprecise abort enable/disable macro

2014-02-10 Thread Russell King - ARM Linux
On Fri, Feb 07, 2014 at 05:09:03PM +, Will Deacon wrote: On Fri, Feb 07, 2014 at 04:19:15PM +, Fabrice GASNIER wrote: +#define local_abt_enable() \ + ({ \ + unsigned long temp;

Re: [RFC PATCH] ARM: Add imprecise abort enable/disable macro

2014-02-10 Thread Will Deacon
On Mon, Feb 10, 2014 at 01:56:59PM +, Russell King - ARM Linux wrote: On Mon, Feb 10, 2014 at 11:17:10AM +, Will Deacon wrote: On Mon, Feb 10, 2014 at 08:50:16AM +, Fabrice Gasnier wrote: On 02/07/2014 06:09 PM, Will Deacon wrote: On Fri, Feb 07, 2014 at 04:19:15PM +,

Re: [RFC PATCH] ARM: Add imprecise abort enable/disable macro

2014-02-10 Thread Dave Martin
On Fri, Feb 07, 2014 at 05:19:15PM +0100, Fabrice GASNIER wrote: This patch adds imprecise abort enable/disable macros. It also enables imprecise aborts when starting kernel. Relying on imprecise aborts for hardware probing would be considered bad hardware and/or software design for

Re: [RFC PATCH] ARM: Add imprecise abort enable/disable macro

2014-02-10 Thread Dave Martin
On Mon, Feb 10, 2014 at 01:56:59PM +, Russell King - ARM Linux wrote: On Mon, Feb 10, 2014 at 11:17:10AM +, Will Deacon wrote: On Mon, Feb 10, 2014 at 08:50:16AM +, Fabrice Gasnier wrote: On 02/07/2014 06:09 PM, Will Deacon wrote: On Fri, Feb 07, 2014 at 04:19:15PM +,

Re: [RFC PATCH] ARM: Add imprecise abort enable/disable macro

2014-02-10 Thread Fabrice Gasnier
On 02/10/2014 03:16 PM, Dave Martin wrote: On Fri, Feb 07, 2014 at 05:19:15PM +0100, Fabrice GASNIER wrote: This patch adds imprecise abort enable/disable macros. It also enables imprecise aborts when starting kernel. Relying on imprecise aborts for hardware probing would be considered bad

Re: [RFC PATCH] ARM: Add imprecise abort enable/disable macro

2014-02-10 Thread Ben Dooks
On 10/02/14 14:16, Dave Martin wrote: On Fri, Feb 07, 2014 at 05:19:15PM +0100, Fabrice GASNIER wrote: This patch adds imprecise abort enable/disable macros. It also enables imprecise aborts when starting kernel. Relying on imprecise aborts for hardware probing would be considered bad

Re: [RFC PATCH] ARM: Add imprecise abort enable/disable macro

2014-02-10 Thread Dave Martin
On Mon, Feb 10, 2014 at 03:44:50PM +0100, Fabrice Gasnier wrote: On 02/10/2014 03:16 PM, Dave Martin wrote: On Fri, Feb 07, 2014 at 05:19:15PM +0100, Fabrice GASNIER wrote: This patch adds imprecise abort enable/disable macros. It also enables imprecise aborts when starting kernel. Relying on

Re: [RFC PATCH] ARM: Add imprecise abort enable/disable macro

2014-02-10 Thread Russell King - ARM Linux
On Mon, Feb 10, 2014 at 02:42:28PM +, Dave Martin wrote: Should we require CPSR.A to me masked in Booting, for all CPUs that have it? If it's not masked at boot, then there can't be an imprecise exception pending. That's unlike interrupts, where a device could trigger an interrupt at any

Re: [RFC PATCH] ARM: Add imprecise abort enable/disable macro

2014-02-10 Thread Dave Martin
On Mon, Feb 10, 2014 at 02:54:22PM +, Ben Dooks wrote: On 10/02/14 14:16, Dave Martin wrote: On Fri, Feb 07, 2014 at 05:19:15PM +0100, Fabrice GASNIER wrote: This patch adds imprecise abort enable/disable macros. It also enables imprecise aborts when starting kernel. Relying on

Re: [RFC PATCH] ARM: Add imprecise abort enable/disable macro

2014-02-10 Thread Russell King - ARM Linux
On Mon, Feb 10, 2014 at 03:12:47PM +, Dave Martin wrote: Firstly, blindly adding 4 to PC is obviouly not right, partly because we might be running an unrelated thread by the time the abort fires, and also because the affected instruction might not be 4 bytes in size in a Thumb kernel.

Re: [RFC PATCH] ARM: Add imprecise abort enable/disable macro

2014-02-10 Thread Dave Martin
On Mon, Feb 10, 2014 at 03:19:34PM +, Russell King - ARM Linux wrote: On Mon, Feb 10, 2014 at 02:42:28PM +, Dave Martin wrote: Should we require CPSR.A to me masked in Booting, for all CPUs that have it? If it's not masked at boot, then there can't be an imprecise exception

Re: [RFC PATCH] ARM: Add imprecise abort enable/disable macro

2014-02-10 Thread Fabrice Gasnier
On 02/10/2014 04:24 PM, Russell King - ARM Linux wrote: On Mon, Feb 10, 2014 at 03:12:47PM +, Dave Martin wrote: Firstly, blindly adding 4 to PC is obviouly not right, partly because we might be running an unrelated thread by the time the abort fires, and also because the affected

Re: [RFC PATCH] ARM: Add imprecise abort enable/disable macro

2014-02-10 Thread Russell King - ARM Linux
On Mon, Feb 10, 2014 at 04:28:22PM +, Dave Martin wrote: On Mon, Feb 10, 2014 at 03:19:34PM +, Russell King - ARM Linux wrote: On Mon, Feb 10, 2014 at 02:42:28PM +, Dave Martin wrote: Should we require CPSR.A to me masked in Booting, for all CPUs that have it? If it's not

Re: [RFC PATCH] ARM: Add imprecise abort enable/disable macro

2014-02-10 Thread Ben Dooks
On 10/02/14 15:21, Dave Martin wrote: On Mon, Feb 10, 2014 at 02:54:22PM +, Ben Dooks wrote: On 10/02/14 14:16, Dave Martin wrote: On Fri, Feb 07, 2014 at 05:19:15PM +0100, Fabrice GASNIER wrote: This patch adds imprecise abort enable/disable macros. It also enables imprecise aborts when

Re: [RFC PATCH] ARM: Add imprecise abort enable/disable macro

2014-02-10 Thread Dave Martin
On Mon, Feb 10, 2014 at 04:37:00PM +, Russell King - ARM Linux wrote: On Mon, Feb 10, 2014 at 04:28:22PM +, Dave Martin wrote: On Mon, Feb 10, 2014 at 03:19:34PM +, Russell King - ARM Linux wrote: On Mon, Feb 10, 2014 at 02:42:28PM +, Dave Martin wrote: Should we require

Re: [RFC PATCH] ARM: Add imprecise abort enable/disable macro

2014-02-07 Thread Will Deacon
On Fri, Feb 07, 2014 at 04:19:15PM +, Fabrice GASNIER wrote: > This patch adds imprecise abort enable/disable macros. > It also enables imprecise aborts when starting kernel. > > Signed-off-by: Fabrice Gasnier > --- > arch/arm/include/asm/irqflags.h | 33 +

[RFC PATCH] ARM: Add imprecise abort enable/disable macro

2014-02-07 Thread Fabrice GASNIER
This patch adds imprecise abort enable/disable macros. It also enables imprecise aborts when starting kernel. Signed-off-by: Fabrice Gasnier --- arch/arm/include/asm/irqflags.h | 33 + arch/arm/kernel/smp.c |1 + arch/arm/kernel/traps.c |

[RFC PATCH] ARM: Add imprecise abort enable/disable macro

2014-02-07 Thread Fabrice GASNIER
This patch adds imprecise abort enable/disable macros. It also enables imprecise aborts when starting kernel. Signed-off-by: Fabrice Gasnier fabrice.gasn...@st.com --- arch/arm/include/asm/irqflags.h | 33 + arch/arm/kernel/smp.c |1 +

Re: [RFC PATCH] ARM: Add imprecise abort enable/disable macro

2014-02-07 Thread Will Deacon
On Fri, Feb 07, 2014 at 04:19:15PM +, Fabrice GASNIER wrote: This patch adds imprecise abort enable/disable macros. It also enables imprecise aborts when starting kernel. Signed-off-by: Fabrice Gasnier fabrice.gasn...@st.com --- arch/arm/include/asm/irqflags.h | 33