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

2014-08-05 Thread Anton Blanchard
Lots of places included bootmem.h even when not using bootmem. Signed-off-by: Anton Blanchard an...@samba.org --- Index: b/arch/powerpc/kernel/crash_dump.c === --- a/arch/powerpc/kernel/crash_dump.c +++ b/arch/powerpc/kernel

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

2014-08-05 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 an...@samba.org --- Index: b/arch/powerpc/kernel/setup_64.c === --- a/arch/powerpc/kernel/setup_64.c

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

2014-08-05 Thread Anton Blanchard
: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 an...@samba.org --- Index: b/arch/powerpc/include/asm/bitops.h

Re: [PATCH 1/2 v3] bootmem/powerpc: Unify bootmem initialization

2014-08-05 Thread Anton Blanchard
Hi Emil, Unify the low/highmem code path from do_init_bootmem() by using (the) lowmem related variables/parameters even when the low/highmem split is not needed (64-bit) or configured. In such cases the lowmem variables/parameters continue to observe the definition by referring to memory

[PATCH] powerpc: Remove powerpc specific cmd_line

2014-08-04 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 an...@samba.org --- Index: b/arch/powerpc/include/asm/machdep.h === --- a/arch/powerpc/include

[PATCH 1/2] powerpc: Hard disable interrupts in xmon

2014-08-04 Thread Anton Blanchard
warning, I also call touch_nmi_watchdog() when exiting xmon. Signed-off-by: Anton Blanchard an...@samba.org --- Index: b/arch/powerpc/xmon/xmon.c === --- a/arch/powerpc/xmon/xmon.c +++ b/arch/powerpc/xmon/xmon.c @@ -24,6 +24,7

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

2014-08-04 Thread Anton Blanchard
count to 2^31, so even when we ask for 10 seconds of processor cycles, we end up taking a couple of PMU exceptions a second. Signed-off-by: Anton Blanchard an...@samba.org --- Index: b/arch/powerpc/Kconfig === --- a/arch/powerpc

Re: Kernel build issues after yesterdays merge by Linus

2014-07-07 Thread Anton Blanchard
Hi Tony, Shows how much we use make install :) Below is a quick hack to get you going but we should look at either fixing the Ubuntu installkernel to handle extra optional args, or stop passing them from the ppc64 kernel install.sh script. It seems like passign the zImage files is

[PATCH] powernv: Add OPAL tracepoints

2014-07-03 Thread Anton Blanchard
3.0660.0010.0050.001 81.166 We use jump labels if configured, which means we only add a single nop instruction to every OPAL call when the tracepoints are disabled. Signed-off-by: Anton Blanchard an...@samba.org --- Index: b/arch/powerpc/include/asm/trace.h

[PATCH 1/2] powerpc/pseries: Use jump labels for hcall tracepoints

2014-07-02 Thread Anton Blanchard
is enabled: plpar_hcall: mr r2,r2 mfcrr0 stw r0,8(r1) nop ... If jump labels are not enabled, we fall back to the old method. Signed-off-by: Anton Blanchard an...@samba.org --- Index: b/arch/powerpc/include/asm/jump_label.h

[PATCH 2/2] powerpc/pseries: optimise hcall tracepoints

2014-07-02 Thread Anton Blanchard
Now that we execute the hcall tracepoint entry and exit code out of line, we can use the same stack across both functions. Signed-off-by: Anton Blanchard an...@samba.org --- Index: b/arch/powerpc/platforms/pseries/hvCall.S

Re: [PATCH] powerpc: module: fix TOC symbol CRC

2014-06-18 Thread Anton Blanchard
by check_version (module.c). Adding Rusty since he maintains the module loader code. Anton Signed-off-by: Laurent Dufour lduf...@linux.vnet.ibm.com Cc: Anton Blanchard an...@samba.org --- arch/powerpc/kernel/module_64.c |9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git

[PATCH 1/4] KVM: PPC: Book3S PR: Fix ABIv2 issues

2014-06-12 Thread Anton Blanchard
binutils knows that a branch to a function descriptor is actually a branch to the function text. By removing the explicit branch to dot symbols, we maintain both ABIv1 and ABIv2 compatibility. Signed-off-by: Anton Blanchard an...@samba.org --- Index: b/arch/powerpc/kvm/book3s_interrupts.S

