[PATCH 2/2] perf/power/hv-24x7: Use kmem_cache_free() instead of kfree

2014-12-09 Thread Sukadev Bhattiprolu
From 982bf5a660ae33fbe2f9187187caa6752c66783d Mon Sep 17 00:00:00 2001 From: Sukadev Bhattiprolu Date: Wed, 10 Dec 2014 01:43:34 -0500 Subject: [PATCH 2/2] power/perf: hv-24x7: Use kmem_cache_free() instead of kfree Use kmem_cache_free() to free a buffer allocated with kmem_cache_alloc(). Signe

[PATCH 1/2] perf/powerpc/hv-24x7: Use per-cpu page buffer

2014-12-09 Thread Sukadev Bhattiprolu
From 470c16c8955672103a9529c78dffbb239e9e27b8 Mon Sep 17 00:00:00 2001 From: Sukadev Bhattiprolu Date: Tue, 9 Dec 2014 22:17:46 -0500 Subject: [PATCH 1/2] perf/poweprc/hv-24x7: Use per-cpu page buffer The 24x7 counters are continuously running and not updated on an interrupt. So we record the eve

Re: [RFC PATCH 0/8] Fix perf probe issues on powerpc

2014-12-09 Thread Ananth N Mavinakayanahalli
On Tue, Dec 09, 2014 at 11:03:58PM +0530, Naveen N. Rao wrote: > This patchset fixes various issues with perf probe on powerpc > across ABIv1 and ABIv2: > - in the presence of DWARF debug-info, > - in the absence of DWARF, but with the symbol table, and > - in the absence of debug-info, but with ka

Re: [RFC PATCH 8/8] perf probe powerpc: Fixup function entry if using kallsyms lookup

2014-12-09 Thread Ananth N Mavinakayanahalli
On Tue, Dec 09, 2014 at 06:14:00PM -0300, Arnaldo Carvalho de Melo wrote: > Em Tue, Dec 09, 2014 at 11:04:06PM +0530, Naveen N. Rao escreveu: > > On powerpc ABIv2, if no debug-info is found and we use kallsyms, > > we need to fixup the function entry to point to the local entry point. > > Use offse

Re: [PATCH V4] powerpc: add little endian flag to syscall_get_arch()

2014-12-09 Thread Richard Guy Briggs
On 14/12/10, Michael Ellerman wrote: > On Tue, 2014-12-09 at 21:11 -0500, Paul Moore wrote: > > On Tuesday, December 09, 2014 03:37:07 PM Richard Guy Briggs wrote: > > > Since both ppc and ppc64 have LE variants which are now reported by uname, > > > add that flag (__AUDIT_ARCH_LE) to syscall_get_a

Re: [PATCH V4] powerpc: add little endian flag to syscall_get_arch()

2014-12-09 Thread Michael Ellerman
On Tue, 2014-12-09 at 21:11 -0500, Paul Moore wrote: > On Tuesday, December 09, 2014 03:37:07 PM Richard Guy Briggs wrote: > > Since both ppc and ppc64 have LE variants which are now reported by uname, > > add that flag (__AUDIT_ARCH_LE) to syscall_get_arch() and add > > AUDIT_ARCH_PPC64LE variant.

Re: [PATCH 2 1/4] powerpc: drop the ability to tweak SMT mode at boot time

2014-12-09 Thread Michael Ellerman
On Tue, 2014-12-09 at 18:14 -0600, Scott Wood wrote: > On Wed, 2014-12-10 at 10:56 +1100, Michael Ellerman wrote: > > On Tue, 2014-12-09 at 15:04 -0600, Scott Wood wrote: > > > On Tue, 2014-12-09 at 15:11 +1100, Michael Ellerman wrote: > > > > On Fri, 2014-12-05 at 12:52 -0600, Scott Wood wrote: >

Re: [PATCH V4] powerpc: add little endian flag to syscall_get_arch()

2014-12-09 Thread Paul Moore
On Tuesday, December 09, 2014 03:37:07 PM Richard Guy Briggs wrote: > Since both ppc and ppc64 have LE variants which are now reported by uname, > add that flag (__AUDIT_ARCH_LE) to syscall_get_arch() and add > AUDIT_ARCH_PPC64LE variant. > > Without this, perf trace and auditctl fail. > > Mainl

Re: [PATCH 2 1/4] powerpc: drop the ability to tweak SMT mode at boot time

