[PATCH RESEND 2/2] tools/perf: Set 'trace_cycles' as defaultevent for perf kvm record in powerpc

2019-06-09 Thread Anju T Sudhakar
Use 'trace_imc/trace_cycles' as the default event for 'perf kvm record' in powerpc. Signed-off-by: Anju T Sudhakar --- tools/perf/arch/powerpc/util/kvm-stat.c | 15 +++ 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/tools/perf/arch/powerpc/util/kvm-stat.c b/tools/per

[PATCH RESEND 1/2] tools/perf: Add arch neutral function to choose event for perf kvm record

2019-06-09 Thread Anju T Sudhakar
'perf kvm record' uses 'cycles'(if the user did not specify any event) as the default event to profile the guest. This will not provide any proper samples from the guest incase of powerpc architecture, since in powerpc the PMUs are controlled by the guest rather than the host. Patch adds a functio

[PATCH v2] powerpc/perf: Use cpumask_last() to determine the designated cpu for nest/core units.

2019-06-09 Thread Anju T Sudhakar
Nest and core imc(In-memory Collection counters) assigns a particular cpu as the designated target for counter data collection. During system boot, the first online cpu in a chip gets assigned as the designated cpu for that chip(for nest-imc) and the first online cpu in a core gets assigned as the

[Bug 203837] Booting kernel under KVM immediately freezes host

2019-06-09 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=203837 --- Comment #3 from npig...@gmail.com --- bugzilla-dae...@bugzilla.kernel.org's on June 7, 2019 4:29 pm: > https://bugzilla.kernel.org/show_bug.cgi?id=203837 > > --- Comment #2 from Paul Mackerras (pau...@ozlabs.org) --- > Just tried 5.1.7 in the

Re: [Bug 203837] Booting kernel under KVM immediately freezes host

2019-06-09 Thread Nicholas Piggin
bugzilla-dae...@bugzilla.kernel.org's on June 7, 2019 4:29 pm: > https://bugzilla.kernel.org/show_bug.cgi?id=203837 > > --- Comment #2 from Paul Mackerras (pau...@ozlabs.org) --- > Just tried 5.1.7 in the host and got the guest locking up during boot. In xmon > I see one cpu in pmdp_invalidate and

Re: [PATCH 1/4] mm: Move ioremap page table mapping function to mm/

2019-06-09 Thread Nicholas Piggin
Anshuman Khandual's on June 10, 2019 3:42 pm: > > > On 06/10/2019 10:08 AM, Nicholas Piggin wrote: >> ioremap_page_range is a generic function to create a kernel virtual >> mapping, move it to mm/vmalloc.c and rename it vmap_range. > > Absolutely. It belongs in mm/vmalloc.c as its a kernel virtu

Re: [PATCH 2/4] arm64: support huge vmap vmalloc

2019-06-09 Thread Nicholas Piggin
Anshuman Khandual's on June 10, 2019 3:47 pm: > > > On 06/10/2019 10:08 AM, Nicholas Piggin wrote: >> Applying huge vmap to vmalloc requires vmalloc_to_page to walk huge >> pages. Define pud_large and pmd_large to support this. >> >> Signed-off-by: Nicholas Piggin >> --- >> arch/arm64/include/

Re: [PATCH 4/4] mm/vmalloc: Hugepage vmalloc mappings

2019-06-09 Thread Nicholas Piggin
Nicholas Piggin's on June 10, 2019 2:38 pm: > +static int vmap_hpages_range(unsigned long start, unsigned long end, > +pgprot_t prot, struct page **pages, > +unsigned int page_shift) > +{ > + BUG_ON(page_shift != PAGE_SIZE); > + return vmap_pa

Re: [PATCH 2/4] arm64: support huge vmap vmalloc

2019-06-09 Thread Anshuman Khandual
On 06/10/2019 10:08 AM, Nicholas Piggin wrote: > Applying huge vmap to vmalloc requires vmalloc_to_page to walk huge > pages. Define pud_large and pmd_large to support this. > > Signed-off-by: Nicholas Piggin > --- > arch/arm64/include/asm/pgtable.h | 2 ++ > 1 file changed, 2 insertions(+) >

Re: [PATCH 1/4] mm: Move ioremap page table mapping function to mm/

2019-06-09 Thread Anshuman Khandual
On 06/10/2019 10:08 AM, Nicholas Piggin wrote: > ioremap_page_range is a generic function to create a kernel virtual > mapping, move it to mm/vmalloc.c and rename it vmap_range. Absolutely. It belongs in mm/vmalloc.c as its a kernel virtual range. But what is the rationale of changing the name