[PATCH 2/4] KVM: PPC: Book3S HV: Fix ABIv2 issues

2014-06-12 Thread Anton Blanchard
binutils knows that a branch to a function descriptor is actually a branch to the function text. By removing the explicit branch to dot symbols, we maintain both ABIv1 and ABIv2 compatibility. Signed-off-by: Anton Blanchard an...@samba.org --- Index: b/arch/powerpc/kvm/book3s_hv_rmhandlers.S

[PATCH 3/4] KVM: PPC: Book3S HV: Fix ABIv2 indirect branch issue

2014-06-12 Thread Anton Blanchard
To establish addressability quickly, ABIv2 requires the target address of the function being called to be in r12. Signed-off-by: Anton Blanchard an...@samba.org --- Index: b/arch/powerpc/kvm/book3s_hv_rmhandlers.S === --- a/arch

[PATCH 4/4] KVM: PPC: Assembly functions exported to modules need _GLOBAL_TOC()

2014-06-12 Thread Anton Blanchard
Both kvmppc_hv_entry_trampoline and kvmppc_entry_trampoline are assembly functions that are exported to modules and also require a valid r2. As such we need to use _GLOBAL_TOC so we provide a global entry point that establishes the TOC (r2). Signed-off-by: Anton Blanchard an...@samba.org

Re: Kernel build issues after yesterdays merge by Linus

2014-06-12 Thread Anton Blanchard
Hi Christoph, This is under Ubuntu Utopic Unicorn on a Power 8 system while simply trying to build with the Ubuntu standard kernel config. It could be that these issues come about because we do not have an rc1 yet but I wanted to give some early notice. Also this is a new arch to me so I may

[PATCH] powerpc/book3s: Fix some ABIv2 issues in machine check code

2014-06-11 Thread Anton Blanchard
for unhandled errors) Signed-off-by: Anton Blanchard an...@samba.org --- Index: b/arch/powerpc/kernel/exceptions-64s.S === --- a/arch/powerpc/kernel/exceptions-64s.S +++ b/arch/powerpc/kernel/exceptions-64s.S @@ -1502,13 +1502,13

[PATCH] KVM: PPC: Book3S PR: ppc64 ABIv2 build fixes

2014-06-07 Thread Anton Blanchard
binutils knows that a branch to a function descriptor is actually a branch to the function text. By removing the explicit branch to dot symbols, we maintain both ABIv1 and ABIv2 compatibility. Signed-off-by: Anton Blanchard an...@samba.org --- Index: b/arch/powerpc/kvm/book3s_interrupts.S

[PATCH] powernv: Fix permissions on sysparam sysfs entries

2014-06-06 Thread Anton Blanchard
Everyone can write to these files, which is not what we want. Cc: sta...@vger.kernel.org # 3.15 Signed-off-by: Anton Blanchard an...@samba.org --- diff --git a/arch/powerpc/platforms/powernv/opal-sysparam.c b/arch/powerpc/platforms/powernv/opal-sysparam.c index d202f9b..9d1acf2 100644

[PATCH] crypto/nx: disable NX on little endian builds

2014-06-06 Thread Anton Blanchard
The NX driver has endian issues so disable it for now. Signed-off-by: Anton Blanchard an...@samba.org --- diff --git a/drivers/crypto/Kconfig b/drivers/crypto/Kconfig index 03ccdb0..8280a7a3 100644 --- a/drivers/crypto/Kconfig +++ b/drivers/crypto/Kconfig @@ -313,7 +313,7 @@ config

[PATCH v2 1/2] powerpc: Allow ppc_md platform hook to override memory_block_size_bytes

2014-06-04 Thread Anton Blanchard
The pseries platform code unconditionally overrides memory_block_size_bytes regardless of the running platform. Create a ppc_md hook that so each platform can choose to do what it wants. Signed-off-by: Anton Blanchard an...@samba.org --- arch/powerpc/include/asm/machdep.h | 3

[PATCH v2 2/2] powerpc/powernv: Set memory_block_size_bytes to 256MB

