[PATCH 0/18] powerpc: convert GPR usage to %r0-31 and R0-31

2012-06-14 Thread Michael Neuling
First 5 patches convert us to %r0-31. Next 12 convert make using R0-31 required in macros. Last 2 convert instructions where ra = r0 we use 0 rather than the register value (as suggested by Andreas). Version 2 adds: ra = 0 idea (as Andreas suggested) Fixes for 32bit KVM (added

[PATCH 1/18] powerpc: Add defines for R0-R31

2012-06-14 Thread Michael Neuling
We are going to use these later and convert r0 to %r0 etc. Signed-off-by: Michael Neuling mi...@neuling.org --- arch/powerpc/include/asm/ppc_asm.h | 33 + 1 file changed, 33 insertions(+) Index: powerpc-test/arch/powerpc/include/asm/ppc_asm.h

[PATCH 2/18] powerpc: modify macro ready for %r0 register change

2012-06-14 Thread Michael Neuling
The assembler doesn't take %r0 register arguments in braces, so remove them. Signed-off-by: Michael Neuling mi...@neuling.org --- arch/powerpc/include/asm/ppc_asm.h | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) Index: powerpc-test/arch/powerpc/include/asm/ppc_asm.h

[PATCH 4/18] powerpc: Fix sldi to take literal not register name

2012-06-14 Thread Michael Neuling
Was introduced by: commit 19ccb76a1938ab364a412253daec64613acbf3df Author: Paul Mackerras pau...@samba.org Date: Sat Jul 23 17:42:46 2011 +1000 Talking to paulus, this shouldn't be a literal. Signed-off-by: Michael Neuling mi...@neuling.org --- arch/powerpc/kvm/book3s_hv_rmhandlers.S |

[PATCH 5/18] powerpc: convert to %r for all GPR usage

2012-06-14 Thread Michael Neuling
Now all the fixes are in place, let's rock-n-roll! Signed-off-by: Michael Neuling mi...@neuling.org --- arch/powerpc/include/asm/ppc_asm.h | 72 - 1 file changed, 39 insertions(+), 33 deletions(-) Index: powerpc-test/arch/powerpc/include/asm/ppc_asm.h

[PATCH 6/18] powerpc/pasemi: move lbz/stbciz to ppc-opcode.h

2012-06-14 Thread Michael Neuling
move lbz/stbciz to ppc-opcode.h. Signed-off-by: Michael Neuling mi...@neuling.org --- arch/powerpc/include/asm/ppc-opcode.h |7 +++ arch/powerpc/kernel/misc_64.S |5 - 2 files changed, 7 insertions(+), 5 deletions(-) Index:

[PATCH 7/18] powerpc: merge STK_REG/PARAM/FRAMESIZE

2012-06-14 Thread Michael Neuling
Merge the defines of STACKFRAMESIZE, STK_REG, STK_PARAM from different places. Signed-off-by: Michael Neuling mi...@neuling.org --- arch/powerpc/include/asm/ppc_asm.h |5 + arch/powerpc/lib/checksum_64.S |3 arch/powerpc/lib/copypage_power7.S |

[PATCH 8/18] powerpc: merge VCPU_GPR

2012-06-14 Thread Michael Neuling
Merge the defines of VCPU_GPR from different places. Signed-off-by: Michael Neuling mi...@neuling.org --- arch/powerpc/include/asm/ppc_asm.h |7 +++ arch/powerpc/kvm/book3s_hv_rmhandlers.S |3 --- arch/powerpc/kvm/book3s_interrupts.S|8

[PATCH 9/18] powerpc: change mtcrf to use real register names

2012-06-14 Thread Michael Neuling
mtocrf define is just a wrapper around the real instructions so we can just use real register names here (ie. lower case). Also remove braces in macro so this is possible. Signed-off-by: Michael Neuling mi...@neuling.org --- arch/powerpc/include/asm/asm-compat.h |2 +-

[PATCH 10/18] powerpc: change LOAD_REG_ADDR to use real register names

2012-06-14 Thread Michael Neuling
LOAD_REG_ADDR define is just a wrapper around real instructions so we can just use real register names here (ie. lower case). Signed-off-by: Michael Neuling mi...@neuling.org --- arch/powerpc/platforms/powernv/opal-wrappers.S |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Index:

[PATCH 11/18] powerpc: fixes for instructions not using correct register naming

2012-06-14 Thread Michael Neuling
These macros are using integers where they could be using logical names since they take registers. We are going to enforce this soon, so fix these up now. Signed-off-by: Michael Neuling mi...@neuling.org --- arch/powerpc/kernel/exceptions-64e.S |8 arch/powerpc/kernel/misc_64.S

[PATCH 13/18] powerpc: introduce new ___PPC_RA/B/S/T macros

2012-06-14 Thread Michael Neuling
These are currently the same as __PPC_RA/B/S/T but we'll wrap them soon. Signed-off-by: Michael Neuling mi...@neuling.org --- arch/powerpc/include/asm/ppc-opcode.h |4 1 file changed, 4 insertions(+) Index: powerpc-test/arch/powerpc/include/asm/ppc-opcode.h

[PATCH 12/18] powerpc: fix VSX macros so register names aren't wrapped

2012-06-14 Thread Michael Neuling
We need to do this so we can enforce the name of a and b in called macros PPC_RA/B later. Signed-off-by: Michael Neuling mi...@neuling.org --- arch/powerpc/include/asm/ppc-opcode.h |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) Index:

