Re: [2/2] cxl: Fail mmap if requested mapping is larger than assigned problem state area

2015-07-08 Thread Michael Ellerman
On Tue, 2015-07-07 at 05:45:46 UTC, Ian Munsie wrote: > From: Ian Munsie > > This patch makes the mmap call fail outright if the requested region is > larger than the problem state area assigned to the context so the error > is reported immediately rather than waiting for an attempt to access an

Re: [PATCH V2 2/2] powerpc/kexec: Reset HILE before kexec_sequence

2015-07-08 Thread Michael Ellerman
On Wed, 2015-07-08 at 16:51 +1000, Stewart Smith wrote: > Michael Ellerman writes: > > On Wed, 2015-07-08 at 14:37 +1000, Samuel Mendoza-Jonas wrote: > >> On powernv secondary cpus are returned to OPAL, and will then enter the > >> target kernel in big-endian. Howeve

Re: PASEMI: PA6T board doesn't boot with the RC1 of kernel 4.2 anymore

2015-07-08 Thread Michael Ellerman
On Thu, 2015-07-09 at 08:36 +1000, Benjamin Herrenschmidt wrote: > On Wed, 2015-07-08 at 20:00 +0200, Christian Zigotzky wrote: > > Dear Linuxppc-dev mailing list, > > > > I used git bisect and found out that the following commit is the problem. > > > > commit 3ceaccdf92073d193f0bfbe24280dd736e3f

Re: [PATCH v2] powerpc/powernv: Fix race in updating core_idle_state

2015-07-09 Thread Michael Ellerman
On Thu, 2015-07-09 at 14:41 +1000, Daniel Axtens wrote: > > I recommend creating an alias or script that does: > > > > $ git log --pretty=fixes -n 1 $commit | xclip > > > > FWIW, having finally got around to doing this, I found I first needed > the following snippet in ~/.gitconfig from > https:

Re: PASEMI: PA6T board doesn't boot with the RC1 of kernel 4.2 anymore

2015-07-09 Thread Michael Ellerman
On Thu, 2015-07-09 at 07:19 +0200, Christian Zigotzky wrote: > Hi All > > Many thanks for your answers. You're right. It is something wrong with > my bisect. I will do another bisect. I will evaluate the one "sometimes > boots" with good. Thanks Christian. cheers

Re: cxl: Check if afu is not null in cxl_slbia

2015-07-09 Thread Michael Ellerman
On Thu, 2015-09-07 at 23:04:25 UTC, Daniel Axtens wrote: > The pointer to an AFU in the adapter's list of AFUs can be null > if we're in the process of removing AFUs. The afu_list_lock > doesn't guard against this. > > Say we have 2 slices, and we're in the process of removing cxl. > - We remove

[git pull] Please pull powerpc/linux.git powerpc-4.2-2 tag

2015-07-10 Thread Michael Ellerman
l: Check if afu is not null in cxl_slbia Ian Munsie (2): cxl: Fail mmap if requested mapping is larger than assigned problem state area cxl: Fix off by one error allowing subsequent mmap page to be accessed Maninder Singh (1): cxl/vphb.c: Use phb pointer after NULL check Michael

Re: [3/3] IRQ: Print "unexpected IRQ" messages consistently across architectures

2015-07-12 Thread Michael Ellerman
On Sun, 2015-12-07 at 22:02:11 UTC, Bjorn Helgaas wrote: > Many architectures use a variant of "unexpected IRQ trap at vector %x" to > log unexpected IRQs. This is confusing because (a) it prints the Linux IRQ > number, but "vector" more often refers to a CPU vector number, and (b) it > prints the

Re: [PATCH V2] powerpc/irq: Enable some more exceptions in /proc/interrupts interface

2015-07-12 Thread Michael Ellerman
On Mon, 2015-07-13 at 10:54 +0530, Anshuman Khandual wrote: > On 07/10/2015 12:40 PM, Michael Neuling wrote: > > What's the performance impact of this? If you run this test with --fp, > > --altivec or --vector what is the impact of adding this patch? > > > > http://ozlabs.org/~anton/junkcode/cont

Re: [RFC,1/2] powerpc/numa: fix cpu_to_node() usage during boot

