[PATCH v3 4/4] staging: r8188eu: Remove unused semaphores

2016-06-05 Thread Binoy Jayan
The semaphores xmit_sema, terminate_xmitthread_sema and tx_retevt have no users, hence remove all references to them. Signed-off-by: Binoy Jayan Reviewed-by: Arnd Bergmann Acked-by: Larry Finger --- drivers/staging/rtl8188eu/core/rtw_xmit.c | 4 drivers/staging/rtl8188eu/include

[PATCH v3 2/4] staging: r8188eu: Replace semaphore terminate_cmdthread_sema with completion

2016-06-05 Thread Binoy Jayan
The semaphore 'terminate_cmdthread_sema' is used as completion, so convert it to struct completion. Signed-off-by: Binoy Jayan Reviewed-by: Arnd Bergmann Acked-by: Larry Finger --- drivers/staging/rtl8188eu/core/rtw_cmd.c| 6 +++--- drivers/staging/rtl8188eu/include/rtw

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

2017-04-07 Thread Binoy Jayan
equests are processed in parallel 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: A

[RFC PATCH v5] crypto: Add IV generation algorithms

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

Re: [RFC PATCH v5] IV Generation algorithms for dm-crypt

2017-04-13 Thread Binoy Jayan
Hi Milan, On 10 April 2017 at 19:30, Milan Broz wrote: Thank you for the reply. > Well, it is good that there is no performance degradation but it > would be nice to have some user of it that proves it is really > working for your hw. I have been able to get access to a hardware with IV genera

[ACTIVITY] (Binoy Jayan) 2017-05-08 to 2017-05-15

2017-05-15 Thread Binoy Jayan
=== Binoy Jayan === === Highlights === dm-crypt optimization - No progress dm-crypt:store keys in secure storage - Read OPTEE ClientAPI specification to figure out how to communicate with optee from a client application - No examples available for using client api from kernel so need

[PATCH v2 0/3] ngene: Replace semaphores with mutexes

2017-06-13 Thread Binoy Jayan
c.c | 6 +++--- drivers/media/pci/ngene/ngene.h | 6 +++--- 3 files changed, 20 insertions(+), 24 deletions(-) -- Binoy Jayan

[PATCH v2 2/3] media: ngene: Replace semaphore stream_mutex with mutex

2017-06-13 Thread Binoy Jayan
The semaphore 'stream_mutex' is used as a simple mutex, so it should be written as one. Also moving the mutex_[lock/unlock] to the caller as it is anyway locked at the beginning of the callee thus avoiding repetition. Signed-off-by: Binoy Jayan --- drivers/media/pci/ngene/ngene-c

[PATCH v2 1/3] media: ngene: Replace semaphore cmd_mutex with mutex

2017-06-13 Thread Binoy Jayan
The semaphore 'cmd_mutex' is used as a simple mutex, so it should be written as one. Also, replace down with mutex_destroy to ensure sane state when ngene_stop is called. Signed-off-by: Binoy Jayan --- drivers/media/pci/ngene/ngene-core.c | 12 ++-- drivers/media/pci/nge

Re: [PATCH 1/3] media: ngene: Replace semaphore cmd_mutex with mutex

2017-06-13 Thread Binoy Jayan
Hi Arnd, On 9 June 2017 at 16:06, Arnd Bergmann wrote: >> Thank you for pointing out that. I'll check the >> concurrency part. By the way why do we need mutex_destoy? >> To debug an aberrate condition? > > At first I suspected the down() here was added for the same > purpose as a mutex_destroy:

[PATCH v2 3/3] media: ngene: Replace semaphore i2c_switch_mutex with mutex

2017-06-13 Thread Binoy Jayan
The semaphore 'i2c_switch_mutex' is used as a simple mutex, so it should be written as one. Semaphores are going away in the future. Signed-off-by: Binoy Jayan --- drivers/media/pci/ngene/ngene-core.c | 2 +- drivers/media/pci/ngene/ngene-i2c.c | 6 +++--- drivers/media/pci/nge

[PATCH v2] HID: Replace semaphore driver_lock with mutex

2017-06-13 Thread Binoy Jayan
The semaphore 'driver_lock' is used as a simple mutex, and also unnecessary as suggested by Arnd. Hence removing it, as the concurrency between the probe and remove is already handled in the driver core. Signed-off-by: Binoy Jayan Suggested-by: Arnd Bergmann --- v1 --> v2 Remove

Re: [PATCH v2] HID: Replace semaphore driver_lock with mutex

