Re: [Lhms-devel] [PATCH] register hot-added memory to iomem resource
- From: jschopp <jschopp@xxxxxxxxxxxxxx>
- Date: Thu, 27 Apr 2006 11:10:16 -0500
+/* add this memory to iomem resource */
+static void register_memory_resource(u64 start, u64 size)
+{
+ struct resource *res;
+
+ res = kzalloc(sizeof(struct resource), GFP_KERNEL);
+ BUG_ON(!res);
+
+ res->name = "System RAM";
+ res->start = start;
+ res->end = start + size - 1;
+ res->flags = IORESOURCE_MEM;
+ if (request_resource(&iomem_resource, res) < 0) {
+ printk("System RAM resource %llx - %llx cannot be added\n",
+ (unsigned long long)res->start, (unsigned long long)res->end);
+ kfree(res);
+ }
+}
This is more of a question than a comment. Is this code saying that all memory we are adding is available for IO? And is it really true that on all platforms any memory we add can be used that way?
-
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/
- Follow-Ups:
- Re: [Lhms-devel] [PATCH] register hot-added memory to iomem resource
- From: KAMEZAWA Hiroyuki
- Re: [Lhms-devel] [PATCH] register hot-added memory to iomem resource
- References:
- [PATCH] register hot-added memory to iomem resource
- From: KAMEZAWA Hiroyuki
- [PATCH] register hot-added memory to iomem resource
- Prev by Date: Re: [PATCH] drivers/scsi/sd.c: fix uninitialized variable in handling medium errors
- Next by Date: Re: C++ pushback
- Previous by thread: [PATCH] register hot-added memory to iomem resource
- Next by thread: Re: [Lhms-devel] [PATCH] register hot-added memory to iomem resource
- Index(es):
Relevant Pages
|