2014-12-09 Thread Scott Wood
On Wed, 2014-12-10 at 10:56 +1100, Michael Ellerman wrote: > On Tue, 2014-12-09 at 15:04 -0600, Scott Wood wrote: > > On Tue, 2014-12-09 at 15:11 +1100, Michael Ellerman wrote: > > > On Fri, 2014-12-05 at 12:52 -0600, Scott Wood wrote: > > > > On Fri, 2014-12-05 at 16:14 +0100, Greg Kurz wrote: > >

Re: [PATCH 2 1/4] powerpc: drop the ability to tweak SMT mode at boot time

2014-12-09 Thread Michael Ellerman
On Tue, 2014-12-09 at 15:04 -0600, Scott Wood wrote: > On Tue, 2014-12-09 at 15:11 +1100, Michael Ellerman wrote: > > On Fri, 2014-12-05 at 12:52 -0600, Scott Wood wrote: > > > On Fri, 2014-12-05 at 16:14 +0100, Greg Kurz wrote: > > > > The smt-enabled kernel parameter basically leaves unwanted cpu

Re: [RFC PATCH 8/8] perf probe powerpc: Fixup function entry if using kallsyms lookup

2014-12-09 Thread Arnaldo Carvalho de Melo
Em Tue, Dec 09, 2014 at 11:04:06PM +0530, Naveen N. Rao escreveu: > On powerpc ABIv2, if no debug-info is found and we use kallsyms, > we need to fixup the function entry to point to the local entry point. > Use offset of 8 since current toolchains always generate 2 > instructions (8 bytes). Hi Mi

Re: [RFC PATCH 2/8] perf probe powerpc: Fix symbol fixup issues due to ELF type

2014-12-09 Thread Arnaldo Carvalho de Melo
Em Tue, Dec 09, 2014 at 11:04:00PM +0530, Naveen N. Rao escreveu: > If using the symbol table, symbol addresses are not being fixed up > properly, resulting in probes being placed at wrong addresses: > > # perf probe do_fork > Added new event: > probe:do_fork(on do_fork) > > You

Re: [PATCH 2 1/4] powerpc: drop the ability to tweak SMT mode at boot time

2014-12-09 Thread Scott Wood
On Tue, 2014-12-09 at 15:11 +1100, Michael Ellerman wrote: > On Fri, 2014-12-05 at 12:52 -0600, Scott Wood wrote: > > On Fri, 2014-12-05 at 16:14 +0100, Greg Kurz wrote: > > > The smt-enabled kernel parameter basically leaves unwanted cpus executing > > > in firmware or wherever they happen to be.

Re: [PATCH] powerpc: secondary CPUs signal to master before setting active and online (fixes kernel BUG at kernel/smpboot.c:134!)

2014-12-09 Thread Linus Torvalds
On Mon, Dec 8, 2014 at 3:58 PM, Anton Blanchard wrote: > Hi Ingo, > >> At that point I thought the previous task_cpu() was somewhat ingrained >> in the scheduler and came up with the patch. If not, we could go on a >> hunt to see what else needs fixing. > > I had another look. The scheduled does i

[PATCH V4] powerpc: add little endian flag to syscall_get_arch()

2014-12-09 Thread Richard Guy Briggs
Since both ppc and ppc64 have LE variants which are now reported by uname, add that flag (__AUDIT_ARCH_LE) to syscall_get_arch() and add AUDIT_ARCH_PPC64LE variant. Without this, perf trace and auditctl fail. Mainline kernel reports ppc64le (per a058801) but there is no matching AUDIT_ARCH_PPC64

[PATCH 1/1] uio: uio_fsl_elbc_gpcm: new driver

2014-12-09 Thread John Ogness
This driver provides UIO access to memory of a peripheral connected to the Freescale enhanced local bus controller (eLBC) interface using the general purpose chip-select mode (GPCM). Signed-off-by: John Ogness --- There are currently drivers that use FCM and UPM modes. But there are no drivers us

Re: [PATCH 1/1] uio: uio_fsl_elbc_gpcm: new driver

2014-12-09 Thread Scott Wood
[Trimmed excessive CC list] On Tue, 2014-12-09 at 17:43 +0100, John Ogness wrote: > This driver provides UIO access to memory of a peripheral connected > to the Freescale enhanced local bus controller (eLBC) interface > using the general purpose chip-select mode (GPCM). > > Signed-off-by: John Og

Re: linux-next: build failure after merge of the access_once tree

