linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 00/15] Make 'mlock' really private
@ 2022-09-20 11:28 Nuno Sá
  2022-09-20 11:28 ` [PATCH 01/15] iio: adc: ad_sigma_delta: do not use internal iio_dev lock Nuno Sá
                   ` (14 more replies)
  0 siblings, 15 replies; 52+ messages in thread
From: Nuno Sá @ 2022-09-20 11:28 UTC (permalink / raw)
  To: linux-arm-kernel, linux-rockchip, linux-amlogic, linux-imx, linux-iio
  Cc: Chunyan Zhang, Michael Hennerich, Martin Blumenstingl,
	Sascha Hauer, Cixi Geng, Kevin Hilman, Vladimir Zapolskiy,
	Pengutronix Kernel Team, Alexandru Ardelean, Fabio Estevam,
	Andriy Tryshnivskyy, Haibo Chen, Shawn Guo, Hans de Goede,
	Miquel Raynal, Jerome Brunet, Heiko Stuebner, Florian Boor,
	Ciprian Regus, Lars-Peter Clausen, Andy Shevchenko,
	Jonathan Cameron, Neil Armstrong, Baolin Wang, Jyoti Bhayana,
	Nuno Sá,
	Chen-Yu Tsai, Orson Zhai

This patchset cleans all the drivers directly using the iio_device 'mlock'.
This lock is private and should not be used outside the core (or by using
proper helpers).

