Re: staging/wilc1000: wrong conversion to completion?

2016-07-19 Thread Binoy Jayan
On 11 July 2016 at 13:38, Arnd Bergmann wrote: > On Monday, July 11, 2016 9:41:15 AM CEST Jiri Slaby wrote: >> Hi, >> >> while looking at this commit: >> >> commit b27a6d5e636ac80b223a18ca2b3c892f1caef9e3 >> Author: Binoy Jayan >> Date: Wed

[PATCH] staging: wilc1000: txq_event: Fix coding error

2016-07-21 Thread Binoy Jayan
Fix incorrect usage of completion interface by replacing 'wait_for_completion' with 'complete'. This error was introduced accidentally while replacing semaphores with mutexes. Reported-by: Jiri Slaby Signed-off-by: Binoy Jayan --- drivers/staging/wilc1000/linux_wlan.c | 2 +

[RFC PATCH v7 0/5] *** Latency histograms ***

2016-09-20 Thread Binoy Jayan
t: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit/?h=v3.14-rt-rebase&id=56d50cc34943bbba12b8c5942ee1ae3b29f73acb Latency Hist article: https://www.osadl.org/Single-View.111+M538f5aa49d6.0.html Switchtime latency:http://www.spinics.net/lists/linux-r

[RFC PATCH v7 2/5] tracing: Add hist trigger support for generic fields

2016-09-20 Thread Binoy Jayan
From: Daniel Wagner Whenever a trace is printed the generic fields (CPU, COMM) are reconstructed (see trace_print_context()). CPU is taken from the trace_iterator and COMM is extracted from the savedcmd map (see __trace_find_cmdline()). We can't reconstruct this information for hist events. Ther

[RFC PATCH v7 1/5] tracing: Dereference pointers without RCU checks

2016-09-20 Thread Binoy Jayan
o avoid this is by disabling the consistency checks. We also need to take care of the iterating in trace_events_trigger.c to avoid a splatter in conjunction with the hist trigger. Signed-off-by: Daniel Wagner Signed-off-by: Binoy Jayan --- include/linux/rculist.

[RFC PATCH v7 4/5] tracing: Measure delayed hrtimer offset latency

2016-09-20 Thread Binoy Jayan
p;id=56d50cc34943bbba12b8c5942ee1ae3b29f73acb ] Cc: Carsten Emde Signed-off-by: Binoy Jayan --- include/linux/hrtimer.h | 4 include/linux/sched.h | 3 +++ kernel/time/Kconfig | 8 kernel/time/hrtimer.c | 47 +++ 4 files changed, 62 insertions(+)

[RFC PATCH v7 5/5] tracing: wakeup latency events and histograms

2016-09-20 Thread Binoy Jayan
echo wakeup > current_tracer [ Initial work and idea by Carsten Link: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit/?h=v3.14-rt-rebase&id=56d50cc34943bbba12b8c5942ee1ae3b29f73acb ] Cc: Carsten Emde Signed-off-by: Binoy Jayan --- inclu

[RFC PATCH v7 3/5] tracing: Add preemptirqsoff timing events

2016-09-20 Thread Binoy Jayan
was taken from the RT patch. - RFC using hist infrastructure code by Daniel. - Got it re-written in shape as Daniel suggested to take over author ship. ] Cc: Carsten Emde Cc: Daniel Wagner Signed-off-by: Binoy Jayan --- include/trace/events/latency.h | 62 +

Re: [RFC PATCH v7 4/5] tracing: Measure delayed hrtimer offset latency

2016-09-20 Thread Binoy Jayan
On 20 September 2016 at 19:49, Thomas Gleixner wrote: > On Tue, 20 Sep 2016, Binoy Jayan wrote: >> +#ifdef CONFIG_TRACE_DELAYED_TIMER_OFFSETS >> +static inline void latency_hrtimer_timing_start(struct hrtimer *timer, >> + struct hrtimer

Re: [RFC PATCH v7 4/5] tracing: Measure delayed hrtimer offset latency

2016-09-22 Thread Binoy Jayan
Hi Thomas, Thank you for the reply and sharing your insights. On 21 September 2016 at 21:28, Thomas Gleixner wrote: > Sorry. This has nothing to do with changing the hrtimer_base, simply > because the time base is the same on all cpus. The condition 'ktime_to_ns(tim) < ktime_to_ns(now)' checks

[PATCH] staging: unisys: visorbus: Replace semaphore with mutex

2016-06-19 Thread Binoy Jayan
The semaphore 'visordriver_callback_lock' is a simple mutex, so it should be written as one. Semaphores are going away in the future. Signed-off-by: Binoy Jayan --- drivers/staging/unisys/include/visorbus.h | 3 ++- drivers/staging/unisys/visorbus/visorbus_main.c | 14 +++

[PATCH v2 1/2] staging: wilc1000: message_queue: Move code to host interface

2016-06-20 Thread Binoy Jayan
Move the contents of wilc_msgqueue.c and wilc_msgqueue.h into host_interface.c, remove 'wilc_msgqueue.c' and 'wilc_msgqueue.h'. This is done so as to restructure the implementation of the kthread 'hostIFthread' using a work queue. Signed-off-by: Binoy Jay

[PATCH v2 0/2] *** staging: wilc1000: Replace semaphores ***

2016-06-20 Thread Binoy Jayan
not having a 'dedicated' thread for each. Split the patch to seperate interface changes to 'wilc_mq_send' No easy way found to split the patch to change the interface 'wilc_mq_send' and to 'wilc_enqueue_cmd' as the parameters 'mq' 'send_