2014-12-09 Thread Christian Borntraeger
Am 08.12.2014 um 12:26 schrieb Stephen Rothwell: > Hi Christian, > > After merging the acess_once tree, today's linux-next build (powerpc > allnoconfig) failed like this: > > arch/powerpc/mm/hugetlbpage.c: In function 'find_linux_pte_or_hugepte': > arch/powerpc/mm/hugetlbpage.c:981:3: error: inva

[PATCH v4 4/4] powernv: powerpc: Add winkle support for offline cpus

2014-12-09 Thread Shreyas B. Prabhu
Winkle is a deep idle state supported in power8 chips. A core enters winkle when all the threads of the core enter winkle. In this state power supply to the entire chiplet i.e core, private L2 and private L3 is turned off. As a result it gives higher powersavings compared to sleep. But entering wi

[PATCH v4 3/4] powernv: cpuidle: Redesign idle states management

2014-12-09 Thread Shreyas B. Prabhu
Deep idle states like sleep and winkle are per core idle states. A core enters these states only when all the threads enter either the particular idle state or a deeper one. There are tasks like fastsleep hardware bug workaround and hypervisor core state save which have to be done only by the last

[PATCH v4 2/4] powerpc/powernv: Enable Offline CPUs to enter deep idle states

2014-12-09 Thread Shreyas B. Prabhu
The secondary threads should enter deep idle states so as to gain maximum powersavings when the entire core is offline. To do so the offline path must be made aware of the available deepest idle state. Hence probe the device tree for the possible idle states in powernv core code and expose the deep

[PATCH v4 1/4] powerpc: powernv: Switch off MMU before entering nap/sleep/rvwinkle mode

2014-12-09 Thread Shreyas B. Prabhu
From: Paul Mackerras Currently, when going idle, we set the flag indicating that we are in nap mode (paca->kvm_hstate.hwthread_state) and then execute the nap (or sleep or rvwinkle) instruction, all with the MMU on. This is bad for two reasons: (a) the architecture specifies that those instructi

[PATCH v4 0/4] powernv: cpuidle: Redesign idle states management

2014-12-09 Thread Shreyas B. Prabhu
Deep idle states like sleep and winkle are per core idle states. A core enters these states only when all the threads enter either the particular idle state or a deeper one. There are tasks like fastsleep hardware bug workaround and hypervisor core state save which have to be done only by the last

[PATCH V2] powerpc: Fix compile errors with STRICT_MM_TYPECHECKS enabled

2014-12-09 Thread Aneesh Kumar K.V
Signed-off-by: Aneesh Kumar K.V --- Changes from V1 * Don't enable STRICT_MM_TYPECHECK for upstream arch/powerpc/include/asm/kvm_book3s_64.h | 12 +++- arch/powerpc/include/asm/pgtable.h | 4 ++-- arch/powerpc/mm/fsl_booke_mmu.c | 2 +- arch/powerpc/mm/pgtable_64.c

[PATCH] powerpc: Fix compile errors with STRICT_MM_TYPECHECKS enabled

2014-12-09 Thread Aneesh Kumar K.V
Signed-off-by: Aneesh Kumar K.V --- arch/powerpc/include/asm/kvm_book3s_64.h | 12 +++- arch/powerpc/include/asm/page.h | 2 +- arch/powerpc/include/asm/pgtable.h | 4 ++-- arch/powerpc/mm/fsl_booke_mmu.c | 2 +- arch/powerpc/mm/pgtable_64.c | 2 +-

[RFC PATCH 8/8] perf probe powerpc: Fixup function entry if using kallsyms lookup

2014-12-09 Thread Naveen N. Rao
On powerpc ABIv2, if no debug-info is found and we use kallsyms, we need to fixup the function entry to point to the local entry point. Use offset of 8 since current toolchains always generate 2 instructions (8 bytes). Signed-off-by: Naveen N. Rao --- tools/perf/util/probe-event.c | 9 +

[RFC PATCH 7/8] perf probe powerpc: Use DWARF info only if necessary

2014-12-09 Thread Naveen N. Rao
Use symbol table lookups by default if DWARF is not necessary, since powerpc ABIv2 encodes local entry points in the symbol table and the function entry address in DWARF may not be appropriate for kprobes, as described here: https://sourceware.org/bugzilla/show_bug.cgi?id=17638 Signed-off-by: Nave

[RFC PATCH 6/8] perf tools powerpc: Fix PPC64 ELF ABIv2 symbol decoding

2014-12-09 Thread Naveen N. Rao
PPC64 ELF ABIv2 has a Global Entry Point (GEP) and a Local Entry Point (LEP). For purposes of probing, we need the LEP. Offset to the LEP is encoded in st_other. Signed-off-by: Ananth N Mavinakayanahalli Signed-off-by: Naveen N. Rao --- tools/perf/arch/powerpc/Makefile | 1 + tool

