Re: [PATCH] stm class: correct masterID range in setting via sysfs

2016-03-31 Thread Alexander Shishkin
Chunyan Zhang writes: > The type of masterID is defined as 'unsigned int', theoretically one > can set masterID with a number larger than 'INT_MAX' as long as > 'stm_data::sw_end' is larger than 'INT_MAX'. > > Also, 'stm_data::start' and 'stm_data::end' is initialized in respective > drivers

Re: [RESEND PATCH V4 1/4] stm class: provision for statically assigned masterIDs

2016-03-31 Thread Alexander Shishkin
Mathieu Poirier <mathieu.poir...@linaro.org> writes: > On 21 March 2016 at 01:47, Alexander Shishkin > <alexander.shish...@linux.intel.com> wrote: >> Chunyan Zhang <zhang.chun...@linaro.org> writes: >> >>> From: Mathieu Poirier <mathieu.poir..

Re: [RESEND PATCH V4 1/4] stm class: provision for statically assigned masterIDs

2016-03-31 Thread Alexander Shishkin
Mathieu Poirier writes: > On 21 March 2016 at 01:47, Alexander Shishkin > wrote: >> Chunyan Zhang writes: >> >>> From: Mathieu Poirier >>> >>> Some architecture like ARM assign masterIDs at the HW design >>> phase. Those are therefor

[tip:perf/core] perf/x86/intel/bts: Move transaction start/stop to start/stop callbacks

2016-03-31 Thread tip-bot for Alexander Shishkin
Commit-ID: 981a4cb380d3dff7010ce9f89618064a254eab8c Gitweb: http://git.kernel.org/tip/981a4cb380d3dff7010ce9f89618064a254eab8c Author: Alexander Shishkin <alexander.shish...@linux.intel.com> AuthorDate: Fri, 4 Mar 2016 15:42:49 +0200 Committer: Ingo Molnar <mi...@kernel.org>

[tip:perf/core] perf/x86/intel/bts: Move transaction start/stop to start/stop callbacks

2016-03-31 Thread tip-bot for Alexander Shishkin
Commit-ID: 981a4cb380d3dff7010ce9f89618064a254eab8c Gitweb: http://git.kernel.org/tip/981a4cb380d3dff7010ce9f89618064a254eab8c Author: Alexander Shishkin AuthorDate: Fri, 4 Mar 2016 15:42:49 +0200 Committer: Ingo Molnar CommitDate: Thu, 31 Mar 2016 10:30:44 +0200 perf/x86/intel/bts

[tip:perf/core] perf/x86/intel/pt: Move transaction start/stop to PMU start/stop callbacks

2016-03-31 Thread tip-bot for Alexander Shishkin
Commit-ID: 66d219014a4ee47ad4ca2b9db5fe6547353e2a56 Gitweb: http://git.kernel.org/tip/66d219014a4ee47ad4ca2b9db5fe6547353e2a56 Author: Alexander Shishkin <alexander.shish...@linux.intel.com> AuthorDate: Fri, 4 Mar 2016 15:42:48 +0200 Committer: Ingo Molnar <mi...@kernel.org>

[tip:perf/core] perf/x86/intel/pt: Move transaction start/stop to PMU start/stop callbacks

2016-03-31 Thread tip-bot for Alexander Shishkin
Commit-ID: 66d219014a4ee47ad4ca2b9db5fe6547353e2a56 Gitweb: http://git.kernel.org/tip/66d219014a4ee47ad4ca2b9db5fe6547353e2a56 Author: Alexander Shishkin AuthorDate: Fri, 4 Mar 2016 15:42:48 +0200 Committer: Ingo Molnar CommitDate: Thu, 31 Mar 2016 10:30:43 +0200 perf/x86/intel/pt

[tip:perf/core] perf/ring_buffer: Document AUX API usage

2016-03-31 Thread tip-bot for Alexander Shishkin
Commit-ID: af5bb4ed1254a378b6028c09e58bdcc1cd9bf5b3 Gitweb: http://git.kernel.org/tip/af5bb4ed1254a378b6028c09e58bdcc1cd9bf5b3 Author: Alexander Shishkin <alexander.shish...@linux.intel.com> AuthorDate: Fri, 4 Mar 2016 15:42:47 +0200 Committer: Ingo Molnar <mi...@kernel.org>

[tip:perf/core] perf/ring_buffer: Document AUX API usage

2016-03-31 Thread tip-bot for Alexander Shishkin
Commit-ID: af5bb4ed1254a378b6028c09e58bdcc1cd9bf5b3 Gitweb: http://git.kernel.org/tip/af5bb4ed1254a378b6028c09e58bdcc1cd9bf5b3 Author: Alexander Shishkin AuthorDate: Fri, 4 Mar 2016 15:42:47 +0200 Committer: Ingo Molnar CommitDate: Thu, 31 Mar 2016 10:30:43 +0200 perf/ring_buffer

[tip:perf/core] perf/core: Free AUX pages in unmap path

2016-03-31 Thread tip-bot for Alexander Shishkin
Commit-ID: 95ff4ca26c492fc1ed7751f5dd7ab7674b54f4e0 Gitweb: http://git.kernel.org/tip/95ff4ca26c492fc1ed7751f5dd7ab7674b54f4e0 Author: Alexander Shishkin <alexander.shish...@linux.intel.com> AuthorDate: Wed, 2 Dec 2015 18:41:11 +0200 Committer: Ingo Molnar <mi...@kernel.org>