2017-06-13 Thread Binoy Jayan
Hi, On 13 June 2017 at 15:26, Benjamin Tissoires wrote: >> Looks good to me, but I see you didn't include David and Andrew on >> Cc, it would be good for at least one of them to provide an Ack as well. > > Please also CC linux-input@ Will do that. > (one more nitpick below too) > A little bit b

Re: [PATCH v2] HID: Replace semaphore driver_lock with mutex

2017-06-13 Thread Binoy Jayan
Hi Arnd, On 13 June 2017 at 15:15, Arnd Bergmann wrote: > Looks good to me, but I see you didn't include David and Andrew on > Cc, it would be good for at least one of them to provide an Ack as well. Will include them, thank you yet again for reminding me. > You forgot to actually drop the defi

Re: [PATCH v2 0/3] ngene: Replace semaphores with mutexes

2017-06-13 Thread Binoy Jayan
Hi Arnd, On 13 June 2017 at 15:19, Arnd Bergmann wrote: > On Tue, Jun 13, 2017 at 10:58 AM, Binoy Jayan wrote: >> These are a set of patches [v2] which removes semaphores from ngene. >> These are part of a bigger effort to eliminate unwanted semaphores >> from the linux

Re: [PATCH v2] HID: Replace semaphore driver_lock with mutex

2017-06-13 Thread Binoy Jayan
Hi, On 14 June 2017 at 01:55, Arnd Bergmann wrote: >> The mutex code clearly states mutex_trylock() must not be used in >> interrupt context (see kernel/locking/mutex.c), hence we used a >> semaphore here. Unless the mutex code is changed to allow this, we >> cannot switch away from semaphores.

[PATCH v3] HID: Replace semaphore driver_lock with mutex

2017-06-13 Thread Binoy Jayan
The semaphore 'driver_lock' is used as a simple mutex, and also unnecessary as suggested by Arnd. Hence removing it, as the concurrency between the probe and remove is already handled in the driver core. Suggested-by: Arnd Bergmann Signed-off-by: Binoy Jayan Acked-by: Benjamin

[PATCH v4] HID: Remove the semaphore driver_lock

2017-06-14 Thread Binoy Jayan
The semaphore 'driver_lock' is used as a simple mutex, and also unnecessary as suggested by Arnd. Hence removing it, as the concurrency between the probe and remove is already handled in the driver core. Suggested-by: Arnd Bergmann Signed-off-by: Binoy Jayan Acked-by: Benjamin

[PATCH] HID: Replace semaphore driver_lock with mutex

2017-06-08 Thread Binoy Jayan
The semaphore 'driver_lock' is used as a simple mutex, so it should be written as one. Semaphores are going away in the future. Signed-off-by: Binoy Jayan --- This patch is part of a bigger effort to eliminate unwanted semaphores from the linux kernel. drivers/hid/hid-c

[PATCH] mwifiex: Replace semaphore async_sem with mutex

2017-06-08 Thread Binoy Jayan
The semaphore 'async_sem' is used as a simple mutex, so it should be written as one. Semaphores are going away in the future. Signed-off-by: Binoy Jayan --- This patch is part of a bigger effort to eliminate unwanted semaphores from the linux kernel. drivers/net/wireless/marve

[PATCH] net: ethernet: micrel: ksz884x: Replace semaphore proc_sem with mutex

2017-06-08 Thread Binoy Jayan
The semaphore 'proc_sem' is used as a simple mutex, so it should be written as one. Semaphores are going away in the future. Signed-off-by: Binoy Jayan --- This patch is part of a bigger effort to eliminate unwanted semaphores from the linux kernel. drivers/net/ethernet/micrel/ksz8

[PATCH 2/3] media: ngene: Replace semaphore stream_mutex with mutex

2017-06-08 Thread Binoy Jayan
The semaphore 'stream_mutex' is used as a simple mutex, so it should be written as one. Semaphores are going away in the future. Signed-off-by: Binoy Jayan --- drivers/media/pci/ngene/ngene-core.c | 14 +++--- drivers/media/pci/ngene/ngene.h | 2 +- 2 files changed, 8

[PATCH 0/3] ngene: Replace semaphores with mutexes

2017-06-08 Thread Binoy Jayan
These are a set of patches which removes semaphores from ngene. These are part of a bigger effort to eliminate unwanted semaphores from the linux kernel. Binoy Jayan (3): media: ngene: Replace semaphore cmd_mutex with mutex media: ngene: Replace semaphore stream_mutex with mutex media

