Re: [v2] cxl: Enable PCI device IDs for future IBM CXL adapters

2017-04-19 Thread Michael Ellerman
On Fri, 2017-03-24 at 16:03:19 UTC, "Matthew R. Ochs" wrote: > Add support for future IBM Coherent Accelerator (CXL) devices > with an IDs of 0x0623 and 0x0628. > > Signed-off-by: Matthew R. Ochs > Signed-off-by: Uma Krishnan > Acked-by: Frederic Barrat Applied to powerpc next, thanks. https:

Re: [v3, 1/6] powerpc/perf: Define big-endian version of perf_mem_data_src

2017-04-19 Thread Michael Ellerman
On Tue, 2017-04-11 at 01:51:05 UTC, Madhavan Srinivasan wrote: > From: Sukadev Bhattiprolu > > perf_mem_data_src is an union that is initialized via the ->val field > and accessed via the bitmap fields. For this to work on big endian > platforms (Which is broken now), we also need a big-endian re

Re: [kernel, v2] powerpc/iommu: Do not call PageTransHuge() on tail pages

2017-04-19 Thread Michael Ellerman
On Tue, 2017-04-11 at 07:54:57 UTC, Alexey Kardashevskiy wrote: > The CMA pages migration code does not support compound pages at > the moment so it performs few tests before proceeding to actual page > migration. > > One of the tests - PageTransHuge() - has VM_BUG_ON_PAGE(PageTail()) as > it is d

Re: powerpc/mm/radix: Use mm->task_size for boundary checking instead of addr_limit

2017-04-19 Thread Michael Ellerman
On Thu, 2017-04-13 at 19:18:21 UTC, "Aneesh Kumar K.V" wrote: > We don't init addr_limit correctly for 32 bit applications. So default to > using > mm->task_size for boundary condition checking. We use addr_limit to only > control > free space search. This makes sure that we do the right thing wi

Re: powerpc/64s: Minor fix for MCE TLB flush for radix