[PATCH v2 2/2] staging: wilc1000: Replace kthread with workqueue for host interface

2016-06-20 Thread Binoy Jayan
_if_work'. Signed-off-by: Binoy Jayan Reviewed-by: Arnd Bergmann --- drivers/staging/wilc1000/TODO | 5 + drivers/staging/wilc1000/host_interface.c | 542 +++--- 2 files changed, 198 insertions(+), 349 deletions(-) diff --git a/drivers/staging/wilc1000/T

[PATCH 0/2] *** Latency Histogram ***

2016-07-27 Thread Binoy Jayan
Hi, I was looking at these RT kernel patches and was wondering why it has not been upstreamed yet. I have made a few changes to these patches to make it compliant with upstream submission process. Also did a minimal testing on my msm board. Can some one from rt kernel team shed some light on why t

[PATCH 1/2] tracing: Add latency histograms

2016-07-27 Thread Binoy Jayan
: Thomas Gleixner Signed-off-by: Binoy Jayan --- Documentation/trace/histograms.txt | 186 ++ include/linux/hrtimer.h |3 + include/linux/sched.h |6 + include/trace/events/hist.h | 72 +++ include/trace/events/latency_hist.h | 136 + kernel/time

[PATCH 2/2] trace: Add missing tracer macros

2016-07-27 Thread Binoy Jayan
From: Yang Shi When building rt kernel with IRQSOFF_TRACER enabled but INTERRUPT_OFF_HIST or PREEMPT_OFF_HIST disabled, the below build failure will be triggered: | kernel/trace/trace_irqsoff.c: In function 'time_hardirqs_on': | kernel/trace/trace_irqsoff.c:453:2: error: implicit declaration of

[PATCH v6 0/4] *** Latency histograms - IRQSOFF,PREEMPTOFF, Delayed HRTIMERS ***

2016-09-07 Thread Binoy Jayan
: https://lkml.org/lkml/2016/8/30/188 v3: https://lkml.org/lkml/2016/8/29/50 v2: https://lkml.org/lkml/2016/8/24/296 v4 -> v5: - Add hist trigger support for generic fields - hrtimer latency event moved to hrtimer event headers - Cleanup -Binoy Binoy Jayan (2): tracing: Add trace_irqs

[PATCH v6 1/4] tracing: Deference pointers without RCU checks

2016-09-07 Thread Binoy Jayan
o avoid this is by disabling the consistency checks. We also need to take care of the iterating in trace_events_trigger.c to avoid a splatter in conjunction with the hist trigger. Signed-off-by: Daniel Wagner Signed-off-by: Binoy Jayan --- include/linux/rculist.

[PATCH v6 3/4] tracing: Add trace_irqsoff tracepoints

2016-09-07 Thread Binoy Jayan
-stable-rt.git/commit/?h=v3.14-rt-rebase&id=56d50cc34943bbba12b8c5942ee1ae3b29f73acb Signed-off-by: Binoy Jayan --- include/trace/events/latency.h | 56 ++ kernel/trace/trace_irqsoff.c | 35 ++ 2 files changed, 91 inserti

[PATCH v6 2/4] tracing: Add hist trigger support for generic fields

2016-09-07 Thread Binoy Jayan
From: Daniel Wagner Whenever a trace is printed the generic fields (CPU, COMM) are reconstructed (see trace_print_context()). CPU is taken from the trace_iterator and COMM is extracted from the savedcmd map (see __trace_find_cmdline()). We can't reconstruct this information for hist events. Ther

[PATCH v6 4/4] tracing: Histogram for delayed hrtimer offsets

2016-09-07 Thread Binoy Jayan
this latency. The following filter(s) may be used 'hist:key=common_pid.execname:val=toffset,hitcount' 'hist:key=cpu,tcomm:val=toffset:sort=tcomm' 'hist:key=comm,tcomm:sort=comm,tcomm' Signed-off-by: Binoy Jayan --- include/linux/hrtimer.h | 3 +++ inc

Re: [PATCH v6 4/4] tracing: Histogram for delayed hrtimer offsets

2016-09-08 Thread Binoy Jayan
[Adding Carsten in cc ] Thank you Thomas for reviewing this and providing insights. On 8 September 2016 at 12:40, Thomas Gleixner wrote: > On Wed, 7 Sep 2016, Binoy Jayan wrote: >> diff --git a/include/linux/hrtimer.h b/include/linux/hrtimer.h >> index 5e00f80..9146842 100644 &

Re: [PATCH v6 3/4] tracing: Add trace_irqsoff tracepoints

2016-09-13 Thread Binoy Jayan
Hi Thomas, Sorry for the late reply. I was trying out some way to do it the way you suggested. Tried to talk to Carsten regarding the hrtimer latency patch but was unable to. On 8 September 2016 at 13:36, Thomas Gleixner wrote: > On Wed, 7 Sep 2016, Binoy Jayan wrote: >> This captures

Re: [PATCH v3 2/3] tracing: Add trace_irqsoff tracepoints

2016-08-30 Thread Binoy Jayan
Hi Daniel/Steven, On 30 August 2016 at 20:32, Daniel Wagner wrote: > On 08/30/2016 04:20 PM, Daniel Wagner wrote: >> Just setting the size of the type is not enough. The hist_field_* >> getter function want to know the offset too: > > With this hack here it should work. The COMM generic field is

Re: [PATCH v4 3/3] tracing: Histogram for missed timer offsets

