[PATCH v2 3/3] drivers:hv Remove old MMIO management code

From: Jake Oshins
Date: Tue Mar 03 2015 - 15:59:22 EST


This patch removes the now-redundant code which examined the ACPI namespace
directly for memory-mapped I/O regions for its children.

Signed-off-by: Jake Oshins <jakeo@xxxxxxxxxxxxx>
---
drivers/hv/vmbus_drv.c | 28 ++--------------------------
include/linux/hyperv.h | 2 --
2 files changed, 2 insertions(+), 28 deletions(-)

diff --git a/drivers/hv/vmbus_drv.c b/drivers/hv/vmbus_drv.c
index 7783f4c..193a362 100644
--- a/drivers/hv/vmbus_drv.c
+++ b/drivers/hv/vmbus_drv.c
@@ -44,12 +44,6 @@ static struct tasklet_struct msg_dpc;
static struct completion probe_event;
static int irq;

-struct resource hyperv_mmio = {
- .name = "hyperv mmio",
- .flags = IORESOURCE_MEM,
-};
-EXPORT_SYMBOL_GPL(hyperv_mmio);
-
static int vmbus_exists(void)
{
if (hv_acpi_dev == NULL)
@@ -899,11 +893,6 @@ static acpi_status vmbus_walk_resources(struct acpi_resource *res, void *ctx)
case ACPI_RESOURCE_TYPE_IRQ:
irq = res->data.irq.interrupts[0];
break;
-
- case ACPI_RESOURCE_TYPE_ADDRESS64:
- hyperv_mmio.start = res->data.address64.address.minimum;
- hyperv_mmio.end = res->data.address64.address.maximum;
- break;
}

return AE_OK;
@@ -917,24 +906,11 @@ static int vmbus_acpi_add(struct acpi_device *device)
hv_acpi_dev = device;

result = acpi_walk_resources(device->handle, METHOD_NAME__CRS,
- vmbus_walk_resources, NULL);
+ vmbus_walk_resources, NULL);

if (ACPI_FAILURE(result))
goto acpi_walk_err;
- /*
- * The parent of the vmbus acpi device (Gen2 firmware) is the VMOD that
- * has the mmio ranges. Get that.
- */
- if (device->parent) {
- result = acpi_walk_resources(device->parent->handle,
- METHOD_NAME__CRS,
- vmbus_walk_resources, NULL);
-
- if (ACPI_FAILURE(result))
- goto acpi_walk_err;
- if (hyperv_mmio.start && hyperv_mmio.end)
- request_resource(&iomem_resource, &hyperv_mmio);
- }
+
ret_val = 0;

acpi_walk_err:
diff --git a/include/linux/hyperv.h b/include/linux/hyperv.h
index 796cc32..993ea5f 100644
--- a/include/linux/hyperv.h
+++ b/include/linux/hyperv.h
@@ -1221,8 +1221,6 @@ int hv_vss_init(struct hv_util_service *);
void hv_vss_deinit(void);
void hv_vss_onchannelcallback(void *);

-extern struct resource hyperv_mmio;
-
/*
* Negotiated version with the Host.
*/
--
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/