[PATCH 3/3] media: ngene: Replace semaphore i2c_switch_mutex with mutex

2017-06-08 Thread Binoy Jayan
The semaphore 'i2c_switch_mutex' is used as a simple mutex, so it should be written as one. Semaphores are going away in the future. Signed-off-by: Binoy Jayan --- drivers/media/pci/ngene/ngene-core.c | 2 +- drivers/media/pci/ngene/ngene-i2c.c | 6 +++--- drivers/media/pci/nge

[PATCH 1/3] media: ngene: Replace semaphore cmd_mutex with mutex

2017-06-08 Thread Binoy Jayan
The semaphore 'cmd_mutex' is used as a simple mutex, so it should be written as one. Semaphores are going away in the future. Signed-off-by: Binoy Jayan --- drivers/media/pci/ngene/ngene-core.c | 12 ++-- drivers/media/pci/ngene/ngene.h | 2 +- 2 files changed, 7 insert

[PATCH 2/2] scsi: esas2r: Replace semaphore fs_api_semaphore with mutex

2017-06-08 Thread Binoy Jayan
The semaphore 'fs_api_semaphore' is used as a simple mutex, so it should be written as one. Semaphores are going away in the future. Signed-off-by: Binoy Jayan --- drivers/scsi/esas2r/esas2r.h | 2 +- drivers/scsi/esas2r/esas2r_init.c | 2 +- drivers/scsi/esas2r/esas2r_i

[PATCH 1/2] scsi: esas2r: Replace semaphore fm_api_semaphore with mutex

2017-06-08 Thread Binoy Jayan
The semaphore 'fm_api_semaphore' is used as a simple mutex, so it should be written as one. Semaphores are going away in the future. Signed-off-by: Binoy Jayan --- drivers/scsi/esas2r/esas2r.h | 2 +- drivers/scsi/esas2r/esas2r_init.c | 2 +- drivers/scsi/esas2r/esas2r_i

[PATCH 0/2] esas2r: Replace semaphores with mutexes

2017-06-08 Thread Binoy Jayan
These are a set of patches which removes semaphores from esas2r. These are part of a bigger effort to eliminate unwanted semaphores from the linux kernel. Binoy Jayan (2): scsi: esas2r: Replace semaphore fm_api_semaphore with mutex scsi: esas2r: Replace semaphore fs_api_semaphore with mutex

Re: [PATCH 1/3] media: ngene: Replace semaphore cmd_mutex with mutex

2017-06-08 Thread Binoy Jayan
On 8 June 2017 at 20:40, Arnd Bergmann wrote: > On Thu, Jun 8, 2017 at 12:04 PM, Binoy Jayan wrote: >> The semaphore 'cmd_mutex' is used as a simple mutex, so >> it should be written as one. Semaphores are going away in the future. >> >> Signed-off-by: Binoy

[PATCH 4/8] IB/mthca: Replace semaphore poll_sem with mutex

2016-10-17 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. Signed-off-by: Binoy Jayan --- drivers/infiniband/hw/mthca/mthca_cmd.c | 10 +- drivers/infiniband/hw/mthca/mthca_cmd.h | 1 + drivers/infiniband/hw/mthca/m

[PATCH 5/8] IB/isert: Replace semaphore sem with completion

2016-10-17 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 0/8] infiniband: Remove semaphores

2016-10-17 Thread Binoy Jayan
/rdma/ib_sa.h'. Need to see if this can be programmed in a generic way using wait queues. Thanks, Binoy Binoy Jayan (8): IB/core: iwpm_nlmsg_request: Replace semaphore with completion IB/core: Replace semaphore sm_sem with completion IB/hns: Replace semaphore poll_sem with mutex IB/mthc

[PATCH 8/8] IB/mlx5: Replace counting semaphore sem with wait condition

2016-10-17 Thread Binoy Jayan
Counting semaphores are going away in the future, so replace the semaphore umr_common::sem with an open-coded implementation. Signed-off-by: Binoy Jayan --- drivers/infiniband/hw/mlx5/main.c| 3 ++- drivers/infiniband/hw/mlx5/mlx5_ib.h | 3 ++- drivers/infiniband/hw/mlx5/mr.c | 28

[PATCH 7/8] IB/mthca: Replace counting semaphore event_sem with wait condition

2016-10-17 Thread Binoy Jayan
Counting semaphores are going away in the future, so replace the semaphore mthca_cmd::event_sem with an open-coded implementation. Signed-off-by: Binoy Jayan --- drivers/infiniband/hw/mthca/mthca_cmd.c | 12 drivers/infiniband/hw/mthca/mthca_dev.h | 3 ++- 2 files changed, 10