[tip:perf/core] perf/ring_buffer: Refuse to begin AUX transaction after rb->aux_mmap_count drops

2016-03-31 Thread tip-bot for Alexander Shishkin
Commit-ID: dcb10a967ce82d5ad20570693091139ae716ff76 Gitweb: http://git.kernel.org/tip/dcb10a967ce82d5ad20570693091139ae716ff76 Author: Alexander Shishkin <alexander.shish...@linux.intel.com> AuthorDate: Fri, 4 Mar 2016 15:42:45 +0200 Committer: Ingo Molnar <mi...@kernel.org>

[tip:perf/core] perf/core: Free AUX pages in unmap path

2016-03-31 Thread tip-bot for Alexander Shishkin
Commit-ID: 95ff4ca26c492fc1ed7751f5dd7ab7674b54f4e0 Gitweb: http://git.kernel.org/tip/95ff4ca26c492fc1ed7751f5dd7ab7674b54f4e0 Author: Alexander Shishkin AuthorDate: Wed, 2 Dec 2015 18:41:11 +0200 Committer: Ingo Molnar CommitDate: Thu, 31 Mar 2016 10:30:42 +0200 perf/core: Free AUX

[tip:perf/core] perf/ring_buffer: Refuse to begin AUX transaction after rb->aux_mmap_count drops

2016-03-31 Thread tip-bot for Alexander Shishkin
Commit-ID: dcb10a967ce82d5ad20570693091139ae716ff76 Gitweb: http://git.kernel.org/tip/dcb10a967ce82d5ad20570693091139ae716ff76 Author: Alexander Shishkin AuthorDate: Fri, 4 Mar 2016 15:42:45 +0200 Committer: Ingo Molnar CommitDate: Thu, 31 Mar 2016 10:30:41 +0200 perf/ring_buffer

[tip:perf/core] perf/core: Don't leak event in the syscall error path

2016-03-31 Thread tip-bot for Alexander Shishkin
Commit-ID: 201c2f85bd0bc13b712d9c0b3d11251b182e06ae Gitweb: http://git.kernel.org/tip/201c2f85bd0bc13b712d9c0b3d11251b182e06ae Author: Alexander Shishkin <alexander.shish...@linux.intel.com> AuthorDate: Mon, 21 Mar 2016 10:02:42 +0200 Committer: Ingo Molnar <mi...@kernel.org>

[tip:perf/core] perf/core: Don't leak event in the syscall error path

2016-03-31 Thread tip-bot for Alexander Shishkin
Commit-ID: 201c2f85bd0bc13b712d9c0b3d11251b182e06ae Gitweb: http://git.kernel.org/tip/201c2f85bd0bc13b712d9c0b3d11251b182e06ae Author: Alexander Shishkin AuthorDate: Mon, 21 Mar 2016 10:02:42 +0200 Committer: Ingo Molnar CommitDate: Thu, 31 Mar 2016 09:54:07 +0200 perf/core: Don't

Re: [PATCH] perf: fix event leak when perf_event_open() failed to create event_file

2016-03-21 Thread Alexander Shishkin
will have called ->release() >* and that will take care of freeing the event. >*/ > - if (!event_file) > + if (IS_ERR_OR_NULL(event_file)) > free_event(event); By this time, we have already checked for IS_ERR(event_file) once, why not just fix it up there like so:

Re: [PATCH] perf: fix event leak when perf_event_open() failed to create event_file

2016-03-21 Thread Alexander Shishkin
gt;*/ > - if (!event_file) > + if (IS_ERR_OR_NULL(event_file)) > free_event(event); By this time, we have already checked for IS_ERR(event_file) once, why not just fix it up there like so: --- From: Alexander Shishkin Date: Mon, 21 Mar 2016 09:55:09 +0200 Subject: perf: Don't leak

Re: [RESEND PATCH V4 1/4] stm class: provision for statically assigned masterIDs

2016-03-21 Thread Alexander Shishkin
Chunyan Zhang writes: > From: Mathieu Poirier > > Some architecture like ARM assign masterIDs at the HW design > phase. Those are therefore unreachable to users, making masterID > management in the generic STM core irrelevant. > > In this

Re: [RESEND PATCH V4 1/4] stm class: provision for statically assigned masterIDs

2016-03-21 Thread Alexander Shishkin
Chunyan Zhang writes: > From: Mathieu Poirier > > Some architecture like ARM assign masterIDs at the HW design > phase. Those are therefore unreachable to users, making masterID > management in the generic STM core irrelevant. > > In this kind of configuration channels are shared between

Re: [PATCH v2 2/5] perf: Free aux pages in unmap path

