[PATCH 0/4] PS3 patches for 3.9

2013-02-13 Thread Geoff Levand
Hi Ben, Here are a few minor PS3 patches, and one cleanup for the powerpc boot_paca variable. Please consider for 3.9 -Geoff The following changes since commit 836dc9e3fbbab0c30aa6e664417225f5c1fb1c39: Linux 3.8-rc7 (2013-02-09 08:20:39 +1100) are available in the git repository at: git:

[PATCH 4/4] powerpc: Move boot_paca into early_setup

2013-02-13 Thread Geoff Levand
The powerpc boot_paca symbol is now only used within the early_setup() routine, so move it from its global definition into early_setup(). Signed-off-by: Geoff Levand --- arch/powerpc/include/asm/paca.h |1 - arch/powerpc/kernel/paca.c |2 -- arch/powerpc/kernel/setup_64.c |2 ++

[PATCH 3/4] powerpc/ps3: Refresh ps3_defconfig

2013-02-13 Thread Geoff Levand
Signed-off-by: Geoff Levand --- arch/powerpc/configs/ps3_defconfig | 15 +-- 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/arch/powerpc/configs/ps3_defconfig b/arch/powerpc/configs/ps3_defconfig index c2f4b4a..7a5c15f 100644 --- a/arch/powerpc/configs/ps3_defconfig

[PATCH 2/4] powerpc/ps3: Increase verbosity of htab errors

2013-02-13 Thread Geoff Levand
Signed-off-by: Geoff Levand --- arch/powerpc/platforms/ps3/htab.c | 14 -- 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/arch/powerpc/platforms/ps3/htab.c b/arch/powerpc/platforms/ps3/htab.c index d00d7b0..6cc5820 100644 --- a/arch/powerpc/platforms/ps3/htab.c +++ b

[PATCH 1/4] powerpc/ps3: Add macro PS3_VERBOSE_RESULT

2013-02-13 Thread Geoff Levand
To allow more control of the verbosity of ps3_result() add a check for the preprocessor macro PS3_VERBOSE_RESULT that builds a verbose verion of the ps3_result() routine. Signed-off-by: Geoff Levand --- arch/powerpc/include/asm/ps3.h |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff

[PATCH 17/17] powerpc: Documentation for transactional memory on powerpc

2013-02-13 Thread Michael Neuling
Signed-off-by: Matt Evans Signed-off-by: Michael Neuling --- Documentation/powerpc/transactional_memory.txt | 175 1 file changed, 175 insertions(+) create mode 100644 Documentation/powerpc/transactional_memory.txt diff --git a/Documentation/powerpc/transactional_memo

[PATCH 16/17] powerpc: Add transactional memory to pseries and ppc64 defconfigs

2013-02-13 Thread Michael Neuling
Signed-off-by: Matt Evans Signed-off-by: Michael Neuling --- arch/powerpc/configs/ppc64_defconfig |2 ++ arch/powerpc/configs/pseries_defconfig |2 ++ 2 files changed, 4 insertions(+) diff --git a/arch/powerpc/configs/ppc64_defconfig b/arch/powerpc/configs/ppc64_defconfig index 6cbde

[PATCH 15/17] powerpc: Add config option for transactional memory

2013-02-13 Thread Michael Neuling
Kconfig option for transactional memory on powerpc. Signed-off-by: Matt Evans Signed-off-by: Michael Neuling --- arch/powerpc/Kconfig |8 1 file changed, 8 insertions(+) diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig index 4b27edb..85ff3a0 100644 --- a/arch/powerpc/Kconf

[PATCH 14/17] powerpc: Add transactional memory to POWER8 cpu features

2013-02-13 Thread Michael Neuling
Signed-off-by: Matt Evans Signed-off-by: Michael Neuling --- arch/powerpc/include/asm/cputable.h |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/powerpc/include/asm/cputable.h b/arch/powerpc/include/asm/cputable.h index 3636081..fb3245e 100644 --- a/arch/powerpc/in

[PATCH 13/17] powerpc: Add new transactional memory state to the signal context

2013-02-13 Thread Michael Neuling
This adds the new transactional memory archtected state to the signal context in both 32 and 64 bit. Signed-off-by: Matt Evans Signed-off-by: Michael Neuling --- arch/powerpc/include/asm/reg.h |1 + arch/powerpc/kernel/signal.h|8 + arch/powerpc/kernel/signal_32.c | 500 ++

[PATCH 12/17] powerpc: Hook in new transactional memory code

2013-02-13 Thread Michael Neuling
This hooks the new transactional memory code into context switching, FP/VMX/VMX unavailable and exception return. Signed-off-by: Matt Evans Signed-off-by: Michael Neuling --- arch/powerpc/kernel/exceptions-64s.S | 56 -- arch/powerpc/kernel/process.c|