2017-04-19 Thread Michael Ellerman
On Sun, 2017-04-16 at 14:21:19 UTC, Nicholas Piggin wrote: > The TLB flush for radix first flushes TLB for radix configuration, > then flushes for hash configuration. The second flush is unnecessary > but does not affect correctness. > > Fixes: 1a472c9dba6b9 ("powerpc/mm/radix: Add tlbflush routin

Re: [V2] powerpc/mm: Update mm context addr limit correctly.

2017-04-19 Thread Michael Ellerman
On Tue, 2017-04-18 at 07:01:27 UTC, "Aneesh Kumar K.V" wrote: > We added the addr < TASK_SIZE check to avoid updating addr_limit > unnecessarily and > also to avoid calling slice_flush_segments on all the cpus. This had the side > effect of having different behaviour when using an addr value above

Re: [1/4] powerpc/64s: Revert setting LPCR LPES0 on POWER9

2017-04-19 Thread Michael Ellerman
On Tue, 2017-04-18 at 19:12:16 UTC, Nicholas Piggin wrote: > The XIVE enablement patches set LPES0 on POWER9 host. This bit sets > external interrupts to guest delivery mode that uses SRR[01]. The host's > EE interrupt handler expects HSRR[01] (for earlier CPUs). which is fine > because XIVE is con

Re: powerpc: POWER9 remove ICSWX feature

2017-04-19 Thread Michael Ellerman
On Wed, 2017-04-19 at 02:27:37 UTC, Nicholas Piggin wrote: > POWER9 does not implement this instruction. > > Fixes: c3ab300ea5 ("powerpc: Add POWER9 cputable entry") > > Signed-off-by: Nicholas Piggin Applied to powerpc next, thanks. https://git.kernel.org/powerpc/c/2384d2d7adc41463a69d3eb0720

Re: powerpc: POWER9 DD1 remove SAO feature

2017-04-19 Thread Michael Ellerman
On Wed, 2017-04-19 at 02:27:38 UTC, Nicholas Piggin wrote: > Signed-off-by: Nicholas Piggin Applied to powerpc next, thanks. https://git.kernel.org/powerpc/c/ca80d5d0a8175c9be04cfbce24180b cheers

Re: [PATCH v3 1/6] powerpc/perf: Define big-endian version of perf_mem_data_src

2017-04-19 Thread Michael Ellerman
Madhavan Srinivasan writes: > On Wednesday 19 April 2017 10:20 AM, Michael Ellerman wrote: >> It also occurred to me that we don't actually have to redefine the whole >> union, it's only the bitfields that matter, so we could reduce the diff >> to: >> >> diff --git a/include/uapi/linux/perf_event.

Re: [PATCH] of: introduce event tracepoints for dynamic device_node lifecyle

2017-04-19 Thread Tyrel Datwyler
On 04/18/2017 06:31 PM, Michael Ellerman wrote: > Frank Rowand writes: > >> On 04/17/17 17:32, Tyrel Datwyler wrote: >>> This patch introduces event tracepoints for tracking a device_nodes >>> reference cycle as well as reconfig notifications generated in response >>> to node/property manipulatio

Re: [PATCH v3 2/2] powerpc/eeh: Clean up and document event handling functions

2017-04-19 Thread Gavin Shan
On Wed, Apr 19, 2017 at 05:39:27PM +1000, Russell Currey wrote: >Remove unnecessary tags in eeh_handle_normal_event(), and add function >comments for eeh_handle_normal_event() and eeh_handle_special_event(). > >The only functional difference is that in the case of a PE reaching the >maximum number

Re: [PATCH v3 1/2] powerpc/eeh: Avoid use after free in eeh_handle_special_event()

2017-04-19 Thread Gavin Shan
On Wed, Apr 19, 2017 at 05:39:26PM +1000, Russell Currey wrote: >eeh_handle_special_event() is called when an EEH event is detected but >can't be narrowed down to a specific PE. This function looks through >every PE to find one in an erroneous state, then calls the regular event >handler eeh_handl

Re: [PATCH] powerpc/crypto/crct10dif-vpmsum: Fix missing preempt_disable()

2017-04-19 Thread Daniel Axtens
Hi Michael, > Fixes: b01df1c16c9a ("crypto: powerpc - Add CRC-T10DIF acceleration") Thank you very much for doing this! (and my apologies for not doing it myself!) It all looks good to me. I think an Ack is appropriate in these circumstances? Acked-by: Daniel Axtens Regards, Daniel

Re: [PATCH v3 00/21] eeprom: at24: Add OF device ID table

2017-04-19 Thread Rob Herring
On Thu, Apr 13, 2017 at 10:04:24PM -0300, Javier Martinez Canillas wrote: > Hello Wolfram, > > This series is a follow-up to patch [0] that added an OF device ID table > to the at24 EEPROM driver. As you suggested [1], this version instead of > adding entries for every used tuple, only adds a sin

Re: [PATCH v3 1/2] powerpc/eeh: Avoid use after free in eeh_handle_special_event()

2017-04-19 Thread Andrew Donnellan
On 19/04/17 17:39, Russell Currey wrote: eeh_handle_special_event() is called when an EEH event is detected but can't be narrowed down to a specific PE. This function looks through every PE to find one in an erroneous state, then calls the regular event handler eeh_handle_normal_event() once it

Re: [PATCH v5 7/7] perf report: Show branch type in callchain entry

2017-04-19 Thread Jin, Yao
On 4/19/2017 10:15 PM, Jiri Olsa wrote: On Wed, Apr 19, 2017 at 11:48:14PM +0800, Jin Yao wrote: SNIP +static int branch_type_str(struct branch_type_stat *stat, + char *bf, int bfsize) +{ + int i, j = 0, printed = 0; + u64 total = 0; + + for (i = 0;

Re: [PATCH v3 2/2] powerpc/eeh: Clean up and document event handling functions

2017-04-19 Thread Andrew Donnellan
On 19/04/17 17:39, Russell Currey wrote: Remove unnecessary tags in eeh_handle_normal_event(), and add function comments for eeh_handle_normal_event() and eeh_handle_special_event(). The only functional difference is that in the case of a PE reaching the maximum number of failures, rather than o

Re: [PATCH v3 2/2] powerpc/eeh: Clean up and document event handling functions

2017-04-19 Thread Russell Currey
On Thu, 2017-04-20 at 09:48 +1000, Gavin Shan wrote: > On Wed, Apr 19, 2017 at 05:39:27PM +1000, Russell Currey wrote: > > Remove unnecessary tags in eeh_handle_normal_event(), and add function > > comments for eeh_handle_normal_event() and eeh_handle_special_event(). > > > > The only functional d

[bug report] powerpc/xive: Native exploitation of the XIVE interrupt controller

2017-04-19 Thread Dan Carpenter
Hello Benjamin Herrenschmidt, The patch 243e25112d06: "powerpc/xive: Native exploitation of the XIVE interrupt controller" from Apr 5, 2017, leads to the following static checker warning: arch/powerpc/sysdev/xive/native.c:184 __xive_native_disable_queue() info: ignoring unreachabl

Re: [PATCH v3 2/2] powerpc/eeh: Clean up and document event handling functions

2017-04-19 Thread Gavin Shan
On Wed, Apr 19, 2017 at 05:39:27PM +1000, Russell Currey wrote: >Remove unnecessary tags in eeh_handle_normal_event(), and add function >comments for eeh_handle_normal_event() and eeh_handle_special_event(). > >The only functional difference is that in the case of a PE reaching the >maximum number

Re: [PATCH v3 2/2] powerpc/eeh: Clean up and document event handling functions

2017-04-19 Thread Gavin Shan
On Thu, Apr 20, 2017 at 11:03:57AM +1000, Russell Currey wrote: >On Thu, 2017-04-20 at 09:48 +1000, Gavin Shan wrote: >> On Wed, Apr 19, 2017 at 05:39:27PM +1000, Russell Currey wrote: >> > Remove unnecessary tags in eeh_handle_normal_event(), and add function >> > comments for eeh_handle_normal_ev

Re: [bug report] powerpc/xive: Native exploitation of the XIVE interrupt controller

2017-04-19 Thread Benjamin Herrenschmidt
On Thu, 2017-04-20 at 04:20 +0300, Dan Carpenter wrote: > Hello Benjamin Herrenschmidt, > > The patch 243e25112d06: "powerpc/xive: Native exploitation of the > XIVE interrupt controller" from Apr 5, 2017, leads to the following > static checker warning: > > arch/powerpc/sysdev/xive/native.c

Re: [PATCH] of: introduce event tracepoints for dynamic device_node lifecyle

2017-04-19 Thread Steven Rostedt
On Wed, 19 Apr 2017 16:27:10 -0700 Tyrel Datwyler wrote: > # echo stacktrace > /sys/kernel/debug/tracing/trace_options > # cat trace | grep -A6 "/pci@8002018" Just to let you know that there is now stacktrace event triggers, where you don't need to stacktrace all events, you can pick and

Re: [PATCH] of: introduce event tracepoints for dynamic device_node lifecyle

2017-04-19 Thread Frank Rowand
On 04/19/17 11:45, Tyrel Datwyler wrote: > On 04/18/2017 07:49 PM, Steven Rostedt wrote: >> On Tue, 18 Apr 2017 18:42:32 -0700 >> Frank Rowand wrote: >> >>> And of course the other issue with using tracepoints is the extra space >>> required to hold the tracepoint info. With the pr_debug() approa

Re: [PATCH v5 1/4] printk/nmi: generic solution for safe printk in NMI

2017-04-19 Thread Sergey Senozhatsky
Hello Steven, On (04/19/17 13:13), Steven Rostedt wrote: > > printk() takes some locks and could not be used a safe way in NMI context. > > I just found a problem with this solution. It kills ftrace dumps from > NMI context :-( > > [ 1295.168495]<...>-67423 10dNh1 38217us : do_raw_spin_

powerpc KVM build break in linux-next (was Re: [PATCH tip/core/rcu 40/40] srcu: Parallelize callback handling)

2017-04-19 Thread Michael Ellerman
"Paul E. McKenney" writes: > diff --git a/include/linux/srcutree.h b/include/linux/srcutree.h > index f2b3bd6c6bc2..0400e211aa44 100644 > --- a/include/linux/srcutree.h > +++ b/include/linux/srcutree.h > @@ -24,25 +24,75 @@ ... > +/* > + * Per-SRCU-domain structure, similar in function to rcu_sta

[PATCH v6 0/7] perf report: Show branch type

2017-04-19 Thread Jin Yao
v6: Update according to the review comments from Jiri Olsa . Major modifications are: 1. Move that multiline conditional code inside {} brackets. 2. Move branch_type_stat_display() from builtin-report.c to branch.c. Move branch_type_str() from callchain.c to branch.c.

[PATCH v6 1/7] perf/core: Define the common branch type classification

2017-04-19 Thread Jin Yao
It is often useful to know the branch types while analyzing branch data. For example, a call is very different from a conditional branch. Currently we have to look it up in binary while the binary may later not be available and even the binary is available but user has to take some time. It is ver

[PATCH v6 2/7] perf/x86/intel: Record branch type

2017-04-19 Thread Jin Yao
Perf already has support for disassembling the branch instruction and using the branch type for filtering. The patch just records the branch type in perf_branch_entry. Before recording, the patch converts the x86 branch type to common branch type. Change log -- v6: Not changed. v5: Just

[PATCH v6 3/7] perf record: Create a new option save_type in --branch-filter

2017-04-19 Thread Jin Yao
The option indicates the kernel to save branch type during sampling. One example: perf record -g --branch-filter any,save_type Change log -- v6: Not changed. v5: Not changed. Signed-off-by: Jin Yao --- tools/perf/Documentation/perf-record.txt | 1 + tools/perf/util/parse-branch-opti

[PATCH v6 4/7] perf report: Refactor the branch info printing code

2017-04-19 Thread Jin Yao
The branch info such as predicted/cycles/... are printed at the callchain entries. For example: perf report --branch-history --no-children --stdio --1.07%--main div.c:39 (predicted:52.4% cycles:1 iterations:17) main div.c:44 (predicted:52.4% cycles:1) main div.c:42

[PATCH v6 5/7] perf util: Create branch.c/.h for common branch functions

2017-04-19 Thread Jin Yao
Create new util/branch.c and util/branch.h to contain the common branch functions. Such as: branch_type_count(): Count the numbers of branch types branch_type_name() : Return the name of branch type branch_type_stat_display(): Display branch type statistics info branch_type_str(): Construct the br

[PATCH v6 6/7] perf report: Show branch type statistics for stdio mode

2017-04-19 Thread Jin Yao
Show the branch type statistics at the end of perf report --stdio. For example: perf report --stdio JCC forward: 27.6% JCC backward: 10.0% CROSS_4K: 0.0% CROSS_2M: 14.3% JCC: 37.6% JMP: 0.0% IND_JMP: 6.5% CALL: 26.6% IND_CALL: 0.0%

[PATCH v6 7/7] perf report: Show branch type in callchain entry

2017-04-19 Thread Jin Yao
Show branch type in callchain entry. The branch type is printed with other LBR information (such as cycles/abort/...). For example: perf report --branch-history --stdio --no-children --24.21%--main div.c:42 (RET CROSS_2M cycles:2) compute_flag div.c:28 (cycles:2) compute_flag

Re: [PATCH] of: introduce event tracepoints for dynamic device_node lifecyle

2017-04-19 Thread Frank Rowand
On 04/19/17 16:27, Tyrel Datwyler wrote: > On 04/18/2017 06:31 PM, Michael Ellerman wrote: >> Frank Rowand writes: >> >>> On 04/17/17 17:32, Tyrel Datwyler wrote: This patch introduces event tracepoints for tracking a device_nodes reference cycle as well as reconfig notifications generat

Re: [PATCH] of: introduce event tracepoints for dynamic device_node lifecyle

2017-04-19 Thread Frank Rowand
On 04/19/17 19:33, Steven Rostedt wrote: > On Wed, 19 Apr 2017 16:27:10 -0700 > Tyrel Datwyler wrote: > >> # echo stacktrace > /sys/kernel/debug/tracing/trace_options >> # cat trace | grep -A6 "/pci@8002018" > > Just to let you know that there is now stacktrace event triggers, where > yo

Re: [PATCH] of: introduce event tracepoints for dynamic device_node lifecyle

2017-04-19 Thread Frank Rowand
On 04/19/17 21:43, Frank Rowand wrote: > On 04/19/17 16:27, Tyrel Datwyler wrote: >> On 04/18/2017 06:31 PM, Michael Ellerman wrote: < snip > >> >> To get that same info as far as I know is to add a dump_stack() after >> each pr_debug. > > Here is a patch that I have used. It is not as user fri

Re: [PATCH] of: introduce event tracepoints for dynamic device_node lifecyle

2017-04-19 Thread Tyrel Datwyler
On 04/19/2017 07:33 PM, Steven Rostedt wrote: > On Wed, 19 Apr 2017 16:27:10 -0700 > Tyrel Datwyler wrote: > >> # echo stacktrace > /sys/kernel/debug/tracing/trace_options >> # cat trace | grep -A6 "/pci@8002018" > > Just to let you know that there is now stacktrace event triggers, where

[PATCH v2] powerpc/crypto/crct10dif-vpmsum: Fix missing preempt_disable()

2017-04-19 Thread Michael Ellerman
In crct10dif_vpmsum() we call enable_kernel_altivec() without first disabling preemption, which is not allowed. It used to be sufficient just to call pagefault_disable(), because that also disabled preemption. But the two were decoupled in commit 8222dbe21e79 ("sched/preempt, mm/fault: Decouple pr

linux-next: build failure after merge of the rcu tree

2017-04-19 Thread Stephen Rothwell
Hi Paul, [Also reported by Michael elsewhere] After merging the rcu tree, today's linux-next build (powerpc pseries_le_defconfig) failed like this: arch/powerpc/kvm/book3s_hv_rmhandlers.S: Assembler messages: arch/powerpc/kvm/book3s_hv_rmhandlers.S:587: Error: operand out of range (0x00

Re: [PATCH] powerpc/crypto/crct10dif-vpmsum: Fix missing preempt_disable()

2017-04-19 Thread Michael Ellerman
Daniel Axtens writes: > Hi Michael, > >> Fixes: b01df1c16c9a ("crypto: powerpc - Add CRC-T10DIF acceleration") > > Thank you very much for doing this! (and my apologies for not doing it > myself!) No worries, the enable_altivec() API is ridiculous, I'm surprised we ever get it right. > It all l

[PATCH] powerpc/xive: Fix missing check of rc != OPAL_BUSY

2017-04-19 Thread Michael Ellerman
Dan Carpenter noticed that the code in __xive_native_disable_queue() has a for loop with an unconditional break in the middle, which doesn't make a lot of sense. What the code's supposed to do is loop as long as OPAL says it's busy, if we get any other return code, either success or failure, then

Re: [PATCH 3/3] powerpc/mm: Implement CONFIG_DEBUG_RODATA on PPC32

2017-04-19 Thread Michael Ellerman
christophe leroy writes: > Le 19/04/2017 à 16:22, Christophe LEROY a écrit : >> >> >> Le 19/04/2017 à 16:01, Michael Ellerman a écrit : >>> Christophe Leroy writes: >>> diff --git a/arch/powerpc/kernel/ftrace.c b/arch/powerpc/kernel/ftrace.c index 32509de6ce4c..4af81fb23653 100644

Re: [PATCH v3 3/7] kprobes: validate the symbol name length

2017-04-19 Thread Michael Ellerman
"Naveen N. Rao" writes: > diff --git a/kernel/kprobes.c b/kernel/kprobes.c > index 6a128f3a7ed1..bb86681c8a10 100644 > --- a/kernel/kprobes.c > +++ b/kernel/kprobes.c > @@ -1382,6 +1382,28 @@ bool within_kprobe_blacklist(unsigned long addr) > return false; > } > > +bool is_valid_kprobe_s

Re: [PATCH v3 6/7] powerpc: kprobes: emulate instructions on kprobe handler re-entry

2017-04-19 Thread Michael Ellerman
"Naveen N. Rao" writes: > Excerpts from Masami Hiramatsu's message of April 19, 2017 20:13: >> >> BTW, as I pointed, 5/7 and 6/7 should be merged since this actually >> makes meaningful change. > > Yes, sorry if I wasn't clear in my previous reply in the (!) previous > patch series. > > Since t

Re: [PATCH 1/2] powerpc: kprobes: blacklist exception handlers

2017-04-19 Thread Michael Ellerman
"Naveen N. Rao" writes: > diff --git a/arch/powerpc/kernel/kprobes.c b/arch/powerpc/kernel/kprobes.c > index 71286dfd76a0..59159337a097 100644 > --- a/arch/powerpc/kernel/kprobes.c > +++ b/arch/powerpc/kernel/kprobes.c > @@ -112,6 +113,14 @@ kprobe_opcode_t *kprobe_lookup_name(const char *name,

<    1   2