LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH v2 0/3] Convert Hyper-V code to use the pnp layer
@ 2015-03-03 22:14 Jake Oshins
  2015-03-03 22:14 ` [PATCH v2 1/3] drivers:pnp Add support for descendants claiming memory address space Jake Oshins
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Jake Oshins @ 2015-03-03 22:14 UTC (permalink / raw)
  To: gregkh, kys, linux-kernel, devel, olaf, apw, vkuznets, rjw, arjan
  Cc: Jake Oshins

This set of patches changes the way that drivers in a Hyper-V VM find the
memory-mapped I/O space that they need.  The Hyper-V BIOS and UEFI
implementations expose a couple of large regions of MMIO space to the guests
using the ACPI namespace, with the expectation that the guest OS will subdivide
those regions for each of the paravirtual devices that require some.  The
firmware itself does not pick the specific regions for each device.

The old Hyper-V code that this patch set replaces found that region by directly
examining the ACPI namespace and exporting one of the ranges for use by a
single frame buffer driver.  This worked, so long as there was only one client
driver instance that wanted address space.

In order to allow multiple clients to each pick a region of memory-mapped I/O
space, the first patch adds a few wrapper functions in the kernel's pnp layer
which allow address space requests ("options") for drivers which are descendants
of the busses that the pnp layer already understands.  This ensures that 
descendants can make requests for MMIO space which don't conflict with "aunts"
and "uncles" in the device tree.  (Hyper-V VMs can have PCI devices which need
to claim from the space address space.)

The second patch converts hv_vmbus and all the related Hyper-V drivers to use
the pnp layer.  The third patch removes the older code which examined the ACPI
namespace directly.

Jake Oshins (3):
  drivers:pnp Add support for descendants claiming memory address space
  drivers:hv Convert VMBus and its descendants to PnP
  drivers:hv Remove old MMIO management code

 drivers/hid/hid-hyperv.c              |   6 +-
 drivers/hv/channel_mgmt.c             |   5 +-
 drivers/hv/hyperv_vmbus.h             |   1 +
 drivers/hv/vmbus_drv.c                | 145 +++++++++++++++-------------------
 drivers/input/serio/hyperv-keyboard.c |  24 +++---
 drivers/net/hyperv/netvsc.c           |   5 +-
 drivers/net/hyperv/netvsc_drv.c       |   4 +-
 drivers/net/hyperv/rndis_filter.c     |   4 +-
 drivers/pnp/Makefile                  |   2 +-
 drivers/pnp/base.h                    |   2 +
 drivers/pnp/core.c                    |   1 +
 drivers/pnp/descendant.c              | 117 +++++++++++++++++++++++++++
 drivers/scsi/storvsc_drv.c            |   2 +-
 drivers/video/fbdev/hyperv_fb.c       |  29 +++----
 include/linux/hyperv.h                |  17 ++--
 include/linux/pnp.h                   |  23 ++++++
 16 files changed, 261 insertions(+), 126 deletions(-)
 create mode 100644 drivers/pnp/descendant.c

-- 
1.9.1


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

end of thread, other threads:[~2015-03-03 20:59 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-03 22:14 [PATCH v2 0/3] Convert Hyper-V code to use the pnp layer Jake Oshins
2015-03-03 22:14 ` [PATCH v2 1/3] drivers:pnp Add support for descendants claiming memory address space Jake Oshins
2015-03-03 22:14 ` [PATCH v2 2/3] drivers:hv Convert VMBus and its descendants to PnP Jake Oshins
2015-03-03 22:14 ` [PATCH v2 3/3] drivers:hv Remove old MMIO management code Jake Oshins

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