Re: [PATCH kernel v3 0/3] powerpc/ioda2: Yet another attempt to allow DMA masks between 32 and 59

2019-06-09 Thread Alexey Kardashevskiy
On 07/06/2019 11:41, Alistair Popple wrote: > On Thursday, 6 June 2019 10:07:54 PM AEST Oliver wrote: >> On Thu, Jun 6, 2019 at 5:17 PM Alistair Popple > wrote: >>> I have been hitting EEH address errors testing this with some network >>> cards which map/unmap DMA addresses more frequently. Fo

Re: [RFC V3] mm: Generalize and rename notify_page_fault() as kprobe_page_fault()

2019-06-09 Thread Anshuman Khandual
On 06/10/2019 10:27 AM, Dave Hansen wrote: > On 6/9/19 9:34 PM, Anshuman Khandual wrote: >>> Do you really think this is easier to read? >>> >>> Why not just move the x86 version to include/linux/kprobes.h, and replace >>> the int with bool? >> Will just return bool directly without an additiona

Re: [RFC V3] mm: Generalize and rename notify_page_fault() as kprobe_page_fault()

2019-06-09 Thread Dave Hansen
On 6/9/19 9:34 PM, Anshuman Khandual wrote: >> Do you really think this is easier to read? >> >> Why not just move the x86 version to include/linux/kprobes.h, and replace >> the int with bool? > Will just return bool directly without an additional variable here as > suggested > before. But for the

[PATCH 4/4] mm/vmalloc: Hugepage vmalloc mappings