2016-03-19 Thread Alexander Shishkin
Peter Zijlstra <pet...@infradead.org> writes: > On Mon, Mar 14, 2016 at 04:04:44PM +0200, Alexander Shishkin wrote: >> Peter Zijlstra <pet...@infradead.org> writes: > >> >> +static void perf_pmu_output_stop(struct perf_event *event) >> >> +{

Re: [PATCH v2 2/5] perf: Free aux pages in unmap path

2016-03-19 Thread Alexander Shishkin
Peter Zijlstra writes: > On Mon, Mar 14, 2016 at 04:04:44PM +0200, Alexander Shishkin wrote: >> Peter Zijlstra writes: > >> >> +static void perf_pmu_output_stop(struct perf_event *event) >> >> +{ >> >> + int cpu, err; >> >>

Re: [PATCH v2 2/5] perf: Free aux pages in unmap path

2016-03-14 Thread Alexander Shishkin
Peter Zijlstra <pet...@infradead.org> writes: > On Fri, Mar 04, 2016 at 03:42:46PM +0200, Alexander Shishkin wrote: >> @@ -4649,10 +4679,22 @@ static void perf_mmap_close(struct vm_area_struct >> *vma) >> */ >> if (rb_has_aux(rb)

Re: [PATCH v2 2/5] perf: Free aux pages in unmap path

2016-03-14 Thread Alexander Shishkin
Peter Zijlstra writes: > On Fri, Mar 04, 2016 at 03:42:46PM +0200, Alexander Shishkin wrote: >> @@ -4649,10 +4679,22 @@ static void perf_mmap_close(struct vm_area_struct >> *vma) >> */ >> if (rb_has_aux(rb) && vma->vm_pgoff == rb->aux_pgoff

Re: [PATCH 00/12] perf: more fixes

2016-03-11 Thread Alexander Shishkin
it, > and find the event wasn't actually stopped anymore. > > This would tickle a WARN in the x86-pmu code which isn't expecting to > start a !stopped event. > > Signed-off-by: Peter Zijlstra (Intel) <pet...@infradead.org> FWIW, Reviewed-by: Alexander Shishkin <alexander.shish...@linux.intel.com> Cheers, -- Alex

Re: [PATCH 00/12] perf: more fixes

2016-03-11 Thread Alexander Shishkin
n't actually stopped anymore. > > This would tickle a WARN in the x86-pmu code which isn't expecting to > start a !stopped event. > > Signed-off-by: Peter Zijlstra (Intel) FWIW, Reviewed-by: Alexander Shishkin Cheers, -- Alex

[tip:perf/core] perf/core: Fix perf_sched_count derailment

2016-03-08 Thread tip-bot for Alexander Shishkin
Commit-ID: 927a5570855836e5d5859a80ce7e91e963545e8f Gitweb: http://git.kernel.org/tip/927a5570855836e5d5859a80ce7e91e963545e8f Author: Alexander Shishkin <alexander.shish...@linux.intel.com> AuthorDate: Wed, 2 Mar 2016 13:24:14 +0200 Committer: Ingo Molnar <mi...@kernel.org>

[tip:perf/core] perf/core: Fix perf_sched_count derailment

2016-03-08 Thread tip-bot for Alexander Shishkin
Commit-ID: 927a5570855836e5d5859a80ce7e91e963545e8f Gitweb: http://git.kernel.org/tip/927a5570855836e5d5859a80ce7e91e963545e8f Author: Alexander Shishkin AuthorDate: Wed, 2 Mar 2016 13:24:14 +0200 Committer: Ingo Molnar CommitDate: Tue, 8 Mar 2016 12:18:31 +0100 perf/core: Fix

[PATCH v2 4/5] perf/x86/intel/pt: Move transaction start/stop to pmu start/stop callbacks

2016-03-04 Thread Alexander Shishkin
} to pt_event_{start,stop}. As a bonus, we get rid of pt_buffer_is_full(), which is already taken care of by perf_aux_output_begin() anyway. Signed-off-by: Alexander Shishkin <alexander.shish...@linux.intel.com> Cc: Mathieu Poirier <mathieu.poir...@linaro.org> --- arch/x86/events/int

[PATCH v2 2/5] perf: Free aux pages in unmap path

2016-03-04 Thread Alexander Shishkin
s the last AUX reference has to happen in perf_mmap_close() on that AUX area. Signed-off-by: Alexander Shishkin <alexander.shish...@linux.intel.com> --- kernel/events/core.c| 100 +++- kernel/events/internal.h| 1 - kernel/events/rin

[PATCH v2 5/5] perf/x86/intel/bts: Move transaction start/stop to start/stop callbacks

2016-03-04 Thread Alexander Shishkin
} to bts_event_{start,stop}. As a bonus, we get rid of bts_buffer_is_full(), which is already taken care of by perf_aux_output_begin() anyway. Signed-off-by: Alexander Shishkin <alexander.shish...@linux.intel.com> Cc: Mathieu Poirier <mathieu.poir...@linaro.org> --- arch/x86/events/intel

[PATCH v2 1/5] perf: Refuse to begin aux transaction after aux_mmap_count drops

2016-03-04 Thread Alexander Shishkin
. Signed-off-by: Alexander Shishkin <alexander.shish...@linux.intel.com> --- kernel/events/ring_buffer.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/kernel/events/ring_buffer.c b/kernel/events/ring_buffer.c index 1faad2cfdb..af5fbc7e91 100644 --- a/kernel/events/ring_buffer.c +++ b/

[PATCH v2 1/5] perf: Refuse to begin aux transaction after aux_mmap_count drops

2016-03-04 Thread Alexander Shishkin
. Signed-off-by: Alexander Shishkin --- kernel/events/ring_buffer.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/kernel/events/ring_buffer.c b/kernel/events/ring_buffer.c index 1faad2cfdb..af5fbc7e91 100644 --- a/kernel/events/ring_buffer.c +++ b/kernel/events/ring_buffer.c @@ -288,6

[PATCH v2 4/5] perf/x86/intel/pt: Move transaction start/stop to pmu start/stop callbacks

2016-03-04 Thread Alexander Shishkin
} to pt_event_{start,stop}. As a bonus, we get rid of pt_buffer_is_full(), which is already taken care of by perf_aux_output_begin() anyway. Signed-off-by: Alexander Shishkin Cc: Mathieu Poirier --- arch/x86/events/intel/pt.c | 85 +++--- 1 file changed, 27

[PATCH v2 2/5] perf: Free aux pages in unmap path

2016-03-04 Thread Alexander Shishkin
s the last AUX reference has to happen in perf_mmap_close() on that AUX area. Signed-off-by: Alexander Shishkin --- kernel/events/core.c| 100 +++- kernel/events/internal.h| 1 - kernel/events/ring_buffer.c | 37 +--- 3 files ch

[PATCH v2 5/5] perf/x86/intel/bts: Move transaction start/stop to start/stop callbacks

2016-03-04 Thread Alexander Shishkin
} to bts_event_{start,stop}. As a bonus, we get rid of bts_buffer_is_full(), which is already taken care of by perf_aux_output_begin() anyway. Signed-off-by: Alexander Shishkin Cc: Mathieu Poirier --- arch/x86/events/intel/bts.c | 105 1 file changed, 48