2015-07-14 Thread Michael Ellerman
On Wed, 2015-07-08 at 16:16 -0700, Nishanth Aravamudan wrote: > On 08.07.2015 [14:00:56 +1000], Michael Ellerman wrote: > > On Thu, 2015-02-07 at 23:02:02 UTC, Nishanth Aravamudan wrote: > > > > > > we currently emit at boot: > > > > > > [

[RFC PATCH 01/12] powerpc/kernel: Get pt_regs from r9 before calling do_syscall_trace_enter()

2015-07-15 Thread Michael Ellerman
To call do_syscall_trace_enter() we need pt_regs in r3, but we don't need to recalculate it based on r1, it's already in r9. Signed-off-by: Michael Ellerman --- arch/powerpc/kernel/entry_64.S | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/arch/powerpc/kernel/en

[RFC PATCH 02/12] powerpc/kernel: Switch to using MAX_ERRNO

2015-07-15 Thread Michael Ellerman
expect to return a non-error value between -MAX_ERRNO and -516. So this change should be safe ... Signed-off-by: Michael Ellerman --- arch/powerpc/include/uapi/asm/errno.h | 2 -- arch/powerpc/kernel/entry_32.S| 3 ++- arch/powerpc/kernel/entry_64.S| 5 +++-- 3 files changed, 5

[RFC PATCH 03/12] powerpc/kernel: Change the do_syscall_trace_enter() API

2015-07-15 Thread Michael Ellerman
current API. So change the do_syscall_trace_enter() API to make it deal with the return code juggling, and the assembler can then just return whatever return code it is given. Signed-off-by: Michael Ellerman --- arch/powerpc/kernel/entry_32.S | 4 arch/powerpc/kernel/entry_64.S | 23

[RFC PATCH 04/12] powerpc: Drop unused syscall_get_error()

2015-07-15 Thread Michael Ellerman
caller and it's clear what semantics the caller wants it's just untested code. So drop it. Signed-off-by: Michael Ellerman --- arch/powerpc/include/asm/syscall.h | 6 -- 1 file changed, 6 deletions(-) diff --git a/arch/powerpc/include/asm/syscall.h b/arch/powerpc/include/asm/sys

[RFC PATCH 05/12] powerpc: Don't negate error in syscall_set_return_value()

2015-07-15 Thread Michael Ellerman
syscall_set_return_value(), and expect the caller to do it like all other implementations do. Also add a comment about the ccr handling. Signed-off-by: Michael Ellerman --- arch/powerpc/include/asm/syscall.h | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/arch/powerpc/include

[RFC PATCH 06/12] powerpc: Rework syscall_get_arguments() so there is only one loop

2015-07-15 Thread Michael Ellerman
Currently syscall_get_arguments() has two loops, one for compat and one for regular tasks. In prepartion for the next patch, which changes which registers we use, switch it to only have one loop, so we only have one place to update. Signed-off-by: Michael Ellerman --- arch/powerpc/include/asm

[RFC PATCH 07/12] powerpc: Use orig_gpr3 in syscall_get_arguments()

2015-07-15 Thread Michael Ellerman
pr3 instead of r3. This is safe for all uses because orig_gpr3 always contains the r3 value that was passed to the syscall. We store it in the syscall entry path and never modify it. Update syscall_set_arguments() while we're here, even though it's never used. Signed-off-by: Mic

[RFC PATCH 08/12] powerpc: Change syscall_get_nr() to return int

2015-07-15 Thread Michael Ellerman
ill zero extend the 32-bit value. If syscall_get_nr() returns an unsigned long, then a 64-bit kernel will see a positive value in r0 and will incorrectly allow the syscall through seccomp. Signed-off-by: Michael Ellerman --- arch/powerpc/include/asm/syscall.h | 11 --- 1 file changed, 8 in

[RFC PATCH 09/12] powerpc/kernel: Add SIG_SYS support for compat tasks

2015-07-15 Thread Michael Ellerman
seccomp filter, add compat handling for SIGSYS. Signed-off-by: Michael Ellerman --- arch/powerpc/include/asm/compat.h | 7 +++ arch/powerpc/kernel/signal_32.c | 5 + tools/testing/selftests/seccomp/seccomp_bpf.c | 4 3 files changed, 16 insertions(+) diff

[RFC PATCH 10/12] powerpc/kernel: Enable seccomp filter

2015-07-15 Thread Michael Ellerman
scall paramater and allow the syscall to proceed. Signed-off-by: Michael Ellerman --- arch/powerpc/Kconfig | 1 + arch/powerpc/kernel/ptrace.c | 28 +++- 2 files changed, 28 insertions(+), 1 deletion(-) diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig

[RFC PATCH 11/12] selftests/seccomp: Make seccomp tests work on big endian

2015-07-15 Thread Michael Ellerman
unt for this. Signed-off-by: Michael Ellerman --- tools/testing/selftests/seccomp/seccomp_bpf.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/tools/testing/selftests/seccomp/seccomp_bpf.c b/tools/testing/selftests/seccomp/seccomp_bpf.c index b2374c131340..51adb9afb511 100644 --- a/to

[RFC PATCH 12/12] selftests/seccomp: Add powerpc support

2015-07-15 Thread Michael Ellerman
Wire up the syscall number and regs so the tests work on powerpc. Signed-off-by: Michael Ellerman --- tools/testing/selftests/seccomp/seccomp_bpf.c | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/tools/testing/selftests/seccomp/seccomp_bpf.c b/tools/testing

Re: [RFC PATCH 09/12] powerpc/kernel: Add SIG_SYS support for compat tasks

2015-07-15 Thread Michael Ellerman
On Wed, 2015-07-15 at 08:12 -0700, Kees Cook wrote: > On Wed, Jul 15, 2015 at 12:37 AM, Michael Ellerman > wrote: > > diff --git a/tools/testing/selftests/seccomp/seccomp_bpf.c > > b/tools/testing/selftests/seccomp/seccomp_bpf.c > > index c5abe7fd7590..b2374c13134

Re: [RFC PATCH 11/12] selftests/seccomp: Make seccomp tests work on big endian

2015-07-15 Thread Michael Ellerman
On Wed, 2015-07-15 at 08:16 -0700, Kees Cook wrote: > On Wed, Jul 15, 2015 at 12:37 AM, Michael Ellerman > wrote: > > diff --git a/tools/testing/selftests/seccomp/seccomp_bpf.c > > b/tools/testing/selftests/seccomp/seccomp_bpf.c > > index b2374c131340..51adb9afb51

Re: [RESEND,v3] powerpc/pseries: Limit EPOW reset event warnings

2015-07-15 Thread Michael Ellerman
adjacent pr_err/pr_emerg into single one to reduce > the number of lines printed per warning. > > Suggested-by: Vipin K Parashar > [Vipin: edited the changelog] > Cc: Anshuman Khandual > Cc: Anton Blanchard > Cc: Michael Ellerman > Signed-off-by: Kamalesh Bab

Re: [3/3] IRQ: Print "unexpected IRQ" messages consistently across architectures

2015-07-15 Thread Michael Ellerman
On Mon, 2015-07-13 at 13:35 -0500, Bjorn Helgaas wrote: > On Sun, Jul 12, 2015 at 10:23 PM, Michael Ellerman > wrote: > > On Sun, 2015-12-07 at 22:02:11 UTC, Bjorn Helgaas wrote: > >> Many architectures use a variant of "unexpected IRQ trap at vector %x" to >

Re: [patch 00/20] powerpc: Interrupt cleanups and API change preparation

2015-07-15 Thread Michael Ellerman
On Mon, 2015-07-13 at 20:50 +, Thomas Gleixner wrote: > The following patch series contains the following changes: > > - Consolidation of chained interrupt handler setup/removal > > - Switch to functions which avoid a redundant interrupt > descriptor lookup > > - Preparatio

Re: [2/2] powerpc/signal: Add helper function to fetch quad word aligned pointer

2015-07-15 Thread Michael Ellerman
On Mon, 2015-06-07 at 10:25:34 UTC, Anshuman Khandual wrote: > This patch adds one helper function 'vmx_reserve_addr' which computes > quad word aligned pointer for vmx_reserve array element in sigcontext > structure making the code more readable. > > Signed-off-by: Anshuman Khandual > --- > arc

Re: [PATCH v5 3/3] leds/powernv: Add driver for PowerNV platform

2015-07-16 Thread Michael Ellerman
On Thu, 2015-07-16 at 10:27 +0200, Jacek Anaszewski wrote: > On 07/16/2015 08:54 AM, Vasant Hegde wrote: > >>> +static enum led_brightness powernv_led_get(struct led_classdev *led_cdev) > >>> +{ > >>> +char *loc_code; > >>> +int rc, led_type; > >>> +__be64 led_mask, led_value, max_led_t

Re: BUG: perf error on syscalls for powerpc64.

2015-07-16 Thread Michael Ellerman
On Thu, 2015-07-16 at 13:57 +0800, Zumeng Chen wrote: > Hi All, > > 1028ccf5 did a change for sys_call_table from a pointer to an array of > unsigned long, I think it's not proper, here is my reason: > > sys_call_table defined as a label in assembler should be pointer array > rather than an array

Re: powerpc: Remove mtmsrd(), use existing mtmsr()

2015-07-16 Thread Michael Ellerman
On Tue, 2015-07-07 at 03:56:59 UTC, Anton Blanchard wrote: > mtmsr() does the right thing on 32bit and 64bit, so use it everywhere. > > Signed-off-by: Anton Blanchard Applied to powerpc next, thanks. https://git.kernel.org/powerpc/c/1c53973172f84fafa8ad cheers _

Re: powerpc/powernv: Include VF PE in PELTV of PF PE

2015-07-16 Thread Michael Ellerman
On Mon, 2015-22-06 at 03:45:47 UTC, Gavin Shan wrote: > The PELTV of PF PE should include VF PE, which is missed by current > code, so that the VF PE is frozen automatically when freezing PF PE. > The patch fixes the PELTV of PF PE to include VF PE. > > Signed-off-by: Gavin Shan Applied to power

Re: [v9] powerpc/powernv: Add poweroff (EPOW, DPO) events support for PowerNV platform

2015-07-16 Thread Michael Ellerman
On Wed, 2015-08-07 at 11:06:01 UTC, Vipin K Parashar wrote: > This patch adds support for OPAL EPOW (Environmental and Power Warnings) > and DPO (Delayed Power Off) events for the PowerNV platform. These events > are generated on FSP (Flexible Service Processor) based systems. EPOW > events are gen

Re: cxl: Destroy cxl_adapter_idr on module_exit

2015-07-16 Thread Michael Ellerman
On Wed, 2015-08-07 at 15:14:36 UTC, Johannes Thumshirn wrote: > Destroy cxl_adapter_idr on module exit, reclaiming the allocated memory. > > Signed-off-by: Johannes Thumshirn > Acked-by: Ian Munsie Applied to powerpc next, thanks. https://git.kernel.org/powerpc/c/b2a02ac65e40fb3900d1 cheers _

Re: cxl: Destroy afu->contexts_idr on release of an afu

2015-07-16 Thread Michael Ellerman
On Thu, 2015-09-07 at 07:39:42 UTC, Johannes Thumshirn wrote: > Destroy afu->contexts_idr on release of an afu, reclaiming the allocated > memory. > > Signed-off-by: Johannes Thumshirn > Acked-by: Ian Munsie Applied to powerpc next, thanks. https://git.kernel.org/powerpc/c/bd664f892e3e2b01c791

Re: [1/4] powerpc/powernv: Allow to reserve one PE for multiple times

2015-07-16 Thread Michael Ellerman
On Fri, 2015-19-06 at 02:26:16 UTC, Gavin Shan wrote: > The PE numbers are reserved according to root port's M64 window, > which is aligned to M64 segment finely. So one PE shouldn't be > reserved for multiple times. We will reserve PE numbers according > to the M64 BARs of PCI device in subsequent

Re: powerpc/powernv: Unfreeze VF PE on releasing it

2015-07-16 Thread Michael Ellerman
On Tue, 2015-23-06 at 07:01:13 UTC, Gavin Shan wrote: > When releasing PE for SRIOV VF, the PE is forced to be frozen > wrongly. When the same PE is picked for another VF, it won't > work anyhow. The patch fixes the issue by unfreezing, not > freezing the VF PE when releasing it. > > Signed-off-by

Re: [v3,1/2] cxl: Add explicit precision specifiers

2015-07-16 Thread Michael Ellerman
On Thu, 2015-11-06 at 11:27:51 UTC, Rasmus Villemoes wrote: > C99 says that a precision given as simply '.' with no following digits > or * should be interpreted as 0. The kernel's printf implementation, > however, treats this case as if the precision was omitted. C99 also > says that if both the p

Re: [1/3] powerpc/iommu: Remove dma_data union

2015-07-16 Thread Michael Ellerman
On Wed, 2015-24-06 at 05:25:22 UTC, Benjamin Herrenschmidt wrote: > To support "hybrid" DMA ops in a subsequent patch, we will need both > a direct DMA offset and an iommu pointer. Those are currently exclusive > (a union), so change them to be separate fields. > > While there, also type iommu_tab

Re: BUG: perf error on syscalls for powerpc64.

2015-07-16 Thread Michael Ellerman
On Fri, 2015-07-17 at 09:27 +0800, Zumeng Chen wrote: > On 2015年07月16日 17:04, Michael Ellerman wrote: > > On Thu, 2015-07-16 at 13:57 +0800, Zumeng Chen wrote: > >> Hi All, > >> > >> 1028ccf5 did a change for sys_call_table from a pointer to an array of > &g

Re: [RFC PATCH 01/12] powerpc/kernel: Get pt_regs from r9 before calling do_syscall_trace_enter()

2015-07-16 Thread Michael Ellerman
On Fri, 2015-07-17 at 08:40 +1000, Benjamin Herrenschmidt wrote: > On Wed, 2015-07-15 at 17:37 +1000, Michael Ellerman wrote: > > To call do_syscall_trace_enter() we need pt_regs in r3, but we don't need > > to recalculate it based on r1, it's already in r9. > &

Re: [PATCH] powerpc: Use hardware RNG for arch_get_random_seed_* not arch_get_random_*

2015-07-16 Thread Michael Ellerman
On Thu, 2015-07-16 at 22:12 +1000, Paul Mackerras wrote: > The hardware RNG on POWER8 and POWER7+ can be relatively slow, since > it can only supply one 64-bit value per microsecond. Currently we > read it in arch_get_random_long(), but that slows down reading from > /dev/urandom since the code in

Re: [V2] powerpc/signal: Add helper function to fetch quad word aligned pointer

2015-07-20 Thread Michael Ellerman
On Mon, 2015-20-07 at 02:58:43 UTC, Anshuman Khandual wrote: > This patch adds one helper function 'sigcontext_vmx_regs' which computes > quad word aligned pointer for 'vmx_reserve' array element in sigcontext > structure making the code more readable. > > diff --git a/arch/powerpc/kernel/signal_6

Re: [PATCH] kprobes: Mark OPTPROBES n/a for powerpc

2015-07-20 Thread Michael Ellerman
On Sun, 2015-07-19 at 11:21 +0900, Masami Hiramatsu wrote: > On 2015/07/16 19:56, Ananth N Mavinakayanahalli wrote: > > Kprobes uses a breakpoint instruction to trap into execution flow > > and the probed instruction is single-stepped from an alternate location. > > > > On some architectures like

Re: [PATCH] Fix crash due to processing "memory-controller" nodes as "memory"

2015-07-20 Thread Michael Ellerman
On Tue, 2015-07-21 at 12:45 +1000, Anton Blanchard wrote: > Hi Ian, > > > From: Ian Munsie > > > > If the system has a PCI device with a memory-controller device node, > > kexec-lite would spew hundreds of double free warnings and eventually > > segfault. This would result in a "kexec load faile

next is open

2015-07-20 Thread Michael Ellerman
Hi folks, Just letting you know that powerpc next is open. So now is the time to start sending patches for 4.3. Ben & I now have a shared powerpc tree on kernel.org, so that is the place you should be looking at if you want to see what's in next: https://git.kernel.org/cgit/linux/kernel/git/p

Re: [3/6] pseries: Update CPU hotplug error recovery

2015-07-20 Thread Michael Ellerman
On Mon, 2015-22-06 at 20:59:20 UTC, Nathan Fontenot wrote: > Update the cpu dlpar add/remove paths to do better error recovery when > a failure occurs during the add/remove operation. This includes adding > some pr_info and pr_debug statements. So I'm happy with the idea there, but .. > diff --g

Re: [PATCH V3 2/2] kprobes: Mark OPTPROBES na for powerpc

2015-07-20 Thread Michael Ellerman
On Mon, 2015-07-20 at 08:41 -0500, Segher Boessenkool wrote: > On Mon, Jul 20, 2015 at 04:24:22PM +0530, Ananth N Mavinakayanahalli wrote: > > There is a potential gain to be had with a direct > > jump instead of a breakpoint, but the caveats need to be traded off > > with the complexity it brings

Re: [PATCH kernel] powerpc/powernv/ioda2: Fix calculation for memory allocated for TCE table

2015-07-20 Thread Michael Ellerman
On Mon, 2015-07-20 at 20:45 +1000, Alexey Kardashevskiy wrote: > The existing code stores the amount of memory allocated for a TCE table. > At the moment it uses @offset which is a virtual offset in the TCE table > which is only correct for a one level tables and it does not include > memory alloca

Re: BUG: perf error on syscalls for powerpc64.

2015-07-20 Thread Michael Ellerman
On Fri, 2015-07-17 at 13:28 +0800, Zumeng Chen wrote: > On 2015年07月17日 12:07, Michael Ellerman wrote: > > On Fri, 2015-07-17 at 09:27 +0800, Zumeng Chen wrote: > >> On 2015年07月16日 17:04, Michael Ellerman wrote: > >>> On Thu, 2015-07-16 at 13:57 +0800, Zu

Re: [4/6] pseries: Add CPU dlpar remove functionality

2015-07-21 Thread Michael Ellerman
On Mon, 2015-22-06 at 21:00:49 UTC, Nathan Fontenot wrote: > Add the ability to dlpar remove CPUs via hotplug rtas events, either by > specifying the drc-index of the CPU to remove or providing a count of cpus > to remove. > > To accomplish we create a list of possible dr cpus and their drc index

Re: [4/6] pseries: Add CPU dlpar remove functionality

2015-07-21 Thread Michael Ellerman
On Mon, 2015-22-06 at 21:00:49 UTC, Nathan Fontenot wrote: > Add the ability to dlpar remove CPUs via hotplug rtas events, either by > specifying the drc-index of the CPU to remove or providing a count of cpus > to remove. > > To accomplish we create a list of possible dr cpus and their drc index

Re: [RFC, 2/8] powerpc/slb: Rename all the 'entry' occurrences to 'slot'

2015-07-21 Thread Michael Ellerman
On Tue, 2015-21-07 at 06:58:40 UTC, Anshuman Khandual wrote: > From: "khand...@linux.vnet.ibm.com" > > These are essentially SLB individual slots what we are dealing with > in these functions. Usage of both 'entry' and 'slot' synonyms makes > it real confusing sometimes. This patch makes it unifo

Re: [RFC, 7/8] powerpc/xmon: Drop 'valid' from the condition inside 'dump_segments'

2015-07-21 Thread Michael Ellerman
On Tue, 2015-21-07 at 06:58:45 UTC, Anshuman Khandual wrote: > From: "khand...@linux.vnet.ibm.com" > > Value of 'valid' is zero when 'esid' is zero and it does not matter > when 'esid' is non-zero. Yes it does. It tells you whether the entry is valid? In practice maybe you only see invalid ent

Re: [RFC, 8/8] powerpc/xmon: Add some more elements to the existing PACA dump list

2015-07-21 Thread Michael Ellerman
On Tue, 2015-21-07 at 06:58:46 UTC, Anshuman Khandual wrote: > From: "khand...@linux.vnet.ibm.com" > > This patch adds some more elements to the existing PACA dump list > inside a xmon session which can be listed here. > > - hmi_event_available > - dscr_default > - vmalloc_sllp

Re: [RFC, 6/8] powerpc/prom: Simplify the logic while fetching SLB size

2015-07-21 Thread Michael Ellerman
On Tue, 2015-21-07 at 06:58:44 UTC, Anshuman Khandual wrote: > From: "khand...@linux.vnet.ibm.com" > > This patch just simplifies the existing code logic while fetching > the SLB size property from the device tree. > > Signed-off-by: Anshuman Khandual > --- > arch/powerpc/kernel/prom.c | 12 ++

Re: [4/6] pseries: Add CPU dlpar remove functionality

2015-07-21 Thread Michael Ellerman
On Tue, 2015-07-21 at 16:34 -0500, Nathan Fontenot wrote: > On 07/21/2015 04:27 AM, Michael Ellerman wrote: > > On Mon, 2015-22-06 at 21:00:49 UTC, Nathan Fontenot wrote: > >> +static int dlpar_cpu_remove_by_count(struct device_node *parent, > >> +

Re: [3/6] pseries: Update CPU hotplug error recovery

2015-07-21 Thread Michael Ellerman
On Tue, 2015-07-21 at 14:14 -0500, Nathan Fontenot wrote: > On 07/20/2015 11:46 PM, Michael Ellerman wrote: > > So the pr_info()s should go entirely and the pr_debugs() should become > > pr_warns(). The warning messages should become more verbose so they stand on > > their

Re: [PATCH] mm: rename and document alloc_pages_exact_node

2015-07-21 Thread Michael Ellerman
_node(area->nid, > GFP_KERNEL|__GFP_THISNODE, > area->order); Yeah that looks right to me. This code enables some firmware memory calibration so I think it really does want to get memory on the spe

Re: [PATCH V4 2/6] mm: mlock: Add new mlock, munlock, and munlockall system calls

2015-07-21 Thread Michael Ellerman
On Tue, 2015-07-21 at 13:44 -0700, Andrew Morton wrote: > On Tue, 21 Jul 2015 15:59:37 -0400 Eric B Munson wrote: > > > With the refactored mlock code, introduce new system calls for mlock, > > munlock, and munlockall. The new calls will allow the user to specify > > what lock states are being a

Re: [RFC, 7/8] powerpc/xmon: Drop 'valid' from the condition inside 'dump_segments'

2015-07-21 Thread Michael Ellerman
On Tue, 2015-07-21 at 17:15 +0530, Anshuman Khandual wrote: > On 07/21/2015 03:30 PM, Michael Ellerman wrote: > > On Tue, 2015-21-07 at 06:58:45 UTC, Anshuman Khandual wrote: > >> > From: "khand...@linux.vnet.ibm.com" > >> > > >> > Value

Re: [PATCH 1/2] Move the pt_regs_offset struct definition from arch to common include file

2015-07-21 Thread Michael Ellerman
On Wed, 2015-07-22 at 00:46 -0400, David Long wrote: > On 06/29/15 23:29, Michael Ellerman wrote: > > On Wed, 2015-06-17 at 14:30 -0400, David Long wrote: > >> On 06/16/15 09:17, Rob Herring wrote: > >>> On Mon, Jun 15, 2015 at 11:42 AM, David Long wrote: > >&

Re: [RFC 5/8] powerpc/slb: Add documentation to runtime patching of SLB encoding

2015-07-21 Thread Michael Ellerman
On Tue, 2015-07-21 at 12:28 +0530, Anshuman Khandual wrote: > From: "khand...@linux.vnet.ibm.com" > > This patch adds some documentation to 'patch_slb_encoding' function > explaining about how it clears the existing immediate value in the > given instruction and inserts a new one there. > > diff

Re: [RFC 5/8] powerpc/slb: Add documentation to runtime patching of SLB encoding

2015-07-22 Thread Michael Ellerman
On Wed, 2015-07-22 at 07:57 +0200, Gabriel Paubert wrote: > On Wed, Jul 22, 2015 at 03:51:03PM +1000, Michael Ellerman wrote: > > On Tue, 2015-07-21 at 12:28 +0530, Anshuman Khandual wrote: > > > From: "khand...@linux.vnet.ibm.com" > > > > &

Re: [RFC 4/8] powerpc/slb: Add some helper functions to improve modularization

2015-07-22 Thread Michael Ellerman
On Tue, 2015-07-21 at 12:28 +0530, Anshuman Khandual wrote: > From: "khand...@linux.vnet.ibm.com" > > This patch adds the following helper functions to improve modularization > and readability of the code. > > (1) slb_invalid_all: Invalidates entire SLB This reads badly. Although inval

Re: [RFC 3/8] powerpc/slb: Define macros for the bolted slots

2015-07-22 Thread Michael Ellerman
On Tue, 2015-07-21 at 12:28 +0530, Anshuman Khandual wrote: > From: "khand...@linux.vnet.ibm.com" > > This patch defines macros for all the three bolted SLB slots. This also > renames the 'create_shadowed_slb' function as 'new_shadowed_slb'. > > Signed-off-by: Anshuman Khandual > --- > arch/po

Re: powerpc/eeh: Fix wrong printed PE number

2015-07-22 Thread Michael Ellerman
On Tue, 2015-12-05 at 07:05:22 UTC, Gavin Shan wrote: > On LE kernel, the non-existing PE number in BE format derived from > skiboot firmware isn't converted to LE format properly as following > kernel log indicates: > >EEH: Clear non-existing PHB#4-PE#200 > > Signed-off-by: Gavin

Re: [V2] powerpc/signal: Add helper function to fetch quad word aligned pointer

2015-07-22 Thread Michael Ellerman
On Mon, 2015-20-07 at 02:58:43 UTC, Anshuman Khandual wrote: > This patch adds one helper function 'sigcontext_vmx_regs' which computes > quad word aligned pointer for 'vmx_reserve' array element in sigcontext > structure making the code more readable. > > Signed-off-by: Anshuman Khandual Applie

Re: powerpc/eeh: Dump PHB diag-data for non-existing PE

2015-07-22 Thread Michael Ellerman
On Tue, 2015-12-05 at 07:05:32 UTC, Gavin Shan wrote: > When detecting EEH error on non-existing PE, including the reserved > one, the PE is simply unfrozen without dumping the PHB diag-data, > which is useful for locating the root cause of the EEH error. The > patch dumps the PHB diag-data when no

Re: powerpc/tm: Drop tm_orig_msr from thread_struct

2015-07-22 Thread Michael Ellerman
On Mon, 2015-06-07 at 10:54:10 UTC, Anshuman Khandual wrote: > Currently tm_orig_msr is getting used during process context switch only. > Then there is ckpt_regs which saves the checkpointed userspace context > The MSR slot contained in ckpt_regs structure can be used during process > context swit

Re: powerpc/rtas: Introduce rtas_get_sensor_fast() for IRQ handlers

2015-07-22 Thread Michael Ellerman
On Fri, 2015-17-07 at 10:46:58 UTC, Thomas Huth wrote: > The EPOW interrupt handler uses rtas_get_sensor(), which in turn > uses rtas_busy_delay() to wait for RTAS becoming ready in case it > is necessary. But rtas_busy_delay() is annotated with might_sleep() > and thus may not be used by interrupt

[PATCH] powerpc: Update corenet32_smp_defconfig for modern distros

2015-07-22 Thread Michael Ellerman
corenet32_smp_defconfig is missing some things that modern distros require, enable them. Signed-off-by: Michael Ellerman --- arch/powerpc/configs/corenet32_smp_defconfig | 6 ++ 1 file changed, 6 insertions(+) diff --git a/arch/powerpc/configs/corenet32_smp_defconfig b/arch/powerpc

Re: [PATCH v5 6/7] powerpc/powernv: generic nest pmu event functions

2015-07-23 Thread Michael Ellerman
On Thu, 2015-07-23 at 12:14 +0530, Madhavan Srinivasan wrote: > > On Wednesday 22 July 2015 10:26 AM, Daniel Axtens wrote: > >> +static void p8_nest_read_counter(struct perf_event *event) > >> +{ > >> + uint64_t *addr; > >> + u64 data = 0; > > You've got a u64 and a uint64_t, and then... > >> +

Re: [PATCH v5 4/7] powerpc/powernv: detect supported nest pmus and its events

2015-07-23 Thread Michael Ellerman
On Thu, 2015-07-23 at 11:33 +0530, Madhavan Srinivasan wrote: > > On Wednesday 22 July 2015 09:37 AM, Daniel Axtens wrote: > > > >> static struct perchip_nest_info p8_nest_perchip_info[P8_NEST_MAX_CHIPS]; > >> +static struct nest_pmu *per_nest_pmu_arr[P8_NEST_MAX_PMUS]; > >> + > >> +static int

Re: [PATCH v5 3/7] powerpc/powernv: Nest PMU detection and device tree parser

2015-07-23 Thread Michael Ellerman
On Thu, 2015-07-23 at 11:24 +0530, Madhavan Srinivasan wrote: > > On Wednesday 22 July 2015 09:19 AM, Daniel Axtens wrote: > > Hi, > > > >> +static struct perchip_nest_info p8_nest_perchip_info[P8_NEST_MAX_CHIPS]; > >> + > >> +static int nest_ima_dt_parser(void) > >> +{ > >> + const __be32 *gcid;

Re: [4.2-rc3] macintosh/ans-lcd.c: Missing include causes compile failure

2015-07-23 Thread Michael Ellerman
On Mon, 2015-20-07 at 19:01:42 UTC, Tim Gardner wrote: > From: Tim Gardner > > drivers/macintosh/ans-lcd.c:201:1: warning: data definition has no type or > storage class > module_init(anslcd_init); > ^ > drivers/macintosh/ans-lcd.c:201:1: error: type defaults to 'int' in > declaration of 'mod

[PATCH 01/11] powerpc/kernel: Switch to using MAX_ERRNO

2015-07-23 Thread Michael Ellerman
expect to return a non-error value between -MAX_ERRNO and -516. So this change should be safe ... Acked-by: Benjamin Herrenschmidt Signed-off-by: Michael Ellerman --- arch/powerpc/include/uapi/asm/errno.h | 2 -- arch/powerpc/kernel/entry_32.S| 3 ++- arch/powerpc/kernel/entry_64.S

[PATCH 02/11] powerpc/kernel: Change the do_syscall_trace_enter() API

2015-07-23 Thread Michael Ellerman
current API. So change the do_syscall_trace_enter() API to make it deal with the return code juggling, and the assembler can then just return whatever return code it is given. Signed-off-by: Michael Ellerman --- arch/powerpc/kernel/entry_32.S | 4 arch/powerpc/kernel/entry_64.S | 23

[PATCH 03/11] powerpc: Drop unused syscall_get_error()

2015-07-23 Thread Michael Ellerman
caller and it's clear what semantics the caller wants it's just untested code. So drop it. Signed-off-by: Michael Ellerman --- arch/powerpc/include/asm/syscall.h | 6 -- 1 file changed, 6 deletions(-) diff --git a/arch/powerpc/include/asm/syscall.h b/arch/powerpc/include/asm/sys

[PATCH 04/11] powerpc: Don't negate error in syscall_set_return_value()

2015-07-23 Thread Michael Ellerman
syscall_set_return_value(), and expect the caller to do it like all other implementations do. Also add a comment about the ccr handling. Signed-off-by: Michael Ellerman --- arch/powerpc/include/asm/syscall.h | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/arch/powerpc/include

[PATCH 05/11] powerpc: Rework syscall_get_arguments() so there is only one loop

2015-07-23 Thread Michael Ellerman
Currently syscall_get_arguments() has two loops, one for compat and one for regular tasks. In prepartion for the next patch, which changes which registers we use, switch it to only have one loop, so we only have one place to update. Signed-off-by: Michael Ellerman --- arch/powerpc/include/asm

[PATCH 06/11] powerpc: Use orig_gpr3 in syscall_get_arguments()

2015-07-23 Thread Michael Ellerman
pr3 instead of r3. This is safe for all uses because orig_gpr3 always contains the r3 value that was passed to the syscall. We store it in the syscall entry path and never modify it. Update syscall_set_arguments() while we're here, even though it's never used. Signed-off-by: Mic

[PATCH 07/11] powerpc: Change syscall_get_nr() to return int

2015-07-23 Thread Michael Ellerman
ill zero extend the 32-bit value. If syscall_get_nr() returns an unsigned long, then a 64-bit kernel will see a positive value in r0 and will incorrectly allow the syscall through seccomp. Signed-off-by: Michael Ellerman --- arch/powerpc/include/asm/syscall.h | 11 --- 1 file changed, 8 in

[PATCH 08/11] powerpc/kernel: Add SIG_SYS support for compat tasks

2015-07-23 Thread Michael Ellerman
seccomp filter, add compat handling for SIGSYS. Signed-off-by: Michael Ellerman --- arch/powerpc/include/asm/compat.h | 7 +++ arch/powerpc/kernel/signal_32.c | 5 + 2 files changed, 12 insertions(+) diff --git a/arch/powerpc/include/asm/compat.h b/arch/powerpc/include/asm/compat.

[PATCH 09/11] powerpc/kernel: Enable seccomp filter

2015-07-23 Thread Michael Ellerman
scall paramater and allow the syscall to proceed. Signed-off-by: Michael Ellerman --- arch/powerpc/Kconfig | 1 + arch/powerpc/kernel/ptrace.c | 28 +++- 2 files changed, 28 insertions(+), 1 deletion(-) diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig

[PATCH 10/11] selftests/seccomp: Make seccomp tests work on big endian

2015-07-23 Thread Michael Ellerman
unt for this. Signed-off-by: Michael Ellerman --- tools/testing/selftests/seccomp/seccomp_bpf.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/tools/testing/selftests/seccomp/seccomp_bpf.c b/tools/testing/selftests/seccomp/seccomp_bpf.c index c5abe7fd7590..2303a8dff9a2 100644 --- a/to

[PATCH 11/11] selftests/seccomp: Add powerpc support

2015-07-23 Thread Michael Ellerman
Wire up the syscall number and regs so the tests work on powerpc. Acked-by: Kees Cook Signed-off-by: Michael Ellerman --- tools/testing/selftests/seccomp/seccomp_bpf.c | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/tools/testing/selftests/seccomp/seccomp_bpf.c b

[PATCH] powerpc/mm: Fix pte_pagesize_index() crash on 4K w/64K hash

2015-07-23 Thread Michael Ellerman
s configuration, otherwise we use the slice mask. Fixes: 7aa0727f3302 ("powerpc/mm: Increase the slice range to 64TB") Reported-by: Cyril Bur Signed-off-by: Michael Ellerman --- arch/powerpc/include/asm/pgtable-ppc64.h | 10 +- 1 file changed, 9 insertions(+), 1 deletion(-)

Re: [PATCH 3/3] powerpc/iommu: Support "hybrid" iommu/direct DMA ops for coherent_mask < dma_mask

2015-07-24 Thread Michael Ellerman
On Fri, 2015-07-24 at 14:55 -0500, Brian King wrote: > Ben, > > It looks like this patch has bit rot. I have a system now where I can test the > latest version. Any chance you can rediff and resend and I can test? It's in next: https://git.kernel.org/cgit/linux/kernel/git/powerpc/linux.git/log

Re: [RFC v4 03/25] m68k/atari: Move Atari-specific code out of drivers/char/nvram.c

2015-07-24 Thread Michael Ellerman
On Sat, 2015-07-25 at 10:35 +1000, Finn Thain wrote: > On Fri, 24 Jul 2015, Christian T. Steigies wrote: > > 3b5801864975cf23bcacb52f648e74cc /dev/nvram > > 3b5801864975cf23bcacb52f648e74cc /tmp/nvram > > Thanks for helping with this, Christian. I'll add your name in "Tested-by" > tags on the r

Re: [PATCH] powerpc/mm: Fix pte_pagesize_index() crash on 4K w/64K hash

2015-07-25 Thread Michael Ellerman
On Fri, 2015-07-24 at 12:15 +0530, Aneesh Kumar K.V wrote: > Michael Ellerman writes: > > > The powerpc kernel can be built to have either a 4K PAGE_SIZE or a 64K > > PAGE_SIZE. ... > > diff --git a/arch/powerpc/include/asm/pgtable-ppc64.h > > b/arch/power

Re: [1/5] powerpc/perf: Drop the branch sample when 'from' cannot be fetched

2015-07-26 Thread Michael Ellerman
On Tue, 2015-30-06 at 08:20:27 UTC, Anshuman Khandual wrote: > BHRB (Branch History Rolling Buffer) is a rolling buffer. Hence we > might end up in a situation where we have read one target address > but when we try to read the next entry indicating the from address > of the target address, the buf

Re: [3/5] powerpc/perf: Replace last usage of get_cpu_var with this_cpu_ptr

2015-07-26 Thread Michael Ellerman
On Tue, 2015-30-06 at 08:20:29 UTC, Anshuman Khandual wrote: > The commit 69111bac42f5ce ("powerpc: Replace __get_cpu_var uses") > replaced all usage of get_cpu_var with this_cpu_ptr inside core > perf event handling on powerpc. But it skipped one of them which > is being replaced with this patch.

Re: [PATCH 11/11] selftests/seccomp: Add powerpc support

2015-07-28 Thread Michael Ellerman
On Mon, 2015-07-27 at 11:59 -0700, Kees Cook wrote: > On Thu, Jul 23, 2015 at 3:21 AM, Michael Ellerman wrote: > > Wire up the syscall number and regs so the tests work on powerpc. > > This patch begs the question: this passes everything? Doh, yes that would have been w

Re: [4/5] powerpc/perf: Change name & type of 'pred' in power_pmu_bhrb_read

2015-07-28 Thread Michael Ellerman
On Tue, 2015-30-06 at 08:20:30 UTC, Anshuman Khandual wrote: > Branch record attributes 'mispred' and 'predicted' are single bit > fields as defined in the perf ABI. Hence the data type of the field > 'pred' used during BHRB processing should be changed from integer > to bool. This patch also chang

Re: [PATCH] cxl: Don't ignore add_process_element result when attaching context

2015-07-28 Thread Michael Ellerman
On Wed, 2015-07-29 at 14:07 +1000, Daniel Axtens wrote: > Previously, when attaching a context in dedicated mode, we ignored Previously? You mean currently? Now is before this patch is applied. > the result of add_process_element, which could potentially fail. > > If add_process_element returns

[PATCH v2] powerpc/kernel: Enable seccomp filter

2015-07-29 Thread Michael Ellerman
scall paramater and allow the syscall to proceed. We need to #ifdef the the additional handling of r3 for seccomp, so move it all out of line. Signed-off-by: Michael Ellerman Reviewed-by: Kees Cook --- arch/powerpc/Kconfig | 1 + arch/powerpc/kernel/ptrace.c

[PATCH] powerpc/powernv: Fix unbalanced IRQ warning in eeh-powernv.c

2015-07-29 Thread Michael Ellerman
enable warning. Check that there are no more errors before enabling interrupts. Fixed-by: Alistair Popple Tested-by: Daniel Axtens [and changelog] Signed-off-by: Michael Ellerman --- arch/powerpc/platforms/powernv/eeh-powernv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

Re: [PATCH -v2 6/8] jump_label: Add a new static_key interface

2015-07-30 Thread Michael Ellerman
On Tue, 2015-07-28 at 15:21 +0200, Peter Zijlstra wrote: > There are various problems and short-comings with the current > static_key interface: ... > --- > arch/powerpc/include/asm/jump_label.h | 19 This looks sane and seems to be working, so powerpc bits: Acked-by: Mich

Re: macintosh/ans-lcd: fix build failure after module_init/exit relocation

2015-07-30 Thread Michael Ellerman
On Fri, 2015-17-07 at 13:20:31 UTC, Luis Henriques wrote: > After commit 0fd972a7d91d ("module: relocate module_init from init.h to > module.h") > ans-lcd module fails to build with: > > drivers/macintosh/ans-lcd.c:201:1: warning: data definition has no type or > storage class [enabled by defaul

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