2014-06-04 Thread Anton Blanchard
powerpc sets a low SECTION_SIZE_BITS to accomodate small pseries boxes. We default to 16MB memory blocks, and boxes with a lot of memory end up with enormous numbers of sysfs memory nodes. Set a more reasonable default for powernv of 256MB. Signed-off-by: Anton Blanchard an...@samba.org

[PATCH] powerpc: exported functions __clear_user and copy_page use r2 so need _GLOBAL_TOC()

2014-06-04 Thread Anton Blanchard
__clear_user and copy_page load from the TOC and are also exported to modules. This means we have to use _GLOBAL_TOC() so that we create the global entry point that sets up the TOC. Signed-off-by: Anton Blanchard an...@samba.org --- Index: b/arch/powerpc/lib/copypage_64.S

[PATCH] powerpc: 64bit sendfile is capped at 2GB

2014-06-03 Thread Anton Blanchard
fixes the bug. Cc: sta...@vger.kernel.org Signed-off-by: Anton Blanchard an...@samba.org --- diff --git a/arch/powerpc/include/asm/systbl.h b/arch/powerpc/include/asm/systbl.h index ac062f5..35f8f2f 100644 --- a/arch/powerpc/include/asm/systbl.h +++ b/arch/powerpc/include/asm/systbl.h @@ -190,7

[PATCH] powerpc/powernv: Fix endian issues in memory error handling code

2014-06-03 Thread Anton Blanchard
struct OpalMemoryErrorData is passed to us from firmware, so we have to byteswap it. Signed-off-by: Anton Blanchard an...@samba.org --- Having enums in a firmware interface concerns me, but that cleanup can be in a subsequent patch. Mahesh, could you give this a test to see if it works? Index

Re: [PATCH 2/2] powerpc/powernv: Enable POWER8 doorbell IPIs

2014-06-02 Thread Anton Blanchard
by Anton, the best case IPI latency between two threads dropped from 894ns to 512ns. Signed-off-by: Michael Neuling mi...@neuling.org Thanks Mikey! Tested-by: Anton Blanchard an...@samba.org Anton ___ Linuxppc-dev mailing list Linuxppc-dev

[PATCH] powerpc/perf: Never program book3s PMCs with values = 0x80000000

2014-05-28 Thread Anton Blanchard
. A number of places program the PMC with (0x8000 - period_left), where period_left can be negative. We can either fix all of these or just ensure that period_left is always = 1. This patch takes the second option. Cc: sta...@vger.kernel.org Signed-off-by: Anton Blanchard an...@samba.org

[PATCH] powerpc/pseries: hcall functions are exported to modules, need _GLOBAL_TOC()

2014-05-13 Thread Anton Blanchard
The hcall macros may call out to c code for tracing, so we need to set up a valid r2. This fixes an oops found when testing ibmvscsi as a module. Signed-off-by: Anton Blanchard an...@samba.org --- diff --git a/arch/powerpc/platforms/pseries/hvCall.S b/arch/powerpc/platforms/pseries/hvCall.S

[PATCH] powerpc: irq work racing with timer interrupt can result in timer interrupt hang

2014-05-09 Thread Anton Blanchard
*/ if (test_irq_work_pending()) set_dec(1); Signed-off-by: Anton Blanchard an...@samba.org Cc: sta...@vger.kernel.org # 3.14+ --- diff --git a/arch/powerpc/kernel/time.c b/arch/powerpc/kernel/time.c index 122a580..4f0b676 100644 --- a/arch/powerpc/kernel/time.c +++ b/arch/powerpc

[PATCH] powerpc/powernv: Correctly set hypervisor interrupt little endian bit on POWER8

2014-05-08 Thread Anton Blanchard
HID0 IBM bit 19 is the HILE bit on POWER8. Set it to 0 to take exceptions in big endian and to 1 to take them in little endian. Signed-off-by: Anton Blanchard an...@samba.org --- Index: b/arch/powerpc/include/asm/reg.h

[PATCH 1/2] powerpc: Move adb symbol exports next to function definitions