[PATCH v2 3/5] perf: Document aux api usage

2016-03-04 Thread Alexander Shishkin
In order to ensure safe aux buffer management, we rely on the assumption that pmu::stop() stops its ongoing aux transaction and not just the hw. This patch documents this requirement for perf_aux_output_{begin,end}() apis. Signed-off-by: Alexander Shishkin <alexander.shish...@linux.intel.com&

[PATCH v2 3/5] perf: Document aux api usage

2016-03-04 Thread Alexander Shishkin
In order to ensure safe aux buffer management, we rely on the assumption that pmu::stop() stops its ongoing aux transaction and not just the hw. This patch documents this requirement for perf_aux_output_{begin,end}() apis. Signed-off-by: Alexander Shishkin Cc: Mathieu Poirier --- kernel

[PATCH v2 0/5] perf: Untangle aux refcounting

2016-03-04 Thread Alexander Shishkin
Hi Peter, Here's a long overdue update of the previous attempt to untangle the aux buffer unmapping and deallocation. Most of the work is in 2/5. Alexander Shishkin (5): perf: Refuse to begin aux transaction after aux_mmap_count drops perf: Free aux pages in unmap path perf: Document aux

[PATCH v2 0/5] perf: Untangle aux refcounting

2016-03-04 Thread Alexander Shishkin
Hi Peter, Here's a long overdue update of the previous attempt to untangle the aux buffer unmapping and deallocation. Most of the work is in 2/5. Alexander Shishkin (5): perf: Refuse to begin aux transaction after aux_mmap_count drops perf: Free aux pages in unmap path perf: Document aux

[PATCH] perf: Fix perf_sched_count derailment

2016-03-02 Thread Alexander Shishkin
scheduler's jump label even though we'd still have active events in the system, thereby facilitating the arrival of the infernal regions upon us. I'm fixing this by moving account_event() inside perf_event_alloc(). Signed-off-by: Alexander Shishkin <alexander.shish...@linux.intel.com> --- kernel/

[PATCH] perf: Fix perf_sched_count derailment

2016-03-02 Thread Alexander Shishkin
scheduler's jump label even though we'd still have active events in the system, thereby facilitating the arrival of the infernal regions upon us. I'm fixing this by moving account_event() inside perf_event_alloc(). Signed-off-by: Alexander Shishkin --- kernel/events/core.c | 7 +++ 1 file changed, 3

Re: [PATCH 1/1] perf/core: find auxiliary events in running pmus list

2016-02-25 Thread Alexander Shishkin
kan.li...@intel.com writes: > From: Kan Liang > > perf_event_aux funciton goes through pmus list to find proper auxiliary > events to output. The pmus list consists of all possible pmus in the > system, that may or may not be running at the moment, while the > auxiliary

Re: [PATCH 1/1] perf/core: find auxiliary events in running pmus list

2016-02-25 Thread Alexander Shishkin
kan.li...@intel.com writes: > From: Kan Liang > > perf_event_aux funciton goes through pmus list to find proper auxiliary > events to output. The pmus list consists of all possible pmus in the > system, that may or may not be running at the moment, while the > auxiliary events must be from the

Re: [git pull] stm class/intel_th: Updates for char-misc-next

2016-02-16 Thread Alexander Shishkin
Greg KH <gre...@linuxfoundation.org> writes: > On Mon, Feb 15, 2016 at 06:08:07PM +0200, Alexander Shishkin wrote: >> Hi Greg, >> >> These are patches I have queued for the next merge window. Please >> consider pulling. >>

Re: [git pull] stm class/intel_th: Updates for char-misc-next

2016-02-16 Thread Alexander Shishkin
Greg KH writes: > On Mon, Feb 15, 2016 at 06:08:07PM +0200, Alexander Shishkin wrote: >> Hi Greg, >> >> These are patches I have queued for the next merge window. Please >> consider pulling. >> >> The following changes since commit 1b79dff672ca09a5461cc

[PATCH 01/20] stm class: Use a signed return type for stm_find_master_chan

2016-02-15 Thread Alexander Shishkin
nux.com> Signed-off-by: Alexander Shishkin <alexander.shish...@linux.intel.com> --- drivers/hwtracing/stm/core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/hwtracing/stm/core.c b/drivers/hwtracing/stm/core.c index aef8ddb244..cdec240bd6 100644 --- a/drivers/hwtrac

