LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Jake Oshins <jakeo@microsoft.com>
To: gregkh@linuxfoundation.org, kys@microsoft.com,
	linux-kernel@vger.kernel.org, devel@linuxdriverproject.org,
	olaf@aepfle.de, apw@canonical.com, vkuznets@redhat.com,
	rjw@rjwysocki.net, arjan@linux.intel.com
Cc: Jake Oshins <jakeo@microsoft.com>
Subject: [PATCH v2 0/3] Convert Hyper-V code to use the pnp layer
Date: Tue,  3 Mar 2015 14:14:26 -0800	[thread overview]
Message-ID: <1425420869-12750-1-git-send-email-jakeo@microsoft.com> (raw)

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


             reply	other threads:[~2015-03-03 20:59 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-03 22:14 Jake Oshins [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1425420869-12750-1-git-send-email-jakeo@microsoft.com \
    --to=jakeo@microsoft.com \
    --cc=apw@canonical.com \
    --cc=arjan@linux.intel.com \
    --cc=devel@linuxdriverproject.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=kys@microsoft.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=olaf@aepfle.de \
    --cc=rjw@rjwysocki.net \
    --cc=vkuznets@redhat.com \
    --subject='Re: [PATCH v2 0/3] Convert Hyper-V code to use the pnp layer' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

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