2014-05-01 Thread Anton Blanchard
Signed-off-by: Anton Blanchard an...@samba.org --- Index: b/arch/powerpc/kernel/ppc_ksyms.c === --- a/arch/powerpc/kernel/ppc_ksyms.c +++ b/arch/powerpc/kernel/ppc_ksyms.c @@ -128,13 +128,6 @@ EXPORT_SYMBOL(smp_hw_index); #endif

[PATCH 2/2] powerpc: Move via-cuda symbol exports next to function definitions

2014-05-01 Thread Anton Blanchard
Signed-off-by: Anton Blanchard an...@samba.org --- Index: b/arch/powerpc/kernel/ppc_ksyms.c === --- a/arch/powerpc/kernel/ppc_ksyms.c +++ b/arch/powerpc/kernel/ppc_ksyms.c @@ -128,10 +128,6 @@ EXPORT_SYMBOL(smp_hw_index); #endif

[PATCH] powerpc/powernv: Reduce pseries panic timeout from 180s to 10s

2014-04-30 Thread Anton Blanchard
We've already dropped the default pseries timeout to 10s, do the same for powernv. Signed-off-by: Anton Blanchard an...@samba.org --- arch/powerpc/platforms/powernv/setup.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/powerpc/platforms/powernv/setup.c b/arch/powerpc/platforms

[PATCH] powerpc/powernv: Reduce panic timeout from 180s to 10s

2014-04-30 Thread Anton Blanchard
We've already dropped the default pseries timeout to 10s, do the same for powernv. Signed-off-by: Anton Blanchard an...@samba.org --- arch/powerpc/platforms/powernv/setup.c | 2 ++ 1 file changed, 2 insertions(+) v2: fix the commit message as Paul pointed out diff --git a/arch/powerpc

[PATCH] powerpc: memcpy optimization for 64bit LE

2014-04-29 Thread Anton Blanchard
for all other 64bit platforms. [ I simplified the loop a bit - Anton ] Signed-off-by: Philippe Bergheaud fe...@linux.vnet.ibm.com Signed-off-by: Anton Blanchard an...@samba.org --- arch/powerpc/include/asm/string.h | 4 arch/powerpc/kernel/ppc_ksyms.c | 2 -- arch/powerpc/lib/Makefile

[PATCH] powerpc: memcpy optimization for 64bit LE

2014-04-29 Thread Anton Blanchard
or bytewise loads and stores. Either would be bad for all other 64bit platforms. [ I simplified the loop a bit - Anton ] Signed-off-by: Philippe Bergheaud fe...@linux.vnet.ibm.com Signed-off-by: Anton Blanchard an...@samba.org --- arch/powerpc/include/asm/string.h | 4 arch/powerpc/kernel

[PATCH 2/2] powerpc/powernv: Set memory_block_size_bytes to 256MB

2014-04-25 Thread Anton Blanchard
powerpc sets a low SECTION_SIZE_BITS to accomodate small pseries boxes. We default to 16MB memory blocks, and boxes with a lot of memory end up with enormous numbers of sysfs memory nodes. Set a more reasonable default for powernv of 256MB. Signed-off-by: Anton Blanchard an...@samba.org

[PATCH 1/2] powerpc: Allow ppc_md platform hook to override memory_block_size_bytes

2014-04-25 Thread Anton Blanchard
The pseries platform code unconditionally overrides memory_block_size_bytes regardless of the running platform. Create a ppc_md hook that so each platform can choose to do what it wants. Signed-off-by: Anton Blanchard an...@samba.org --- arch/powerpc/include/asm/machdep.h | 1

Re: [RFC PATCH] Fix Oops in rtas_stop_self()

2014-04-25 Thread Anton Blanchard
enter_rtas to understand why it happens, but the problem seems could be solved by moving the rtas_args away from stack by adding static before it. Nice catch. RTAS is 32bit and if your box has more than 4GB RAM then your stack could easily be outside 32bit range. You can add: Signed-off-by: Anton

[PATCH] powerpc/powernv: Fix little endian issues in OPAL flash code

2014-04-23 Thread Anton Blanchard
With this patch I was able to update firmware on an LE kernel. Signed-off-by: Anton Blanchard an...@samba.org --- arch/powerpc/platforms/powernv/opal-flash.c | 12 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/arch/powerpc/platforms/powernv/opal-flash.c b/arch