[PATCH 01/20] stm class: Use a signed return type for stm_find_master_chan

2016-02-15 Thread Alexander Shishkin
From: Lucas Tanure The return type "unsigned int" was used by the stm_find_master_chan function despite of the aspect that it will eventually return a negative error code. Done with the help of Coccinelle. Signed-off-by: Lucas Tanure Signed-off-by: Alexander Shishkin --- drivers

[PATCH 02/20] stm class: Fix master deallocation in device unregistering

2016-02-15 Thread Alexander Shishkin
avoid memory leaks after unloading the stm driver. Signed-off-by: Chunyan Zhang <zhang.chun...@linaro.org> [alexander.shish...@intel.com: re-wrote the commit message] Signed-off-by: Alexander Shishkin <alexander.shish...@linux.intel.com> --- drivers/hwtracing/stm/core.c | 2 +-

[PATCH 02/20] stm class: Fix master deallocation in device unregistering

2016-02-15 Thread Alexander Shishkin
unloading the stm driver. Signed-off-by: Chunyan Zhang [alexander.shish...@intel.com: re-wrote the commit message] Signed-off-by: Alexander Shishkin --- drivers/hwtracing/stm/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/hwtracing/stm/core.c b/drivers/hwtracing/stm

[PATCH 07/20] intel_th: msu: Release resources on read error

2016-02-15 Thread Alexander Shishkin
; Signed-off-by: Alexander Shishkin <alexander.shish...@linux.intel.com> --- drivers/hwtracing/intel_th/msu.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/hwtracing/intel_th/msu.c b/drivers/hwtracing/intel_th/msu.c index 3c793bbf6a..d9d6022c5a 100644 --- a

[PATCH 07/20] intel_th: msu: Release resources on read error

2016-02-15 Thread Alexander Shishkin
From: Laurent FERT Right now, reading from msc character device will leak its's user count on read error. This patch makes sure resources are released when there is no data left to read from the buffer. Signed-off-by: Laurent FERT Signed-off-by: Alexander Shishkin --- drivers/hwtracing

[PATCH 05/20] intel_th: Update scratchpad bits according to enabled output activity

2016-02-15 Thread Alexander Shishkin
the driver to automatically set scratchpad register bits according to the output configuration that's enabled. Based on work by Yann Fouassier. Signed-off-by: Yann Fouassier <yann.fouass...@intel.com> Signed-off-by: Alexander Shishkin <alexander.shish...@linux.intel.com> --- drivers/hwtrac

[PATCH 05/20] intel_th: Update scratchpad bits according to enabled output activity

2016-02-15 Thread Alexander Shishkin
the driver to automatically set scratchpad register bits according to the output configuration that's enabled. Based on work by Yann Fouassier. Signed-off-by: Yann Fouassier Signed-off-by: Alexander Shishkin --- drivers/hwtracing/intel_th/core.c | 5 + drivers/hwtracing/intel_th/gth.c

[PATCH 06/20] intel_th: msu: Fix offset for wrapped block

2016-02-15 Thread Alexander Shishkin
From: Laurent FERT <laurent.f...@intel.com> Fix offset for the second pass on the wrapped block when iterating over memory in multi-block mode, otherwise wrong part of the block will get copied. Signed-off-by: Laurent FERT <laurent.f...@intel.com> Signed-off-by: Alexan

[PATCH 06/20] intel_th: msu: Fix offset for wrapped block

2016-02-15 Thread Alexander Shishkin
From: Laurent FERT Fix offset for the second pass on the wrapped block when iterating over memory in multi-block mode, otherwise wrong part of the block will get copied. Signed-off-by: Laurent FERT Signed-off-by: Alexander Shishkin --- drivers/hwtracing/intel_th/msu.c | 2 +- 1 file changed

[PATCH 13/20] stm class: dummy_stm: Create multiple devices

2016-02-15 Thread Alexander Shishkin
STM framework should be able to handle multiple STM devices at a time, each one with its own master allocation policy. This patch changes dummy_stm driver to create multiple STM sinks to help testing the framework. Signed-off-by: Alexander Shishkin <alexander.shish...@linux.intel.

[PATCH 13/20] stm class: dummy_stm: Create multiple devices

2016-02-15 Thread Alexander Shishkin
STM framework should be able to handle multiple STM devices at a time, each one with its own master allocation policy. This patch changes dummy_stm driver to create multiple STM sinks to help testing the framework. Signed-off-by: Alexander Shishkin --- drivers/hwtracing/stm/dummy_stm.c | 57

[PATCH 12/20] stm class: Support devices with multiple instances

2016-02-15 Thread Alexander Shishkin
prohibiting dots from being used in policy names. Suggested-by: Chunyan Zhang <zhang.chun...@linaro.org> Signed-off-by: Alexander Shishkin <alexander.shish...@linux.intel.com> --- drivers/hwtracing/stm/policy.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --g

[PATCH 12/20] stm class: Support devices with multiple instances

2016-02-15 Thread Alexander Shishkin
prohibiting dots from being used in policy names. Suggested-by: Chunyan Zhang Signed-off-by: Alexander Shishkin --- drivers/hwtracing/stm/policy.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/hwtracing/stm/policy.c b/drivers/hwtracing/stm/policy.c index

[PATCH 16/20] stm class: Guard output assignment against concurrency

