Re: [PATCH] ibmveth: Fix more little endian issues

2013-12-22 Thread Anton Blanchard
ing the MAC address in a long in struct ibmveth_adapter. It's never used so remove it - we don't need another place in the driver where we create endian issues with MAC addresses. Reported-by: Alexander Graf Signed-off-by: Anton Blanchard --- diff --git a/drivers/net/ethernet/ibm/ibm

Re: [PATCH] powerpc: Make 64-bit non-VMX __copy_tofrom_user bi-endian

2013-12-23 Thread Anton Blanchard
Hi Michael, > > To try and catch any screw ups in our ppc64 memcpy and > > copy_tofrom_user loops, I wrote a quick test: > > > > http://ozlabs.org/~anton/junkcode/validate_kernel_copyloops.tar.gz > > Nice! How's this look? Love it! At the moment my other copy_to/from_user tests run against the

[PATCH] ibmveth: Fix more little endian issues

2013-12-23 Thread Anton Blanchard
- we don't need another place in the driver where we create endian issues with MAC addresses. Signed-off-by: Anton Blanchard Reviewed-by: Alexander Graf --- v2: annotate with __be64 as suggested by Joe diff --git a/drivers/net/ethernet/ibm/ibmveth.c b/drivers/net/ethernet/ibm/ibmve

[PATCH] slub: Don't throw away partial remote slabs if there is no local memory

2014-01-06 Thread Anton Blanchard
00.00% inode_cache 14 MB 100.00% kmalloc-256 14 MB 97.81% kmalloc-8192 14 MB 85.71% Signed-off-by: Anton Blanchard --- Thoughts? It seems like we could hit a similar situation if a machine is balanced but we run out of memory on a single node. Index: b/mm/s

Re: [PATCH] slub: Don't throw away partial remote slabs if there is no local memory

2014-01-08 Thread Anton Blanchard
Hi Andi, > > Thoughts? It seems like we could hit a similar situation if a > > machine is balanced but we run out of memory on a single node. > > Yes I agree, but your patch doesn't seem to attempt to handle this? It doesn't. I was hoping someone with more mm knowledge than I could suggest a li

Re: [PATCH] slub: Don't throw away partial remote slabs if there is no local memory

2014-01-08 Thread Anton Blanchard
Hi David, > Why not just delete the entire test? > Presumably some time a little earlier no local memory was available. > Even if there is some available now, it is very likely that some won't > be available again in the near future. I agree, the current behaviour seems strange but it has been a

Re: [PATCH] slub: Don't throw away partial remote slabs if there is no local memory