Most of the conversions where straight, but there are some that really need
extra looking. Mainly patches [13/15] and [14/15] were a bit hacky since
iio_device_claim_direct_mode() does not fit 100%. The reason is that we
want to check if the device is buffering and do something if it is (in
which case the API return -EBUSY and released the lock. I just used a
combinations of locks to get around this (hopefully I did not messed up).

I was also not sure if patch [1/15] deserves a Fixes: tag but, to me, it
is really fixing a potential race so I added it.

Note that this series was only compiled tested using allyesconfig for
ARM. I ran 'git grep' to make sure there were no more users of 'mlock'.
Hopefully I covered them all...

Nuno Sá (15):
  iio: adc: ad_sigma_delta: do not use internal iio_dev lock
  iio: adc: ad799x: do not use internal iio_dev lock
  iio: adc: axp288_adc: do not use internal iio_dev lock
  iio: adc: imx7d_adc: do not use internal iio_dev lock
  iio: adc: lpc32xx_adc: do not use internal iio_dev lock
  iio: adc: ltc2947-core: do not use internal iio_dev lock
  iio: adc: meson_saradc: do not use internal iio_dev lock
  iio: adc: rockchip_saradc: do not use internal iio_dev lock
  iio: adc: sc27xx_adc: do not use internal iio_dev lock
  iio: adc: vf610_adc: do not use internal iio_dev lock
  iio: common: scmi_iio: do not use internal iio_dev lock
  iio: fyro: itg3200_core: do not use internal iio_dev lock
  iio: health: max30100: do not use internal iio_dev lock
  iio: health: max30102: do not use internal iio_dev lock
  iio: core: move 'mlock' to 'struct iio_dev_opaque'

 drivers/iio/TODO                           |  3 ---
 drivers/iio/adc/ad799x.c                   | 18 ++++++++-----
 drivers/iio/adc/ad_sigma_delta.c           |  8 +++---
 drivers/iio/adc/axp288_adc.c               |  8 ++++--
 drivers/iio/adc/imx7d_adc.c                | 13 ++++++----
 drivers/iio/adc/lpc32xx_adc.c              | 10 +++++---
 drivers/iio/adc/ltc2497-core.c             |  7 +++--
 drivers/iio/adc/ltc2497.h                  |  2 ++
 drivers/iio/adc/meson_saradc.c             | 10 +++++---
 drivers/iio/adc/rockchip_saradc.c          | 14 ++++++----
 drivers/iio/adc/sc27xx_adc.c               | 12 ++++++---
 drivers/iio/adc/vf610_adc.c                | 30 ++++++++++++++--------
 drivers/iio/common/scmi_sensors/scmi_iio.c |  9 +++++--
 drivers/iio/gyro/itg3200_core.c            |  9 ++++---
 drivers/iio/health/max30100.c              | 24 ++++++++++++-----
 drivers/iio/health/max30102.c              | 25 +++++++++++++-----
 drivers/iio/industrialio-buffer.c          | 29 ++++++++++++---------
 drivers/iio/industrialio-core.c            | 18 +++++++------
 drivers/iio/industrialio-event.c           |  4 +--
 drivers/iio/industrialio-trigger.c         | 12 ++++-----
 include/linux/iio/gyro/itg3200.h           |  2 ++
 include/linux/iio/iio-opaque.h             |  2 ++
 include/linux/iio/iio.h                    |  3 ---
 23 files changed, 175 insertions(+), 97 deletions(-)

-- 
2.37.3


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 52+ messages in thread

end of thread, other threads:[~2022-10-23 10:57 UTC | newest]

Thread overview: 52+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-20 11:28 [PATCH 00/15] Make 'mlock' really private Nuno Sá
2022-09-20 11:28 ` [PATCH 01/15] iio: adc: ad_sigma_delta: do not use internal iio_dev lock Nuno Sá
2022-09-20 11:54   ` Miquel Raynal
2022-09-24 14:22     ` Jonathan Cameron
2022-09-20 11:28 ` [PATCH 02/15] iio: adc: ad799x: " Nuno Sá
2022-09-24 14:45   ` Jonathan Cameron
2022-09-26 11:22     ` Nuno Sá
2022-09-20 11:28 ` [PATCH 03/15] iio: adc: axp288_adc: " Nuno Sá
2022-09-20 13:13   ` Andy Shevchenko
2022-09-20 13:18     ` Sa, Nuno
2022-09-20 13:37       ` Andy Shevchenko
2022-09-20 13:39         ` Andy Shevchenko
2022-09-20 13:46           ` Sa, Nuno
2022-09-20 15:12             ` Andy Shevchenko
2022-09-21  9:07               ` Nuno Sá
2022-09-24 15:23                 ` Jonathan Cameron
2022-09-24 15:24   ` Jonathan Cameron
2022-09-20 11:28 ` [PATCH 04/15] iio: adc: imx7d_adc: " Nuno Sá
2022-09-24 15:26   ` Jonathan Cameron
2022-09-20 11:28 ` [PATCH 05/15] iio: adc: lpc32xx_adc: " Nuno Sá
2022-09-24 15:27   ` Jonathan Cameron
2022-09-20 11:28 ` [PATCH 06/15] iio: adc: ltc2947-core: " Nuno Sá
2022-09-20 11:28 ` [PATCH 07/15] iio: adc: meson_saradc: " Nuno Sá
2022-09-25 20:38   ` Martin Blumenstingl
2022-09-20 11:28 ` [PATCH 08/15] iio: adc: rockchip_saradc: " Nuno Sá
2022-09-20 11:28 ` [PATCH 09/15] iio: adc: sc27xx_adc: " Nuno Sá
2022-09-20 11:28 ` [PATCH 10/15] iio: adc: vf610_adc: " Nuno Sá
2022-09-24 15:37   ` Jonathan Cameron
2022-09-20 11:28 ` [PATCH 11/15] iio: common: scmi_iio: " Nuno Sá
2022-09-24 15:42   ` Jonathan Cameron
2022-09-20 11:28 ` [PATCH 12/15] iio: fyro: itg3200_core: " Nuno Sá
2022-09-24 15:43   ` Jonathan Cameron
2022-09-24 15:46   ` Jonathan Cameron
2022-09-20 11:28 ` [PATCH 13/15] iio: health: max30100: " Nuno Sá
2022-09-20 12:23   ` Miquel Raynal
2022-09-20 12:44     ` Sa, Nuno
2022-09-20 12:55       ` Miquel Raynal
2022-09-20 13:15         ` Sa, Nuno
2022-09-20 13:53           ` Miquel Raynal
2022-09-20 14:56             ` Nuno Sá
2022-09-20 15:10               ` Miquel Raynal
2022-09-24 15:53                 ` Jonathan Cameron
2022-09-26 10:06                   ` Nuno Sá
2022-10-02 11:03                     ` Jonathan Cameron
2022-10-04  7:57                       ` Nuno Sá
2022-09-20 11:28 ` [PATCH 14/15] iio: health: max30102: " Nuno Sá
2022-09-24 15:54   ` Jonathan Cameron
2022-09-30 10:04     ` Nuno Sá
2022-10-02 11:08       ` Jonathan Cameron
2022-10-04  7:53         ` Nuno Sá
2022-09-20 11:28 ` [PATCH 15/15] iio: core: move 'mlock' to 'struct iio_dev_opaque' Nuno Sá
2022-09-24 15:56   ` Jonathan Cameron

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).