2016-02-15 Thread Alexander Shishkin
. Signed-off-by: Alexander Shishkin <alexander.shish...@linux.intel.com> --- drivers/hwtracing/stm/core.c | 17 + drivers/hwtracing/stm/stm.h | 1 + 2 files changed, 18 insertions(+) diff --git a/drivers/hwtracing/stm/core.c b/drivers/hwtracing/stm/core.c index 4a626d8990..f6ad

[PATCH 16/20] stm class: Guard output assignment against concurrency

2016-02-15 Thread Alexander Shishkin
. Signed-off-by: Alexander Shishkin --- drivers/hwtracing/stm/core.c | 17 + drivers/hwtracing/stm/stm.h | 1 + 2 files changed, 18 insertions(+) diff --git a/drivers/hwtracing/stm/core.c b/drivers/hwtracing/stm/core.c index 4a626d8990..f6ade21729 100644 --- a/drivers/hwtracing/stm

[PATCH 17/20] stm class: Fix unbalanced module/device refcounting

2016-02-15 Thread Alexander Shishkin
and annotates each site so that it's easier to verify correctness by reading the code. Signed-off-by: Alexander Shishkin <alexander.shish...@linux.intel.com> --- drivers/hwtracing/stm/core.c | 20 ++-- 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/drivers/hwt

[PATCH 17/20] stm class: Fix unbalanced module/device refcounting

2016-02-15 Thread Alexander Shishkin
and annotates each site so that it's easier to verify correctness by reading the code. Signed-off-by: Alexander Shishkin --- drivers/hwtracing/stm/core.c | 20 ++-- 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/drivers/hwtracing/stm/core.c b/drivers/hwtracing/stm

[PATCH 18/20] stm class: Fix a race in unlinking

2016-02-15 Thread Alexander Shishkin
the locks, it will release them and repeat the whole unlinking procedure from the beginning, unless the other contender beat us to it. Signed-off-by: Alexander Shishkin <alexander.shish...@linux.intel.com> --- drivers/hwtracing/stm/core.c | 54 ++--

[PATCH 18/20] stm class: Fix a race in unlinking

2016-02-15 Thread Alexander Shishkin
the locks, it will release them and repeat the whole unlinking procedure from the beginning, unless the other contender beat us to it. Signed-off-by: Alexander Shishkin --- drivers/hwtracing/stm/core.c | 54 ++-- 1 file changed, 42 insertions(+), 12

[PATCH 20/20] stm class: dummy_stm: Add link callback for fault injection

2016-02-15 Thread Alexander Shishkin
STM device's link callback has the power to abort master/channel assignment by returning a negative error code. Use this in dummy stm device to optionally abort assigning certain channel IDs. This is useful as fault injection into the stm class core, for testing purposes. Signed-off-by: Alexander

[PATCH 20/20] stm class: dummy_stm: Add link callback for fault injection

2016-02-15 Thread Alexander Shishkin
STM device's link callback has the power to abort master/channel assignment by returning a negative error code. Use this in dummy stm device to optionally abort assigning certain channel IDs. This is useful as fault injection into the stm class core, for testing purposes. Signed-off-by: Alexander

[PATCH 19/20] stm class: Plug stm device's unlink callback

2016-02-15 Thread Alexander Shishkin
STM device's unlink callback is never actually called from anywhere in the stm class code. This patch adds calls to stm driver's unlink method after the unlinking has succeeded. Signed-off-by: Alexander Shishkin <alexander.shish...@linux.intel.com> --- drivers/hwtracing/stm/core.

[PATCH 19/20] stm class: Plug stm device's unlink callback

2016-02-15 Thread Alexander Shishkin
STM device's unlink callback is never actually called from anywhere in the stm class code. This patch adds calls to stm driver's unlink method after the unlinking has succeeded. Signed-off-by: Alexander Shishkin --- drivers/hwtracing/stm/core.c | 23 +++ include/linux/stm.h

[PATCH 08/20] intel_th: sth: Sanitize packet callback's return values

2016-02-15 Thread Alexander Shishkin
these issues. Signed-off-by: Alexander Shishkin <alexander.shish...@linux.intel.com> --- drivers/hwtracing/intel_th/sth.c | 11 --- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/drivers/hwtracing/intel_th/sth.c b/drivers/hwtracing/intel_th/sth.c index 56101c33e1..e1ae

[PATCH 10/20] intel_th: Use real device index in the node names

2016-02-15 Thread Alexander Shishkin
Most of the intel_th core supports multiple co-existing TH devices, except for output device nodes, where intel_th device id is hardcoded to be zero. Fix this by fetching the actual intel_th device id from the parent device's drvdata. Signed-off-by: Alexander Shishkin <alexander.sh

[PATCH 11/20] stm class: Use driver's packet callback return value

2016-02-15 Thread Alexander Shishkin
the stm core will have to take appropriate action. For now, we need to account for the possibility that the stm driver may not support certain combinations of packet type/flags, in which case it is expected to signal an error. Signed-off-by: Alexander Shishkin <alexander.shish...@linux.intel.

[PATCH 08/20] intel_th: sth: Sanitize packet callback's return values

2016-02-15 Thread Alexander Shishkin
these issues. Signed-off-by: Alexander Shishkin --- drivers/hwtracing/intel_th/sth.c | 11 --- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/drivers/hwtracing/intel_th/sth.c b/drivers/hwtracing/intel_th/sth.c index 56101c33e1..e1aee61dd7 100644 --- a/drivers/hwtracing/intel_th