[RFC PATCH 5/8] perf probe powerpc: Allow matching against dot symbols

2014-12-09 Thread Naveen N. Rao
Allow perf probe to work on powerpc ABIv1 without the need to specify the leading dot '.' for functions. 'perf probe do_fork' works with this patch. Signed-off-by: Naveen N. Rao --- tools/perf/util/probe-event.c | 9 + 1 file changed, 9 insertions(+) diff --git a/tools/perf/util/probe-e

[RFC PATCH 4/8] perf probe powerpc: Handle powerpc dot symbols

2014-12-09 Thread Naveen N. Rao
Fix up various perf aspects related to ppc64's usage of dot functions: - ignore leading '.' when generating event names and when looking for existing events. - use the proper prefix when ignoring SyS symbol lookups. Signed-off-by: Naveen N. Rao --- tools/perf/util/probe-event.c | 8 t

[RFC PATCH 3/8] perf probe: Improve detection of file/function name in the probe pattern

2014-12-09 Thread Naveen N. Rao
Currently, perf probe considers patterns including a '.' to be a file. However, this causes problems on powerpc ABIv1 where all functions have a leading '.': $ perf probe -F | grep schedule_timeout_interruptible .schedule_timeout_interruptible $ perf probe .schedule_timeout_interruptible S

[RFC PATCH 2/8] perf probe powerpc: Fix symbol fixup issues due to ELF type

2014-12-09 Thread Naveen N. Rao
If using the symbol table, symbol addresses are not being fixed up properly, resulting in probes being placed at wrong addresses: # perf probe do_fork Added new event: probe:do_fork(on do_fork) You can now use it in all perf tools, such as: perf record -e probe:do_for

[RFC PATCH 0/8] Fix perf probe issues on powerpc

2014-12-09 Thread Naveen N. Rao
This patchset fixes various issues with perf probe on powerpc across ABIv1 and ABIv2: - in the presence of DWARF debug-info, - in the absence of DWARF, but with the symbol table, and - in the absence of debug-info, but with kallsyms. Applies cleanly on v3.18 and on -tip with minor changes to patch

[RFC PATCH 1/8] kprobes: Fix kallsyms lookup across powerpc ABIv1 and ABIv2

2014-12-09 Thread Naveen N. Rao
Currently, all non-dot symbols are being treated as function descriptors in ABIv1. This is incorrect and is resulting in perf probe not working: # perf probe do_fork Added new event: Failed to write event: Invalid argument Error: Failed to add events. # dmesg | tail -1 [192268.073063

Re: powerpc32: missing accessors to pgprot_t objects

2014-12-09 Thread Aneesh Kumar K.V
Michael Ellerman writes: > On Mon, 2014-08-12 at 14:16:29 UTC, LEROY Christophe wrote: >> Compilation with #define STRICT_MM_TYPECHECKS in >> arch/powerpc/include/asm/page.h >> fails due to missing use of pgprot_val() when using pgprot_t objects. > > Hmm, looks like 64 bit doesn't build either.

Re: [v3] i2c: Driver to expose PowerNV platform i2c busses

2014-12-09 Thread Neelesh Gupta
On 12/09/2014 03:15 PM, Michael Ellerman wrote: On Mon, 2014-08-12 at 06:36:16 UTC, Neelesh Gupta wrote: The patch exposes the available i2c busses on the PowerNV platform to the kernel and implements the bus driver to support i2c and smbus commands. The driver uses the platform device infrastr

Re: [1/5] powerpc: Fix handling of DSCR related facility unavailable exception

2014-12-09 Thread Anshuman Khandual
On 12/09/2014 03:41 PM, Michael Ellerman wrote: > On Mon, 2014-08-12 at 06:30:08 UTC, Anshuman Khandual wrote: >> Currently DSCR (Data Stream Control Register) can be accessed with >> mfspr or mtspr instructions inside a thread via two different SPR >> numbers. One being the user accessible problem

Re: [4/5] powerpc, dscr: Added some in-code documentation

2014-12-09 Thread Anshuman Khandual
On 12/09/2014 03:33 PM, Michael Ellerman wrote: > On Mon, 2014-08-12 at 06:30:11 UTC, Anshuman Khandual wrote: >> This patch adds some in-code documentation to the DSCR related >> code to make it more readable without having any functional >> change to it. > > Adding documentation is always good,

