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

2017-04-23 Thread Jin, Yao
On 4/20/2017 5:36 PM, Jiri Olsa wrote: On Thu, Apr 20, 2017 at 08:07:48PM +0800, Jin Yao wrote: 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()

Re: [PATCH] powerpc/64s: use ibm,tlbiel-congruence-classes-(hash|radix) dt property

2017-04-23 Thread Nicholas Piggin
On Sun, 23 Apr 2017 10:39:11 +1000 Benjamin Herrenschmidt wrote: > On Sun, 2017-04-23 at 09:14 +1000, Nicholas Piggin wrote: > > I think we were going to take another look at moving the setup code > > later, but I think that might wait until 4.13. > > Except without that we won't boot a post-P

[tip:core/rcu] rcu: Make arch select smp_mb__after_unlock_lock() strength

2017-04-23 Thread tip-bot for Paul E. McKenney
Commit-ID: 77e5849688670280b173bb9e0544e9da7b2acc36 Gitweb: http://git.kernel.org/tip/77e5849688670280b173bb9e0544e9da7b2acc36 Author: Paul E. McKenney AuthorDate: Sat, 14 Jan 2017 13:32:50 -0800 Committer: Paul E. McKenney CommitDate: Tue, 18 Apr 2017 11:20:15 -0700 rcu: Make arch sel

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

2017-04-23 Thread Michael Ellerman
christophe leroy writes: > Le 22/04/2017 à 08:08, Michael Ellerman a écrit : >> "Naveen N. Rao" writes: >>> Excerpts from Christophe Leroy's message of April 21, 2017 18:32: diff --git a/arch/powerpc/kernel/ftrace.c b/arch/powerpc/kernel/ftrace.c index 32509de6ce4c..06d2ac53f471 1

Re: [7/9] powerpc/mm: Wire up ioremap_cache

2017-04-23 Thread Michael Ellerman
On Tue, 2017-04-11 at 17:42:31 UTC, Oliver O'Halloran wrote: > The default implementation of ioremap_cache() is aliased to ioremap(). > On powerpc ioremap() creates cache-inhibited mappings by default which > is almost certainly not what you wanted. > > Signed-off-by: Oliver O'Halloran Applied t

Re: [v2] powerpc: kprobes: convert __kprobes to NOKPROBE_SYMBOL()

2017-04-23 Thread Michael Ellerman
On Wed, 2017-04-12 at 11:18:51 UTC, "Naveen N. Rao" wrote: > Along similar lines as commit 9326638cbee2 ("kprobes, x86: Use > NOKPROBE_SYMBOL() instead of __kprobes annotation"), convert __kprobes > annotation to either NOKPROBE_SYMBOL() or nokprobe_inline. The latter > forces inlining, in which ca

Re: [v3,7/7] powerpc: kprobes: remove duplicate saving of msr

2017-04-23 Thread Michael Ellerman
On Wed, 2017-04-19 at 12:51:06 UTC, "Naveen N. Rao" wrote: > set_current_kprobe() already saves regs->msr into kprobe_saved_msr. Remove > the redundant save. > > Signed-off-by: Naveen N. Rao > Reviewed-by: Masami Hiramatsu Applied to powerpc next, thanks. https://git.kernel.org/powerpc/c/d08f8

Re: [v4,1/6] powerpc: ftrace: minor cleanup

2017-04-23 Thread Michael Ellerman
On Wed, 2017-04-19 at 12:52:23 UTC, "Naveen N. Rao" wrote: > Move the stack setup and teardown code to the ftrace_graph_caller(). > This way, we don't incur the cost of setting it up unless function graph > is enabled for this function. > > Also, remove the extraneous LR restore code after the fun

Re: [1/9] powerpc/64s: Remove unnecessary relocation branch from idle handler