[PATCH 10/20] intel_th: Use real device index in the node names

2016-02-15 Thread Alexander Shishkin
Most of the intel_th core supports multiple co-existing TH devices, except for output device nodes, where intel_th device id is hardcoded to be zero. Fix this by fetching the actual intel_th device id from the parent device's drvdata. Signed-off-by: Alexander Shishkin --- drivers/hwtracing

[PATCH 11/20] stm class: Use driver's packet callback return value

2016-02-15 Thread Alexander Shishkin
the stm core will have to take appropriate action. For now, we need to account for the possibility that the stm driver may not support certain combinations of packet type/flags, in which case it is expected to signal an error. Signed-off-by: Alexander Shishkin --- drivers/hwtracing/stm/core.c | 19

[PATCH 14/20] stm class: Add heartbeat stm source device

2016-02-15 Thread Alexander Shishkin
-by: Alexander Shishkin <alexander.shish...@linux.intel.com> --- drivers/hwtracing/stm/Kconfig | 11 drivers/hwtracing/stm/Makefile| 2 + drivers/hwtracing/stm/heartbeat.c | 130 ++ 3 files changed, 143 insertions(+) create mode 100644 d

[PATCH 14/20] stm class: Add heartbeat stm source device

2016-02-15 Thread Alexander Shishkin
-by: Alexander Shishkin --- drivers/hwtracing/stm/Kconfig | 11 drivers/hwtracing/stm/Makefile| 2 + drivers/hwtracing/stm/heartbeat.c | 130 ++ 3 files changed, 143 insertions(+) create mode 100644 drivers/hwtracing/stm/heartbeat.c diff --git

[PATCH 15/20] stm class: Fix unlocking braino in the error path

2016-02-15 Thread Alexander Shishkin
does happen. This patch unifies the unlocking in the exit path of __stm_source_link_drop() to fix this. Reported-by: Laurent Fert <laurent.f...@intel.com> Signed-off-by: Alexander Shishkin <alexander.shish...@linux.intel.com> --- drivers/hwtracing/stm/core.c | 7 +++ 1 fil

[PATCH 09/20] intel_th: Set root device's drvdata early

2016-02-15 Thread Alexander Shishkin
Already during the subdevice initialization time, devices will need to reference Intel TH controller descriptor structure. This patch moves setting the drvdata from the pci glue to intel_th core, before subdevices are populated. Signed-off-by: Alexander Shishkin <alexander.sh

[PATCH 04/20] intel_th: gth: Remove commented-out code

2016-02-15 Thread Alexander Shishkin
There's a commented-out function in the GTH driver that's a leftover from previous versions of the driver, where we tried to inherit the pre-existing configuration, which didn't prove to be a sound idea. This patch removes the function. No functional changes. Signed-off-by: Alexander Shishkin

[PATCH 15/20] stm class: Fix unlocking braino in the error path

2016-02-15 Thread Alexander Shishkin
does happen. This patch unifies the unlocking in the exit path of __stm_source_link_drop() to fix this. Reported-by: Laurent Fert Signed-off-by: Alexander Shishkin --- drivers/hwtracing/stm/core.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/hwtracing/stm

[PATCH 09/20] intel_th: Set root device's drvdata early

2016-02-15 Thread Alexander Shishkin
Already during the subdevice initialization time, devices will need to reference Intel TH controller descriptor structure. This patch moves setting the drvdata from the pci glue to intel_th core, before subdevices are populated. Signed-off-by: Alexander Shishkin --- drivers/hwtracing/intel_th

[PATCH 04/20] intel_th: gth: Remove commented-out code

2016-02-15 Thread Alexander Shishkin
There's a commented-out function in the GTH driver that's a leftover from previous versions of the driver, where we tried to inherit the pre-existing configuration, which didn't prove to be a sound idea. This patch removes the function. No functional changes. Signed-off-by: Alexander Shishkin

[PATCH 00/20] stm class/intel_th: Updates for char-misc-next

2016-02-15 Thread Alexander Shishkin
Hi Greg, These are the patches I have queued for the next merge window. Please consider applying. Alexander Shishkin (16): intel_th: Depend on HAS_IOMEM intel_th: gth: Remove commented-out code intel_th: Update scratchpad bits according to enabled output activity intel_th: sth: Sanitize

[PATCH 00/20] stm class/intel_th: Updates for char-misc-next

2016-02-15 Thread Alexander Shishkin
Hi Greg, These are the patches I have queued for the next merge window. Please consider applying. Alexander Shishkin (16): intel_th: Depend on HAS_IOMEM intel_th: gth: Remove commented-out code intel_th: Update scratchpad bits according to enabled output activity intel_th: sth: Sanitize

[PATCH 03/20] intel_th: Depend on HAS_IOMEM

2016-02-15 Thread Alexander Shishkin
This driver requires io memory to operate, so don't even consider it for NO_IOMEM architectures. Reported-by: Richard Weinberger <rich...@nod.at> Signed-off-by: Alexander Shishkin <alexander.shish...@linux.intel.com> --- drivers/hwtracing/intel_th/Kconfig | 2 +- 1 file changed,

[PATCH 03/20] intel_th: Depend on HAS_IOMEM

2016-02-15 Thread Alexander Shishkin
This driver requires io memory to operate, so don't even consider it for NO_IOMEM architectures. Reported-by: Richard Weinberger Signed-off-by: Alexander Shishkin --- drivers/hwtracing/intel_th/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/hwtracing

