linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH/RFC v4 0/2] vfio: platform: Add generic reset controller support
@ 2018-09-17 16:39 Geert Uytterhoeven
  2018-09-17 16:39 ` [PATCH/RFC v4 1/2] reset: Add support for dedicated reset controls Geert Uytterhoeven
  2018-09-17 16:39 ` [PATCH/RFC v4 2/2] vfio: platform: Add generic reset controller support Geert Uytterhoeven
  0 siblings, 2 replies; 15+ messages in thread
From: Geert Uytterhoeven @ 2018-09-17 16:39 UTC (permalink / raw)
  To: Philipp Zabel, Eric Auger, Alex Williamson
  Cc: kvm, devicetree, linux-renesas-soc, linux-kernel, Geert Uytterhoeven

	Hi all,

This patch series implements generic reset controller support for
vfio-platform, for devices that are connected to an SoC-internal reset
controller and can be reset in a generic way.  This avoids having to
write/change a vfio-specific reset driver for each and every device to be
passed-through to a guest.

It consists of two patches:
  - The first patch enhances the reset controller subsystem to add support
    for dedicated resets.
    This addresses the issue that even reset_control_get_exclusive() does
    not guarantee that we have an exclusive wire between the device and
    the reset controller.
  - The second patch enhances vfio-platform to add generic reset controller
    support.

Changes compared to v3:
  - Add Reviewed-by,
  - New patch "reset: Add support for dedicated reset controls",
  - Use new RFC reset_control_get_dedicated() instead of
    of_reset_control_get_exclusive(), to (a) make it more generic, and
    (b) make sure the reset returned is really a dedicated reset, and
    does not affect other devices,
  - Drop vfio-platform reset leak fix, which has been applied.

Changes compared to v2:
  - Add Reviewed-by,
  - Merge similar checks in vfio_platform_has_reset().

Changes compared to v1:
  - Add Reviewed-by,
  - Don't store error values in vdev->reset_control,
  - Use of_reset_control_get_exclusive() instead of
    __of_reset_control_get(),
  - Improve description.

This has been tested on R-Car H3/Salvator-XS:
  - SATA can be exported, as it has a dedicated reset,
  - PWM1 cannot, as its reset is shared with all other PWM modules:
    "VFIO: No reset function found for device e6e31000.pwm".

Thanks for your comments!

Geert Uytterhoeven (2):
  [RFC] reset: Add support for dedicated reset controls
  [RFC] vfio: platform: Add generic reset controller support

 drivers/reset/core.c                          | 76 ++++++++++++++++---
 drivers/vfio/platform/vfio_platform_common.c  | 20 ++++-
 drivers/vfio/platform/vfio_platform_private.h |  1 +
 include/linux/reset.h                         | 60 ++++++++++-----
 4 files changed, 126 insertions(+), 31 deletions(-)

-- 
2.17.1

Gr{oetje,eeting}s,

						Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
							    -- Linus Torvalds

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

end of thread, other threads:[~2018-09-20  9:38 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-09-17 16:39 [PATCH/RFC v4 0/2] vfio: platform: Add generic reset controller support Geert Uytterhoeven
2018-09-17 16:39 ` [PATCH/RFC v4 1/2] reset: Add support for dedicated reset controls Geert Uytterhoeven
2018-09-18  6:42   ` Geert Uytterhoeven
2018-09-19 12:09   ` Auger Eric
2018-09-19 13:16     ` Geert Uytterhoeven
2018-09-19 15:28       ` Auger Eric
2018-09-19 14:58   ` Philipp Zabel
2018-09-19 15:24     ` Geert Uytterhoeven
2018-09-20  9:27       ` Philipp Zabel
2018-09-20  9:37         ` Geert Uytterhoeven
2018-09-17 16:39 ` [PATCH/RFC v4 2/2] vfio: platform: Add generic reset controller support Geert Uytterhoeven
2018-09-19 12:36   ` Auger Eric
2018-09-19 12:54     ` Geert Uytterhoeven
2018-09-19 15:31       ` Auger Eric
2018-09-19 18:19         ` Alex Williamson

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).