Re: [v3] i2c: Driver to expose PowerNV platform i2c busses

2014-12-09 Thread Benjamin Herrenschmidt
On Tue, 2014-12-09 at 20:45 +1100, Michael Ellerman wrote: > On Mon, 2014-08-12 at 06:36:16 UTC, Neelesh Gupta wrote: > > The patch exposes the available i2c busses on the PowerNV platform > > to the kernel and implements the bus driver to support i2c and > > smbus commands. > > The driver uses the

Re: powerpc32: missing accessors to pgprot_t objects

2014-12-09 Thread Michael Ellerman
On Mon, 2014-08-12 at 14:16:29 UTC, LEROY Christophe wrote: > Compilation with #define STRICT_MM_TYPECHECKS in > arch/powerpc/include/asm/page.h > fails due to missing use of pgprot_val() when using pgprot_t objects. Hmm, looks like 64 bit doesn't build either. Aneesh I think you added this, min

Re: powerpc32: missing accessors to pgprot_t objects

2014-12-09 Thread Benjamin Herrenschmidt
On Tue, 2014-12-09 at 21:06 +1100, Michael Ellerman wrote: > On Mon, 2014-08-12 at 14:16:29 UTC, LEROY Christophe wrote: > > Compilation with #define STRICT_MM_TYPECHECKS in > > arch/powerpc/include/asm/page.h > > fails due to missing use of pgprot_val() when using pgprot_t objects. > > Any idea

Re: [1/5] powerpc: Fix handling of DSCR related facility unavailable exception

2014-12-09 Thread Michael Ellerman
On Mon, 2014-08-12 at 06:30:08 UTC, Anshuman Khandual wrote: > Currently DSCR (Data Stream Control Register) can be accessed with > mfspr or mtspr instructions inside a thread via two different SPR > numbers. One being the user accessible problem state SPR number 0x03 > and the other being the priv

Re: powerpc32: missing accessors to pgprot_t objects

2014-12-09 Thread Michael Ellerman
On Mon, 2014-08-12 at 14:16:29 UTC, LEROY Christophe wrote: > Compilation with #define STRICT_MM_TYPECHECKS in > arch/powerpc/include/asm/page.h > fails due to missing use of pgprot_val() when using pgprot_t objects. Any idea when this broke? Recently, or has it gone unnoticed for a long time? c

Re: [4/5] powerpc, dscr: Added some in-code documentation

2014-12-09 Thread Michael Ellerman
On Mon, 2014-08-12 at 06:30:11 UTC, Anshuman Khandual wrote: > This patch adds some in-code documentation to the DSCR related > code to make it more readable without having any functional > change to it. Adding documentation is always good, but ... > diff --git a/arch/powerpc/include/asm/processo

Re: [v3] i2c: Driver to expose PowerNV platform i2c busses

2014-12-09 Thread Michael Ellerman
On Mon, 2014-08-12 at 06:36:16 UTC, Neelesh Gupta wrote: > The patch exposes the available i2c busses on the PowerNV platform > to the kernel and implements the bus driver to support i2c and > smbus commands. > The driver uses the platform device infrastructure to probe the busses > on the platform

Re: [PATCH v3] i2c: Driver to expose PowerNV platform i2c busses

2014-12-09 Thread Benjamin Herrenschmidt
On Tue, 2014-12-09 at 09:54 +0100, Wolfram Sang wrote: > > > Oh, I thought we agreed that you take it via powerpc. I still think this > > > is the best solution. > > > > I threatened to do that :-) I don't remember you replying, did I miss > > it ? > It is here: > http://thread.gmane.org/gmane.li

Re: [PATCH v3] i2c: Driver to expose PowerNV platform i2c busses

2014-12-09 Thread Wolfram Sang
> > Oh, I thought we agreed that you take it via powerpc. I still think this > > is the best solution. > > I threatened to do that :-) I don't remember you replying, did I miss > it ? It is here: http://thread.gmane.org/gmane.linux.drivers.i2c/20762/focus=21099 > If you are ok with the driver an

Re: [PATCH 2 1/4] powerpc: drop the ability to tweak SMT mode at boot time

2014-12-09 Thread Greg Kurz
On Tue, 09 Dec 2014 15:11:02 +1100 Michael Ellerman wrote: > On Fri, 2014-12-05 at 12:52 -0600, Scott Wood wrote: > > On Fri, 2014-12-05 at 16:14 +0100, Greg Kurz wrote: > > > The smt-enabled kernel parameter basically leaves unwanted cpus executing > > > in firmware or wherever they happen to be