[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 Reviewed-by: Stewart Smith --- arch/powerpc/include/asm/opal.h| 12 ++-- arch/powerpc/platforms/powernv/opal-elog.c | 2 +- 2 files changed

[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 --- 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 2a34485..cb7d52e

[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 --- arch/powerpc/platforms/powernv/opal.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/powerpc/platforms

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

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

[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 Reviewed-by: Stewart Smith --- arch/powerpc/include/asm/opal.h| 2 +- arch/powerpc/platforms/powernv/opal-elog.c | 9 - 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/arch

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

2014-04-21 Thread Anton Blanchard
Signed-off-by: Anton Blanchard --- 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 index afb0fed

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 m

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
nges up 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 d

[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 --- 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/powerpc/platforms

[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 --- arch/powerpc

[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 --- arch/powerpc/include/asm/machdep.h | 1 + arch/powerpc

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

2014-04-25 Thread Anton Blanchard
can add: Signed-off-by: Anton Blanchard And also: Cc: sta...@vger.kernel.org # 3.14+ > Signed-off-by: Li Zhong > --- > arch/powerpc/platforms/pseries/hotplug-cpu.c | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > > diff --git a/arch/powerpc/platforms/pserie

[PATCH] powerpc: memcpy optimization for 64bit LE

2014-04-29 Thread Anton Blanchard
be bad for all other 64bit platforms. [ I simplified the loop a bit - Anton ] Signed-off-by: Philippe Bergheaud Signed-off-by: Anton Blanchard --- arch/powerpc/include/asm/string.h | 4 arch/powerpc/kernel/ppc_ksyms.c | 2 -- arch/powerpc/lib/Makefile | 2 -- arch/powerpc/lib

[PATCH] powerpc: memcpy optimization for 64bit LE

2014-04-29 Thread Anton Blanchard
loads and stores. Either would be bad for all other 64bit platforms. [ I simplified the loop a bit - Anton ] Signed-off-by: Philippe Bergheaud Signed-off-by: Anton Blanchard --- arch/powerpc/include/asm/string.h | 4 arch/powerpc/kernel/ppc_ksyms.c | 2 -- arch/powerpc/lib/Makefile

[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 --- 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/powernv/se

[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 --- 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/platforms/po

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

2014-05-01 Thread Anton Blanchard
Signed-off-by: Anton Blanchard --- 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 #endif -#ifdef

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

2014-05-01 Thread Anton Blanchard
Signed-off-by: Anton Blanchard --- 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 #endif -#ifdef

[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 --- Index: b/arch/powerpc/include/asm/reg.h === --- a/arch/powerpc

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

2014-05-09 Thread Anton Blanchard
with new irq work */ if (test_irq_work_pending()) set_dec(1); Signed-off-by: Anton Blanchard 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/ar

[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 --- diff --git a/arch/powerpc/platforms/pseries/hvCall.S b/arch/powerpc/platforms/pseries/hvCall.S index 7891a86

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

2014-05-28 Thread Anton Blanchard
flows. 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: Signed-off-by: Anton Blanchard --- Attached is a graph that s

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

2014-06-02 Thread Anton Blanchard
bit. > > Based on tests by Anton, the best case IPI latency between two > threads dropped from 894ns to 512ns. > > Signed-off-by: Michael Neuling Thanks Mikey! Tested-by: Anton Blanchard Anton ___ Linuxppc-dev mailing list Li

[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 --- 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 +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 --- 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: b/arch/powerpc

[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 --- arch/powerpc/include/asm/machdep.h | 3 +++ arch/powerpc

[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 --- arch/powerpc

[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 --- Index: b/arch/powerpc/lib/copypage_64.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 --- diff --git a/arch/powerpc/platforms/powernv/opal-sysparam.c b/arch/powerpc/platforms/powernv/opal-sysparam.c index d202f9b..9d1acf2 100644 --- a/arch/powerpc

[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 --- 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 CRYPTO_DEV_S5P config

[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 --- Index: b/arch/powerpc/kvm/book3s_interrupts.S

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

2014-06-11 Thread Anton Blanchard
g for unhandled errors") Signed-off-by: Anton Blanchard --- 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 @@ machine_check_ha

[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 --- 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 --- 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 --- Index: b/arch/powerpc/kvm/book3s_hv_rmhandlers.S === --- a/arch/powerpc/kvm

[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 --- Index: b/arch

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 >

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

2014-06-18 Thread Anton Blanchard
> relocate_start' done in maybe_relocated called by check_version > (module.c). Adding Rusty since he maintains the module loader code. Anton > Signed-off-by: Laurent Dufour > Cc: Anton Blanchard > --- > arch/powerpc/kernel/module_64.c |9 - > 1 file changed,

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

2014-07-02 Thread Anton Blanchard
en the tracepoint 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 --- Index: b/arch/powerpc/include/asm/jum

[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 --- Index: b/arch/powerpc/platforms/pseries/hvCall.S === --- a/arch/powerpc

[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 --- Index: b/arch/powerpc/include/asm/trace.h

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 fil

[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 --- Index: b/arch/powerpc/include/asm/machdep.h === --- a/arch/powerpc/include/asm/machdep.h

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

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

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

2014-08-04 Thread Anton Blanchard
PMCs can only 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 --- Index: b/arch/powerpc/Kconfig === --- a/arch/powerpc/Kconfig ++

[PATCH 1/5] powerpc: Remove bootmem allocator

2014-08-04 Thread Anton Blanchard
At the moment we transition from the memblock alloctor to the bootmem allocator. Removing 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 --- Index: b/arch/powerpc/Kconfig

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

2014-08-04 Thread Anton Blanchard
Now bootmem is gone from powerpc we can remove comments mentioning it. Signed-off-by: Anton Blanchard --- Index: b/arch/powerpc/kernel/prom.c === --- a/arch/powerpc/kernel/prom.c +++ b/arch/powerpc/kernel/prom.c @@ -695,10 +695,7

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

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

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

2014-08-04 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 --- Index: b/arch/powerpc/kernel/setup_64.c === --- a/arch/powerpc/kernel/setup_64.c +++ b/arch/powerpc

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

2014-08-04 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 --- Index: b/

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 memo

[PATCH] powerpc: Remove ppc_md.remove_memory

2014-08-07 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 --- Index: b/arch

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

2014-08-07 Thread Anton Blanchard
A recent patch added a function prototype for htab_remove_mapping in c code. Fix it. Signed-off-by: Anton Blanchard --- diff --git a/arch/powerpc/include/asm/mmu-hash64.h b/arch/powerpc/include/asm/mmu-hash64.h index d765144..92bc3a6 100644 --- a/arch/powerpc/include/asm/mmu-hash64.h +++ b

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

2014-08-11 Thread Anton Blanchard
PMCs can only 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 --- v2: Mikey noticed a build issue with oprofile. Since our NMI is just the PMU hardware it doesn't make any sense for oprofi

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

2014-08-19 Thread Anton Blanchard
Signed-off-by: Anton Blanchard --- arch/powerpc/kernel/ppc_ksyms.c | 7 --- drivers/macintosh/adb.c | 5 + 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/arch/powerpc/kernel/ppc_ksyms.c b/arch/powerpc/kernel/ppc_ksyms.c index 48d17d6f..351f447 100644 --- a/arch

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

2014-08-19 Thread Anton Blanchard
Signed-off-by: Anton Blanchard --- arch/powerpc/kernel/ppc_ksyms.c | 4 drivers/macintosh/via-cuda.c| 2 ++ 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/arch/powerpc/kernel/ppc_ksyms.c b/arch/powerpc/kernel/ppc_ksyms.c index 351f447..521291d 100644 --- a/arch/powerpc

[PATCH 3/6] powerpc: Move more symbol exports next to function definitions

2014-08-19 Thread Anton Blanchard
Signed-off-by: Anton Blanchard --- arch/powerpc/kernel/ppc_ksyms.c| 14 -- arch/powerpc/kernel/process.c | 2 ++ arch/powerpc/kernel/setup-common.c | 3 +++ arch/powerpc/kernel/time.c | 1 + arch/powerpc/mm/hash_utils_64.c| 1 + 5 files changed, 7 insertions

[PATCH 4/6] powerpc: Remove unused 32bit symbol exports

2014-08-19 Thread Anton Blanchard
Signed-off-by: Anton Blanchard --- arch/powerpc/kernel/ppc_ksyms.c | 16 1 file changed, 16 deletions(-) diff --git a/arch/powerpc/kernel/ppc_ksyms.c b/arch/powerpc/kernel/ppc_ksyms.c index 4a42a1f..ab4f0bc 100644 --- a/arch/powerpc/kernel/ppc_ksyms.c +++ b/arch/powerpc/kernel

[PATCH 5/6] powerpc: Move lib symbol exports into arch/powerpc/lib/ppc_ksyms.c

2014-08-19 Thread Anton Blanchard
Move the lib symbol exports closer to their function definitions Signed-off-by: Anton Blanchard --- arch/powerpc/kernel/ppc_ksyms.c | 32 arch/powerpc/lib/Makefile | 2 +- arch/powerpc/lib/ppc_ksyms.c| 39 +++ 3

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

2014-08-19 Thread Anton Blanchard
Simplify things considerably by moving all the ppc32 specific symbol exports into its own file. Signed-off-by: Anton Blanchard --- arch/powerpc/kernel/Makefile | 3 + arch/powerpc/kernel/ppc_ksyms.c| 123 + arch/powerpc/kernel/ppc_ksyms_32.c | 61

[PATCH 1/4] powerpc: Make a bunch of things static

2014-08-19 Thread Anton Blanchard
Signed-off-by: Anton Blanchard --- arch/powerpc/kernel/hw_breakpoint.c | 2 +- arch/powerpc/kernel/nvram_64.c| 2 +- arch/powerpc/kernel/pci-common.c | 2 +- arch/powerpc/kernel/pci_of_scan.c | 2 +- arch/powerpc/kernel/prom.c| 5

[PATCH 2/4] powerpc: Ensure global functions include their prototype

2014-08-19 Thread Anton Blanchard
Fix a number of places where global functions were not including their prototype. This ensures the prototype and the function match. Signed-off-by: Anton Blanchard --- arch/powerpc/kernel/smp.c | 1 + arch/powerpc/mm/slice.c | 2 ++ arch/powerpc

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

2014-08-19 Thread Anton Blanchard
A recent patch added a function prototype for htab_remove_mapping in c code. Fix it. Signed-off-by: Anton Blanchard --- arch/powerpc/include/asm/mmu-hash64.h | 2 ++ arch/powerpc/mm/init_64.c | 3 --- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/arch/powerpc

[PATCH 3/4] powerpc: Remove stale function prototypes

2014-08-19 Thread Anton Blanchard
There were a number of prototypes for functions that no longer exist. Remove them. Signed-off-by: Anton Blanchard --- arch/powerpc/include/asm/bug.h | 1 - arch/powerpc/include/asm/hydra.h | 1 - arch/powerpc/include/asm/irq.h | 5 - arch/powerpc/include/asm

[PATCH] PCI: Increase BAR size quirk for IBM ipr SAS Crocodile adapters

2014-08-20 Thread Anton Blanchard
64k BARs the address will be truncated and the BARs will overlap. This quirk will force Linux to allocate the resource as a full page, which will avoid the overlap. Cc: Signed-off-by: Douglas Lehr Signed-off-by: Anton Blanchard Acked-by: Milton Miller --- drivers/pci/quirks.c | 19

[PATCH] ibmveth: Fix endian issues with rx_no_buffer statistic

2014-08-21 Thread Anton Blanchard
: Anton Blanchard Cc: sta...@vger.kernel.org --- Index: b/drivers/net/ethernet/ibm/ibmveth.c === --- a/drivers/net/ethernet/ibm/ibmveth.c +++ b/drivers/net/ethernet/ibm/ibmveth.c @@ -292,6 +292,18 @@ failure: atomic_add

[PATCH] powerpc/pseries: duplicate dtl entries sometimes sent to userspace

2013-11-16 Thread Anton Blanchard
the index. To fix this I moved dtl_consumer() after the timebase comparison. Signed-off-by: Anton Blanchard Cc: sta...@vger.kernel.org --- Index: b/arch/powerpc/kernel/time.c === --- a/arch/powerpc/kernel/time.c +++ b/arch/powerpc

[PATCH] powerpc: Only print PACATMSCRATCH in oops when TM is active

2013-11-17 Thread Anton Blanchard
If TM is not active there is no need to print PACATMSCRATCH so we can save ourselves a line. Signed-off-by: Anton Blanchard --- Index: b/arch/powerpc/kernel/process.c === --- a/arch/powerpc/kernel/process.c +++ b/arch/powerpc

[PATCH] powerpc: ppc64 address space capped at 32TB, mmap randomisation disabled

2013-11-17 Thread Anton Blanchard
top of our mmap region is clamped at 32TB This also breaks mmap randomisation since the randomised address is always up near the top of the address space and it gets clamped down to 32TB. Cc: sta...@vger.kernel.org # v3.10+ Signed-off-by: Anton Blanchard --- diff --git a/arch/powerpc/mm/slice.c

[PATCH 0/9] ppc64 little endian updates

2013-11-20 Thread Anton Blanchard
function descriptors. Rusty's kernel patches allow binaries of either ABI to work, easing the transition. Alistair Popple (1): powerpc: Don't use ELFv2 ABI to build the kernel Anton Blanchard (4): powerpc/pseries: Fix endian issues in pseries EEH code pseries: Add H_SET_MODE to change

[PATCH 3/9] powerpc: Add TIF_ELF2ABI flag.

2013-11-20 Thread Anton Blanchard
. We store this in a thread flag, because we need to set it in core dumps and for signal delivery. Our chief concern is that it doesn't use function descriptors. Signed-off-by: Rusty Russell Signed-off-by: Anton Blanchard --- arch/powerpc/include/asm/elf.h | 2 ++ arch/powerpc/in

[PATCH 5/9] powerpc: ELF2 binaries launched directly.

2013-11-20 Thread Anton Blanchard
From: Rusty Russell No function descriptor, but we set r12 up and set TIF_RESTOREALL as it normally isn't restored on return from syscall. Signed-off-by: Rusty Russell Signed-off-by: Anton Blanchard --- arch/powerpc/kernel/process.c | 50 ++- 1

[PATCH 6/9] powerpc: ELF2 binaries signal handling

2013-11-20 Thread Anton Blanchard
From: Rusty Russell For the ELFv2 ABI, the hander is the entry point, not a function descriptor. We also need to set up r12, and fortunately the fast_exception_return exit path restores r12 for us so nothing else is required. Signed-off-by: Rusty Russell Signed-off-by: Anton Blanchard

[PATCH 9/9] powerpc: Add pseries_le_defconfig

2013-11-20 Thread Anton Blanchard
Signed-off-by: Anton Blanchard --- arch/powerpc/configs/pseries_le_defconfig | 352 ++ 1 file changed, 352 insertions(+) create mode 100644 arch/powerpc/configs/pseries_le_defconfig diff --git a/arch/powerpc/configs/pseries_le_defconfig b/arch/powerpc/configs

[PATCH 1/9] powerpc/pseries: Fix endian issues in pseries EEH code

2013-11-20 Thread Anton Blanchard
Signed-off-by: Anton Blanchard --- arch/powerpc/platforms/pseries/eeh_pseries.c | 21 - 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/arch/powerpc/platforms/pseries/eeh_pseries.c b/arch/powerpc/platforms/pseries/eeh_pseries.c index 7fbc25b..ccb633e 100644

[PATCH 4/9] powerpc: Set eflags correctly for ELF ABIv2 core dumps.

2013-11-20 Thread Anton Blanchard
From: Rusty Russell We leave it at zero (though it could be 1) for old tasks. Signed-off-by: Rusty Russell Signed-off-by: Anton Blanchard --- arch/powerpc/include/asm/elf.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/powerpc/include/asm/elf.h b/arch/powerpc/include/asm/elf.h

[PATCH 2/9] pseries: Add H_SET_MODE to change exception endianness

2013-11-20 Thread Anton Blanchard
On little endian builds call H_SET_MODE so exceptions have the correct endianness. We need to reset the endian during kexec so do that in the MMU hashtable clear callback. Signed-off-by: Anton Blanchard --- arch/powerpc/include/asm/hvcall.h | 2 ++ arch/powerpc/include/asm

[PATCH 7/9] powerpc: Don't use ELFv2 ABI to build the kernel

2013-11-20 Thread Anton Blanchard
From: Alistair Popple The kernel doesn't build correctly using the ELFv2 ABI. This patch ensures that the ELFv1 ABI is used when building a kernel with an ELFv2 enabled compiler. Signed-off-by: Alistair Popple Signed-off-by: Anton Blanchard --- arch/powerpc/Makefile | 1 + 1 file chang

[PATCH 8/9] powerpc: Add CONFIG_CPU_LITTLE_ENDIAN kernel config option.

2013-11-20 Thread Anton Blanchard
With the little endian support merged, we can add the CONFIG_CPU_LITTLE_ENDIAN kernel config option. Signed-off-by: Anton Blanchard --- arch/powerpc/platforms/Kconfig.cputype | 11 +++ 1 file changed, 11 insertions(+) diff --git a/arch/powerpc/platforms/Kconfig.cputype b/arch/powerpc

[PATCH] powerpc: Wrong DWARF CFI in the kernel vdso for little-endian / ELFv2

2013-11-20 Thread Anton Blanchard
nored. So it seems the simplest fix would be just to always provide CFI for all the fields. Signed-off-by: Ulrich Weigand Signed-off-by: Anton Blanchard --- arch/powerpc/kernel/vdso64/sigtramp.S | 16 +++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/arch/powerpc/k

Re: linux-next: build failure after merge of the final tree (Linus' tree related - powerpc)

2013-11-20 Thread Anton Blanchard
Hi, > After merging the final tree, today's linux-next build (powerpc > allyesconfig) failed like this: > > :1:0: error: -mcall-aixdesc must be big endian Urgh, allyesconfig is building an LE kernel. Ian: do we need to reverse the polarity of the option, and call it CONFIG_CPU_BIG_ENDIAN? Anto

[PATCH] powerpc: allyesconfig should not select CONFIG_CPU_LITTLE_ENDIAN

2013-11-20 Thread Anton Blanchard
Stephen reported a failure in an allyesconfig build. CONFIG_CPU_LITTLE_ENDIAN=y gets set but his toolchain is not new enough to support little endian. We really want to default to a big endian build; Ben suggested using a choice which defaults to CPU_BIG_ENDIAN. Signed-off-by: Anton Blanchard

[PATCH] drivers/tty: ehv_bytechan fails to build as a module

2013-12-08 Thread Anton Blanchard
igned-off-by: Anton Blanchard --- Index: b/drivers/tty/Kconfig === --- a/drivers/tty/Kconfig +++ b/drivers/tty/Kconfig @@ -366,7 +366,7 @@ config TRACE_SINK "Trace data router for MIPI P1149.7 cJTAG standard&q

[PATCH 0/8] ppc64 little endian bug fixes

2013-12-11 Thread Anton Blanchard
corrupt NVRAM and end up with particular hard to fix issues, since we don't have easy ways to edit the contents of NVRAM. Fixed other endian issues in crash dump, lparcfg and MSI code. Anton Blanchard (7): powerpc: Fix endian issue in setup-common.c powerpc: Fix topology core_id endian issue

[PATCH 1/8] powerpc: PTRACE_PEEKUSR always returns FPR0

2013-12-11 Thread Anton Blanchard
branch 'for-kvm' into next). [ It is indeed a merge conflict between Paul's FPU/VSX state rework and my LE patches - Anton ] Signed-off-by: Ulrich Weigand Signed-off-by: Anton Blanchard --- arch/powerpc/kernel/ptrace.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) di

[PATCH 2/8] powerpc: Fix endian issue in setup-common.c

2013-12-11 Thread Anton Blanchard
During on LE boot we see: Partition configured for 1073741824 cpus, operating system maximum is 2048. Clearly missing a byteswap here. Signed-off-by: Anton Blanchard --- arch/powerpc/kernel/setup-common.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/powerpc

[PATCH 4/8] powerpc/pseries: Fix endian issues in /proc/ppc64/lparcfg

2013-12-11 Thread Anton Blanchard
Some obvious issues: cat /proc/ppc64/lparcfg ... partition_id=16777216 ... partition_potential_processors=268435456 Signed-off-by: Anton Blanchard --- arch/powerpc/platforms/pseries/lparcfg.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/arch/powerpc

[PATCH 3/8] powerpc: Fix topology core_id endian issue on LE builds

2013-12-11 Thread Anton Blanchard
cpu_to_core_id() is missing a byteswap: cat /sys/devices/system/cpu/cpu63/topology/core_id 201326592 Signed-off-by: Anton Blanchard --- arch/powerpc/kernel/smp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/powerpc/kernel/smp.c b/arch/powerpc/kernel/smp.c index

[PATCH 5/8] powerpc/pseries: Fix endian issues in nvram code

2013-12-11 Thread Anton Blanchard
read it in another we get junk. Make both of these formats big endian, and byteswap as required. Signed-off-by: Anton Blanchard --- arch/powerpc/platforms/pseries/nvram.c | 46 +- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/arch/powerpc/platforms

[PATCH 6/8] powerpc/pseries: Fix PCIE link speed endian issue

2013-12-11 Thread Anton Blanchard
We need to byteswap ibm,pcie-link-speed-stats. Signed-off-by: Anton Blanchard --- arch/powerpc/platforms/pseries/pci.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/powerpc/platforms/pseries/pci.c b/arch/powerpc/platforms/pseries/pci.c index 5f93856..70670a2

[PATCH 7/8] powerpc/pseries: Fix endian issues in MSI code

2013-12-11 Thread Anton Blanchard
The MSI code is miscalculating quotas in little endian mode. Add required byteswaps to fix this. Before we claimed a quota of 65536, after the patch we see the correct value of 256. Signed-off-by: Anton Blanchard --- arch/powerpc/platforms/pseries/msi.c | 28 +++- 1

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

2013-12-11 Thread Anton Blanchard
A couple more device tree properties that need byte swapping. Signed-off-by: Anton Blanchard --- arch/powerpc/kernel/crash_dump.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/powerpc/kernel/crash_dump.c b/arch/powerpc/kernel/crash_dump.c index 779a78c..11c1d06

[PATCH] powerpc/powernv: Fix endian issue in opal_xscom_read

2013-12-12 Thread Anton Blanchard
opal_xscom_read uses a pointer to return the data so we need to byteswap it on LE builds. Signed-off-by: Anton Blanchard --- diff --git a/arch/powerpc/include/asm/opal.h b/arch/powerpc/include/asm/opal.h index aded1b8..9873a26 100644 --- a/arch/powerpc/include/asm/opal.h +++ b/arch/powerpc

[PATCH] powerpc: Fix endian issues in power7/8 machine check handler

2013-12-15 Thread Anton Blanchard
The SLB save area is shared with the hypervisor and is defined as big endian, so we need to byte swap on little endian builds. Signed-off-by: Anton Blanchard --- diff --git a/arch/powerpc/kernel/mce_power.c b/arch/powerpc/kernel/mce_power.c index b36e777..27c93f4 100644 --- a/arch/powerpc

[PATCH] powerpc: Make unaligned accesses endian-safe for powerpc

2013-12-15 Thread Anton Blanchard
From: Rajesh B Prathipati The generic put_unaligned/get_unaligned macros were made endian-safe by calling the appropriate endian dependent macros based on the endian type of the powerpc processor. Signed-off-by: Rajesh B Prathipati Signed-off-by: Anton Blanchard --- diff --git a/arch

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

2013-12-17 Thread Anton Blanchard
: Anton Blanchard --- diff --git a/arch/powerpc/lib/copyuser_64.S b/arch/powerpc/lib/copyuser_64.S index d73a590..596a285 100644 --- a/arch/powerpc/lib/copyuser_64.S +++ b/arch/powerpc/lib/copyuser_64.S @@ -9,6 +9,14 @@ #include #include +#ifdef __BIG_ENDIAN__ +#define sLd sld

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

2013-12-18 Thread Anton Blanchard
Hi, > [ This is a rare but nasty LE issue. Most of the time we use the > POWER7 optimised __copy_tofrom_user_power7 loop, but when it hits an > exception we fall back to the base __copy_tofrom_user loop. - Anton ] To try and catch any screw ups in our ppc64 memcpy and copy_tofrom_user loops, I w

[PATCH] powerpc: Align p_end

2013-12-22 Thread Anton Blanchard
p_end is an 8 byte value embedded in the text section. This means it is only 4 byte aligned when it should be 8 byte aligned. Fix this by adding an explicit alignment. This fixes an issue where POWER7 little endian builds with CONFIG_RELOCATABLE=y fail to boot. Signed-off-by: Anton Blanchard

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