Re: [PATCH 6/6] powerpc/powernv: Fix little endian issues in OPAL dump code

2014-04-22 Thread Anton Blanchard
Hi, -int64_t opal_dump_info(uint32_t *dump_id, uint32_t *dump_size); -int64_t opal_dump_info2(uint32_t *dump_id, uint32_t *dump_size, uint32_t *dump_type); +int64_t opal_dump_info(__be32 *dump_id, __be32 *dump_size); +int64_t opal_dump_info2(__be32 *dump_id, __be32 *dump_size, __be32

Re: [PATCH 5/6] powerpc/powernv: Create OPAL sglist helper functions and fix endian issues

2014-04-22 Thread Anton Blanchard
Hi, Shouldn't we convert addr and id before passing to opal_dump_read() here ? int64_t opal_dump_read(uint32_t dump_id, uint64_t buffer); All arguments are passed via register, so byteswaping the arguments would break it. Anton ___ Linuxppc-dev

Re: [PATCH 10/33] powerpc: Ignore TOC relocations

2014-04-22 Thread Anton Blanchard
Hi Alan, The linker fixes up TOC. relocations, so prom_init_check.sh should ignore them. Err, .TOC. you mean. Presumably something strips off the leading dot somewhere? Yeah, the script strips them: # On 64-bit nm gives us the function descriptors, which have # a

[git pull] Please pull abiv2 branch

2014-04-22 Thread Anton Blanchard
to cec4b7eaf09d330e94e8e94133d360e6f1855974: selftests/powerpc: Update for ABIv2 (2014-04-23 11:41:07 +1000) Anton Blanchard (30): powerpc: Don't build assembly files with ABIv2 powerpc: No need to use dot symbols when

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

2014-04-21 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 an...@samba.org Reviewed-by: Stewart Smith stew...@linux.vnet.ibm.com --- arch/powerpc/include/asm/opal.h| 12 ++-- arch/powerpc/platforms

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

2014-04-21 Thread Anton Blanchard
We had some duplication of the internal OPAL functions. Signed-off-by: Anton Blanchard an...@samba.org --- arch/powerpc/include/asm/opal.h | 12 ++-- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/arch/powerpc/include/asm/opal.h b/arch/powerpc/include/asm/opal.h index

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

2014-04-21 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 an...@samba.org --- arch/powerpc/platforms/powernv/opal.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/arch

[PATCH 5/6] powerpc/powernv: Create OPAL sglist helper functions and fix endian issues

2014-04-21 Thread Anton Blanchard
and it is impossible to add this in a backwards compatible way, just remove it. Signed-off-by: Anton Blanchard an...@samba.org --- arch/powerpc/include/asm/opal.h | 14 ++-- arch/powerpc/platforms/powernv/opal-dump.c | 81 + arch/powerpc/platforms/powernv/opal

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

2014-04-21 Thread Anton Blanchard
Fix little endian issues with the OPAL error log code. Signed-off-by: Anton Blanchard an...@samba.org Reviewed-by: Stewart Smith stew...@linux.vnet.ibm.com --- arch/powerpc/include/asm/opal.h| 2 +- arch/powerpc/platforms/powernv/opal-elog.c | 9 - 2 files changed, 9

[PATCH 6/6] powerpc/powernv: Fix little endian issues in OPAL dump code

2014-04-21 Thread Anton Blanchard
Signed-off-by: Anton Blanchard an...@samba.org --- arch/powerpc/include/asm/opal.h| 4 ++-- arch/powerpc/platforms/powernv/opal-dump.c | 13 + 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/arch/powerpc/include/asm/opal.h b/arch/powerpc/include/asm/opal.h

[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 an...@samba.org --- 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

[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 an...@samba.org --- 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

[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 an...@samba.org --- 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

[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 an...@samba.org --- 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/ops.h

[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 an...@samba.org --- diff --git a/arch/powerpc/Makefile b/arch/powerpc/Makefile index a9f814a..4c0cedf 100644 --- a/arch

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

2014-04-06 Thread Anton Blanchard
: 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 an...@samba.org +ifeq ($(call cc-option-yn,-mno-save-toc-indirect),y) + KBUILD_CFLAGS_MODULE += -mno-save

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 [

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

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

2014-04-04 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-04 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 an...@samba.org --- arch/powerpc/include/asm/ppc_asm.h | 12

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

2014-04-04 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 an...@samba.org --- arch/powerpc/kernel/entry_64.S | 7 ++- 1

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

2014-04-04 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 an...@samba.org --- arch/powerpc/include/asm/module.h | 1 + arch/powerpc/kernel

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

2014-04-04 Thread Anton Blanchard
Use ppc_function_entry in places where we previously assumed function descriptors exist. Signed-off-by: Anton Blanchard an...@samba.org --- 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

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

2014-04-04 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 an...@samba.org --- arch/powerpc/include/asm/module.h | 2 ++ arch/powerpc

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

2014-04-04 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 an...@samba.org --- arch/powerpc/kernel/ftrace.c | 97 +--- 1 file changed

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

2014-04-04 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

[PATCH] powerpc: Add lq/stq emulation

2014-03-28 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 an...@samba.org --- Index: b/arch/powerpc/include/asm/emulated_ops.h === --- a/arch/powerpc

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 an...@samba.org --- 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 an...@samba.org --- Index: b/arch/powerpc/platforms/powernv/opal-sensor.c === --- a/arch/powerpc/platforms/powernv/opal-sensor.c +++ b

[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 an...@samba.org --- Index: b/arch/powerpc/include/asm/opal.h === --- a/arch/powerpc/include/asm/opal.h

[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 an...@samba.org --- Index: b/arch/powerpc/platforms/powernv/opal-sensor.c === --- a/arch/powerpc/platforms/powernv/opal-sensor.c +++ b

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 by

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

2014-03-26 Thread Anton Blanchard
: Tested-by: Anton Blanchard an...@samba.org 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 an...@samba.org --- Index: b/arch/powerpc/include/asm/opal.h === --- a/arch/powerpc/include/asm

[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 an...@samba.org --- Index: b/arch/powerpc/include/asm/opal.h === --- a/arch/powerpc/include/asm/opal.h +++ b/arch/powerpc/include/asm/opal.h

[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 an...@samba.org --- Index: b/arch/powerpc/platforms/powernv/opal.c

[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 an...@samba.org --- Index: b/arch/powerpc/platforms/powernv/opal-elog.c === --- a/arch/powerpc/platforms/powernv/opal-elog.c +++ b/arch/powerpc

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
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 descriptors

[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 an...@samba.org --- arch

[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 an...@samba.org --- arch/powerpc/kernel/entry_64.S | 10 +- arch/powerpc/kernel/exceptions-64s.S | 18 +- arch/powerpc/kernel/head_64.S

[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 an...@samba.org --- arch/powerpc/kernel/exceptions-64e.S | 4 ++-- arch/powerpc/kernel/exceptions-64s.S | 2 +- arch/powerpc/kernel/head_64.S| 12

[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 an...@samba.org --- arch/powerpc/include/asm/ppc_asm.h | 38 -- 1 file changed, 38 deletions(-) diff --git a/arch/powerpc/include/asm

[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 an...@samba.org --- arch/powerpc/kernel/exceptions-64e.S | 8 +++ arch/powerpc/kernel

[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 an...@samba.org --- arch

[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 an...@samba.org --- 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 an...@samba.org

[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 an...@samba.org --- 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

[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 an...@samba.org --- 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

[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 an...@samba.org --- 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

[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 an...@samba.org --- arch/powerpc

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

2014-03-25 Thread Anton Blanchard
. Signed-off-by: Anton Blanchard an...@samba.org --- 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

[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 an...@samba.org --- 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

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

2014-03-25 Thread Anton Blanchard
a stack frame; the routine is not performance critical. Signed-off-by: Ulrich Weigand ulrich.weig...@de.ibm.com Signed-off-by: Anton Blanchard an...@samba.org --- arch/powerpc/lib/copypage_power7.S | 8 arch/powerpc/lib/copyuser_power7.S | 24

[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 an...@samba.org --- 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

[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 an...@samba.org --- 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

[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 an...@samba.org --- arch/powerpc/include/asm/irqflags.h | 4 ++-- 1 file

[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

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