]> err.no Git - linux-2.6/commitdiff
x86: paravirt_ops: don't steal memory resources in paravirt_disable_iospace
authorJeremy Fitzhardinge <jeremy@goop.org>
Fri, 28 Mar 2008 00:28:40 +0000 (17:28 -0700)
committerIngo Molnar <mingo@elte.hu>
Thu, 17 Apr 2008 15:41:33 +0000 (17:41 +0200)
The memory resource is also used for main memory, and we need it to
allocate physical addresses for memory hotplug.  Knobbling io space is
enough to get the job done anyway.

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
arch/x86/kernel/paravirt.c

index 075962cc75ab60a3bc37823644f1050c64a3b9bf..3733412d135773846c1b7259de4dc8dfbed99c46 100644 (file)
@@ -206,13 +206,6 @@ static struct resource reserve_ioports = {
        .flags = IORESOURCE_IO | IORESOURCE_BUSY,
 };
 
-static struct resource reserve_iomem = {
-       .start = 0,
-       .end = -1,
-       .name = "paravirt-iomem",
-       .flags = IORESOURCE_MEM | IORESOURCE_BUSY,
-};
-
 /*
  * Reserve the whole legacy IO space to prevent any legacy drivers
  * from wasting time probing for their hardware.  This is a fairly
@@ -222,16 +215,7 @@ static struct resource reserve_iomem = {
  */
 int paravirt_disable_iospace(void)
 {
-       int ret;
-
-       ret = request_resource(&ioport_resource, &reserve_ioports);
-       if (ret == 0) {
-               ret = request_resource(&iomem_resource, &reserve_iomem);
-               if (ret)
-                       release_resource(&reserve_ioports);
-       }
-
-       return ret;
+       return request_resource(&ioport_resource, &reserve_ioports);
 }
 
 static DEFINE_PER_CPU(enum paravirt_lazy_mode, paravirt_lazy_mode) = PARAVIRT_LAZY_NONE;