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

2012-06-13 Thread Jesse Larrew
On 06/13/2012 10:25 PM, Michael Neuling wrote: > Jesse Larrew 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 upper

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

2012-06-13 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 --- arch/powerpc/include/asm/ppc-opcode.h | 14 +++--- arch/powerpc/kernel/cpu_setup_a2.S|2 +- arch/powerpc/

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

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

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

2012-06-13 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 15/18] powerpc: Introduce new __REG_R macros

2012-06-13 Thread Michael Neuling
Signed-off-by: Michael Neuling --- arch/powerpc/include/asm/ppc_asm.h | 32 1 file changed, 32 insertions(+) Index: powerpc-test/arch/powerpc/include/asm/ppc_asm.h === --- powerpc-test.orig/arch/p

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

2012-06-13 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 --- arch/powerpc/include/asm/ppc-opcode.h |8 ++--- arch/powerpc/include/asm/p

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

2012-06-13 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 --- arch/powerpc/include/asm/ppc-opcode.h |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) Index: powerpc-test/arch/powerpc/include/asm/ppc-opcode.h ==

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

2012-06-13 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 --- arch/powerpc/include/asm/ppc-opcode.h |4 1 file changed, 4 insertions(+) Index: powerpc-test/arch/powerpc/include/asm/ppc-opcode.h =

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

2012-06-13 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 --- arch/powerpc/kernel/exceptions-64e.S |8 arch/powerpc/kernel/misc_64.S|4 ++--

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

2012-06-13 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 --- arch/powerpc/platforms/powernv/opal-wrappers.S |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Index: powerpc-test/arch/powe

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

2012-06-13 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 --- arch/powerpc/include/asm/asm-compat.h |2 +- arch/powerpc/include/asm/ppc_asm.h

[PATCH 8/18] powerpc: merge VCPU_GPR

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

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

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

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

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

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

2012-06-13 Thread Michael Neuling
Now all the fixes are in place, let's rock-n-roll! Signed-off-by: Michael Neuling --- 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 4/18] powerpc: Fix sldi to take literal not register name

2012-06-13 Thread Michael Neuling
Was introduced by: commit 19ccb76a1938ab364a412253daec64613acbf3df Author: Paul Mackerras Date: Sat Jul 23 17:42:46 2011 +1000 Talking to paulus, this shouldn't be a literal. Signed-off-by: Michael Neuling --- arch/powerpc/kvm/book3s_hv_rmhandlers.S |2 +- 1 file changed, 1 insertion

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

2012-06-13 Thread Michael Neuling
The assembler doesn't take %r0 register arguments in braces, so remove them. Signed-off-by: Michael Neuling --- 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 1/18] powerpc: Add defines for R0-R31

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

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

2012-06-13 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 ppc44x_defconf

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

2012-06-13 Thread Grant Likely
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 FWIW, and without any actual compiling or testing: Acked-by: Grant Likely

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

2012-06-13 Thread Michael Neuling
Jesse Larrew 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 upper > > + * case R0-R31 as they provide more error che

Re: Replacement to of_register_platform_driver ?

2012-06-13 Thread Michael Ellerman
On Wed, 2012-06-13 at 17:21 +0200, Guillaume Dargaud wrote: > Hello all, > I just updated to the most recent kernel and a driver I wrote last year > won't compile: > xad.c:534:2: error: implicit declaration of function > 'of_register_platform_driver' > > I see references to this function as 'obs

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

2012-06-13 Thread Stephen Warren
On 06/13/2012 03:12 PM, 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. At least on Tegra this works fine, Tested-by: Stephen Warren ___ Linuxppc-dev

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

2012-06-13 Thread Benjamin Herrenschmidt
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 > --- > > Based on v3.5-rc2. Only build tested, I don't have a OF based devic

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

2012-06-13 Thread Wolfram Sang
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 --- Based on v3.5-rc2. Only build tested, I don't have a OF based device around at the moment. @Peter: Why does ocores do the device regist

Re: [PATCH 2/2] drivers: crypto: fix typo in nx driver config option

2012-06-13 Thread Kent Yoder
On Wed, 2012-06-13 at 13:22 -0500, Seth Jennings wrote: > Cc: Kent Yoder > Signed-off-by: Seth Jennings > --- > drivers/crypto/Kconfig |2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Acked-by: Kent Yoder > diff --git a/drivers/crypto/Kconfig b/drivers/crypto/Kconfig > index 1092a77