[PATCH 11/17] powerpc: Routines for FP/VSX/VMX unavailable during a transaction

2013-02-13 Thread Michael Neuling
We do lazy FP but not lazy TM (ie. userspace starts with MSR TM=1 FP=0). Hence if userspace does an FP instruction during a transaction, we'll take an fp unavailable exception. This adds functions needed to handle this case. We have to inject the current FP state into the checkpoint so that the

[PATCH 10/17] powerpc: Add transactional memory unavaliable execption handler

2013-02-13 Thread Michael Neuling
These should never happen since we always turn on MSR TM when in userspace. We don't do lazy TM. Hence if we hit this, we barf and kill the task as something's gone horribly wrong. Signed-off-by: Matt Evans Signed-off-by: Michael Neuling --- arch/powerpc/kernel/exceptions-64s.S | 19

[PATCH 09/17] powerpc: Add reclaim and recheckpoint functions for context switching transactional memory processes

2013-02-13 Thread Michael Neuling
When we switch out a task, we need to save both the checkpointed and the speculated state into the thread struct. Similarly when we are switching in a task we need to load both the checkpointed and speculated state. If the task was using FP, we non-lazily reload both the original and the speculat

[PATCH 08/17] powerpc: Add FP/VSX and VMX register load functions for transactional memory

2013-02-13 Thread Michael Neuling
This adds functions to restore the state of the FP/VSX registers from what's stored in the thread_struct. Two version for FP/VSX are required since one restores them from transactional/checkpoint side of the thread_struct and the other from the speculated side. Similar functions are added for VMX

[PATCH 07/17] powerpc: Add helper functions for transactional memory context switching

2013-02-13 Thread Michael Neuling
Here we add the helper functions to be used when context switching. These allow us to fully reclaim and recheckpoint a transaction. We introduce a new paca field called tm_scratch to help us store away register values when doing the low level tm reclaim register save. Signed-off-by: Matt Evans

[PATCH 06/17] powerpc: Add transactional memory paca scratch register to show_regs

2013-02-13 Thread Michael Neuling
Add transactional memory paca scratch register to show_regs. This is useful for debugging. Signed-off-by: Matt Evans Signed-off-by: Michael Neuling --- arch/powerpc/include/asm/paca.h |3 +++ arch/powerpc/kernel/asm-offsets.c |1 + arch/powerpc/kernel/entry_64.S|4 arch/

[PATCH 05/17] powerpc: Register defines for various transactional memory registers

2013-02-13 Thread Michael Neuling
Defines for MSR bits and transactional memory related SPRs TFIAR, TEXASR and TEXASRU. Signed-off-by: Matt Evans Signed-off-by: Michael Neuling --- arch/powerpc/include/asm/reg.h | 27 +++ 1 file changed, 27 insertions(+) diff --git a/arch/powerpc/include/asm/reg.h b/a

[PATCH 04/17] powerpc: New macros for transactional memory support

2013-02-13 Thread Michael Neuling
This adds new macros for saving and restoring checkpointed architected state from and to the thread_struct. It also adds some debugging macros for when your brain explodes trying to debug your transactional memory enabled kernel. Signed-off-by: Matt Evans Signed-off-by: Michael Neuling --- arc

[PATCH 03/17] powerpc: Add additional state needed for transactional memory to thread struct

2013-02-13 Thread Michael Neuling
Set of new archtected state for saving away on context switch. Signed-off-by: Matt Evans Signed-off-by: Michael Neuling --- arch/powerpc/include/asm/processor.h | 28 1 file changed, 28 insertions(+) diff --git a/arch/powerpc/include/asm/processor.h b/arch/power

[PATCH 02/17] powerpc: Add new instructions for transactional memory

2013-02-13 Thread Michael Neuling
Here we define the new instructions we need for transactional memory in the kernel. This is so we can support compiling with binutils that don't support the new transactional memory instructions. Transactional memory results in two sets of architected state (GPRs/VSRs etc). treclaim allows us to

[PATCH 01/17] powerpc: Add new CPU feature bit for transactional memory

2013-02-13 Thread Michael Neuling
Signed-off-by: Matt Evans Signed-off-by: Michael Neuling --- arch/powerpc/include/asm/cputable.h |7 +++ 1 file changed, 7 insertions(+) diff --git a/arch/powerpc/include/asm/cputable.h b/arch/powerpc/include/asm/cputable.h index 5f1938f..3636081 100644 --- a/arch/powerpc/include/asm/c

[PATCH 00/17] powerpc: Hardware transactional memory support for POWER8

2013-02-13 Thread Michael Neuling
POWER8 implements hardware transactional memory support. This patch series adds kernel support so that user programs can use this hardware transactional memory and the new state is properly context switched. It is not currently used by the kernel itself. This patch series was originally develope

