Re: [PATCH v2 03/31] arm64: Exception handling

2012-08-16 Thread Arnd Bergmann
On Thursday 16 August 2012, Will Deacon wrote: > On Wed, Aug 15, 2012 at 02:03:47PM +0100, Arnd Bergmann wrote: > > On Tuesday 14 August 2012, Catalin Marinas wrote: > > > > > +#ifdef CONFIG_AARCH32_EMULATION > > > +#define compat_thumb_mode(regs) \ > > > + (((regs)->pstate & COMPAT_PSR_T_BIT))

Re: [PATCH v2 03/31] arm64: Exception handling

2012-08-16 Thread Will Deacon
On Wed, Aug 15, 2012 at 02:03:47PM +0100, Arnd Bergmann wrote: > On Tuesday 14 August 2012, Catalin Marinas wrote: > > > +#ifdef CONFIG_AARCH32_EMULATION > > +#define compat_thumb_mode(regs) \ > > + (((regs)->pstate & COMPAT_PSR_T_BIT)) > > +#else > > +#define compat_thumb_mode(regs) (0) > >

Re: [PATCH v2 03/31] arm64: Exception handling

2012-08-16 Thread Will Deacon
On Wed, Aug 15, 2012 at 02:03:47PM +0100, Arnd Bergmann wrote: On Tuesday 14 August 2012, Catalin Marinas wrote: +#ifdef CONFIG_AARCH32_EMULATION +#define compat_thumb_mode(regs) \ + (((regs)-pstate COMPAT_PSR_T_BIT)) +#else +#define compat_thumb_mode(regs) (0) +#endif The

Re: [PATCH v2 03/31] arm64: Exception handling

2012-08-16 Thread Arnd Bergmann
On Thursday 16 August 2012, Will Deacon wrote: On Wed, Aug 15, 2012 at 02:03:47PM +0100, Arnd Bergmann wrote: On Tuesday 14 August 2012, Catalin Marinas wrote: +#ifdef CONFIG_AARCH32_EMULATION +#define compat_thumb_mode(regs) \ + (((regs)-pstate COMPAT_PSR_T_BIT)) +#else

Re: [PATCH v2 03/31] arm64: Exception handling

2012-08-15 Thread Arnd Bergmann
On Tuesday 14 August 2012, Catalin Marinas wrote: > +#ifdef CONFIG_AARCH32_EMULATION > +#define compat_thumb_mode(regs) \ > + (((regs)->pstate & COMPAT_PSR_T_BIT)) > +#else > +#define compat_thumb_mode(regs) (0) > +#endif The symbol we use on other platforms is CONFIG_COMPAT. I don't think

Re: [PATCH v2 03/31] arm64: Exception handling

2012-08-15 Thread Arnd Bergmann
On Tuesday 14 August 2012, Catalin Marinas wrote: +#ifdef CONFIG_AARCH32_EMULATION +#define compat_thumb_mode(regs) \ + (((regs)-pstate COMPAT_PSR_T_BIT)) +#else +#define compat_thumb_mode(regs) (0) +#endif The symbol we use on other platforms is CONFIG_COMPAT. I don't think you need

Re: [PATCH v2 03/31] arm64: Exception handling

2012-08-14 Thread Thomas Gleixner
On Tue, 14 Aug 2012, Olof Johansson wrote: > > diff --git a/arch/arm64/kernel/traps.c b/arch/arm64/kernel/traps.c > > new file mode 100644 > > index 000..8712a8e > > --- /dev/null > > +++ b/arch/arm64/kernel/traps.c > [...] > > +DEFINE_SPINLOCK(die_lock); > > Should probably be static. And

Re: [PATCH v2 03/31] arm64: Exception handling

2012-08-14 Thread Olof Johansson
Hi, This one is a bit denser, so just a quick first pass with a couple of minor comments. I'll revisit the rest. On Tue, Aug 14, 2012 at 06:52:04PM +0100, Catalin Marinas wrote: > +el1_sp_pc: > + /* > + *Stack or PC alignment exception handling > + */ > + mrs x0, far_el1 >

[PATCH v2 03/31] arm64: Exception handling

2012-08-14 Thread Catalin Marinas
The patch contains the exception entry code (kernel/entry.S), pt_regs structure and related accessors, undefined instruction trapping and stack tracing. AArch64 Linux kernel (including kernel threads) runs in EL1 mode using the SP1 stack. The vectors don't have a fixed address, only alignment

[PATCH v2 03/31] arm64: Exception handling

2012-08-14 Thread Catalin Marinas
The patch contains the exception entry code (kernel/entry.S), pt_regs structure and related accessors, undefined instruction trapping and stack tracing. AArch64 Linux kernel (including kernel threads) runs in EL1 mode using the SP1 stack. The vectors don't have a fixed address, only alignment

Re: [PATCH v2 03/31] arm64: Exception handling

2012-08-14 Thread Olof Johansson
Hi, This one is a bit denser, so just a quick first pass with a couple of minor comments. I'll revisit the rest. On Tue, Aug 14, 2012 at 06:52:04PM +0100, Catalin Marinas wrote: +el1_sp_pc: + /* + *Stack or PC alignment exception handling + */ + mrs x0, far_el1 +

Re: [PATCH v2 03/31] arm64: Exception handling

2012-08-14 Thread Thomas Gleixner
On Tue, 14 Aug 2012, Olof Johansson wrote: diff --git a/arch/arm64/kernel/traps.c b/arch/arm64/kernel/traps.c new file mode 100644 index 000..8712a8e --- /dev/null +++ b/arch/arm64/kernel/traps.c [...] +DEFINE_SPINLOCK(die_lock); Should probably be static. And RAW_ -- To