[git pull] stm class/intel_th: Updates for char-misc-next

2016-02-15 Thread Alexander Shishkin
://github.com/virtuoso/linux-perf.git stm-for-greg for you to fetch changes up to fb756bc533ca533c2f415b74589b7172c3456b7c: stm class: dummy_stm: Add link callback for fault injection (2016-02-15 15:54:37 +0200) Alexander Shishkin (16

[git pull] stm class/intel_th: Updates for char-misc-next

2016-02-15 Thread Alexander Shishkin
://github.com/virtuoso/linux-perf.git stm-for-greg for you to fetch changes up to fb756bc533ca533c2f415b74589b7172c3456b7c: stm class: dummy_stm: Add link callback for fault injection (2016-02-15 15:54:37 +0200) Alexander Shishkin (16

Re: [PATCH] drivers: stm: correct the index in master array release

2016-02-15 Thread Alexander Shishkin
Chunyan Zhang <zhang.chun...@linaro.org> writes: > On Tue, Feb 9, 2016 at 6:12 PM, Alexander Shishkin > <alexander.shish...@linux.intel.com> wrote: >> Chunyan Zhang <zhang.chun...@linaro.org> writes: >> >>> It would be broken if stm_data->sw_st

Re: [PATCH] drivers: stm: correct the index in master array release

2016-02-15 Thread Alexander Shishkin
Chunyan Zhang writes: > On Tue, Feb 9, 2016 at 6:12 PM, Alexander Shishkin > wrote: >> Chunyan Zhang writes: >> >>> It would be broken if stm_data->sw_start isn't zero, because that >>> stp_master_free() get the 'master' with __stm_master()/stm_master(),

[QUEUED v20160212 18/19] stm class: Plug stm device's unlink callback

2016-02-12 Thread Alexander Shishkin
STM device's unlink callback is never actually called from anywhere in the stm class code. This patch adds calls to stm driver's unlink method after the unlinking has succeeded. Signed-off-by: Alexander Shishkin --- drivers/hwtracing/stm/core.c | 23 +++ include/linux/stm.h

[QUEUED v20160212 19/19] stm class: dummy_stm: Add link callback for fault injection

2016-02-12 Thread Alexander Shishkin
STM device's link callback has the power to abort master/channel assignment by returning a negative error code. Use this in dummy stm device to optionally abort assigning certain channel IDs. This is useful as fault injection into the stm class core, for testing purposes. Signed-off-by: Alexander

[QUEUED v20160212 13/19] stm class: Add heartbeat stm source device

2016-02-12 Thread Alexander Shishkin
-by: Alexander Shishkin --- drivers/hwtracing/stm/Kconfig | 11 drivers/hwtracing/stm/Makefile| 2 + drivers/hwtracing/stm/heartbeat.c | 130 ++ 3 files changed, 143 insertions(+) create mode 100644 drivers/hwtracing/stm/heartbeat.c diff --git

[QUEUED v20160212 12/19] stm class: dummy_stm: Create multiple devices

2016-02-12 Thread Alexander Shishkin
STM framework should be able to handle multiple STM devices at a time, each one with its own master allocation policy. This patch changes dummy_stm driver to create multiple STM sinks to help testing the framework. Signed-off-by: Alexander Shishkin --- drivers/hwtracing/stm/dummy_stm.c | 57

[QUEUED v20160212 17/19] stm class: Fix a race in unlinking

2016-02-12 Thread Alexander Shishkin
the locks, it will release them and repeat the whole unlinking procedure from the beginning, unless the other contender beat us to it. Signed-off-by: Alexander Shishkin --- drivers/hwtracing/stm/core.c | 54 ++-- 1 file changed, 42 insertions(+), 12

[QUEUED v20160212 16/19] stm class: Fix unbalanced module/device refcounting

2016-02-12 Thread Alexander Shishkin
and annotates each site so that it's easier to verify correctness by reading the code. Signed-off-by: Alexander Shishkin --- drivers/hwtracing/stm/core.c | 20 ++-- 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/drivers/hwtracing/stm/core.c b/drivers/hwtracing/stm

[QUEUED v20160212 14/19] stm class: Fix unlocking braino in the error path

2016-02-12 Thread Alexander Shishkin
does happen. This patch unifies the unlocking in the exit path of __stm_source_link_drop() to fix this. Reported-by: Laurent Fert Signed-off-by: Alexander Shishkin --- drivers/hwtracing/stm/core.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/hwtracing/stm

[QUEUED v20160212 15/19] stm class: Guard output assignment against concurrency

2016-02-12 Thread Alexander Shishkin
. Signed-off-by: Alexander Shishkin --- drivers/hwtracing/stm/core.c | 17 + drivers/hwtracing/stm/stm.h | 1 + 2 files changed, 18 insertions(+) diff --git a/drivers/hwtracing/stm/core.c b/drivers/hwtracing/stm/core.c index fb5a6a582b..6a254ce4b9 100644 --- a/drivers/hwtracing/stm

[QUEUED v20160212 11/19] stm class: Support devices with multiple instances

2016-02-12 Thread Alexander Shishkin
prohibiting dots from being used in policy names. Suggested-by: Chunyan Zhang Signed-off-by: Alexander Shishkin --- drivers/hwtracing/stm/policy.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/hwtracing/stm/policy.c b/drivers/hwtracing/stm/policy.c index

<    9   10   11   12   13   14   15   16   17   18   >