Re: [PATCH 06/17] powerpc: Add transactional memory paca scratch register to show_regs

2013-02-13 Thread Michael Neuling
Kumar Gala wrote: > > On Feb 12, 2013, at 10:31 PM, Michael Neuling wrote: > > > Add transactional memory paca scratch register to show_regs. This is useful > > for debugging. > > > > Signed-off-by: Matt Evans > > Signed-off-by: Michael Neuling > > --- > > arch/powerpc/include/asm/paca.h

Re: [PATCH 08/17] powerpc: Add FP/VSX and VMX register load functions for transactional memory

2013-02-13 Thread Michael Neuling
> > +/* void do_load_up_fpu(struct thread_struct *thread) > > Comment is wrong, should be void do_load_up_transact_fpu(...) Ooops, thanks for the catch. > > +/* void do_load_up_altivec(struct thread_struct *thread) > > comment wrong. Ooops again. FYI I'm in Austin next week if you wanna grab

Re: [PATCH 15/17] powerpc: Add config option for transactional memory

2013-02-13 Thread Michael Neuling
Kumar Gala wrote: > > On Feb 12, 2013, at 10:31 PM, Michael Neuling wrote: > > > Kconfig option for transactional memory on powerpc. > > > > Signed-off-by: Matt Evans > > Signed-off-by: Michael Neuling > > --- > > arch/powerpc/Kconfig |8 > > 1 file changed, 8 insertions(+) > >

Re: [PATCH] powerpc: Apply early paca fixups to boot_paca and the boot cpu's paca

2013-02-13 Thread Geoff Levand
On Wed, 2013-02-13 at 11:44 +1100, Michael Ellerman wrote: > In commit 466921c we added a hack to set the paca data_offset to zero so > that per-cpu accesses would work on the boot cpu prior to per-cpu areas > being setup. This fixed a problem with lockdep touching per-cpu areas > very early in boo

[PATCH] powerpc: Mark low level irq handlers NO_THREAD

2013-02-13 Thread Thomas Gleixner
These low level handlers cannot be threaded. Mark them NO_THREAD Reported-by: leroy christophe Tested-by: leroy christophe Signed-off-by: Thomas Gleixner --- arch/powerpc/platforms/8xx/m8xx_setup.c |1 + arch/powerpc/sysdev/cpm1.c |1 + 2 files changed, 2 insertions(+) I

Re: PS3 platform is broken on Linux 3.7.0

2013-02-13 Thread Michael Ellerman
On Tue, Feb 12, 2013 at 11:32:59PM -0800, Geoff Levand wrote: > Hi, > > On Fri, 2012-12-14 at 16:35 +0400, Phileas Fogg wrote: > > I wanted to bring to your attention the fact that the PS3 platform is > > broken on Linux 3.7.0. > > > So i cloned the Linux powerpc GIT repository and tried to find

Re[2]: [PATCH 2/2] powerpc: Make context bits depend on virtual addr size.

2013-02-13 Thread Phileas Fogg
> >Ok. How about the below patch. This is based on the suggestion from >Paulus. I still have to take care of few comments in the code. > >We now split the proto-vsid range differently. > User: 0 to [2^(CONTEXT_BITS) - 4 + 2^(USER_ESID_BITS)] > kernel: [2^(CONTEXT_BITS) - 4 + 2^(USER_ESID_BITS)]

Re: [PATCH 2/2] powerpc: Make context bits depend on virtual addr size.

2013-02-13 Thread Geoff Levand
Hi Aneesh, On Wed, 2013-02-13 at 17:10 +0530, Aneesh Kumar K.V wrote: > Ok. How about the below patch. This is based on the suggestion from > Paulus. I still have to take care of few comments in the code. > > Phileas and Geoff, > > Can we check whether this fix the PS3 boot hang ? I did a quick

RE: [PATCH 2/2] powerpc: Make context bits depend on virtual addr size.

2013-02-13 Thread Aneesh Kumar K.V
"Aneesh Kumar K.V" writes: > David Laight writes: > >>> +#define CONTEXT_BITS 19 >>> +#define USER_ESID_BITS 18 >>> +#define USER_ESID_BITS_1T 6 >>> + >>> +/* >>> + * 256MB segment >>> + * The proto-VSID space has 2^(CONTEX_BITS + USER_ESID_BITS) - 1 segments >>> + * a

Re: BOOKE KVM calling load_up_fpu from C?

2013-02-13 Thread Scott Wood
On 02/12/2013 10:17:00 PM, Bhushan Bharat-R65777 wrote: > -Original Message- > From: Wood Scott-B07421 > Sent: Wednesday, February 13, 2013 6:53 AM > To: Bhushan Bharat-R65777 > Cc: Wood Scott-B07421; Michael Neuling; linuxppc-dev@lists.ozlabs.org > Subject: Re: BOOKE KVM calling loa

Re: [PATCH v3 1/1] powerpc/85xx: Board support for ppa8548

2013-02-13 Thread Timur Tabi
On 02/13/2013 08:09 AM, Stef van Os wrote: > Initial board support for the Prodrive PPA8548 AMC module. Board > is an MPC8548 AMC platform used in RapidIO systems. This module is > also used to test/work on mainline linux RapidIO software. > > PPA8548 overview: > - 1.3 GHz Freescale PowerQUICC III

[PATCH] Enhanced support for MPC8xx/8xxx watchdog

2013-02-13 Thread Christophe Leroy
This patch modifies the behaviour of the MPC8xx/8xxx watchdog. On the MPC8xx, at 133Mhz, the maximum timeout of the watchdog timer is 1s, which means it must be pinged twice a second. This is not in line with the Linux watchdog concept which is based on a default watchdog timeout around 60s. This p

RE: [PATCH 2/2] powerpc: Make context bits depend on virtual addr size.

2013-02-13 Thread Aneesh Kumar K.V
David Laight writes: >> +#define CONTEXT_BITS19 >> +#define USER_ESID_BITS 18 >> +#define USER_ESID_BITS_1T 6 >> + >> +/* >> + * 256MB segment >> + * The proto-VSID space has 2^(CONTEX_BITS + USER_ESID_BITS) - 1 segments >> + * available for user + kernel mapping. T

[PATCH v3 1/1] powerpc/85xx: Board support for ppa8548

2013-02-13 Thread Stef van Os
Initial board support for the Prodrive PPA8548 AMC module. Board is an MPC8548 AMC platform used in RapidIO systems. This module is also used to test/work on mainline linux RapidIO software. PPA8548 overview: - 1.3 GHz Freescale PowerQUICC III MPC8548 processor - 1 GB DDR2 @ 266 MHz - 8 MB NOR fla

Re: [PATCH v2 1/1] powerpc/85xx: Board support for ppa8548

2013-02-13 Thread Stef van Os
On 02/12/2013 09:09 PM, Kumar Gala wrote: On Feb 4, 2013, at 9:30 AM, Timur Tabi wrote: On 02/03/2013 01:39 PM, Stef van Os wrote: + pci0: pci@fe0008000 { + status = "disabled"; + }; + + pci1: pci@fe0009000 { + status = "disabled"; + }; + +

Re: [PATCH 15/17] powerpc: Add config option for transactional memory

2013-02-13 Thread Kumar Gala
On Feb 12, 2013, at 10:31 PM, Michael Neuling wrote: > Kconfig option for transactional memory on powerpc. > > Signed-off-by: Matt Evans > Signed-off-by: Michael Neuling > --- > arch/powerpc/Kconfig |8 > 1 file changed, 8 insertions(+) > > diff --git a/arch/powerpc/Kconfig b/arch

Re: [PATCH 08/17] powerpc: Add FP/VSX and VMX register load functions for transactional memory

2013-02-13 Thread Kumar Gala
On Feb 12, 2013, at 10:31 PM, Michael Neuling wrote: > This adds functions to restore the state of the FP/VSX registers from > what's stored in the thread_struct. Two version for FP/VSX are required > since one restores them from transactional/checkpoint side of the > thread_struct and the other

Re: [PATCH 06/17] powerpc: Add transactional memory paca scratch register to show_regs

2013-02-13 Thread Kumar Gala
On Feb 12, 2013, at 10:31 PM, Michael Neuling wrote: > Add transactional memory paca scratch register to show_regs. This is useful > for debugging. > > Signed-off-by: Matt Evans > Signed-off-by: Michael Neuling > --- > arch/powerpc/include/asm/paca.h |1 + > arch/powerpc/kernel/asm-offse

RE: [PATCH 2/2] powerpc: Make context bits depend on virtual addr size.

2013-02-13 Thread David Laight
> +#define CONTEXT_BITS 19 > +#define USER_ESID_BITS 18 > +#define USER_ESID_BITS_1T6 > + > +/* > + * 256MB segment > + * The proto-VSID space has 2^(CONTEX_BITS + USER_ESID_BITS) - 1 segments > + * available for user + kernel mapping. The top 4 contexts are used for > + *

Re: [PATCH 2/2] powerpc: Make context bits depend on virtual addr size.

2013-02-13 Thread Aneesh Kumar K.V
Benjamin Herrenschmidt writes: > On Wed, 2013-02-13 at 08:54 +0530, Aneesh Kumar K.V wrote: >> > A compile option ? Really ? Ugh... >> >> I actually wanted that to be done in Kconfig.cputype, but haven't found >> a nice way to do it. Considering we are switching between only two >> values, I was