2016-08-31 Thread Binoy Jayan
On 30 August 2016 at 19:45, Steven Rostedt wrote: > On Tue, 30 Aug 2016 15:58:44 +0530 > Binoy Jayan wrote: > >> + >> + TP_STRUCT__entry( >> + __field(long long, toffset) >> + __array(char, ccomm, TASK_COMM_LEN) >

Re: [PATCH v4 2/3] tracing: Add trace_irqsoff tracepoints

2016-08-31 Thread Binoy Jayan
Hi Steven/Daniel, On 30 August 2016 at 19:38, Steven Rostedt wrote: >> + >> + TP_printk("ltype=%d, latency=%lu", >> + __entry->ltype, (unsigned long) __entry->latency) > > The print of ltype should be text and not a number. Well, you could > have both text and a number, but a numb

[PATCH v5 3/4] tracing: Add trace_irqsoff tracepoints

2016-09-02 Thread Binoy Jayan
-stable-rt.git/commit/?h=v3.14-rt-rebase&id=56d50cc34943bbba12b8c5942ee1ae3b29f73acb Signed-off-by: Binoy Jayan --- include/trace/events/latency.h | 50 ++ kernel/trace/trace_irqsoff.c | 35 + 2 files changed, 85 inserti

[PATCH v5 4/4] tracing: Histogram for delayed hrtimer offsets

2016-09-02 Thread Binoy Jayan
this latency. The following filter(s) may be used 'hist:key=common_pid.execname:val=toffset,hitcount' 'hist:key=cpu,tcomm:val=toffset:sort=tcomm' 'hist:key=common_pid.execname,tcomm' Signed-off-by: Binoy Jayan --- include/linux/hrtimer.h| 3 +++ inclu

[PATCH v5 1/4] tracing: Deference pointers without RCU checks

2016-09-02 Thread Binoy Jayan
o avoid this is by disabling the consistency checks. We also need to take care of the iterating in trace_events_trigger.c to avoid a splatter in conjunction with the hist trigger. Signed-off-by: Daniel Wagner Signed-off-by: Binoy Jayan --- include/linux/rculist.

[PATCH v5 0/4] *** Latency histograms - IRQSOFF,PREEMPTOFF ***

2016-09-02 Thread Binoy Jayan
ch to mark the generic field cpu as a key field and make it part of histogram output - Changed ambiguous function names TODO: 1. kselftest test scripts 2. delayed hrtimer offset test scenario Thanks, Binoy Binoy Jayan (3): tracing: Add cpu as a key field in histogram tracing: Add tra

[PATCH v5 2/4] tracing: Add cpu as a key field in histogram

2016-09-02 Thread Binoy Jayan
The field 'cpu' although part of the set of generic fields, is not made part of the key fields when mentioned in the trigger command. This hack suggested by Daniel marks it as one of the key fields and make it appear in the histogram output. Signed-off-by: Binoy Jayan --- ke

Re: [PATCH v4 3/3] tracing: Histogram for missed timer offsets

2016-09-02 Thread Binoy Jayan
On 30 August 2016 at 16:20, Masami Hiramatsu wrote: > Hi Binoy, >> >> +static inline void trace_latency_hrtimer_mark_ts(struct hrtimer *timer, >> +struct hrtimer_clock_base *new_base, >> +ktime_t tim) >> +{ >> +#if def

[PATCH v2 1/3] tracing: Deference pointers without RCU checks

2016-08-24 Thread Binoy Jayan
From: Daniel Wagner The tracepoint can't be used in code section where we are in the middle of a state transition. For example if we place a tracepoint inside start/stop_critical_section(), lockdep complains with [0.035589] WARNING: CPU: 0 PID: 3 at kernel/locking/lockdep.c:3560 \ check_fla

[PATCH v2 2/3] tracing: Add trace_irqsoff tracepoints

2016-08-24 Thread Binoy Jayan
has to be captured to calculate the effective latencies introduced for individual processes. Initial work - latency.patch [1] https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit/?h=v3.14-rt-rebase&id=56d50cc34943bbba12b8c5942ee1ae3b29f73acb Signed-off-by: Binoy Jayan -

[PATCH v2 0/3] *** Latency histograms - IRQSOFF,PREEMPTOFF ***

2016-08-24 Thread Binoy Jayan
Then, at the event end trigger the histogram, pick timestamp from the map by using context "key" and calculate the difference. Basically this needs is a "map" which can be accessed from both the events, .i.e that is the "global variable". Binoy Binoy Ja

[PATCH v2 3/3] tracing: Histogram for missed timer offsets

2016-08-24 Thread Binoy Jayan
'hist:key=common_pid.execname,cpu:val=toffset,hitcount' Signed-off-by: Binoy Jayan --- include/linux/hrtimer.h| 3 +++ include/trace/events/latency.h | 31 +++ kernel/time/hrtimer.c | 39 +++ 3 files changed, 73

Re: [PATCH v2 0/3] *** Latency histograms - IRQSOFF,PREEMPTOFF ***

2016-08-24 Thread Binoy Jayan
On 25 August 2016 at 10:56, Daniel Wagner wrote: > Hi Binoy, > > On 08/24/2016 01:17 PM, Binoy Jayan wrote: >> >> Histogram output: >> cat /sys/kernel/debug/tracing/events/latency/latency_irqs/hist >> cat /sys/kernel/debug/tracing/events/latency/latency_pree

Re: [PATCH v2 1/3] tracing: Deference pointers without RCU checks

2016-08-25 Thread Binoy Jayan
On 26 August 2016 at 07:19, Masami Hiramatsu wrote: > On Wed, 24 Aug 2016 16:47:28 +0530 >> "__local_bh_enable() tests if this is the last SOFTIRQ_OFFSET, if so it >> tells lockdep softirqs are enabled with trace_softirqs_on() after that >> we go an actually modify the preempt_count with preempt_c

[PATCH v6 2/2] crypto: Multikey template for essiv

2017-06-21 Thread Binoy Jayan
for which it was written for. The underlying IV generator 'essiv-aes-du512-dx' generates IV for every 512 byte blocks. Signed-off-by: Binoy Jayan --- drivers/md/dm-crypt.c|5 +- drivers/staging/ccree/Makefile |2 +- drivers/staging/ccr

[PATCH v6 1/2] crypto: Add IV generation algorithms

2017-06-21 Thread Binoy Jayan
to encrypt/decrypt a sector are processed sequentially. Asynchronous requests if processed in parallel, are freed in the async callback. The storage space for the initialization vectors are allocated in the iv generator implementations. Interface to the crypto layer - include/crypto/geniv.h Signed-off

[PATCH v6 0/2] IV Generation algorithms for dm-crypt

2017-06-21 Thread Binoy Jayan
ation for sub-requests using mempool v1 --> v2 -- 1. dm-crypt changes to process larger block sizes (one segment in a bio) 2. Incorporated changes w.r.t. comments from Herbert. Binoy Jayan (2): crypto: Add IV generation algorithms crypto: Multikey template for essiv drivers/md

Re: [RFC PATCH v2] crypto: Add IV generation algorithms

2017-01-04 Thread Binoy Jayan
Hi Herbert, On 2 January 2017 at 12:23, Herbert Xu wrote: > On Mon, Jan 02, 2017 at 12:16:45PM +0530, Binoy Jayan wrote: > > Right. The actual number of underlying tfms that do the work > won't change compared to the status quo. We're just structuring > it such that

[RFC PATCH v3] IV Generation algorithms for dm-crypt

2017-01-18 Thread Binoy Jayan
allel and is freed in the async callback. 4. Changed allocation for sub-requests using mempool v1 --> v2 -- 1. dm-crypt changes to process larger block sizes (one segment in a bio) 2. Incorporated changes w.r.t. comments from Herbert. Binoy Jayan (1): crypto: Add IV generation algor

[RFC PATCH v3] crypto: Add IV generation algorithms

2017-01-18 Thread Binoy Jayan
ude/crypto/geniv.h Signed-off-by: Binoy Jayan --- drivers/md/dm-crypt.c | 1891 ++-- include/crypto/geniv.h | 47 ++ 2 files changed, 1399 insertions(+), 539 deletions(-) create mode 100644 include/crypto/geniv.h diff --git a/drivers/md/dm-crypt.c b/dri

Re: [RFC PATCH v3] crypto: Add IV generation algorithms

2017-01-18 Thread Binoy Jayan
Hi Gilad, On 18 January 2017 at 20:51, Gilad Ben-Yossef wrote: > I have some review comments and a bug report - Thank you very much for testing this on ARM and for the comments. > I'm pretty sure this needs to be > > n2 = bio_segments(ctx->bio_out); Yes you are right, that was a typo :) >> +

Re: [RFC PATCH v3] crypto: Add IV generation algorithms

2017-01-19 Thread Binoy Jayan
Hi Gilad, On 19 January 2017 at 15:17, Gilad Ben-Yossef wrote: > I tried adding sg_init_table() where I thought it was appropriate and > it didn't resolve the issue. > > For what it's worth, my guess is that the difference between our > setups is not related to Arm but to other options or the sto

[PATCH v3 0/3] *** staging: wilc1000: Replace semaphores ***

2016-06-22 Thread Binoy Jayan
erface 'wilc_mq_send' in a different patch - Avoid change in indentation in host_if_work and move it to a different patch Cannot remove forward declaraition for 'host_if_work' since there is a mutual dependency. Binoy Binoy Jayan (3): staging: wilc1000: mes

[PATCH v3 1/3] staging: wilc1000: message_queue: Move code to host interface

2016-06-22 Thread Binoy Jayan
Move the contents of wilc_msgqueue.c and wilc_msgqueue.h into host_interface.c, remove 'wilc_msgqueue.c' and 'wilc_msgqueue.h'. This is done so as to restructure the implementation of the kthread 'hostIFthread' using a work queue. Signed-off-by: Binoy Jayan --- dri

[PATCH v3 2/3] staging: wilc1000: Replace kthread with workqueue for host interface

2016-06-22 Thread Binoy Jayan
_if_work'. Signed-off-by: Binoy Jayan --- drivers/staging/wilc1000/TODO | 5 + drivers/staging/wilc1000/host_interface.c | 282 -- 2 files changed, 75 insertions(+), 212 deletions(-) diff --git a/drivers/staging/wilc1000/TODO b/drivers/staging/wilc10

[PATCH v3 3/3] staging: wilc1000: Change interface wilc_mq_send to wilc_enqueue_cmd

2016-06-22 Thread Binoy Jayan
Replace the interface 'wilc_mq_send' with 'wilc_enqueue_cmd' and remove the now unused structures 'message' and 'message_queue'. Restructure switch statement in the work queue helper function host_if_work and remove unwanted indentation. Signed-off-by: Bi

[PATCH v4 1/3] staging: wilc1000: message_queue: Move code to host interface

2016-06-22 Thread Binoy Jayan
Move the contents of wilc_msgqueue.c and wilc_msgqueue.h into host_interface.c, remove 'wilc_msgqueue.c' and 'wilc_msgqueue.h'. This is done so as to restructure the implementation of the kthread 'hostIFthread' using a work queue. Signed-off-by: Binoy Jayan --- dri

[PATCH v4 0/3] *** staging: wilc1000: Replace semaphores ***

2016-06-22 Thread Binoy Jayan
_mq_send' in a different patch - Avoid change in indentation in host_if_work and move it to a different patch Cannot remove forward declaration of local function 'host_if_work' since there is a mutual dependency. New changes in v4 Remove unused identifier 'hif_msg_q' which

[PATCH v4 3/3] staging: wilc1000: Change interface wilc_mq_send to wilc_enqueue_cmd

2016-06-22 Thread Binoy Jayan
Replace the interface 'wilc_mq_send' with 'wilc_enqueue_cmd' and remove the now unused structures 'message' and 'message_queue'. Restructure switch statement in the work queue helper function host_if_work and remove unwanted indentation. Signed-off-by: Bi

[PATCH v4 2/3] staging: wilc1000: Replace kthread with workqueue for host interface

2016-06-22 Thread Binoy Jayan
_if_work'. Signed-off-by: Binoy Jayan --- drivers/staging/wilc1000/TODO | 5 + drivers/staging/wilc1000/host_interface.c | 282 -- 2 files changed, 75 insertions(+), 212 deletions(-) diff --git a/drivers/staging/wilc1000/TODO b/drivers/staging/wilc10

[PATCH v2 0/5] *** staging: wilc1000: Replace semaphores with mutexes or completions ***

2016-06-14 Thread Binoy Jayan
. Whitespace removed in patch 3 2. Removed semaphore 'close_exit_sync' 3. To rework on patch 6 and send in a seperate patch series Binoy Jayan (5): staging: wilc1000: Replace semaphore txq_event with completion staging: wilc1000: Replace semaphore txq_add_to_head_cs with mutex

[PATCH v2 1/5] staging: wilc1000: Replace semaphore txq_event with completion

2016-06-14 Thread Binoy Jayan
The semaphore 'txq_event' is used as completion, so convert it to a struct completion type. Signed-off-by: Binoy Jayan --- drivers/staging/wilc1000/linux_wlan.c | 8 drivers/staging/wilc1000/wilc_wfi_netdevice.h | 3 ++- drivers/staging/wilc1000/wilc_wlan.c

[PATCH v3 0/5] *** staging: wilc1000: Replace semaphores with mutexes or completions ***

2016-06-14 Thread Binoy Jayan
. Whitespace removed in patch 3 2. Removed semaphore 'close_exit_sync' 3. To rework on patch 6 and send in a seperate patch series Binoy Jayan (5): staging: wilc1000: Replace semaphore txq_event with completion staging: wilc1000: Replace semaphore txq_add_to_head_cs with mutex

[PATCH v3 2/5] staging: wilc1000: Replace semaphore txq_add_to_head_cs with mutex

2016-06-14 Thread Binoy Jayan
The semaphore 'txq_add_to_head_cs' is a simple mutex, so it should be written as one. Semaphores are going away in the future. Also, removing the timeout scenario as the error handling code does not propagate the timeout properly. Signed-off-by: Binoy Jayan Reviewed-by: Arn

[PATCH v3 3/5] staging: wilc1000: Replace semaphore cfg_event with completion

2016-06-14 Thread Binoy Jayan
The semaphore 'cfg_event' is used as completion, so convert it to a struct completion type. Signed-off-by: Binoy Jayan Reviewed-by: Arnd Bergmann --- drivers/staging/wilc1000/linux_wlan.c | 2 +- drivers/staging/wilc1000/wilc_wfi_netdevice.h | 2 +- drivers/stagin

[PATCH v3 4/5] staging: wilc1000: Replace semaphore sync_event with completion

2016-06-14 Thread Binoy Jayan
The semaphore 'sync_event' is used as completion, so convert it to a struct completion type. Also, return -ETIME if the return value of wait_for_completion_timeout is 0. Signed-off-by: Binoy Jayan Reviewed-by: Arnd Bergmann --- drivers/staging/wilc1000/linux_wlan.c

[PATCH v3 1/5] staging: wilc1000: Replace semaphore txq_event with completion

2016-06-14 Thread Binoy Jayan
The semaphore 'txq_event' is used as completion, so convert it to a struct completion type. Signed-off-by: Binoy Jayan Reviewed-by: Arnd Bergmann --- drivers/staging/wilc1000/linux_wlan.c | 8 drivers/staging/wilc1000/wilc_wfi_netdevice.h | 3 ++- drivers/stagin

[PATCH v3 5/5] staging: wilc1000: Remove semaphore close_exit_sync

2016-06-14 Thread Binoy Jayan
n the device is used. Signed-off-by: Binoy Jayan Reviewed-by: Arnd Bergmann --- drivers/staging/wilc1000/linux_wlan.c | 7 --- 1 file changed, 7 deletions(-) diff --git a/drivers/staging/wilc1000/linux_wlan.c b/drivers/staging/wilc1000/linux_wlan.c index 39fe350..f87a30f 100644 --- a/driv

[PATCH v2] staging: gdm724x: Replace semaphore netlink with mutex

2016-06-14 Thread Binoy Jayan
Replace semaphore netlink_mutex with mutex. Semaphores are going away in the future. Signed-off-by: Binoy Jayan Reviewed-by: Arnd Bergmann --- drivers/staging/gdm724x/netlink_k.c | 11 +-- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/drivers/staging/gdm724x/netlink_k.c

[PATCH 1/5] rtl8192e: rtllib_device: Replace semaphore wx_sem with mutex

2016-06-01 Thread Binoy Jayan
The semaphore 'wx_sem' in the rtllib_device is a simple mutex, so it should be written as one. Semaphores are going away in the future. Signed-off-by: Binoy Jayan --- drivers/staging/rtl8192e/rtl8192e/rtl_core.c | 4 +-- drivers/staging/rtl8192e/rtllib.h| 5 ++-- drive

[PATCH 2/5] rtl8192e: r8192_priv: Replace semaphore wx_sem with mutex

2016-06-01 Thread Binoy Jayan
The semaphore 'wx_sem' in the r8192_priv is a simple mutex, so it should be written as one. Semaphores are going away in the future. Signed-off-by: Binoy Jayan --- This patch depends on the following patch: rtl8192e: rtllib_device: Replace semaphore wx_sem with mutex drivers/stagin

[PATCH 0/5] *** rtl8192e: Replace semaphore with mutex ***

2016-06-01 Thread Binoy Jayan
following hardware: "RealTek RTL8192E Wireless LAN NIC driver" Thanks, Binoy Binoy Jayan (5): rtl8192e: rtllib_device: Replace semaphore wx_sem with mutex rtl8192e: r8192_priv: Replace semaphore wx_sem with mutex rtl8192e: Replace semaphore rf_sem with mutex rtl8192e: Replace

[PATCH 3/5] rtl8192e: Replace semaphore rf_sem with mutex

2016-06-01 Thread Binoy Jayan
The semaphore 'rf_sem' in the rtl8192e is a simple mutex, so it should be written as one. Semaphores are going away in the future. Signed-off-by: Binoy Jayan --- This patch depends on the following patch: rtl8192e: r8192_priv: Replace semaphore wx_sem with mutex drivers/stagin

[PATCH 5/5] rtl8192e: Replace semaphore ips_sem with mutex

2016-06-01 Thread Binoy Jayan
The semaphore 'ips_sem' in the rtl8192e is a simple mutex, so it should be written as one. Semaphores are going away in the future. Signed-off-by: Binoy Jayan --- This patch depends on the following patch: rtl8192e: Replace semaphore scan_sem with mutex drivers/staging/rtl8192

[PATCH 4/5] rtl8192e: Replace semaphore scan_sem with mutex

2016-06-01 Thread Binoy Jayan
The semaphore 'scan_sem' in the rtl8192e is a simple mutex, so it should be written as one. Semaphores are going away in the future. Signed-off-by: Binoy Jayan --- This patch depends on the following patch: rtl8192e: Replace semaphore rf_sem with mutex drivers/staging/rtl8192

[PATCH v2 4/4] rtl8712: pwrctrl_priv: Replace semaphore lock with mutex

2016-06-01 Thread Binoy Jayan
ecks the return code here. Hence, using mutex_lock instead of the interruptible version. Removing the now unused _enter_pwrlock and _down_sema. Signed-off-by: Binoy Jayan --- This patch depends on the following patch: rtl8712: intf_priv: Replace semaphore lock with completion drivers/staging/rtl

[PATCH v2 3/4] rtl8712: intf_priv: Replace semaphore lock with completion

2016-06-01 Thread Binoy Jayan
The semaphore 'lock' in 'intf_priv' is used as completion, so convert it to a struct completion type. Signed-off-by: Binoy Jayan --- This patch depends on the following patch: rtl8712: Replace semaphore terminate_cmdthread_sema with completion drivers/staging/rtl8712

[PATCH v2 1/4] rtl8712: Replace semaphore cmd_queue_sema with completion

2016-06-01 Thread Binoy Jayan
The semaphore 'cmd_queue_sema' is used as completion, so convert it to a struct completion type. Signed-off-by: Binoy Jayan --- drivers/staging/rtl8712/os_intfs.c| 2 +- drivers/staging/rtl8712/rtl8712_cmd.c | 2 +- drivers/staging/rtl8712/rtl871x_cmd.c | 6 +++--

[PATCH v2 0/4] *** rtl8712: Replace semaphores with mutex / completions ***

2016-06-01 Thread Binoy Jayan
ents w.r.t. PATCH v1: - Removed wrapper functions _wait_completion, _down_sema and _enter_pwrlock - Updated changelog to explain use of mutex_lock instead of mutex_lock_interruptible in [PATCH v2 4/4] Binoy Binoy Jayan (4): rtl8712: Replace semaphore cmd_queue_sema with completion rtl871

[PATCH v2 2/4] rtl8712: Replace semaphore terminate_cmdthread_sema with completion

2016-06-01 Thread Binoy Jayan
The semaphore 'terminate_cmdthread_sema' is used as completion, so convert it to a struct completion type. Signed-off-by: Binoy Jayan --- This patch depends on the following patch: rtl8712: Replace semaphore cmd_queue_sema with completion drivers/staging/rtl8712/os_intfs.c| 2 +

[PATCH 1/4] rtl8192u: r8192_priv: Replace semaphore wx_sem with mutex

2016-06-01 Thread Binoy Jayan
The semaphore 'wx_sem' in r8192_priv is a simple mutex, so it should be written as one. Semaphores are going away in the future. Signed-off-by: Binoy Jayan --- drivers/staging/rtl8192u/r8192U.h | 2 +- drivers/staging/rtl8192u/r8192U_core.c | 28 ++-- drivers/stagin

[PATCH 4/4] rtl8192u: Replace semaphore rf_sem with mutex

2016-06-01 Thread Binoy Jayan
The semaphore 'rf_sem' in rtl8192u is a simple mutex, so it should be written as one. Semaphores are going away in the future. Signed-off-by: Binoy Jayan --- This patch depends on the following patch: rtl8192u: Replace semaphore scan_sem with mutex drivers/staging/rtl8192u/r8192U.

[PATCH 2/4] rtl8192u: ieee80211_device: Replace semaphore wx_sem with mutex

2016-06-01 Thread Binoy Jayan
The semaphore 'wx_sem' in ieee80211_device is a simple mutex, so it should be written as one. Semaphores are going away in the future. Signed-off-by: Binoy Jayan --- This patch depends on the following patch: rtl8192u: r8192_priv: Replace semaphore wx_sem with mutex drivers/stagin

[PATCH 0/4] *** rtl8192u: Replace semaphores with mutexes ***

2016-06-01 Thread Binoy Jayan
Hi, These are a set of patches which removes semaphores from: drivers/staging/rtl8192u They build correctly (individually and as a whole). NB: I have not tested this as I do not have the following hardware: "RealTek RTL8192U Wireless LAN NIC driver" Thanks, Binoy Binoy Jayan (4):

[PATCH 3/4] rtl8192u: Replace semaphore scan_sem with mutex

2016-06-01 Thread Binoy Jayan
The semaphore 'scan_sem' in rtl8192u is a simple mutex, so it should be written as one. Semaphores are going away in the future. Signed-off-by: Binoy Jayan --- This patch depends on the following patch: rtl8192u: ieee80211_device: Replace semaphore wx_sem with mutex drivers/stagin

[PATCH v2 1/4] rtl8192u: r8192_priv: Replace semaphore wx_sem with mutex

2016-06-02 Thread Binoy Jayan
The semaphore 'wx_sem' in r8192_priv is a simple mutex, so it should be written as one. Semaphores are going away in the future. Signed-off-by: Binoy Jayan --- drivers/staging/rtl8192u/r8192U.h | 2 +- drivers/staging/rtl8192u/r8192U_core.c | 28 ++-- drivers/stagin

[PATCH v2 0/4] *** rtl8192u: Replace semaphores with mutexes ***

2016-06-02 Thread Binoy Jayan
ad of replacing it with a mutex. Thanks, Binoy Binoy Jayan (4): rtl8192u: r8192_priv: Replace semaphore wx_sem with mutex rtl8192u: ieee80211_device: Replace semaphore wx_sem with mutex rtl8192u: Replace semaphore scan_sem with mutex rtl8192u: Remove unused semaphore rf_sem driv

[PATCH v2 4/4] rtl8192u: Remove unused semaphore rf_sem

2016-06-02 Thread Binoy Jayan
The semaphore 'rf_sem' in rtl8192u has no users, hence removing it. Signed-off-by: Binoy Jayan --- This patch depends on the following patch: rtl8192u: Replace semaphore scan_sem with mutex drivers/staging/rtl8192u/r8192U.h | 1 - drivers/staging/rtl8192u/r8192U_core.c | 1

[PATCH v2 3/4] rtl8192u: Replace semaphore scan_sem with mutex

2016-06-02 Thread Binoy Jayan
The semaphore 'scan_sem' in rtl8192u is a simple mutex, so it should be written as one. Semaphores are going away in the future. Signed-off-by: Binoy Jayan --- This patch depends on the following patch: rtl8192u: ieee80211_device: Replace semaphore wx_sem with mutex drivers/stagin

[PATCH v2 2/4] rtl8192u: ieee80211_device: Replace semaphore wx_sem with mutex

2016-06-02 Thread Binoy Jayan
The semaphore 'wx_sem' in ieee80211_device is a simple mutex, so it should be written as one. Semaphores are going away in the future. Signed-off-by: Binoy Jayan --- This patch depends on the following patch: rtl8192u: r8192_priv: Replace semaphore wx_sem with mutex drivers/stagin

Re: [PATCH v2 8/8] IB/mlx5: Add helper mlx5_ib_post_send_wait

2016-10-26 Thread Binoy Jayan
On 27 October 2016 at 11:35, Leon Romanovsky wrote: > On Tue, Oct 25, 2016 at 06:46:58PM +0530, Binoy Jayan wrote: >> On 25 October 2016 at 17:56, Leon Romanovsky wrote: >> > On Tue, Oct 25, 2016 at 05:31:59PM +0530, Binoy Jayan wrote: >> >> > In case of suc

[PATCH v4 06/10] IB/hns: Replace counting semaphore event_sem with wait_event

2016-10-27 Thread Binoy Jayan
Counting semaphores are going away in the future, so replace the semaphore mthca_cmd::event_sem with a conditional wait_event. Signed-off-by: Binoy Jayan --- drivers/infiniband/hw/hns/hns_roce_cmd.c| 46 - drivers/infiniband/hw/hns/hns_roce_device.h | 2 +- 2

[PATCH v4 03/10] IB/hns: Replace semaphore poll_sem with mutex

2016-10-27 Thread Binoy Jayan
The semaphore 'poll_sem' is a simple mutex, so it should be written as one. Semaphores are going away in the future. So replace it with a mutex. Also, remove mutex_[un]lock from mthca_cmd_use_events and mthca_cmd_use_polling respectively. Signed-off-by: Binoy Jayan --- drivers/infinib

[PATCH v4 01/10] IB/core: iwpm_nlmsg_request: Replace semaphore with completion

2016-10-27 Thread Binoy Jayan
Semaphore sem in iwpm_nlmsg_request is used as completion, so convert it to a struct completion type. Semaphores are going away in the future. Signed-off-by: Binoy Jayan --- drivers/infiniband/core/iwpm_msg.c | 8 drivers/infiniband/core/iwpm_util.c | 7 +++ drivers/infiniband

[PATCH v4 07/10] IB/mthca: Replace counting semaphore event_sem with wait_event

2016-10-27 Thread Binoy Jayan
Counting semaphores are going away in the future, so replace the semaphore mthca_cmd::event_sem with a conditional wait_event. Signed-off-by: Binoy Jayan --- drivers/infiniband/hw/mthca/mthca_cmd.c | 47 ++--- drivers/infiniband/hw/mthca/mthca_dev.h | 3 ++- 2 files

[PATCH v4 02/10] IB/core: Replace semaphore sm_sem with an atomic wait

2016-10-27 Thread Binoy Jayan
The semaphore 'sm_sem' is used for an exclusive ownership of the device so model the same as an atomic variable with an associated wait_event. Semaphores are going away in the future. Signed-off-by: Binoy Jayan --- drivers/infiniband/core/user_mad.c | 20 ++-- 1 file c

[PATCH v4 00/10] infiniband: Remove semaphores

2016-10-27 Thread Binoy Jayan
eon Romanovsky Thanks, Binoy Binoy Jayan (10): IB/core: iwpm_nlmsg_request: Replace semaphore with completion IB/core: Replace semaphore sm_sem with an atomic wait IB/hns: Replace semaphore poll_sem with mutex IB/mthca: Replace semaphore poll_sem with mutex IB/isert: Replace semaphore sem w

[PATCH v4 04/10] IB/mthca: Replace semaphore poll_sem with mutex

2016-10-27 Thread Binoy Jayan
The semaphore 'poll_sem' is a simple mutex, so it should be written as one. Semaphores are going away in the future. So replace it with a mutex. Also, remove mutex_[un]lock from mthca_cmd_use_events and mthca_cmd_use_polling respectively. Signed-off-by: Binoy Jayan --- drivers/inf

[PATCH v4 10/10] IB/mlx5: Simplify completion into a wait_event

2016-10-27 Thread Binoy Jayan
Convert the completion 'mlx5_ib_umr_context:done' to a wait_event as it just waits for the return value to be filled. Signed-off-by: Binoy Jayan --- drivers/infiniband/hw/mlx5/mlx5_ib.h | 2 +- drivers/infiniband/hw/mlx5/mr.c | 9 + include/rdma/ib_verbs.h

[PATCH v4 08/10] IB/mlx5: Add helper mlx5_ib_post_send_wait

2016-10-27 Thread Binoy Jayan
the semaphore, which can then be rewritten to use something else. Signed-off-by: Binoy Jayan --- drivers/infiniband/hw/mlx5/mr.c | 115 +++- 1 file changed, 32 insertions(+), 83 deletions(-) diff --git a/drivers/infiniband/hw/mlx5/mr.c b/drivers/infiniband/h

[PATCH v4 05/10] IB/isert: Replace semaphore sem with completion

2016-10-27 Thread Binoy Jayan
The semaphore 'sem' in isert_device is used as completion, so convert it to struct completion. Semaphores are going away in the future. Signed-off-by: Binoy Jayan --- drivers/infiniband/ulp/isert/ib_isert.c | 6 +++--- drivers/infiniband/ulp/isert/ib_isert.h | 3 ++- 2 files

[PATCH v4 09/10] IB/mlx5: Replace semaphore umr_common:sem with wait_event

2016-10-27 Thread Binoy Jayan
Remove semaphore umr_common:sem used to limit concurrent access to umr qp and introduce an atomic value 'users' to keep track of the same. Use a wait_event to block when the limit is reached. Signed-off-by: Binoy Jayan --- drivers/infiniband/hw/mlx5/main.c| 6 +- drivers/inf

Re: [PATCH v4 05/10] IB/isert: Replace semaphore sem with completion

2016-11-17 Thread Binoy Jayan
Hi Sagi, On 31 October 2016 at 02:42, Sagi Grimberg wrote: >> The semaphore 'sem' in isert_device is used as completion, so convert >> it to struct completion. Semaphores are going away in the future. > > > Umm, this is 100% *not* true. np->sem is designed as a counting to > sync the iscsi login

Re: [PATCH v4 05/10] IB/isert: Replace semaphore sem with completion

2016-11-18 Thread Binoy Jayan
Hi Arnd, On 18 November 2016 at 14:28, Arnd Bergmann wrote: > On Friday, November 18, 2016 12:27:32 PM CET Binoy Jayan wrote: >> Hi Sagi, > I think you are right. This is behavior is actuallly documented in > Documentation/scheduler/completion.txt: Thanking for having a look.

Re: [PATCH 1/2] scsi: smartpqi: Replace semaphore sync_request_sem with mutex

2016-10-24 Thread Binoy Jayan
Hi Arnd On 20 October 2016 at 14:36, Arnd Bergmann wrote: > On Thursday, October 20, 2016 2:24:01 PM CEST Binoy Jayan wrote: >> Semaphores are going away in the future, so replace the semaphore >> sync_request_sem with the a mutex lock. timeout_msecs is not used >> for the

  1   2   3   >