2017-04-23 Thread Michael Ellerman
On Wed, 2017-04-19 at 13:05:43 UTC, Nicholas Piggin wrote: > The system reset idle handler system_reset_idle_common is relocated, so > relocation is not required to branch to kvm_start_guest. The superfluous > relocation does not result in incorrect code, but it does not compile > outside of except

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

2017-04-23 Thread Michael Ellerman
On Wed, 2017-04-19 at 15:29:51 UTC, "Naveen N. Rao" wrote: > Introduce __head_end to mark end of the early fixed sections and use the > same to blacklist all exception handlers from kprobes. > > Signed-off-by: Naveen N. Rao Applied to powerpc next, thanks. https://git.kernel.org/powerpc/c/7aa5b

Re: [2/2] powerpc: kprobes: blacklist exception common handlers

2017-04-23 Thread Michael Ellerman
On Wed, 2017-04-19 at 15:29:52 UTC, "Naveen N. Rao" wrote: > Blacklist all the exception common/OOL handlers as the kernel stack is > not yet setup, which means we can't take a trap at this point. > > Signed-off-by: Naveen N. Rao Applied to powerpc next, thanks. https://git.kernel.org/powerpc/c

Re: [v2] powerpc/mm: Add support for runtime configuration of ASLR limits

2017-04-23 Thread Michael Ellerman
On Thu, 2017-04-20 at 14:36:20 UTC, Michael Ellerman wrote: > Add powerpc support for mmap_rnd_bits and mmap_rnd_compat_bits, which are two > sysctls that allow a user to configure the number of bits of randomness used > for > ASLR. > > Because of the way the Kconfig for ARCH_MMAP_RND_BITS is def

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

2017-04-23 Thread Jiri Olsa
On Thu, Apr 20, 2017 at 08:07:50PM +0800, Jin Yao wrote: SNIP > > +#define X86_BR_TYPE_MAP_MAX 16 > + > +static int > +common_branch_type(int type) > +{ > + int i, mask; > + const int branch_map[X86_BR_TYPE_MAP_MAX] = { > + PERF_BR_CALL, /* X86_BR_CALL */ > +

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

2017-04-23 Thread Naveen N. Rao
Excerpts from Masami Hiramatsu's message of April 21, 2017 19:12: On Wed, 19 Apr 2017 16:38:22 + "Naveen N. Rao" wrote: Excerpts from Masami Hiramatsu's message of April 19, 2017 20:07: > On Wed, 19 Apr 2017 18:21:02 +0530 > "Naveen N. Rao" wrote: > >> When a kprobe is being registered,

Re: [PATCH v4 4/7] powerpc/kprobes: Use safer string functions in kprobe_lookup_name()

2017-04-23 Thread Naveen N. Rao
Excerpts from Paul Clarke's message of April 21, 2017 19:22: Sent too soon. The suggestions don't guarantee null termination. Refined, below. (Sorry for the noise.) Yeah, the string operations here are a bit of a minefield... On 04/21/2017 08:33 AM, Paul Clarke wrote: On 04/21/2017 07:33

Re: [PATCH v4 3/7] kprobes: validate the symbol name provided during probe registration

2017-04-23 Thread Naveen N. Rao
Excerpts from Michael Ellerman's message of April 22, 2017 11:25: "Naveen N. Rao" writes: When a kprobe is being registered, we use the symbol_name field to lookup the address where the probe should be placed. Since this is a user-provided field, let's ensure that the length of the string is w

Re: [PATCH] powerpc/64s: use ibm,tlbiel-congruence-classes-(hash|radix) dt property

2017-04-23 Thread Benjamin Herrenschmidt
On Sun, 2017-04-23 at 19:57 +1000, Nicholas Piggin wrote: > On Sun, 23 Apr 2017 10:39:11 +1000 > Benjamin Herrenschmidt wrote: > > > On Sun, 2017-04-23 at 09:14 +1000, Nicholas Piggin wrote: > > > I think we were going to take another look at moving the setup > > > code > > > later, but I think t

[PATCH] powerpc/xmon: Deindent the SLB dumping logic