2019-06-09 Thread Nicholas Piggin
For platforms that define HAVE_ARCH_HUGE_VMAP, have vmap allow vmalloc to allocate huge pages and map them This brings dTLB misses for linux kernel tree `git diff` from 45,000 to 8,000 on a Kaby Lake KVM guest with 8MB dentry hash and mitigations=off (performance is in the noise, under 1% differen

[PATCH 3/4] powerpc/64s/radix: support huge vmap vmalloc

2019-06-09 Thread Nicholas Piggin
Applying huge vmap to vmalloc requires vmalloc_to_page to walk huge pages. Define pud_large and pmd_large to support this. Signed-off-by: Nicholas Piggin --- arch/powerpc/include/asm/book3s/64/pgtable.h | 24 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/arc

[PATCH 2/4] arm64: support huge vmap vmalloc

2019-06-09 Thread Nicholas Piggin
Applying huge vmap to vmalloc requires vmalloc_to_page to walk huge pages. Define pud_large and pmd_large to support this. Signed-off-by: Nicholas Piggin --- arch/arm64/include/asm/pgtable.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/arm64/include/asm/pgtable.h b/arch/arm64/inclu

[PATCH 1/4] mm: Move ioremap page table mapping function to mm/

2019-06-09 Thread Nicholas Piggin
ioremap_page_range is a generic function to create a kernel virtual mapping, move it to mm/vmalloc.c and rename it vmap_range. For clarity with this move, also: - Rename vunmap_page_range (vmap_range's inverse) to vunmap_range. - Rename vmap_page_range (which takes a page array) to vmap_pages. Si

Re: [RFC V3] mm: Generalize and rename notify_page_fault() as kprobe_page_fault()

2019-06-09 Thread Anshuman Khandual
On 06/07/2019 08:36 PM, Dave Hansen wrote: > On 6/7/19 3:34 AM, Anshuman Khandual wrote: >> +static nokprobe_inline bool kprobe_page_fault(struct pt_regs *regs, >> + unsigned int trap) >> +{ >> +int ret = 0; >> + >> +/* >> + * To be potentiall

Re: [RFC V3] mm: Generalize and rename notify_page_fault() as kprobe_page_fault()

2019-06-09 Thread Anshuman Khandual
On 06/08/2019 01:42 AM, Matthew Wilcox wrote: > Before: > >> @@ -46,23 +46,6 @@ kmmio_fault(struct pt_regs *regs, unsigned long addr) >> return 0; >> } >> >> -static nokprobe_inline int kprobes_fault(struct pt_regs *regs) >> -{ >> -if (!kprobes_built_in()) >> -return 0;

[PATCH 3/3] powerpc/64s/radix: Enable HAVE_ARCH_HUGE_VMAP

2019-06-09 Thread Nicholas Piggin
This sets the HAVE_ARCH_HUGE_VMAP option, and defines the required page table functions. This enables huge (2MB and 1GB) ioremap mappings. I don't have a benchmark for this change, but huge vmap will be used by a later core kernel change to enable huge vmalloc memory mappings. This improves cached

[PATCH 2/3] powerpc/64s/radix: ioremap use ioremap_page_range

2019-06-09 Thread Nicholas Piggin
Radix can use ioremap_page_range for ioremap, after slab is available. This makes it possible to enable huge ioremap mapping support. Signed-off-by: Nicholas Piggin --- arch/powerpc/include/asm/book3s/64/radix.h | 3 +++ arch/powerpc/mm/book3s64/pgtable.c | 21 + arc

[PATCH 1/3] powerpc/64: __ioremap_at clean up in the error case

2019-06-09 Thread Nicholas Piggin
__ioremap_at error handling is wonky, it requires caller to clean up after it. Implement a helper that does the map and error cleanup and remove the requirement from the caller. Signed-off-by: Nicholas Piggin --- This series is a different approach to the problem, using the generic ioremap_page_

Re: [PATCH net 0/3] ibmvnic: Fixes for device reset handling

2019-06-09 Thread David Miller
From: Thomas Falcon Date: Fri, 7 Jun 2019 16:03:52 -0500 > This series contains three unrelated fixes to issues seen during > device resets. The first patch fixes an error when the driver requests > to deactivate the link of an uninitialized device, resulting in a > failure to reset. Next, a pa

Re: [RFC V3] mm: Generalize and rename notify_page_fault() as kprobe_page_fault()

2019-06-09 Thread Anshuman Khandual
On 06/07/2019 09:01 PM, Christophe Leroy wrote: > > > Le 07/06/2019 à 12:34, Anshuman Khandual a écrit : >> Very similar definitions for notify_page_fault() are being used by multiple >> architectures duplicating much of the same code. This attempts to unify all >> of them into a generic imple

Re: [RFC V3] mm: Generalize and rename notify_page_fault() as kprobe_page_fault()

2019-06-09 Thread Anshuman Khandual
On 06/07/2019 05:33 PM, Stephen Rothwell wrote: > Hi Anshuman, > > On Fri, 7 Jun 2019 16:04:15 +0530 Anshuman Khandual > wrote: >> >> +static nokprobe_inline bool kprobe_page_fault(struct pt_regs *regs, >> + unsigned int trap) >> +{ >> +int ret =

[PATCH 4.4 145/241] cpufreq/pasemi: fix possible object reference leak

2019-06-09 Thread Greg Kroah-Hartman
[ Upstream commit a9acc26b75f652f697e02a9febe2ab0da648a571 ] The call to of_get_cpu_node returns a node pointer with refcount incremented thus it must be explicitly decremented after the last usage. Detected by coccinelle with the following warnings: ./drivers/cpufreq/pasemi-cpufreq.c:212:1-7: ER

[PATCH 4.4 163/241] ASoC: fsl_utils: fix a leaked reference by adding missing of_node_put

2019-06-09 Thread Greg Kroah-Hartman
[ Upstream commit c705247136a523488eac806bd357c3e5d79a7acd ] The call to of_parse_phandle returns a node pointer with refcount incremented thus it must be explicitly decremented after the last usage. Detected by coccinelle with the following warnings: ./sound/soc/fsl/fsl_utils.c:74:2-8: ERROR: mi

[PATCH 4.4 146/241] cpufreq: pmac32: fix possible object reference leak

2019-06-09 Thread Greg Kroah-Hartman
[ Upstream commit 8d10dc28a9ea6e8c02e825dab28699f3c72b02d9 ] The call to of_find_node_by_name returns a node pointer with refcount incremented thus it must be explicitly decremented after the last usage. Detected by coccinelle with the following warnings: ./drivers/cpufreq/pmac32-cpufreq.c:557:2-

Re: [PATCH v3 15/20] docs: move protection-keys.rst to the core-api book

2019-06-09 Thread Geert Uytterhoeven
Hi Mauro, On Fri, Jun 7, 2019 at 9:38 PM Mauro Carvalho Chehab wrote: > This document is used by multiple architectures: Indeed it is... > > $ echo $(git grep -l pkey_mprotect arch|cut -d'/' -f 2|sort|uniq) > alpha arm arm64 ia64 m68k microblaze mips parisc powerpc s390 sh > s

[Bug 155231] powerpc : native aslr vdso randomization is not working in powerpc platform

2019-06-09 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=155231 Christophe Leroy (christophe.le...@c-s.fr) changed: What|Removed |Added CC||christophe.le

[Bug 203839] Kernel 5.2-rc3 fails to boot on a PowerMac G4 3,6: systemd[1]: Failed to bump fs.file-max, ignoring: invalid argument

2019-06-09 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=203839 Christophe Leroy (christophe.le...@c-s.fr) changed: What|Removed |Added CC||christophe.le