2014-01-08 Thread Anton Blanchard
Hi Wanpeng, > >+if (node_spanned_pages(node)) { > > s/node_spanned_pages/node_present_pages Thanks, I hadn't come across node_present_pages() before. Anton ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.

[PATCH] powerpc: Fix endian issues in kexec and crash dump code

2014-01-21 Thread Anton Blanchard
We expose a number of OF properties in the kexec and crash dump code and these need to be big endian. Cc: sta...@vger.kernel.org # v3.13 Signed-off-by: Anton Blanchard -- diff --git a/arch/powerpc/kernel/machine_kexec.c b/arch/powerpc/kernel/machine_kexec.c index 75d4f73..015ae55 100644 --- a

Re: [PATCH 8/8] powerpc: Fix endian issues in crash dump code

2014-01-22 Thread Anton Blanchard
Hi Michael, > Not my favourite colour :D What about this instead? > > We could also add of_property_read_u32(), with an implied index of > zero? > > I don't like the rc handling, but couldn't come up with anything I > liked better. Thanks for pointing that out, I didn't realise we had so man

Re: [PATCH v2] powerpc/powernv: Platform dump interface

2014-02-08 Thread Anton Blanchard
Hi Vasant, > +static void free_dump_sg_list(struct opal_sg_list *list) > +{ > + struct opal_sg_list *sg1; > + while (list) { > + sg1 = list->next; > + kfree(list); > + list = sg1; > + } > + list = NULL; > +} > + > +/* > + * Build dump buffer sca

[PATCH 1/2] powerpc: Link VDSOs at 0x0

2014-02-11 Thread Anton Blanchard
n We still have some local symbol resolution issues that will be fixed in a subsequent patch. Signed-off-by: Anton Blanchard --- diff --git a/arch/powerpc/include/asm/vdso.h b/arch/powerpc/include/asm/vdso.h index 0d9cecd..c53f5f6 100644 --- a/arch/powerpc/include/asm/vdso.h +++ b/arch/po

[PATCH 2/2] powerpc: Use unstripped VDSO image for more accurate profiling data

2014-02-11 Thread Anton Blanchard
apage 3.20% test[.] main 2.92% test[.] 0037.plt_call.gettimeofday@@GLIBC_2.18 Signed-off-by: Anton Blanchard --- diff --git a/arch/powerpc/kernel/vdso32/vdso32_wrapper.S b/arch/powerpc/kernel/vdso32/vdso32_wrapper.S index 6e8f507..37

[PATCH] powerpc: Align p_dyn, p_rela and p_st symbols

2014-03-03 Thread Anton Blanchard
The 64bit relocation code places a few symbols in the text segment. These symbols are only 4 byte aligned where they need to be 8 byte aligned. Add an explicit alignment. Signed-off-by: Anton Blanchard Cc: sta...@vger.kernel.org --- diff --git a/arch/powerpc/kernel/reloc_64.S b/arch/powerpc

ibmveth: Fix endian issues with MAC addresses

2014-03-04 Thread Anton Blanchard
ibmveth_adapter. It's never used so remove it - we don't need another place in the driver where we create endian issues with MAC addresses. Signed-off-by: Anton Blanchard Cc: sta...@vger.kernel.org --- Index: b/drivers/net/ethernet/ibm

[PATCH] powerpc: compat: 32 bit little endian machine name is ppcle, not ppc

2014-03-05 Thread Anton Blanchard
I noticed this when testing setarch. No, we don't magically support a big endian userspace on a little endian kernel. Signed-off-by: Anton Blanchard Cc: sta...@vger.kernel.org # v3.10+ --- diff --git a/arch/powerpc/include/asm/compat.h b/arch/powerpc/include/asm/compat.h index 84

[PATCH] powerpc: Use default set of netfilter modules (CONFIG_NETFILTER_ADVANCED=n)

2014-03-15 Thread Anton Blanchard
bridge module which is heavily used in KVM setups. Signed-off-by: Anton Blanchard --- diff --git a/arch/powerpc/configs/ppc64_defconfig b/arch/powerpc/configs/ppc64_defconfig index e015896..f26b267 100644 --- a/arch/powerpc/configs/ppc64_defconfig +++ b/arch/powerpc/configs/ppc64_defconfig

kvmppc_wait_for_nap warnings and KVM host+guest hang on 3.14-rc6*

2014-03-15 Thread Anton Blanchard
Hi, I was testing KVM on an upstream kernel (3.14.0-rc6-00145-ga4ecdf8) with Gregory's emulated MMIO fixes. I ran with 16 cores and 4 threads (matches the host): qemu-system-ppc64 -enable-kvm -smp cores=16,threads=4 -m 32G -M pseries -cpu POWER7 -nographic -nodefaults -monitor stdio -serial pt

[PATCH] powerpc: Fix KVM hang with CONFIG_KVM_XICS=n

2014-03-20 Thread Anton Blanchard
-off-by: Anton Blanchard Cc: sta...@vger.kernel.org --- diff --git a/arch/powerpc/kvm/book3s_hv.c b/arch/powerpc/kvm/book3s_hv.c index 17fc949..7a25d92 100644 --- a/arch/powerpc/kvm/book3s_hv.c +++ b/arch/powerpc/kvm/book3s_hv.c @@ -86,7 +86,7 @@ static void kvmppc_fast_vcpu_kick_hv(struct kvm_vcpu

Re: [PATCH v2] powerpc/powernv: Platform dump interface

2014-03-24 Thread Anton Blanchard
Hi Vasant, > On 02/09/2014 02:50 AM, Anton Blanchard wrote: > > > > Hi Vasant, > > > >> +static void free_dump_sg_list(struct opal_sg_list *list) > >> +{ > >> + struct opal_sg_list *sg1; > >> + while (list) { > >> + s

Re: [PATCH v4 09/11] powerpc/perf: add support for the hv 24x7 interface

2014-03-25 Thread Anton Blanchard
Hi Cody, hv-24x7: could not obtain capabilities, error 0x fffe, not enabling hv-gpci: could not obtain capabilities, error 0x fffe, not enabling

[PATCH 00/33] Build ppc64le kernel using ABIv2

2014-03-25 Thread Anton Blanchard
arted using modules. It would be nice to avoid a stack frame in the common (tracepoints disabled) case, but we may end up having to allocate one. Anton -- Anton Blanchard (21): powerpc: No need to use dot symbols when branching to a function powerpc: Remove superflous function descripto

[PATCH 03/33] powerpc: Don't use a function descriptor for system call table

2014-03-25 Thread Anton Blanchard
There is no need to create a function descriptor for the system call table. By using one we force the system call table into the text section and it really belongs in the rodata section. This also removes another use of dot symbols. Signed-off-by: Anton Blanchard --- arch/powerpc/kernel

[PATCH 02/33] powerpc: Remove superflous function descriptors in assembly only code

2014-03-25 Thread Anton Blanchard
descriptor so we can replace it with a label and remove the dot symbol. Signed-off-by: Anton Blanchard --- arch/powerpc/kernel/entry_64.S | 10 +- arch/powerpc/kernel/exceptions-64s.S | 18 +- arch/powerpc/kernel/head_64.S | 9

[PATCH 04/33] powerpc: Remove some unnecessary uses of _GLOBAL() and _STATIC()

2014-03-25 Thread Anton Blanchard
There is no need to create a function descriptor for functions called locally out of assembly. Signed-off-by: Anton Blanchard --- arch/powerpc/kernel/exceptions-64e.S | 4 ++-- arch/powerpc/kernel/exceptions-64s.S | 2 +- arch/powerpc/kernel/head_64.S| 12 ++-- 3 files changed

[PATCH 05/33] powerpc: Remove _INIT_GLOBAL(), _STATIC() and _INIT_STATIC()

2014-03-25 Thread Anton Blanchard
Now there are no users of _INIT_GLOBAL(), _STATIC() and _INIT_STATIC() we can remove them. Signed-off-by: Anton Blanchard --- arch/powerpc/include/asm/ppc_asm.h | 38 -- 1 file changed, 38 deletions(-) diff --git a/arch/powerpc/include/asm/ppc_asm.h b/arch

[PATCH 06/33] powerpc: Remove dot symbol usage in exception macros

2014-03-25 Thread Anton Blanchard
STD_EXCEPTION_COMMON, STD_EXCEPTION_COMMON_ASYNC and MASKABLE_EXCEPTION branch to the handler, so we can remove the explicit dot symbol and binutils will do the right thing. Signed-off-by: Anton Blanchard --- arch/powerpc/kernel/exceptions-64e.S | 8 +++ arch/powerpc/kernel/exceptions

[PATCH 07/33] powerpc: Create DOTSYM to wrap dot symbol usage

2014-03-25 Thread Anton Blanchard
There are a few places we have to use dot symbols with the current ABI - the syscall table and the kvm hcall table. Wrap both of these with a new macro called DOTSYM so it will be easy to transition away from dot symbols in a future ABI. Signed-off-by: Anton Blanchard --- arch/powerpc/include

[PATCH 08/33] powerpc: Remove function descriptors and dot symbols on new ABI

2014-03-25 Thread Anton Blanchard
ABIv2 doesn't have function descriptors or dot symbols. One new thing it does add is a function global and a local entry point, so add that to our _GLOBAL macro. Signed-off-by: Anton Blanchard --- arch/powerpc/include/asm/ftrace.h | 2 ++ arch/powerpc/include/asm/linkage.h | 2 ++

[PATCH 09/33] powerpc: ABIv2 function calls must place target address in r12

2014-03-25 Thread Anton Blanchard
To establish addressability quickly, ABIv2 requires the target address of the function being called to be in r12. Fix a number of places in assembly code that we do indirect function calls. We need to avoid function descriptors on ABIv2 too. Signed-off-by: Anton Blanchard --- arch/powerpc

[PATCH 10/33] powerpc: Ignore TOC relocations

2014-03-25 Thread Anton Blanchard
The linker fixes up TOC. relocations, so prom_init_check.sh should ignore them. Signed-off-by: Anton Blanchard --- arch/powerpc/kernel/prom_init_check.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/powerpc/kernel/prom_init_check.sh b/arch/powerpc/kernel

[PATCH 11/33] powerpc: Add ABIv2 support to ppc_function_entry

2014-03-25 Thread Anton Blanchard
Skip over the well known global entry point code for ABIv2. Signed-off-by: Anton Blanchard --- arch/powerpc/include/asm/code-patching.h | 40 1 file changed, 36 insertions(+), 4 deletions(-) diff --git a/arch/powerpc/include/asm/code-patching.h b/arch/powerpc

[PATCH 12/33] powerpc: Use ppc_function_entry instead of open coding it

2014-03-25 Thread Anton Blanchard
Replace FUNCTION_TEXT with ppc_function_entry which can handle both ABIv1 and ABIv2. Signed-off-by: Anton Blanchard --- arch/powerpc/mm/hash_utils_64.c | 18 -- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/arch/powerpc/mm/hash_utils_64.c b/arch/powerpc/mm

[PATCH 14/33] powerpc: Fix kernel thread creation on ABIv2

2014-03-25 Thread Anton Blanchard
Change how we setup registers for ret_from_kernel_thread. In ABIv1, instead of passing a function descriptor in, dereference it and pass the target in directly. Use ppc_global_function_entry to get it right on both ABIv1 and ABIv2. Signed-off-by: Anton Blanchard --- arch/powerpc/kernel

[PATCH 13/33] powerpc: Fix branch patching code for ABIv2

2014-03-25 Thread Anton Blanchard
ABIs. Signed-off-by: Anton Blanchard --- arch/powerpc/mm/hash_low_64.S | 36 arch/powerpc/mm/hash_utils_64.c | 20 +--- arch/powerpc/mm/slb.c | 12 ++-- arch/powerpc/mm/slb_low.S | 12 4 files change

[PATCH 15/33] powerpc: Fix ABIv2 issues with stack offsets in assembly code

2014-03-25 Thread Anton Blanchard
Fix STK_PARAM and use it instead of hardcoding ABIv1 offsets. Signed-off-by: Anton Blanchard --- arch/powerpc/include/asm/ppc_asm.h | 4 arch/powerpc/lib/copypage_power7.S | 8 arch/powerpc/lib/copyuser_power7.S | 24 arch/powerpc/lib/memcpy_64.S

[PATCH 16/33] powerpc: Fix unsafe accesses to parameter area in ELFv2

2014-03-25 Thread Anton Blanchard
routine is not performance critical. Signed-off-by: Ulrich Weigand Signed-off-by: Anton Blanchard --- arch/powerpc/lib/copypage_power7.S | 8 arch/powerpc/lib/copyuser_power7.S | 24 arch/powerpc/lib/memcpy_64.S | 8

[PATCH 17/33] powerpc/tm: Use STK_PARAM

2014-03-25 Thread Anton Blanchard
Get rid of the tm specific STACK_PARAM and use STK_PARAM Signed-off-by: Anton Blanchard --- arch/powerpc/kernel/tm.S | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/arch/powerpc/kernel/tm.S b/arch/powerpc/kernel/tm.S index ef47bcb..db02e84 100644 --- a/arch/powerpc

[PATCH 18/33] powerpc/tm: Fix GOT save offset for ABIv2

2014-03-25 Thread Anton Blanchard
The r2 TOC/GOT save offset is 40 on ABIv1 and 24 on ABIv2. Signed-off-by: Anton Blanchard --- arch/powerpc/include/asm/ppc_asm.h | 2 ++ arch/powerpc/kernel/tm.S | 8 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/arch/powerpc/include/asm/ppc_asm.h b/arch

[PATCH 19/33] powerpc/tracing: TRACE_WITH_FRAME_BUFFER creates invalid stack frames

2014-03-25 Thread Anton Blanchard
TRACE_WITH_FRAME_BUFFER creates 32 byte stack frames. On ppc64 ABIv1 this is too small and a callee could corrupt the stack by writing to the parameter save area (starting at offset 48). Signed-off-by: Anton Blanchard --- arch/powerpc/include/asm/irqflags.h | 4 ++-- 1 file changed, 2

[PATCH 20/33] powerpc: Fix SMP issues with ppc64le ABIv2

2014-03-25 Thread Anton Blanchard
There is no need to put a function descriptor in __secondary_hold_spinloop. Use ppc_function_entry to get the instruction address and put it in __secondary_hold_spinloop instead. Also fix an issue where we assumed cur_cpu_spec held a function descriptor. Signed-off-by: Anton Blanchard --- arch

[PATCH 21/33] powerpc: Fix ABIv2 issue with dereference_function_descriptor

2014-03-25 Thread Anton Blanchard
Don't try and dereference a function descriptor on ABIv2. Signed-off-by: Anton Blanchard --- arch/powerpc/include/asm/sections.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/powerpc/include/asm/sections.h b/arch/powerpc/include/asm/sections.h index d0e784e..d1bb96d 100644

[PATCH 22/33] powerpc: make module stub code endian independent

2014-03-25 Thread Anton Blanchard
From: Rusty Russell By representing them as words, rather than chars, we can avoid endian ifdefs. Signed-off-by: Rusty Russell --- arch/powerpc/kernel/module_64.c | 42 +++-- 1 file changed, 11 insertions(+), 31 deletions(-) diff --git a/arch/powerpc/kernel

[PATCH 23/33] powerpc: modules implement R_PPC64_TOCSAVE relocation.

2014-03-25 Thread Anton Blanchard
From: Rusty Russell Signed-off-by: Rusty Russell --- arch/powerpc/include/uapi/asm/elf.h | 5 - arch/powerpc/kernel/module_64.c | 8 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/arch/powerpc/include/uapi/asm/elf.h b/arch/powerpc/include/uapi/asm/elf.h index 7

[PATCH 24/33] powerpc: EXPORT_SYMBOL(.TOC.)

2014-03-25 Thread Anton Blanchard
From: Rusty Russell For the ELFv2 ABI, powerpc introduces a magic symbol ".TOC.". depmod then complains that this doesn't resolve (so does modpost, but we could easily fix that). To export this, we need to use asm. modpost and depmod both strip "." from symbols for the old PPC64 ELFv1 ABI, so

[PATCH 25/33] powerpc: module: handle MODVERSION for .TOC.

2014-03-25 Thread Anton Blanchard
From: Rusty Russell For the ELFv2 ABI, powerpc introduces a magic symbol ".TOC.". If we don't create a CRC for it (minus the leading ".", since we strip that) we get a modpost warning about missing CRC and the CRC array seems to be displaced by 1 so other CRCs mismatch too. Signed-off-by: Rusty

[PATCH 26/33] powerpc: Fix up TOC. for modules.

2014-03-25 Thread Anton Blanchard
From: Rusty Russell The kernel resolved the '.TOC.' to a fake symbol, so we need to fix it up to point to our .toc section plus 0x8000. Signed-off-by: Rusty Russell --- arch/powerpc/include/asm/module.h | 1 + arch/powerpc/kernel/module_64.c | 29 + 2 files chang

[PATCH 27/33] powerpc: Handle new ELFv2 module relocations

2014-03-25 Thread Anton Blanchard
From: Rusty Russell The new ELF ABI tends to use R_PPC64_REL16_LO and R_PPC64_REL16_HA relocations (PC-relative), so implement them. Signed-off-by: Rusty Russell --- arch/powerpc/include/uapi/asm/elf.h | 7 ++- arch/powerpc/kernel/module_64.c | 17 + 2 files changed, 2

[PATCH 28/33] powerpc: modules: comment about de-dotifying symbols when using the ELFv2 ABI.

2014-03-25 Thread Anton Blanchard
From: Rusty Russell ELFv2 doesn't use function descriptors, so we don't expect symbols to start with ".". But because depmod and modpost strip ".", and we have the special symbol ".TOC.", we still need to do it. Signed-off-by: Rusty Russell --- arch/powerpc/kernel/module_64.c | 3 ++- 1 file

[PATCH 29/33] powerpc: modules: change r2 save/restore offset for ELFv2 ABI.

2014-03-25 Thread Anton Blanchard
From: Rusty Russell ELFv2 uses a different stack offset (24 vs 40) to save r2. Signed-off-by: Rusty Russell --- arch/powerpc/kernel/module_64.c | 23 +++ 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/arch/powerpc/kernel/module_64.c b/arch/powerpc/kernel/mod

[PATCH 30/33] powerpc: modules: use r12 for stub jump address.

2014-03-25 Thread Anton Blanchard
From: Rusty Russell In ELFv2, r12 is supposed to equal to PC on entry to a function. Our stubs use r11, so change swap that with r12. Signed-off-by: Rusty Russell --- arch/powerpc/kernel/module_64.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/arch/powerpc/ker

[PATCH 31/33] powerpc: modules: skip r2 setup for ELFv2

2014-03-25 Thread Anton Blanchard
From: Rusty Russell ELFv2 doesn't need to set up r2 when calling a function. Signed-off-by: Rusty Russell --- arch/powerpc/kernel/module_64.c | 22 -- 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/arch/powerpc/kernel/module_64.c b/arch/powerpc/kernel/module

[PATCH 32/33] powerpc: modules: implement stubs for ELFv2 ABI.

2014-03-25 Thread Anton Blanchard
From: Rusty Russell ELFv2 doesn't use function descriptors, because it doesn't need to load a new r2 when calling into a function. On the other hand, you're supposed to use a local entry point for R_PPC_REL24 branches. Signed-off-by: Rusty Russell --- arch/powerpc/kernel/module_64.c | 73

[PATCH 33/33] powerpc: Build little endian ppc64 kernel with ABIv2

2014-03-25 Thread Anton Blanchard
Build the little endian ppc64 kernel with ABIv2 if the toolchain supports it. We can identify an ABIv2 capable toolchain by the -mabi=elfv2 compiler flag. Signed-off-by: Anton Blanchard --- arch/powerpc/Makefile | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/arch

Re: [PATCH 00/33] Build ppc64le kernel using ABIv2

2014-03-26 Thread Anton Blanchard
Hi Uli, > You probably should have two different macros _GLOBAL_TOC vs. _GLOBAL > (or _GLOBAL vs. _GLOBAL_NOTOC), and use the variant that provides a > global entry point setting up the TOC only with those functions that > actually require a TOC. I was worried that we might introduce subtle bugs

Re: [PATCH v4] powernv, cpufreq: cpufreq driver for powernv platform

2014-03-26 Thread Anton Blanchard
el free to add: Tested-by: Anton Blanchard Anton ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev

[PATCH 1/4] powerpc/powernv: Use uint64_t instead of size_t in OPAL APIs

2014-03-26 Thread Anton Blanchard
Using size_t in our APIs is asking for trouble, especially when some OPAL calls use size_t pointers. Signed-off-by: Anton Blanchard --- Index: b/arch/powerpc/include/asm/opal.h === --- a/arch/powerpc/include/asm/opal.h +++ b/arch

[PATCH 2/4] powerpc/powernv: Remove some OPAL function declaration duplication

2014-03-26 Thread Anton Blanchard
We had some duplication of the internal OPAL functions. Signed-off-by: Anton Blanchard --- Index: b/arch/powerpc/include/asm/opal.h === --- a/arch/powerpc/include/asm/opal.h +++ b/arch/powerpc/include/asm/opal.h @@ -877,7 +877,8

[PATCH 3/4] powerpc/powernv: Fix little endian issues with opal_do_notifier calls

2014-03-26 Thread Anton Blanchard
The bitmap in opal_poll_events and opal_handle_interrupt is big endian, so we need to byteswap it on little endian builds. Signed-off-by: Anton Blanchard --- Index: b/arch/powerpc/platforms/powernv/opal.c === --- a/arch/powerpc

[PATCH 4/4] powerpc/powernv: Fix little endian issues OPAL error log code

2014-03-26 Thread Anton Blanchard
Fix little endian issues with the OPAL error log code. Signed-off-by: Anton Blanchard --- Index: b/arch/powerpc/platforms/powernv/opal-elog.c === --- a/arch/powerpc/platforms/powernv/opal-elog.c +++ b/arch/powerpc/platforms

Re: [PATCH 4/4] powerpc/powernv: Fix little endian issues OPAL error log code

2014-03-27 Thread Anton Blanchard
Hi Stewart, > Do we also need any magic for the getting of error logs themselves? > > You may want to check the md5 of the logs themselves on be and le. Good idea. An md5 of the logs in LE and BE on this box checks out, so I think we are good. Anton

[PATCH 1/2] powerpc/powernv: Fix endian issues with OPAL async code

2014-03-27 Thread Anton Blanchard
Byteswap struct opal_msg in one place instead of requiring all the callers to do it. Signed-off-by: Anton Blanchard --- Index: b/arch/powerpc/include/asm/opal.h === --- a/arch/powerpc/include/asm/opal.h +++ b/arch/powerpc/include

[PATCH 2/2] powerpc/powernv: Fix endian issues with sensor code

2014-03-27 Thread Anton Blanchard
One OPAL call and one device tree property needed byte swapping. Signed-off-by: Anton Blanchard --- Index: b/arch/powerpc/platforms/powernv/opal-sensor.c === --- a/arch/powerpc/platforms/powernv/opal-sensor.c +++ b/arch/powerpc

[PATCH 1/2] powerpc/powernv: Fix endian issues with OPAL async code

2014-03-27 Thread Anton Blanchard
OPAL defines opal_msg as a big endian struct so we have to byte swap it on little endian builds. Signed-off-by: Anton Blanchard --- Index: b/arch/powerpc/include/asm/opal.h === --- a/arch/powerpc/include/asm/opal.h +++ b/arch

[PATCH 2/2] powerpc/powernv: Fix endian issues with sensor code

2014-03-27 Thread Anton Blanchard
One OPAL call and one device tree property needed byte swapping. Signed-off-by: Anton Blanchard --- Index: b/arch/powerpc/platforms/powernv/opal-sensor.c === --- a/arch/powerpc/platforms/powernv/opal-sensor.c +++ b/arch/powerpc

[PATCH] powerpc: Add lq/stq emulation

2014-03-27 Thread Anton Blanchard
Recent CPUs support quad word load and store instructions. Add support to the alignment handler for them. Signed-off-by: Anton Blanchard --- Index: b/arch/powerpc/include/asm/emulated_ops.h === --- a/arch/powerpc/include/asm

[PATCH 0/7] Build ppc64le kernel using ABIv2, supplemental patches

2014-04-03 Thread Anton Blanchard
to load: # cat /proc/modules | wc -l 3830 It survived a fair bit of poking (enabling/disabling function tracers etc). Anton Blanchard (7): powerpc: Add _GLOBAL_TOC for ABIv2 assembly functions exported to modules powerpc: ftrace_caller, _mcount is exported to modules so needs

[PATCH 1/7] powerpc: Add _GLOBAL_TOC for ABIv2 assembly functions exported to modules

2014-04-03 Thread Anton Blanchard
If an assembly function that calls back into c code is exported to modules, we need to ensure r2 is setup correctly. There are only two places crazy enough to do it (two of which are my fault). Signed-off-by: Anton Blanchard --- arch/powerpc/include/asm/ppc_asm.h | 12 arch/powerpc

[PATCH 2/7] powerpc: ftrace_caller, _mcount is exported to modules so needs _GLOBAL_TOC()

2014-04-03 Thread Anton Blanchard
When testing the ftrace function tracer, I realised that ftrace_caller and mcount are called from modules and they both call into C, therefore they need the ABIv2 global entry point to establish r2. Signed-off-by: Anton Blanchard --- arch/powerpc/kernel/entry_64.S | 7 ++- 1 file changed, 2

[PATCH 4/7] powerpc/modules: Create is_module_trampoline()

2014-04-03 Thread Anton Blanchard
ftrace has way too much knowledge of our kernel module trampoline layout hidden inside it. Create is_module_trampoline() that can abstract this away inside the module loader code. Signed-off-by: Anton Blanchard --- arch/powerpc/include/asm/module.h | 1 + arch/powerpc/kernel/module_64.c | 51

[PATCH 3/7] powerpc/kprobes: Fix ABIv2 issues with kprobe_lookup_name

2014-04-03 Thread Anton Blanchard
Use ppc_function_entry in places where we previously assumed function descriptors exist. Signed-off-by: Anton Blanchard --- arch/powerpc/include/asm/kprobes.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/arch/powerpc/include/asm/kprobes.h b/arch/powerpc/include/asm

[PATCH 5/7] powerpc/modules: Create module_trampoline_target()

2014-04-03 Thread Anton Blanchard
ftrace has way too much knowledge of our kernel module trampoline layout hidden inside it. Create module_trampoline_target() that gives the target address of a kernel module trampoline. Signed-off-by: Anton Blanchard --- arch/powerpc/include/asm/module.h | 2 ++ arch/powerpc/kernel/module_64.c

[PATCH 6/7] powerpc/ftrace: Use module loader helpers to parse trampolines

2014-04-03 Thread Anton Blanchard
Now we have is_module_trampoline() and module_trampoline_target() we can remove a bunch of intimate kernel module trampoline knowledge from ftrace. Signed-off-by: Anton Blanchard --- arch/powerpc/kernel/ftrace.c | 97 +--- 1 file changed, 20 insertions

[PATCH 7/7] powerpc/ftrace: Fix ABIv2 issues with __ftrace_make_call

2014-04-03 Thread Anton Blanchard
__ftrace_make_call assumed ABIv1 TOC stack offsets, so it broke on ABIv2. While we are here, we can simplify the instruction modification code. Since we always update one instruction there is no need to probe_kernel_write and flush_icache_range, just use patch_branch. Signed-off-by: Anton

Re: [PATCH] powerpc/le: Avoid creatng R_PPC64_TOCSAVE relocations for modules.

2014-04-06 Thread Anton Blanchard
les with an error like: > nf_conntrack: Unknown ADD relocation: 109 > > This patch tells the linker to avoid createing R_PPC64_TOCSAVE > relocations allowing modules to load. Looks good. Signed-off-by: Anton Blanchard > +ifeq ($(call cc-option-yn,-mno-save-toc-indirect),y) > +

Re: [PATCH 1/2] fixup: "powerpc/perf: Add support for the hv 24x7 interface"

2014-04-06 Thread Anton Blanchard
Hi > That's not much less awful... The message gives 0 informations about > where it comes from .. what is it that couldn't obtain capabilities ? Cody is at least using pr_fmt to give some information on what went wrong: [1.635040] hv-24x7: not a virtualized system, not enabling [1.63507

ISA kernel modules that build and oops on ppc64

2014-04-06 Thread Anton Blanchard
Hi, I built an allmodconfig kernel last Friday and tried inserting every module. There were quite a few that oops because they probe ISA space. Anton -- Unable to handle kernel paging request for data at address 0xd80001f2 NIP [d3f3ff98] probe_chip_type+0x244/0x11d4 [pata_legacy

[PATCH] powerpc/le: Fix module build error

2014-04-08 Thread Anton Blanchard
I made a cleanup suggestion on 27143b9a0 (powerpc/le: Avoid creatng R_PPC64_TOCSAVE relocations for modules) that had a stupid typo. Fix it. Signed-off-by: Anton Blanchard --- diff --git a/arch/powerpc/Makefile b/arch/powerpc/Makefile index a9f814a..4c0cedf 100644 --- a/arch/powerpc/Makefile

[PATCH] powerpc: Fix error return in rtas_flash module init

2014-04-14 Thread Anton Blanchard
module_init should return 0 or a negative errno. Signed-off-by: Anton Blanchard --- diff --git a/arch/powerpc/kernel/rtas_flash.c b/arch/powerpc/kernel/rtas_flash.c index 2f3cdb0..658e89d 100644 --- a/arch/powerpc/kernel/rtas_flash.c +++ b/arch/powerpc/kernel/rtas_flash.c @@ -705,7 +705,7

[PATCH 1/3] powerpc: Rename duplicate COMMAND_LINE_SIZE define

2014-04-14 Thread Anton Blanchard
the boot wrapper define unique by calling it BOOT_COMMAND_LINE_SIZE. Signed-off-by: Anton Blanchard --- diff --git a/arch/powerpc/boot/main.c b/arch/powerpc/boot/main.c index a28f021..d367a0a 100644 --- a/arch/powerpc/boot/main.c +++ b/arch/powerpc/boot/main.c @@ -139,18 +139,18 @@ static struct

[PATCH 2/3] powerpc: Bump COMMAND_LINE_SIZE to 2048

2014-04-14 Thread Anton Blanchard
I've had a report that the current limit is too small for an automated network based installer. Bump it. Signed-off-by: Anton Blanchard --- diff --git a/arch/powerpc/include/uapi/asm/setup.h b/arch/powerpc/include/uapi/asm/setup.h index 552df83..0516e97 100644 --- a/arch/powerpc/include

[PATCH 3/3] powerpc: Bump BOOT_COMMAND_LINE_SIZE to 2048

2014-04-14 Thread Anton Blanchard
Bump the boot wrapper BOOT_COMMAND_LINE_SIZE to match the kernel. Signed-off-by: Anton Blanchard --- We export this in an ELF section so userspace tools can edit it. We should be safe so long as we are only increasing it shouldn't we? Index: b/arch/powerpc/boot/

[PATCH 2/7] powerpc: Enable on demand governor on ppc64_defconfig

2015-01-19 Thread Anton Blanchard
This was enabled on the pseries defconfigs recently, but missed the ppc64 one. Signed-off-by: Anton Blanchard --- arch/powerpc/configs/ppc64_defconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/powerpc/configs/ppc64_defconfig b/arch/powerpc/configs/ppc64_defconfig index f1c4342

[PATCH 1/7] powerpc: regenerate ppc64 and pseries defconfigs

2015-01-19 Thread Anton Blanchard
Regenerate defconfigs using make savedefconfig. Anton Blanchard --- arch/powerpc/configs/ppc64_defconfig | 11 +-- arch/powerpc/configs/pseries_defconfig| 12 +++- arch/powerpc/configs/pseries_le_defconfig | 14 +++--- 3 files changed, 7 insertions(+), 30

[PATCH 3/7] powerpc: Enable CONFIG_SATA_AHCI on pseries and ppc64 defconfigs

2015-01-19 Thread Anton Blanchard
We are starting to see ppc64 boxes with SATA AHCI adapters in it, so enable it in our defconfigs. Signed-off-by: Anton Blanchard --- arch/powerpc/configs/ppc64_defconfig | 1 + arch/powerpc/configs/pseries_defconfig| 1 + arch/powerpc/configs/pseries_le_defconfig | 1 + 3 files changed

[PATCH 4/7] powerpc: Enable KSM on pseries and ppc64 defconfigs

2015-01-19 Thread Anton Blanchard
KSM will only be used on areas marked for merging via madvise, and it is showing nice improvements on KVM workloads, so enable it by default. Signed-off-by: Anton Blanchard --- arch/powerpc/configs/ppc64_defconfig | 1 + arch/powerpc/configs/pseries_defconfig| 1 + arch/powerpc/configs

[PATCH 5/7] powerpc: Enable overlayfs on pseries and ppc64 defconfigs

2015-01-19 Thread Anton Blanchard
Signed-off-by: Anton Blanchard --- arch/powerpc/configs/ppc64_defconfig | 1 + arch/powerpc/configs/pseries_defconfig| 1 + arch/powerpc/configs/pseries_le_defconfig | 1 + 3 files changed, 3 insertions(+) diff --git a/arch/powerpc/configs/ppc64_defconfig b/arch/powerpc/configs

[PATCH 6/7] powerpc: Enable various container features on pseries defconfigs.

2015-01-19 Thread Anton Blanchard
Enable config options required by lxc and docker. Signed-off-by: Anton Blanchard --- arch/powerpc/configs/pseries_defconfig| 12 arch/powerpc/configs/pseries_le_defconfig | 12 2 files changed, 24 insertions(+) diff --git a/arch/powerpc/configs/pseries_defconfig

[PATCH 7/7] powerpc: enable CONFIG_NETFILTER_XT_MARK

2015-01-19 Thread Anton Blanchard
docker requires CONFIG_NETFILTER_XT_MARK to be enabled. Unfortunately that means turning on CONFIG_NETFILTER_ADVANCED. Signed-off-by: Anton Blanchard --- arch/powerpc/configs/pseries_defconfig| 22 +- arch/powerpc/configs/pseries_le_defconfig | 22

[PATCH 1/2] powerpc: Add 64bit optimised memcmp

2015-01-20 Thread Anton Blanchard
atomics. Signed-off-by: Anton Blanchard --- arch/powerpc/lib/Makefile| 3 +- arch/powerpc/lib/memcmp_64.S | 233 +++ arch/powerpc/lib/string.S| 2 + 3 files changed, 237 insertions(+), 1 deletion(-) create mode 100644 arch/powerpc/lib/memcmp_

[PATCH 2/2] powerpc: Add memcmp testcase

2015-01-20 Thread Anton Blanchard
Add a testcase for the new ppc64 memcmp. Signed-off-by: Anton Blanchard --- .../testing/selftests/powerpc/stringloops/Makefile | 21 + .../selftests/powerpc/stringloops/asm/ppc_asm.h| 7 ++ .../selftests/powerpc/stringloops/memcmp_64.S | 1 + .../selftests/powerpc/stringloops

[PATCH 2/2] powerpc: Add ppc64 hard lockup detector support

2015-01-20 Thread Anton Blanchard
ns we might take multiple PMU exceptions per second per hardware thread even if our hard lockup timeout is 10 seconds. It can be enabled via a boot option, or via procfs. Signed-off-by: Anton Blanchard --- arch/powerpc/Kconfig | 1 + arch/powerpc/include/asm/nmi.h | 4

[PATCH 1/2] oprofile: Add HAVE_OPROFILE_NMI_TIMER

2015-01-20 Thread Anton Blanchard
HAVE_PERF_EVENTS_NMI is used for two things - the oprofile NMI timer and the hardlockup detector. Create HAVE_OPROFILE_NMI_TIMER so an architecture can select them separately. On ppc64 we want to add the hardlockup detector, but not the oprofile NMI timer fallback. Signed-off-by: Anton Blanchard

Re: [PATCH 3/3] powerpc: Include linux/jump_label.h to get HAVE_JUMP_LABEL define

2015-01-20 Thread Anton Blanchard
Hi Jason, > > diff --git a/arch/powerpc/platforms/pseries/lpar.c > > b/arch/powerpc/platforms/pseries/lpar.c index 469751d..14ac1ad > > 100644 --- a/arch/powerpc/platforms/pseries/lpar.c > > +++ b/arch/powerpc/platforms/pseries/lpar.c > > @@ -27,6 +27,7 @@ > > #include > > #include > > #inclu

[PATCH 1/2] oprofile: Add HAVE_OPROFILE_NMI_TIMER

2015-01-21 Thread Anton Blanchard
HAVE_PERF_EVENTS_NMI is used for two things - the oprofile NMI timer and the hard lockup detector. Create HAVE_OPROFILE_NMI_TIMER so an architecture can select them separately. On ppc64 we want to add the hard lockup detector, but not the oprofile NMI timer fallback. Signed-off-by: Anton

Re: [PATCH 1/2] powerpc: Add 64bit optimised memcmp

2015-01-21 Thread Anton Blanchard
Hi Arnd, > Would it help to also add a way for an architecture to override > memcmp_pages() with its own implementation? That way you could > skip the unaligned part, hardcode the loop counter and avoid the > preempt_disable() in kmap_atomic(). Good idea. We could also have a generic implementati

Re: [PATCH 1/2] oprofile: Add HAVE_OPROFILE_NMI_TIMER

2015-01-22 Thread Anton Blanchard
Hi Robert, > I also don't see a reason, why you don't want to support oprofile NMI > timer. Is there any? I couldn't come up with a case where it would be a benefit to us. We roll out PMU support for a new CPU early so that the kernel and tools support it when we GA. On the other hand adding opro

Re: [PATCH] powerpc/mm: Add trace point for tracking hash pte fault

2015-02-02 Thread Anton Blanchard
Hi, > > ebizzy with -S 30 -t 1 -P gave > > 13627 records/s -> Without patch > > 13546 records/s -> With patch with tracepoint disabled > > OK. So that's about -0.6%. Are we happy with that? I'm not sure. > > Can you do a few more runs and see if that's a stable result. Surprisingly large. Is CO

Re: [PATCH] powerpc/mm: Add trace point for tracking hash pte fault

2015-02-02 Thread Anton Blanchard
Hi Aneesh, > yes. We do use jump label. I also verified that looking at .s > > #APP > # 23 "./arch/powerpc/include/asm/jump_label.h" 1 > 1: > nop > .pushsection __jump_table, "aw" > .llong 1b, .L201, __tracepoint_hash_fault+8 #, > .popsection > > #

[PATCH 1/2] powerpc: Change vrX register defines to vX to match gcc and glibc

2015-02-09 Thread Anton Blanchard
VMX register definitions - the kernel uses vrX whereas both gcc and glibc use vX. Change the kernel to match userspace. Signed-off-by: Anton Blanchard --- arch/powerpc/include/asm/ppc_asm.h | 64 +++--- arch/powerpc/include/uapi/asm/ptrace.h | 2 +- arch/powerpc

[PATCH 2/2] powerpc: Change vsrX register defines to vsX to match gcc and glibc

2015-02-09 Thread Anton Blanchard
VSX register definitions - the kernel uses vsrX whereas gcc uses vsX. Change the kernel to match userspace. Signed-off-by: Anton Blanchard --- arch/powerpc/include/asm/ppc_asm.h | 128 ++--- arch/powerpc/lib/ldstfp.S | 6 +- 2 files changed, 67 insertions

<    1   2   3   4   5   6   7   8   9   10   >