[PATCH 6/8] IB/hns: Replace counting semaphore event_sem with wait condition

2016-10-17 Thread Binoy Jayan
Counting semaphores are going away in the future, so replace the semaphore hns_roce_cmdq::event_sem with an open-coded implementation. Signed-off-by: Binoy Jayan --- drivers/infiniband/hw/hns/hns_roce_cmd.c| 16 drivers/infiniband/hw/hns/hns_roce_device.h | 3 ++- include

[PATCH 2/8] IB/core: Replace semaphore sm_sem with completion

2016-10-17 Thread Binoy Jayan
The semaphore 'sm_sem' is used as completion, so convert it to struct completion. Semaphores are going away in the future. The initial status of the completion variable is marked as completed by a call to the function 'complete' immediately following the initialization. Signed

[PATCH 1/8] IB/core: iwpm_nlmsg_request: Replace semaphore with completion

2016-10-17 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 3/8] IB/hns: Replace semaphore poll_sem with mutex

2016-10-17 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. Signed-off-by: Binoy Jayan --- drivers/infiniband/hw/hns/hns_roce_cmd.c| 12 ++-- drivers/infiniband/hw/hns/hns_roce_device.h | 3 ++- 2 files changed, 8

Re: [PATCH 6/8] IB/hns: Replace counting semaphore event_sem with wait condition

2016-10-17 Thread Binoy Jayan
On 18 October 2016 at 01:59, Arnd Bergmann wrote: > On Monday, October 17, 2016 10:01:00 PM CEST Binoy Jayan wrote: >> --- a/drivers/infiniband/hw/hns/hns_roce_cmd.c >> +++ b/drivers/infiniband/hw/hns/hns_roce_cmd.c >> @@ -248,10 +248,14 @@ static int hns_roce_cmd_mbox_wai

[PATCH] bnx2x: Replace semaphore stats_lock with mutex

2016-10-20 Thread Binoy Jayan
stats_lock is used as a simple mutex, so replace it with a mutex. Semaphores are going away in the future. Signed-off-by: Binoy Jayan --- They following is a patch which removes semaphores from bnx2x. Its part of a bigger effort to eliminate all semaphores from the linux kernel. drivers/net

[PATCH 0/2] smartpqi: Remove semaphores

2016-10-20 Thread Binoy Jayan
Hi, The following are a set of patches which removes semaphores from scsi/smartpqi. These are part of a bigger effort to eliminate all semaphores from the linux kernel. Thanks, Binoy Binoy Jayan (2): scsi: smartpqi: Replace semaphore sync_request_sem with mutex scsi: smartpqi: Replace

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

2016-10-20 Thread Binoy Jayan
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 lock sync_request_sem, so remove the timed locking too. Signed-off-by: Binoy Jayan --- drivers/scsi/smartpqi/smartpqi.h | 4 +++- drivers/scsi

[PATCH] staging: wilc1000: Remove unused function wilc_lock_timeout

2016-10-20 Thread Binoy Jayan
Semaphore are going away in the future, so remove the unused function wilc_lock_timeout which calls a semaphore api but has no users. Signed-off-by: Binoy Jayan --- They following is a patch which removes semaphores from wilc1000. Its part of a bigger effort to eliminate all semaphores from the

[PATCH 2/2] scsi: smartpqi: Replace semaphore lun_reset_sem with mutex

2016-10-20 Thread Binoy Jayan
Semaphores are going away in the future, so replace the semaphore lun_reset_sem with the a mutex lock. Signed-off-by: Binoy Jayan --- drivers/scsi/smartpqi/smartpqi.h | 2 +- drivers/scsi/smartpqi/smartpqi_init.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a

[PATCH v2] staging: wilc1000: Remove unused function wilc_lock_timeout

2016-10-20 Thread Binoy Jayan
Semaphore are going away in the future, so remove the unused function wilc_lock_timeout which calls a semaphore api but has no users. Signed-off-by: Binoy Jayan Reviewed-by: Arnd Bergmann --- They following is a patch [v2] which removes semaphores from wilc1000. Its part of a bigger effort to

[PATCH] rtl8712: pwrctrl_priv: Replace semaphore lock with mutex

2016-08-21 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 Reviewed-by: Arnd Bergmann Tested-by: Larry Finger --- drivers/staging/rtl8712/osdep_service.h | 7 --- drivers/staging/r

<    1   2   3