[PATCH 16/18] powerpc: enforce usage of R0-R31 where possible

2012-06-14 Thread Michael Neuling
Enforce the use of R0-R31 in macros where possible now we have all the fixes in. R0-R31 macros are removed here so that can't be used anymore. They should not be defined anywhere. Signed-off-by: Michael Neuling mi...@neuling.org --- arch/powerpc/include/asm/ppc-opcode.h |8 ++---

[PATCH 15/18] powerpc: Introduce new __REG_R macros

2012-06-14 Thread Michael Neuling
Signed-off-by: Michael Neuling mi...@neuling.org --- arch/powerpc/include/asm/ppc_asm.h | 32 1 file changed, 32 insertions(+) Index: powerpc-test/arch/powerpc/include/asm/ppc_asm.h === ---

[PATCH 14/18] powerpc: start using ___PPC_RA/B/S/T where necessary

2012-06-14 Thread Michael Neuling
Now have ___PPC_RA/B/S/T we can use it in some places. These are places where we can't use the existing defines which will soon enforce R0-R31 usage. The macros being changed here are being used in inline asm, which can't convert to enforce the R0-R31 usage. Signed-off-by: Michael Neuling

[PATCH 17/18] powerpc: Add defines for RA 0-R31

2012-06-14 Thread Michael Neuling
R0 is special since it'll be 0. Signed-off-by: Michael Neuling mi...@neuling.org --- arch/powerpc/include/asm/ppc-opcode.h |1 + arch/powerpc/include/asm/ppc_asm.h| 33 + 2 files changed, 34 insertions(+) Index:

[PATCH 18/18] powerpc: enforce usage of RA 0-R31 where possible

2012-06-14 Thread Michael Neuling
Some macros use RA where when RA=R0 the values is 0, so make this the enforced mnemonic in the macro. Idea suggested by Andreas Schwab. Signed-off-by: Michael Neuling mi...@neuling.org --- arch/powerpc/include/asm/ppc-opcode.h | 14 +++--- arch/powerpc/kernel/cpu_setup_a2.S|2

Re: [PATCH 5/15] powerpc: convert to %r for all GPR usage

