Re: [Lhms-devel] [RFC] Patch [1/2] for acpi_memhotplug.c

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 2006-06-22 at 12:13 +0900, KAMEZAWA Hiroyuki wrote:
> On Wed, 21 Jun 2006 19:19:58 -0700
> keith mannthey <kmannth@xxxxxxxxxx> wrote:
> > > Good Catch :)
> > > 
> > > Then, could you print driver name ? like this
> > > ==
> > > printk("Call Add driver for name %s/class %s/id %s\n",driver->name,driver->class,driver->id);
> > > ==
> > 
> > Good idea!
> > During the hot add I see. 
> > Call Add driver for name motherboard/class /id PNP0C01
> > 
> > That is the wrong driver for sure. 
> 
> Hmm....curious..but no idead..
> Then, could try this ? 

I am trying to make the motherboard driver fail with it looks for
resources and finds node.  The motherboard add function alway returns
AE_OK which is why the algorithm fails. See attached patch it allows the
hot-add event to happen. 

With the event happening and I see 

Call Add driver for name Hotplug Mem Driver/class memory/id PNP0C80
acpi-memhotplug: device_add() called
acpi-memhotplug: kmalloc mem_device success
acpi-memhotplug: read CRS success

But then 

On node -1 totalpages: 0

How do I tell if my event has the right _PXM data or what ever is
needed?

Signed-off-by:  Keith Mannthey <kmannth@xxxxxxxxxx>
--- linux-2.6.17-rc6-mm2-orig/drivers/acpi/motherboard.c	2006-06-21 23:35:26.000000000 -0400
+++ linux-2.6.17-rc6-mm2/drivers/acpi/motherboard.c	2006-06-21 23:04:44.000000000 -0400
@@ -86,6 +86,7 @@
 		}
 	} else {
 		/* Memory mapped IO? */
+		 return -EINVAL;
 	}
 
 	if (requested_res)
@@ -95,12 +96,14 @@
 
 static int acpi_motherboard_add(struct acpi_device *device)
 {
+	acpi_status status;
 	if (!device)
 		return -EINVAL;
-	acpi_walk_resources(device->handle, METHOD_NAME__CRS,
+
+	status = acpi_walk_resources(device->handle, METHOD_NAME__CRS,
 			    acpi_reserve_io_ranges, NULL);
 
-	return 0;
+	return status;
 }
 
 static struct acpi_driver acpi_motherboard_driver1 = {

[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux