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

2015-04-08 Thread Anton Blanchard
c9e47aa8e4 ("powerpc/jump_label: Use HAVE_JUMP_LABEL") Signed-off-by: Anton Blanchard --- arch/powerpc/platforms/powernv/opal-wrappers.S | 2 +- arch/powerpc/platforms/pseries/hvCall.S| 2 +- arch/powerpc/platforms/pseries/lpar.c | 2 +- 3 files changed, 3 insertions(+),

[PATCH] powerpc/config: Enable bnx2x on ppc64 and pseries defconfigs

2015-04-09 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 2/2] powerpc: Add ppc64 hard lockup detector support

2015-04-08 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 2/3] jump_label: Allow jump labels to be used in assembly

2015-04-08 Thread Anton Blanchard
To use jump labels in assembly we need the HAVE_JUMP_LABEL define, so we select a fallback version if the toolchain does not support them. Modify linux/jump_label.h so it can be included by assembly files. We also need to add -DCC_HAVE_ASM_GOTO to KBUILD_AFLAGS. Signed-off-by: Anton Blanchard

[PATCH 1/2] oprofile: Disable oprofile NMI timer on ppc64

2015-04-08 Thread Anton Blanchard
y for OPROFILE_NMI_TIMER to disable it on PPC64. Signed-off-by: Anton Blanchard --- arch/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/Kconfig b/arch/Kconfig index 05d7a8a..0cc605d 100644 --- a/arch/Kconfig +++ b/arch/Kconfig @@ -32,7 +32,7 @@ config HAVE_OPR

[PATCH 1/3] jump_label: Allow asm/jump_label.h to be included in assembly

2015-04-08 Thread Anton Blanchard
(see ARCH_STATIC_BRANCH in the powerpc asm/jump_label.h for an example). Signed-off-by: Anton Blanchard --- arch/arm/include/asm/jump_label.h | 5 ++--- arch/arm64/include/asm/jump_label.h | 8 arch/mips/include/asm/jump_label.h | 7 +++ arch/s390/include/asm/jump_label.h | 3 +++

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

2015-04-08 Thread Anton Blanchard
c9e47aa8e4 ("powerpc/jump_label: Use HAVE_JUMP_LABEL") Signed-off-by: Anton Blanchard --- arch/powerpc/platforms/powernv/opal-wrappers.S | 2 +- arch/powerpc/platforms/pseries/hvCall.S| 2 +- arch/powerpc/platforms/pseries/lpar.c | 2 +- 3 files changed, 3 insertions(+),

[PATCH 2/3] jump_label: Allow jump labels to be used in assembly

2015-04-08 Thread Anton Blanchard
To use jump labels in assembly we need the HAVE_JUMP_LABEL define, so we select a fallback version if the toolchain does not support them. Modify linux/jump_label.h so it can be included by assembly files. We also need to add -DCC_HAVE_ASM_GOTO to KBUILD_AFLAGS. Signed-off-by: Anton Blanchard

[PATCH 1/3] jump_label: Allow asm/jump_label.h to be included in assembly

2015-04-08 Thread Anton Blanchard
(see ARCH_STATIC_BRANCH in the powerpc asm/jump_label.h for an example). Signed-off-by: Anton Blanchard --- arch/arm/include/asm/jump_label.h | 5 ++--- arch/arm64/include/asm/jump_label.h | 8 arch/mips/include/asm/jump_label.h | 7 +++ arch/s390/include/asm/jump_label.h | 3 +++

[PATCH] powerpc/perf: Cap 64bit userspace backtraces to PERF_MAX_STACK_DEPTH

2015-04-13 Thread Anton Blanchard
We cap 32bit userspace backtraces to PERF_MAX_STACK_DEPTH (currently 127), but we forgot to do the same for 64bit backtraces. Cc: sta...@vger.kernel.org Signed-off-by: Anton Blanchard --- arch/powerpc/perf/callchain.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch

[PATCH] powerpc/config: Enable bnx2x on ppc64 and pseries defconfigs

2015-05-12 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] powerpc: Align TOC to 256 bytes

2015-05-13 Thread Anton Blanchard
...@vger.kernel.org Signed-off-by: Anton Blanchard --- arch/powerpc/kernel/vmlinux.lds.S | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/powerpc/kernel/vmlinux.lds.S b/arch/powerpc/kernel/vmlinux.lds.S index f096e72..1db6851 100644 --- a/arch/powerpc/kernel/vmlinux.lds.S +++ b/arch/powerpc/kernel

Re: [PATCH V3 09/13] selftests, powerpc: Add test for DSCR value inheritence across fork

2015-05-17 Thread Anton Blanchard
o), is that we don't restore the DSCR on exit. I'm not sure we need to go to the trouble of saving and restoring it, but we should at least get it back to 0 when done. Also a tiny nit, no need for a newline in perror(): open() failed : Permission denied With those changes you can ad

Re: [PATCH 1/2] powerpc/configs: merge pseries_defconfig and pseries_le_defconfig

2015-05-23 Thread Anton Blanchard
Hi Cyril, > These two configs should be identical with the exception of big or > little endian > > The big endian version has XMON_DEFAULT turned on while the little > endian has XMON_DEFAULT not set. Enable XMON_DEFAULT for little > endian. I disabled it on the LE defconfig on purpose. In most

[PATCH 0/6] Build ppc64le kernel with llvm/clang

2015-05-25 Thread Anton Blanchard
upstream to fix them. Anton Blanchard (6): powerpc: Fix duplicate const clang warning in user access code powerpc: Only use -mabi=altivec if toolchain supports it powerpc: Only use -mtraceback=no, -mno-string and -msoft-float if toolchain supports it powerpc: Don't use -mno-strict-

[PATCH 1/6] powerpc: Fix duplicate const clang warning in user access code

2015-05-25 Thread Anton Blanchard
Signed-off-by: Anton Blanchard --- arch/powerpc/include/asm/uaccess.h | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/powerpc/include/asm/uaccess.h b/arch/powerpc/include/asm/uaccess.h index a0c071d..2a8ebae 100644 --- a/arch/powerpc/include/asm/uaccess.h +++ b

[PATCH 2/6] powerpc: Only use -mabi=altivec if toolchain supports it

2015-05-25 Thread Anton Blanchard
The -mabi=altivec option is not recognised on LLVM, so use call cc-option to check for support. Signed-off-by: Anton Blanchard --- arch/powerpc/lib/Makefile | 2 +- lib/raid6/Makefile| 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/powerpc/lib/Makefile b/arch

[PATCH 3/6] powerpc: Only use -mtraceback=no, -mno-string and -msoft-float if toolchain supports it

2015-05-25 Thread Anton Blanchard
These options are not recognised on LLVM, so use call cc-option to check for support. Signed-off-by: Anton Blanchard --- arch/powerpc/Makefile | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/arch/powerpc/Makefile b/arch/powerpc/Makefile index 7a0daad..7c08b4e 100644

[PATCH 4/6] powerpc: Don't use -mno-strict-align on clang

2015-05-25 Thread Anton Blanchard
We added -mno-strict-align in commit f036b3681962 (powerpc: Work around little endian gcc bug) to fix gcc bug http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57134 Clang doesn't understand it. We need to use a conditional because we can't use the simpler call cc-option here. Signed-off

[PATCH 5/6] powerpc: Don't use gcc specific options on clang

2015-05-25 Thread Anton Blanchard
Add a conditional around the code to select various gcc only options: -mabi=elfv2 vs -mcall-aixdesc, and -mcmodel=medium vs -mminimal-toc. Signed-off-by: Anton Blanchard --- arch/powerpc/Makefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/powerpc/Makefile b/arch/powerpc/Makefile

[PATCH 6/6] llvm: A few Makefile hacks

2015-05-25 Thread Anton Blanchard
llvm accepts -fno-delete-null-pointer-checks but complains about it. Wrap it to avoid getting enormous numbers of warnings. Also add -no-integrated-as to disable the llvm integrated assembler, lots of stuff currently relies on gas. --- Makefile | 5 + 1 file changed, 5 insertions(+) diff --g

[PATCH] powerpc/perf: Fix book3s kernel to userspace backtraces

2015-05-25 Thread Anton Blanchard
cpu_ioctl | | do_vfs_ioctl | | sys_ioctl | | system_call | | __ioctl | | 0x7e714 | | 0x7e714 Signed-off-

[PATCH 1/2] powerpc: Relocatable system call no longer uses the LR

2015-05-25 Thread Anton Blanchard
s not need restoring. Remove the stale comment and the restore of the LR. Signed-off-by: Anton Blanchard --- arch/powerpc/kernel/exceptions-64s.S | 16 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/arch/powerpc/kernel/exceptions-64s.S b/arch/powerpc/kernel/except

[PATCH 2/2] powerpc: Non relocatable system call doesn't need a trampoline

2015-05-25 Thread Anton Blanchard
We need to use a trampoline when using LOAD_HANDLER(), because the destination needs to be in the first 64kB. An absolute branch has no such limitations, so just jump there. Signed-off-by: Anton Blanchard --- arch/powerpc/kernel/exceptions-64s.S | 2 +- 1 file changed, 1 insertion(+), 1

Re: [PATCH] powerpc/perf: Fix book3s kernel to userspace backtraces

2015-05-26 Thread Anton Blanchard
Hi Laurentiu, > > + if ((TRAP(regs) == 0xf00) && regs->result) > > + return true; > > + > > + return false; > > Why not just > > return (TRAP(regs) == 0xf00) && regs->result; Could do, it just read a little easier to my tired eyes. Anton __

[PATCH] powerpc: Fix duplicate const clang warning in user access code

2015-05-31 Thread Anton Blanchard
oing const __typeof__(*(ptr)), which will hit the warning if ptr is marked const. Signed-off-by: Anton Blanchard --- arch/powerpc/include/asm/uaccess.h | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/powerpc/include/asm/uaccess.h b/arch/powerpc/include/asm/uaccess.h ind

[PATCH] powerpc/perf: Fix ABIv2 kernel backtraces

2014-08-25 Thread Anton Blanchard
_exit __GI___libc_read Cc: sta...@vger.kernel.org # 3.16+ Reported-by: Aneesh Kumar K.V Signed-off-by: Anton Blanchard --- Index: b/arch/powerpc/include/asm/ptrace.h === --- a/arch/powerpc/include/asm/ptrace.h +++ b/arch/po

Re: [PATCH 6/6] powerpc: Separate ppc32 symbol exports into ppc_ksyms_32.c

2014-09-11 Thread Anton Blanchard
Hi Stephen, > You removed export.h ... > > > +EXPORT_SYMBOL(flush_dcache_range); > > +EXPORT_SYMBOL(flush_icache_range); > > But still use EXPORT_SYMBOL ... Thanks, fixed! Anton ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://list

Re: [PATCH 4/4] powerpc: Move htab_remove_mapping function prototype into header file

2014-09-11 Thread Anton Blanchard
Hi Stephen, > Please be consistent about "extern" use (unless this file is already > inconsistent, I guess). (I know that the current trend is to remove > "extern" in header files - I just happen to disagree with that > trend. :-)) Good idea, fixed this for the next rev. Anton

[PATCH 1/2] powerpc: Add POWER8 CPU selection

2014-09-15 Thread Anton Blanchard
This allows the user to build a kernel targeted at POWER8 (ie gcc -mcpu=power8). Signed-off-by: Anton Blanchard --- Index: b/arch/powerpc/Makefile === --- a/arch/powerpc/Makefile +++ b/arch/powerpc/Makefile @@ -135,6 +135,7

[PATCH 2/2] powerpc: Use CONFIG_ARCH_HAS_FAST_MULTIPLIER

2014-09-15 Thread Anton Blanchard
I ran some tests to compare hash_64 using shifts and multiplies. The results: POWER6: ~2x slower POWER7: ~2x faster POWER8: ~2x faster Now we have a proper config option, select CONFIG_ARCH_HAS_FAST_MULTIPLIER on POWER7 and POWER8. Signed-off-by: Anton Blanchard --- Index: b/arch/powerpc

[PATCH 1/6] powerpc: Speed up clear_page by unrolling it

2014-09-16 Thread Anton Blanchard
yond 512 bytes and page sizes wont drop below 1kB, which is unlikely, but we could add a runtime check during early init if it makes people nervous. Signed-off-by: Anton Blanchard --- arch/powerpc/include/asm/page_64.h | 18 ++ 1 file changed, 14 insertions(+), 4 deletions(-) diff

[PATCH 2/6] powerpc: Use pr_fmt in module loader code

2014-09-16 Thread Anton Blanchard
Use pr_fmt to give some context to the error messages in the module code, and convert open coded debug printk to pr_debug. Use pr_err for error messages. Signed-off-by: Anton Blanchard --- arch/powerpc/kernel/module_32.c | 31 ++- arch/powerpc/kernel/module_64.c

[PATCH 4/6] powerpc: Remove ppc_md.remove_memory

2014-09-16 Thread Anton Blanchard
We have an extra level of indirection on memory hot remove which is not matched on memory hot add. Memory hotplug is book3s only, so there is no need for it. This also enables means remove_memory() (ie memory hot unplug) works on powernv. Signed-off-by: Anton Blanchard --- arch/powerpc/include

[PATCH 3/6] powerpc: Remove powerpc specific cmd_line

2014-09-16 Thread Anton Blanchard
There is no need for yet another copy of the command line, just use boot_command_line like everyone else. Signed-off-by: Anton Blanchard --- arch/powerpc/include/asm/machdep.h | 2 -- arch/powerpc/kernel/prom.c | 4 +--- arch/powerpc/kernel/setup-common.c | 2 -- arch

[PATCH 5/6] powerpc: Add printk levels to powernv platform code

2014-09-16 Thread Anton Blanchard
Add printk levels to powernv platform code, and convert to pr_err() etc while here. Signed-off-by: Anton Blanchard --- arch/powerpc/platforms/powernv/opal-nvram.c | 2 +- arch/powerpc/platforms/powernv/opal.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/arch

[PATCH 6/6] powerpc: Add printk levels to powerpc code

2014-09-16 Thread Anton Blanchard
Add printk levels to some places in the powerpc port. Signed-off-by: Anton Blanchard --- arch/powerpc/include/asm/pgtable-ppc32.h| 4 ++-- arch/powerpc/include/asm/pgtable-ppc64-4k.h | 2 +- arch/powerpc/include/asm/pgtable-ppc64.h| 6 +++--- arch/powerpc/kernel/irq.c

[PATCH 1/5] powerpc: Remove bootmem allocator

2014-09-16 Thread Anton Blanchard
At the moment we transition from the memblock alloctor to the bootmem allocator. Gitting rid of the bootmem allocator removes a bunch of complicated code (most of which I owe the dubious honour of being responsible for writing). Signed-off-by: Anton Blanchard --- arch/powerpc/Kconfig

[PATCH 2/5] powerpc: Remove some old bootmem related comments

2014-09-16 Thread Anton Blanchard
Now bootmem is gone from powerpc we can remove comments mentioning it. Signed-off-by: Anton Blanchard --- arch/powerpc/kernel/prom.c | 5 + arch/powerpc/kernel/rtas.c | 4 ++-- arch/powerpc/kvm/book3s_hv_builtin.c | 2 +- arch/powerpc/mm/hugetlbpage.c| 4

[PATCH 3/5] powerpc: Remove superfluous bootmem includes

2014-09-16 Thread Anton Blanchard
Lots of places included bootmem.h even when not using bootmem. Signed-off-by: Anton Blanchard --- arch/powerpc/kernel/crash_dump.c | 1 - arch/powerpc/kernel/irq.c | 1 - arch/powerpc/kernel/pci_64.c | 1 - arch/powerpc/kernel/rtas_pci.c

[PATCH 5/5] powerpc: make __ffs return unsigned long

2014-09-16 Thread Anton Blanchard
^ mm/nobootmem.c:90:11: note: in expansion of macro 'min' order = min(MAX_ORDER - 1UL, __ffs(start)); ^ The rest of the worlds seems to define __ffs as returning unsigned long, so lets do that. Signed-off-by: Anton Blanchard --- arch/powerpc/include/asm/bit

[PATCH 4/5] powerpc: Move sparse_init() into initmem_init

2014-09-16 Thread Anton Blanchard
We did part of sparse initialisation in setup_arch and part in initmem_init. Put them together. Signed-off-by: Anton Blanchard --- arch/powerpc/kernel/setup_64.c | 1 - arch/powerpc/mm/mem.c | 1 + arch/powerpc/mm/numa.c | 2 ++ 3 files changed, 3 insertions(+), 1 deletion

[PATCH 1/3] powerpc: Remove -mno-sched-epilog workaround

2014-09-17 Thread Anton Blanchard
gcc option, so lets remove it. Signed-off-by: Anton Blanchard --- arch/powerpc/Makefile| 5 - arch/powerpc/kernel/Makefile | 12 ++-- arch/powerpc/platforms/powermac/Makefile | 2 +- 3 files changed, 7 insertions(+), 12 deletions(-) diff --git a/arc

[PATCH 2/3] powerpc/ftrace: Remove mod_return_to_handler

2014-09-17 Thread Anton Blanchard
mod_return_to_handler is the same as return_to_handler, except it handles the change of the TOC (r2). Add this into return_to_handler and remove mod_return_to_handler. Signed-off-by: Anton Blanchard --- arch/powerpc/kernel/entry_64.S | 24 +--- arch/powerpc/kernel/ftrace.c

[PATCH 3/3] powerpc/ftrace: simplify prepare_ftrace_return

2014-09-17 Thread Anton Blanchard
t about it. Later on we would do an unprotected modification: if (!ftrace_graph_entry(&trace)) { *parent = old; Signed-off-by: Anton Blanchard --- arch/powerpc/kernel/entry_32.S | 10 +-- arch/powerpc/kernel/entry_64.S | 11 ++-- arch/powerpc/kernel/f

Re: [PATCH 3/5] powerpc: Remove superfluous bootmem includes

2014-09-17 Thread Anton Blanchard
Hi Emil, > While building corenet64_smp I get this: > > > ../arch/powerpc/mm/pgtable_64.c: In function 'early_alloc_pgtable': > > ../arch/powerpc/mm/pgtable_64.c:77:95: error: 'MAX_DMA_ADDRESS' > > undeclared (first use in this > > function) ../arch/powerpc/mm/pgtable_64.c:77:95: note: each > >

[PATCH 1/5] powerpc: Remove bootmem allocator

2014-09-17 Thread Anton Blanchard
At the moment we transition from the memblock alloctor to the bootmem allocator. Gitting rid of the bootmem allocator removes a bunch of complicated code (most of which I owe the dubious honour of being responsible for writing). Signed-off-by: Anton Blanchard Tested-by: Emil Medve --- arch

[PATCH 2/5] powerpc: Remove some old bootmem related comments

2014-09-17 Thread Anton Blanchard
Now bootmem is gone from powerpc we can remove comments mentioning it. Signed-off-by: Anton Blanchard Tested-by: Emil Medve --- arch/powerpc/kernel/prom.c | 5 + arch/powerpc/kernel/rtas.c | 4 ++-- arch/powerpc/kvm/book3s_hv_builtin.c | 2 +- arch/powerpc/mm

[PATCH 3/5] powerpc: Remove superfluous bootmem includes

2014-09-17 Thread Anton Blanchard
Lots of places included bootmem.h even when not using bootmem. Signed-off-by: Anton Blanchard Tested-by: Emil Medve --- arch/powerpc/kernel/crash_dump.c | 1 - arch/powerpc/kernel/irq.c | 1 - arch/powerpc/kernel/pci_64.c | 1 - arch/powerpc

[PATCH 4/5] powerpc: Move sparse_init() into initmem_init

2014-09-17 Thread Anton Blanchard
We did part of sparse initialisation in setup_arch and part in initmem_init. Put them together. Signed-off-by: Anton Blanchard Tested-by: Emil Medve --- arch/powerpc/kernel/setup_64.c | 1 - arch/powerpc/mm/mem.c | 1 + arch/powerpc/mm/numa.c | 2 ++ 3 files changed, 3

[PATCH 5/5] powerpc: make __ffs return unsigned long

2014-09-17 Thread Anton Blanchard
^ mm/nobootmem.c:90:11: note: in expansion of macro 'min' order = min(MAX_ORDER - 1UL, __ffs(start)); ^ The rest of the worlds seems to define __ffs as returning unsigned long, so lets do that. Signed-off-by: Anton Blanchard Tested-by: Emil Medve --- arch/powerpc/

[PATCH 0/3] DCACHE_WORD_ACCESS support for ppc64le

2014-09-18 Thread Anton Blanchard
his assumes that we never ask for an all 1s bitmask */ static inline unsigned long zero_bytemask(unsigned long mask) { return (1UL << mask) - 1; } Anton Blanchard (3): powerpc: Implement load_unaligned_zeropad powerpc: ppc64le optimised word at a time powerpc: Enable DCACHE_WO

[PATCH 1/3] powerpc: Implement load_unaligned_zeropad

2014-09-18 Thread Anton Blanchard
boundary, and a SEGV handler to lookup the exception tables and run the fixup routine. It also compares the result against a normal load. Signed-off-by: Anton Blanchard --- arch/powerpc/include/asm/word-at-a-time.h | 40 +++ 1 file changed, 40 insertions(+) diff --git a

[PATCH 2/3] powerpc: ppc64le optimised word at a time

2014-09-18 Thread Anton Blanchard
, depending on the length. Signed-off-by: Anton Blanchard --- arch/powerpc/include/asm/word-at-a-time.h | 61 --- 1 file changed, 47 insertions(+), 14 deletions(-) diff --git a/arch/powerpc/include/asm/word-at-a-time.h b/arch/powerpc/include/asm/word-at-a-time.h index

[PATCH 3/3] powerpc: Enable DCACHE_WORD_ACCESS on ppc64le

2014-09-18 Thread Anton Blanchard
efine ITERATIONS 1000 #define PATH "123456781234567812345678123456781" int main(void) { unsigned long i; struct stat buf; for (i = 0; i < ITERATIONS; i++) stat(PATH, &buf); return 0; } runs 27% faster on POWER8. Signed-o

Re: [PATCH v2] powerpc/iommu/ddw: Fix endianness

2014-09-23 Thread Anton Blanchard
u verify this works and then fold it into yours? Also mark it for inclusion in stable v3.13+. You can add: Reviewed-by: Anton Blanchard Thanks! Anton Index: b/arch/powerpc/platforms/pseries/iommu.c === --- a/arch/powerpc/platform

[PATCH 1/2] powerpc: Add VM_FAULT_HWPOISON handling to powerpc page fault handler

2014-09-23 Thread Anton Blanchard
do_page_fault was missing knowledge of HWPOISON, and we would oops if userspace tried to access a poisoned page: kernel BUG at arch/powerpc/mm/fault.c:180! Signed-off-by: Anton Blanchard --- arch/powerpc/mm/fault.c | 36 +--- 1 file changed, 21 insertions(+), 15

[PATCH 2/2] powerpc: Fill in si_addr_lsb siginfo field

2014-09-23 Thread Anton Blanchard
Fill in the si_addr_lsb siginfo field so the hwpoison code can pass to userspace the length of memory that has been corrupted. Signed-off-by: Anton Blanchard --- arch/powerpc/mm/fault.c | 8 1 file changed, 8 insertions(+) diff --git a/arch/powerpc/mm/fault.c b/arch/powerpc/mm/fault.c

Re: [PATCH 3/3] powerpc/ftrace: simplify prepare_ftrace_return

2014-09-23 Thread Anton Blanchard
Hi Steve, > > This could be broken from the earlier patches, I haven't run just > > this test. I probably should on them. > > I went back and tested, and it breaks under the first patch. Thanks for testing. It looks like some toolchains have issues other than the -fno-no-omit-frame-pointer one,

Re: [PATCH 3/3] powerpc/ftrace: simplify prepare_ftrace_return

2014-09-23 Thread Anton Blanchard
Hi Ben, > > I'll drop that patch and respin. > > Or maybe do a toolchain check / or enable it in LE ? We are scratching our heads trying to remember details of the issue right now. In retrospect we should have linked the gcc bugzilla or gcc commit details in the kernel commit message :) Steve:

[PATCH 1/3] powerpc: Simplify do_sigbus

2014-09-24 Thread Anton Blanchard
Exit out early for a kernel fault, avoiding indenting of most of the function. Signed-off-by: Anton Blanchard --- arch/powerpc/mm/fault.c | 20 ++-- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/arch/powerpc/mm/fault.c b/arch/powerpc/mm/fault.c index 51ab9e7

[PATCH 2/3] powerpc: Add VM_FAULT_HWPOISON handling to powerpc page fault handler

2014-09-24 Thread Anton Blanchard
do_page_fault was missing knowledge of HWPOISON, and we would oops if userspace tried to access a poisoned page: kernel BUG at arch/powerpc/mm/fault.c:180! Signed-off-by: Anton Blanchard --- arch/powerpc/mm/fault.c | 17 +++-- 1 file changed, 11 insertions(+), 6 deletions(-) diff

[PATCH 3/3] powerpc: Fill in si_addr_lsb siginfo field

2014-09-24 Thread Anton Blanchard
Fill in the si_addr_lsb siginfo field so the hwpoison code can pass to userspace the length of memory that has been corrupted. Signed-off-by: Anton Blanchard --- arch/powerpc/mm/fault.c | 8 1 file changed, 8 insertions(+) diff --git a/arch/powerpc/mm/fault.c b/arch/powerpc/mm/fault.c

Re: [PATCH 1/2] powerpc: Add VM_FAULT_HWPOISON handling to powerpc page fault handler

2014-09-24 Thread Anton Blanchard
Hi Stephen, > If you had done this as 2 patches (one to remove the indent and a > second to fix the actual problem), it would have been much easier to > review ... Good idea, I separated it out and resubmitted. Anton ___ Linuxppc-dev mailing list Linu

[PATCH] powerpc: Print instruction when logging unhandled exceptions

2014-09-24 Thread Anton Blanchard
It is often useful to see the instruction that caused an unhandled exception. Signed-off-by: Anton Blanchard --- arch/powerpc/kernel/traps.c | 17 + 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/arch/powerpc/kernel/traps.c b/arch/powerpc/kernel/traps.c index

Re: [PATCH 01/15] powerpc/cell: Move spu_handle_mm_fault() out of cell platform

2014-09-25 Thread Anton Blanchard
use it. > > Signed-off-by: Ian Munsie > Signed-off-by: Michael Neuling Reviewed-by: Anton Blanchard Anton ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev

Re: [PATCH 02/15] powerpc/cell: Move data segment faulting code out of cell platform

2014-09-25 Thread Anton Blanchard
by other powerpc code. Could we also mention: and adds 1TB segment support. > Signed-off-by: Ian Munsie > Signed-off-by: Michael Neuling Reviewed-by: Anton Blanchard Anton ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https:

Re: [PATCH 10/15] powerpc/mm: Add hooks for cxl

2014-09-25 Thread Anton Blanchard
> From: Ian Munsie > > This add a hook into tlbie() so that we use global invalidations when > there are cxl contexts active. > > Normally cxl snoops broadcast tlbie. cxl can have TLB entries > invalidated via MMIO, but we aren't doing that yet. So for now we > are just disabling local tlbies

Re: [PATCH 09/15] powerpc/opal: Add PHB to cxl mode call

2014-09-25 Thread Anton Blanchard
> From: Ian Munsie > > This adds the OPAL call to change a PHB into cxl mode. > > Signed-off-by: Ian Munsie > Signed-off-by: Michael Neuling Reviewed-by: Anton Blanchard ___ Linuxppc-dev mailing list Linuxppc-dev@list

Re: [PATCH 10/15] powerpc/mm: Add hooks for cxl

2014-09-26 Thread Anton Blanchard
Hi Mikey, > We only map what a user processes maps and we tear it down when the > process is teared down (on the file descriptor release). So I think > we are ok. > > Unless there's some lazy teardown you're alluding to that I'm missing? I was trying to make sure things like the TLB batching

[PATCH] powerpc: Reimplement __get_SP() as a function not a define

2014-09-30 Thread Anton Blanchard
up with a stack pointer below the current one, and it is likely to be scribbled over. Fix this by making __get_SP() a function which returns the callers stack frame. Also replace inline assembly which grabs the stack pointer in save_stack_trace and show_stack with __get_SP(). Reported-by: Li Zhon

[PATCH] powerpc: Rename __get_SP() to current_stack_pointer()

2014-10-01 Thread Anton Blanchard
Michael points out that __get_SP() is a pretty horrible function name. Let's give it a better name. Signed-off-by: Anton Blanchard --- arch/powerpc/include/asm/perf_event.h | 2 +- arch/powerpc/include/asm/reg.h| 2 +- arch/powerpc/kernel/irq.c | 2 +- arch/powerpc/k

[PATCH v2] powerpc: Speed up clear_page by unrolling it

2014-10-01 Thread Anton Blanchard
yond 512 bytes or page sizes wont drop below 1kB, which is unlikely, but we could add a runtime check during early init if it makes people nervous. Michael found that some versions of gcc produce quite bad code (all multiplies), so we give gcc a hand by using shifts and adds. Signed-off-by: Anton B

Re: [PATCH v3] powerpc/iommu/ddw: Fix endianness

2014-10-02 Thread Anton Blanchard
d_u32_array to byte swap and avoid the need for a > number of be32_to_cpu calls. > > Cc: sta...@vger.kernel.org # v3.13 > Cc: Benjamin Herrenschmidt > Reviewed-by: Anton Blanchard > [aik: folded Anton's patch with of_property_read_u32_array] > Signed-off-by: Alexe

Re: [PATCH 1/4] powerpc: Dynamic DMA zone limits

2014-10-13 Thread Anton Blanchard
Hi Scott, > Platform code can call limit_zone_pfn() to set appropriate limits > for ZONE_DMA and ZONE_DMA32, and dma_direct_alloc_coherent() will > select a suitable zone based on a device's mask and the pfn limits > that platform code has configured. This patch breaks my POWER8 box: ipr 0001:08

[PATCH 1/3] powerpc: Reimplement __get_SP() as a function not a define

2014-10-13 Thread Anton Blanchard
etch_caller_regs() (which is used in modules) calls it from a header file. Reported-by: Li Zhong Signed-off-by: Anton Blanchard --- arch/powerpc/include/asm/perf_event.h | 2 +- arch/powerpc/include/asm/reg.h| 3 +-- arch/powerpc/kernel/misc.S| 4 arch/powerpc/kern

[PATCH 2/3] powerpc: Rename __get_SP() to current_stack_pointer()

2014-10-13 Thread Anton Blanchard
Michael points out that __get_SP() is a pretty horrible function name. Let's give it a better name. Signed-off-by: Anton Blanchard --- arch/powerpc/include/asm/perf_event.h | 2 +- arch/powerpc/include/asm/reg.h| 2 +- arch/powerpc/kernel/irq.c | 2 +- arch/powerpc/k

[PATCH 3/3] powerpc/pseries: Use dump_stack instead of show_stack

2014-10-13 Thread Anton Blanchard
We can use the simpler dump_stack() instead of show_stack(current, __get_SP()) Signed-off-by: Anton Blanchard --- arch/powerpc/platforms/pseries/iommu.c | 11 +-- 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/arch/powerpc/platforms/pseries/iommu.c b/arch/powerpc

[PATCH 1/2] ipr: Convert to generic DMA API

2014-10-13 Thread Anton Blanchard
Even though the ipr driver is only used on PCI, convert it to use the generic DMA API. Signed-off-by: Anton Blanchard --- drivers/scsi/ipr.c | 101 +++-- drivers/scsi/ipr.h | 2 +- 2 files changed, 53 insertions(+), 50 deletions(-) diff --git a

[PATCH 2/2] ipr: set coherent DMA mask

2014-10-13 Thread Anton Blanchard
Use dma_set_mask_and_coherent() to set both the DMA and coherent DMA mask. Signed-off-by: Anton Blanchard --- drivers/scsi/ipr.c | 11 ++- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/drivers/scsi/ipr.c b/drivers/scsi/ipr.c index 3aa28bd..15f4575 100644 --- a/drivers

[PATCH] powerpc: sync pseries_le_defconfig with pseries_defconfig

2014-10-13 Thread Anton Blanchard
Now KVM is working on LE, enable it. Also enable transarent hugepage which has already been enabled on BE. Signed-off-by: Anton Blanchard --- arch/powerpc/configs/pseries_le_defconfig | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/arch/powerpc/configs

[PATCH] powerpc: Add printk levels to setup_system output

2014-10-13 Thread Anton Blanchard
Signed-off-by: Anton Blanchard --- arch/powerpc/kernel/setup_64.c | 32 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/arch/powerpc/kernel/setup_64.c b/arch/powerpc/kernel/setup_64.c index cd07d79..4f3cfe1 100644 --- a/arch/powerpc/kernel

[PATCH] powerpc: Use probe_kernel_address in show_instructions

2014-10-13 Thread Anton Blanchard
We really don't want to take a pagefault in show_instructions, so use probe_kernel_address instead of __get_user. Signed-off-by: Anton Blanchard --- arch/powerpc/kernel/process.c | 8 ++-- 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/arch/powerpc/kernel/process.c b

[PATCH] powerpc/pci: Quieten unset I/O resource warning

2014-10-13 Thread Anton Blanchard
Newer POWER designs do not implement PCI I/O space, so we expect to see a number of these. Reduce the severity of the warning so it doesn't mask other real issues. Signed-off-by: Anton Blanchard --- Index: b/arch/powerpc/kernel/pci-com

[PATCH] powerpc: Remove ppc_md.remove_memory

2014-10-13 Thread Anton Blanchard
We have an extra level of indirection on memory hot remove which is not matched on memory hot add. Memory hotplug is book3s only, so there is no need for it. This also enables means remove_memory() (ie memory hot unplug) works on powernv. Signed-off-by: Anton Blanchard --- arch/powerpc/include

[PATCH] powerpc: Remove ppc64_boot_msg

2014-10-13 Thread Anton Blanchard
ppc64_boot_msg is meant to be a boot debug aid, but is only used in one spot. Get rid of it, and save ourseleves a couple of lines in the kernel log buffer. Signed-off-by: Anton Blanchard --- arch/powerpc/include/asm/machdep.h | 10 -- arch/powerpc/kernel/setup_64.c | 29

[PATCH v2] powerpc: Remove ppc_md.remove_memory

2014-10-14 Thread Anton Blanchard
We have an extra level of indirection on memory hot remove which is not matched on memory hot add. Memory hotplug is book3s only, so there is no need for it. This also enables means remove_memory() (ie memory hot unplug) works on powernv. Signed-off-by: Anton Blanchard --- arch/powerpc/include

[PATCH] powerpc/pseries: Quieten relocation on exceptions warning

2014-10-19 Thread Anton Blanchard
The hypervisor returns H_P2 if relocation on exceptions are not supported. If we get this, just print a lower priority informational message. Signed-off-by: Anton Blanchard --- arch/powerpc/platforms/pseries/setup.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/arch

Re: [PATCH 3/3] powerpc/ftrace: simplify prepare_ftrace_return

2014-10-27 Thread Anton Blanchard
Hi Segher, > On Wed, Sep 24, 2014 at 12:33:07PM +1000, Anton Blanchard wrote: > > We are scratching our heads trying to remember details of the issue > > right now. In retrospect we should have linked the gcc bugzilla or > > gcc commit details in the kernel commit message :)

[PATCH] powerpc/jump_label: Use HAVE_JUMP_LABEL

2014-10-29 Thread Anton Blanchard
Commit d4fe0965e208 ("powerpc/jump_label: use HAVE_JUMP_LABEL?") missed a few conversions. Change the remaining uses of CONFIG_JUMP_LABEL to HAVE_JUMP_LABEL. Signed-off-by: Anton Blanchard --- arch/powerpc/platforms/powernv/opal-wrappers.S | 2 +- arch/powerpc/platforms/pserie

[PATCH] powerpc: do_notify_resume can be called with bad thread_info flags argument

2014-10-29 Thread Anton Blanchard
us and its register allocator never used r4. Sometimes, rarely, luck is on our side. Signed-off-by: Anton Blanchard Cc: sta...@vger.kernel.org --- arch/powerpc/kernel/entry_64.S | 7 +++ 1 file changed, 7 insertions(+) diff --git a/arch/powerpc/kernel/entry_64.S b/arch/powerpc/kernel/entry_64.S ind

[PATCH] powerpc: do_notify_resume can be called with bad thread_info flags argument

2014-10-30 Thread Anton Blanchard
gods shone down on us and its register allocator never used r4. Sometimes, rarely, luck is on our side. LLVM on the other hand did trample r4. To avoid having to reload the flags, pass it through restore_interrupts, suggested by benh. Signed-off-by: Anton Blanchard Cc: sta...@vger.kernel.org --- ar

[PATCH 1/3] powerpc: Don't use local named register variable in current_thread_info

2014-10-30 Thread Anton Blanchard
s specific case is performance critical and we can't afford to call a function to get it. Furthermore it isn't important to know exactly where in the stack we are since we mask the lower bits. Signed-off-by: Anton Blanchard --- arch/powerpc/include/asm/thread_info.h | 5 ++--- 1 file c

[PATCH 2/3] powerpc: Remove double braces in alignment code.

2014-10-30 Thread Anton Blanchard
Looks like I introduced this when adding LE support. Signed-off-by: Anton Blanchard --- arch/powerpc/kernel/align.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/powerpc/kernel/align.c b/arch/powerpc/kernel/align.c index 34f5552..86150fb 100644 --- a/arch/powerpc

[PATCH 3/3] powerpc: LLVM complains about forward declaration of struct rtas_sensors

2014-10-30 Thread Anton Blanchard
Move the declaration up to silence the warning. Signed-off-by: Anton Blanchard --- arch/powerpc/kernel/rtas-proc.c | 20 +--- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/arch/powerpc/kernel/rtas-proc.c b/arch/powerpc/kernel/rtas-proc.c index 8777fb0..fb2fb3e

[PATCH] powerpc/pseries: Quieten ibm,pcie-link-speed-stats warning

2014-10-30 Thread Anton Blanchard
The ibm,pcie-link-speed-stats isn't mandatory, so we shouldn't print a high priority error message when missing. One example where we see this is QEMU. Reduce it to pr_info. Signed-off-by: Anton Blanchard --- arch/powerpc/platforms/pseries/pci.c | 2 +- 1 file changed, 1 inser

[PATCH] powerpc: do_notify_resume can be called with bad thread_info flags argument

2014-10-30 Thread Anton Blanchard
gods shone down on us and its register allocator never used r4. Sometimes, rarely, luck is on our side. LLVM on the other hand did trample r4. Signed-off-by: Anton Blanchard Cc: sta...@vger.kernel.org --- arch/powerpc/kernel/entry_64.S | 6 ++ 1 file changed, 6 insertions(+) diff --git a/ar

[PATCH] powerpc: Replace cc constraint in inline assembly with cr0

2014-10-31 Thread Anton Blanchard
18: 20 00 80 4e blr Replacing cc with cr0: : 0: 20 00 80 4e blr This patch produces no difference to a kernel built with gcc. Signed-off-by: Anton Blanchard --- arch/powerpc/include/asm/atomic.h| 36 arch/powerpc/include/asm/bitops.h

Re: [PATCH] powerpc: Replace cc constraint in inline assembly with cr0

2014-11-02 Thread Anton Blanchard
Hi Segher, > > Our inline assembly only clobbers the first condition register > > field, but we mark all of them as being clobbered. > > No, we don't. "cc" has been an alias for cr0 for over twenty two and > a half years now; it has never changed meaning. This is an LLVM bug. Thanks! I opened

[PATCH] powerpc/pseries: Quieten ibm,pcie-link-speed-stats warning

2014-11-02 Thread Anton Blanchard
The ibm,pcie-link-speed-stats isn't mandatory, so we shouldn't print a high priority error message when missing. One example where we see this is QEMU. Reduce it to pr_debug. Signed-off-by: Anton Blanchard --- arch/powerpc/platforms/pseries/pci.c | 2 +- 1 file changed, 1 inser

  1   2   3   4   5   6   7   8   9   10   >