Re: [Cbe-oss-dev] [PATCH 05/10] powerpc/ps3: Use highmem region from repository

2012-06-13 Thread Nathan Whitehorn
On 06/13/12 12:58, Geoff Levand wrote: Hi Michael, On Wed, 2012-06-13 at 11:49 +1000, Michael Ellerman wrote: On Wed, 2012-04-25 at 19:19 +, Andre Heider wrote: Use any preallocated highmem region setup by the bootloader. This implementation only checks for the existance of a single region

Re: Q: a_ops->readpage() && struct file

2012-06-13 Thread Oleg Nesterov
On 06/13, Peter Zijlstra wrote: > > On Mon, 2012-06-11 at 21:09 +0200, Oleg Nesterov wrote: > > Stupid question. I'm afraid the answer is "no" but I'll ask anyway. > > Is it safe to pass filp == NULL to mapping->readpage()? In fact > > I do not understand why it needs "struct file*" and I do not se

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

2012-06-13 Thread Oleg Nesterov
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 bit strange to use the "random" mm > > > (the firs

Re: [PATCH 1/2] drivers: crypto: move nx build to driver/crypto Makefile

2012-06-13 Thread Kent Yoder
On Wed, 2012-06-13 at 13:22 -0500, Seth Jennings wrote: > When the nx driver was pulled, the Makefile that actually > builds it is arch/powerpc/Makefile. This is unnatural. > > This patch moves the line that builds the nx driver from > arch/powerpc/Makefile to drivers/crypto/Makefile where it > be

[PATCH 2/2] drivers: crypto: fix typo in nx driver config option

2012-06-13 Thread Seth Jennings
Cc: Kent Yoder Signed-off-by: Seth Jennings --- drivers/crypto/Kconfig |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/crypto/Kconfig b/drivers/crypto/Kconfig index 1092a77..b9b11a6 100644 --- a/drivers/crypto/Kconfig +++ b/drivers/crypto/Kconfig @@ -298,7 +298,7 @

[PATCH 1/2] drivers: crypto: move nx build to driver/crypto Makefile

2012-06-13 Thread Seth Jennings
When the nx driver was pulled, the Makefile that actually builds it is arch/powerpc/Makefile. This is unnatural. This patch moves the line that builds the nx driver from arch/powerpc/Makefile to drivers/crypto/Makefile where it belongs. Cc: Kent Yoder Signed-off-by: Seth Jennings --- arch/powe

Re: [Cbe-oss-dev] [PATCH 05/10] powerpc/ps3: Use highmem region from repository

2012-06-13 Thread Geoff Levand
Hi Michael, On Wed, 2012-06-13 at 11:49 +1000, Michael Ellerman wrote: > On Wed, 2012-04-25 at 19:19 +, Andre Heider wrote: > > Use any preallocated highmem region setup by the bootloader. > > This implementation only checks for the existance of a single > > region at region_index=0. > > > >

Re: Replacement to of_register_platform_driver ?

2012-06-13 Thread Ira W. Snyder
On Wed, Jun 13, 2012 at 05:21:22PM +0200, Guillaume Dargaud wrote: > Hello all, > I just updated to the most recent kernel and a driver I wrote last year > won't compile: > xad.c:534:2: error: implicit declaration of function > 'of_register_platform_driver' > > I see references to this function

Replacement to of_register_platform_driver ?

2012-06-13 Thread Guillaume Dargaud
Hello all, I just updated to the most recent kernel and a driver I wrote last year won't compile: xad.c:534:2: error: implicit declaration of function 'of_register_platform_driver' I see references to this function as 'obsolete' but could not find what's the new recommended way to do things.

Re: Q: a_ops->readpage() && struct file

2012-06-13 Thread Peter Zijlstra
On Mon, 2012-06-11 at 21:09 +0200, Oleg Nesterov wrote: > Stupid question. I'm afraid the answer is "no" but I'll ask anyway. > Is it safe to pass filp == NULL to mapping->readpage()? In fact > I do not understand why it needs "struct file*" and I do not see > any example of actual usage. Looking