2017-04-23 Thread Michael Ellerman
Currently the code that dumps SLB entries uses a double-nested if. This means the actual dumping logic is a bit squashed. Deindent it by using continue. Signed-off-by: Michael Ellerman --- arch/powerpc/xmon/xmon.c | 39 ++- 1 file changed, 22 insertions(+), 17

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

2017-04-23 Thread Jin, Yao
On 4/23/2017 9:55 PM, Jiri Olsa wrote: On Thu, Apr 20, 2017 at 08:07:50PM +0800, Jin Yao wrote: SNIP +#define X86_BR_TYPE_MAP_MAX 16 + +static int +common_branch_type(int type) +{ + int i, mask; + const int branch_map[X86_BR_TYPE_MAP_MAX] = { + PERF_BR_CALL,

Re: [PATCH v2] powerpc/mm: Add support for runtime configuration of ASLR limits

2017-04-23 Thread Balbir Singh
On Fri, 2017-04-21 at 00:36 +1000, Michael Ellerman wrote: > Add powerpc support for mmap_rnd_bits and mmap_rnd_compat_bits, which are two > sysctls that allow a user to configure the number of bits of randomness used > for > ASLR. > > Because of the way the Kconfig for ARCH_MMAP_RND_BITS is defi

Re: [PATCH v2 03/11] dt-bindings: soc/fsl: Update reserved memory binding for QBMan

2017-04-23 Thread Scott Wood
On Wed, 2017-04-19 at 16:48 -0400, Roy Pledge wrote: > Updates the QMan and BMan device tree bindings for reserved memory > nodes. This makes the reserved memory allocation compatiable with > the shared-dma-pool usage. > > Signed-off-by: Roy Pledge > --- >  Documentation/devicetree/bindings/soc/f

Re: [PATCH v2 02/11] soc/fsl/qbman: Use shared-dma-pool for QMan private memory allocations

2017-04-23 Thread Scott Wood
On Wed, 2017-04-19 at 16:48 -0400, Roy Pledge wrote: > @@ -727,10 +730,81 @@ static int fsl_qman_probe(struct platform_device > *pdev) >   qm_channel_caam = QMAN_CHANNEL_CAAM_REV3; >   } >   > - ret = zero_priv_mem(dev, node, fqd_a, fqd_sz); > - WARN_ON(ret); > - if (ret

Re: [PATCH v2 07/11] soc/fsl/qbman: Rework ioremap() calls for ARM/PPC

2017-04-23 Thread Scott Wood
On Wed, 2017-04-19 at 16:48 -0400, Roy Pledge wrote: > Rework ioremap() for PPC and ARM. The PPC devices require a > non-coherent mapping while ARM will work with a non-cachable/write > combine mapping. > > Signed-off-by: Roy Pledge > --- >  drivers/soc/fsl/qbman/bman_portal.c | 16 +-

Re: [PATCH] powerpc/powernv: Fix opal entry/exit MSR_RI coverage

2017-04-23 Thread Benjamin Herrenschmidt
On Thu, 2017-03-30 at 22:10 +1000, Nicholas Piggin wrote: > There are some windows in opal entry/exit that can not recover from a > re-entrant interrupt (e.g., machine check) due to using SRR registers, > but they currently do not have MSR_RI clear. > > These were found by machine check injection

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

2017-04-23 Thread Sergey Senozhatsky
On (04/21/17 14:06), Petr Mladek wrote: [..] > > I agree that this_cpu_read(printk_context) covers slightly more than > > logbuf_lock scope, so we may get positive this_cpu_read(printk_context) > > with unlocked logbuf_lock, but I don't tend to think that it's a big > > problem. > > PRINTK_SAFE_CO

Re: [PATCH] powerpc/64s: use ibm,tlbiel-congruence-classes-(hash|radix) dt property

2017-04-23 Thread Nicholas Piggin
On Mon, 24 Apr 2017 10:13:23 +1000 Benjamin Herrenschmidt wrote: > On Sun, 2017-04-23 at 19:57 +1000, Nicholas Piggin wrote: > > On Sun, 23 Apr 2017 10:39:11 +1000 > > Benjamin Herrenschmidt wrote: > > > > > On Sun, 2017-04-23 at 09:14 +1000, Nicholas Piggin wrote: > > > > I think we were g

Re: [PATCH] powerpc/xmon: Deindent the SLB dumping logic

2017-04-23 Thread Rashmica Gupta
On 24/04/17 10:35, Michael Ellerman wrote: Currently the code that dumps SLB entries uses a double-nested if. This means the actual dumping logic is a bit squashed. Deindent it by using continue. Signed-off-by: Michael Ellerman Reviewed-by: Rashmica Gupta --- arch/powerpc/xmon/xmon.c |

Re: [PATCH] powerpc/powernv: Fix opal entry/exit MSR_RI coverage

2017-04-23 Thread Nicholas Piggin
On Mon, 24 Apr 2017 11:47:48 +1000 Benjamin Herrenschmidt wrote: > On Thu, 2017-03-30 at 22:10 +1000, Nicholas Piggin wrote: > > There are some windows in opal entry/exit that can not recover from a > > re-entrant interrupt (e.g., machine check) due to using SRR registers, > > but they currently

Re: [PATCH] powerpc/powernv: Fix opal entry/exit MSR_RI coverage

2017-04-23 Thread Benjamin Herrenschmidt
On Mon, 2017-04-24 at 14:55 +1000, Nicholas Piggin wrote: > On Mon, 24 Apr 2017 11:47:48 +1000 > > Benjamin Herrenschmidt wrote: > > > On Thu, 2017-03-30 at 22:10 +1000, Nicholas Piggin wrote: > > > There are some windows in opal entry/exit that can not recover from a > > > re-entrant interrupt (

Re: [PATCH] powerpc/powernv: Fix opal entry/exit MSR_RI coverage

2017-04-23 Thread Nicholas Piggin
On Mon, 24 Apr 2017 15:09:02 +1000 Benjamin Herrenschmidt wrote: > On Mon, 2017-04-24 at 14:55 +1000, Nicholas Piggin wrote: > > On Mon, 24 Apr 2017 11:47:48 +1000 > > > Benjamin Herrenschmidt wrote: > > > > > On Thu, 2017-03-30 at 22:10 +1000, Nicholas Piggin wrote: > > > > There are s

Re: [PATCH v4 04/11] VAS: Define vas_init() and vas_exit()

2017-04-23 Thread Benjamin Herrenschmidt
On Thu, 2017-03-30 at 22:13 -0700, Sukadev Bhattiprolu wrote: > +config VAS > +   tristate "IBM Virtual Accelerator Switchboard (VAS)" CONFIG_IBM_VAS or PPC_VAS ... too high risk of collision otherwise Ben.

Re: [PATCH v4 04/11] VAS: Define vas_init() and vas_exit()

2017-04-23 Thread Benjamin Herrenschmidt
On Thu, 2017-03-30 at 22:13 -0700, Sukadev Bhattiprolu wrote: > > + p = of_get_property(dn, "vas-id", NULL); > + if (!p) { > + pr_err("VAS: NULL vas-id? %p\n", p); > + return -ENODEV; > + } > + > + vinst->vas_id = of_read_number(p, 1); of_property_read_u32(

Re: [PATCH v4 05/11] VAS: Define helpers for access MMIO regions

2017-04-23 Thread Benjamin Herrenschmidt
On Thu, 2017-03-30 at 22:13 -0700, Sukadev Bhattiprolu wrote: > +static void *map_mmio_region(char *name, uint64_t start, int len) > +{ > +   void *map; > + > +   if (!request_mem_region(start, len, name)) { > +   pr_devel("%s(): request_mem_region(0x%llx, %d) failed\n", > +