2012-06-14 Thread Jesse Larrew
On 06/13/2012 10:25 PM, Michael Neuling wrote: Jesse Larrew jlar...@linux.vnet.ibm.com wrote: On 06/08/2012 06:36 AM, Michael Neuling wrote: -/* General Purpose Registers (GPRs) */ +/* + * General Purpose Registers (GPRs) + * + * The lower case r0-r31 should be used in preference to the

Re: [PATCH] i2c: let the core register devices from devicetree

2012-06-14 Thread Peter Korsgaard
Wolfram == Wolfram Sang w.s...@pengutronix.de writes: Wolfram Currently, every driver has to do it on its own, but it should Wolfram be done in the core, like we already do with board_info Wolfram structs. Wolfram Signed-off-by: Wolfram Sang w.s...@pengutronix.de Wolfram --- Wolfram

Re: [PATCH] i2c: let the core register devices from devicetree

2012-06-14 Thread viresh kumar
On Wed, Jun 13, 2012 at 10:12 PM, Wolfram Sang w.s...@pengutronix.de wrote: Currently, every driver has to do it on its own, but it should be done in the core, like we already do with board_info structs. Signed-off-by: Wolfram Sang w.s...@pengutronix.de --- diff --git

Re: [PATCH] i2c: let the core register devices from devicetree

2012-06-14 Thread Wolfram Sang
On Thu, Jun 14, 2012 at 07:33:37AM +1000, Benjamin Herrenschmidt wrote: On Wed, 2012-06-13 at 23:12 +0200, Wolfram Sang wrote: Currently, every driver has to do it on its own, but it should be done in the core, like we already do with board_info structs. Signed-off-by: Wolfram Sang

RE: [PATCH 0/6] Description for PCI patches using platform driver

2012-06-14 Thread Bhushan Bharat-R65777
Hello Ben, Kumar, others Please provide your comments/thoughts on this ? Thanks -Bharat -Original Message- From: Jia Hongtao-B38951 Sent: Friday, June 08, 2012 3:12 PM To: linuxppc-dev@lists.ozlabs.org; ga...@kernel.crashing.org Cc: Li Yang-R58472;

[PATCH] Make hard_irq_disable() actually hard-disable interrupts

2012-06-14 Thread Paul Mackerras
At present, hard_irq_disable() does nothing because of this code in include/linux/interrupt.h: #ifndef hard_irq_disable #define hard_irq_disable() do { } while(0) #endif So we need to make our hard_irq_disable() be a macro. Signed-off-by: Paul Mackerras pau...@samba.org ---

Re: [PATCH] i2c: let the core register devices from devicetree

2012-06-14 Thread Pawel Moll
On Wed, 2012-06-13 at 23:12 +0200, Wolfram Sang wrote: Currently, every driver has to do it on its own, but it should be done in the core, like we already do with board_info structs. Signed-off-by: Wolfram Sang w.s...@pengutronix.de --- drivers/i2c/busses/i2c-versatile.c |1 -

Re: [PATCH] i2c: let the core register devices from devicetree

2012-06-14 Thread Jean Delvare
Hi Wolfram, On Wed, 13 Jun 2012 23:12:10 +0200, Wolfram Sang wrote: Currently, every driver has to do it on its own, but it should be done in the core, like we already do with board_info structs. Signed-off-by: Wolfram Sang w.s...@pengutronix.de --- Based on v3.5-rc2. Only build tested,

Re: [PATCH] Make hard_irq_disable() actually hard-disable interrupts

2012-06-14 Thread Benjamin Herrenschmidt
On Thu, 2012-06-14 at 20:31 +1000, Paul Mackerras wrote: At present, hard_irq_disable() does nothing because of this code in include/linux/interrupt.h: #ifndef hard_irq_disable #define hard_irq_disable()do { } while(0) #endif So we need to make our hard_irq_disable() be a macro.

Re: [PATCH] i2c: let the core register devices from devicetree

2012-06-14 Thread Benjamin Herrenschmidt
On Thu, 2012-06-14 at 11:14 +0200, Wolfram Sang wrote: On Thu, Jun 14, 2012 at 07:33:37AM +1000, Benjamin Herrenschmidt wrote: On Wed, 2012-06-13 at 23:12 +0200, Wolfram Sang wrote: Currently, every driver has to do it on its own, but it should be done in the core, like we already do with

Re: [PATCH v2 1/2] uprobes: Pass probed vaddr to arch_uprobe_analyze_insn()

2012-06-14 Thread Srikar Dronamraju
* Oleg Nesterov o...@redhat.com [2012-06-13 21:15:19]: On 06/12, Oleg Nesterov wrote: On 06/12, Srikar Dronamraju wrote: Note also that we should move this !UPROBE_COPY_INSN from install_breakpoint() to somewhere near alloc_uprobe(). This code is called only once, it looks a

Re: [PATCH] i2c: let the core register devices from devicetree

2012-06-14 Thread Linus Walleij
On Wed, Jun 13, 2012 at 11:12 PM, Wolfram Sang w.s...@pengutronix.de wrote: Currently, every driver has to do it on its own, but it should be done in the core, like we already do with board_info structs. Signed-off-by: Wolfram Sang w.s...@pengutronix.de Acked-by: Linus Walleij

Re: [PATCH] powerpc/44x: Support OCM(On Chip Memory) for APM821xx SoC and Bluestone board

2012-06-14 Thread Josh Boyer
On Sun, May 6, 2012 at 11:52 PM, Vinh Nguyen Huu Tuong vhtngu...@apm.com wrote: This patch consists of: - Add driver for OCM component - Export OCM Information at /sys/class/ocm/ocminfo Again, apologies for the delay. Aside from the incorrect sysfs usage I pointed out in my other reply, I

Re: [PATCH v2 1/2] uprobes: Pass probed vaddr to arch_uprobe_analyze_insn()

2012-06-14 Thread Oleg Nesterov
On 06/14, Srikar Dronamraju wrote: * Oleg Nesterov o...@redhat.com [2012-06-13 21:15:19]: For example. Suppose there is some instruction in /lib64/libc.so which is valid for 64-bit, but not for 32-bit. Suppose that a 32-bit application does mmap(/lib64/libc.so, PROT_EXEC). How

[PATCH 1/2] powerpc/mm: remove obsolete comment about page size name array

2012-06-14 Thread Scott Wood
The array of names in hugetlbpage.c no longer exists. Signed-off-by: Scott Wood scottw...@freescale.com --- arch/powerpc/include/asm/mmu.h |7 +-- 1 files changed, 1 insertions(+), 6 deletions(-) diff --git a/arch/powerpc/include/asm/mmu.h b/arch/powerpc/include/asm/mmu.h index

[PATCH 2/2] powerpc/e6500: TLB miss handler with hardware tablewalk support

2012-06-14 Thread Scott Wood
There are a few things that make the existing hw tablewalk handlers unsuitable for e6500: - Indirect entries go in TLB1 (though the resulting direct entries go in TLB0). - It has threads, but no tlbsrx. -- so we need a spinlock and a normal tlbsx. Because we need this lock, hardware

Re: [PATCH 2/2] powerpc/e6500: TLB miss handler with hardware tablewalk support

2012-06-14 Thread Benjamin Herrenschmidt
On Thu, 2012-06-14 at 18:41 -0500, Scott Wood wrote: There are a few things that make the existing hw tablewalk handlers unsuitable for e6500: - Indirect entries go in TLB1 (though the resulting direct entries go in TLB0). That per-se doesn't justify a whole new handler... patching

Re: [PATCH 1/2] powerpc/mm: remove obsolete comment about page size name array

2012-06-14 Thread Michael Ellerman
On Thu, 2012-06-14 at 18:40 -0500, Scott Wood wrote: The array of names in hugetlbpage.c no longer exists. Signed-off-by: Scott Wood scottw...@freescale.com --- arch/powerpc/include/asm/mmu.h |7 +-- 1 files changed, 1 insertions(+), 6 deletions(-) diff --git

RE: [PATCH] powerpc/44x: Support OCM(On Chip Memory) for APM821xx SoC and Bluestone board

2012-06-14 Thread Vinh Huu Tuong Nguyen
-Original Message- From: Josh Boyer [mailto:jwbo...@gmail.com] Sent: Friday, June 15, 2012 12:47 AM To: Vinh Nguyen Huu Tuong Cc: Benjamin Herrenschmidt; Paul Mackerras; Matt Porter; Grant Likely; Rob Herring; Duc Dang; David S. Miller; Kumar Gala; Li Yang; Ashish Kalra; Anatolij

[PATCH v2] Make hard_irq_disable() actually hard-disable interrupts

2012-06-14 Thread Paul Mackerras
At present, hard_irq_disable() does nothing on powerpc because of this code in include/linux/interrupt.h: #ifndef hard_irq_disable #define hard_irq_disable() do { } while(0) #endif So we need to make our hard_irq_disable be a macro. Acked-by: Benjamin Herrenschmidt b...@kernel.crashing.org