From: keith <kmannth-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
To: external hotplug mem list
<lhms-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org>
Cc: naveen.b.s-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org,
acpi-devel
<acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org>
Subject: [RFC][PATCH] patch to fix acpi_memhotplug.c for my hardware
Date: Fri, 11 Nov 2005 21:03:45 -0800 [thread overview]
Message-ID: <1131771825.20603.44.camel@knk> (raw)
In-Reply-To: <1131677135.20603.22.camel@knk>
[-- Attachment #1: Type: text/plain, Size: 798 bytes --]
Hello All,
I have troubles with the current acpi hotplug memory handler.
acpi_memory_get_device fails for me (acpi_bus_get_device fails) and the
whole things falls apart. I think this may be related to the
comment /* TBD: Support fixed-feature devices */ in acpi_get_bus but it
is unclear to me.
My event comes a notifiy with a acpi memory range attached. It is a
single event. My hardware does not work with the current driver.
The attached patch is a simple workaround for my hardware from 2.6.14-
git7. This patch works for me. It creates the mem_device for the data
attached from the present event. It is provided to start the
conversation of how it is best to fix this issue.
Signed-off-by: Keith Mannthey
--
keith <kmannth-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
[-- Attachment #2: acpi_memfix_v1.patch --]
[-- Type: text/x-patch, Size: 1165 bytes --]
--- linux-2.6.14-bootsreg/drivers/acpi/acpi_memhotplug.c 2005-11-03 17:58:21.000000000 -0800
+++ linux-2.6.14/drivers/acpi/acpi_memhotplug.c 2005-11-11 20:44:33.000000000 -0800
@@ -110,6 +110,21 @@
return_VALUE(0);
}
+static struct acpi_memory_device*
+get_mem_resource_fixup(acpi_handle handle){
+ struct acpi_memory_device *mem_tmp = NULL;
+
+ printk ("called keiths fixup handler\n");
+
+ mem_tmp= kmalloc(sizeof(struct acpi_memory_device), GFP_KERNEL);
+
+ memset(mem_tmp,0, sizeof(struct acpi_memory_device));
+ mem_tmp->handle = handle;
+ acpi_memory_get_device_resources(mem_tmp);
+ return mem_tmp;
+}
+
+
static int
acpi_memory_get_device(acpi_handle handle,
struct acpi_memory_device **mem_device)
@@ -147,14 +159,15 @@
ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Error in acpi_bus_add\n"));
return_VALUE(-EINVAL);
}
-
end:
*mem_device = acpi_driver_data(device);
+
if (!(*mem_device)) {
- printk(KERN_ERR "\n driver data not found");
- return_VALUE(-ENODEV);
+ /* ok this is where I end up.....
+ * I am making my own memory_device
+ */
+ *mem_device = get_mem_resource_fixup(handle);
}
-
return_VALUE(0);
}
next prev parent reply other threads:[~2005-11-12 5:03 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-11-07 21:44 acpi_memhotplug driver is not working for me. Any ideas? keith
2005-11-11 2:45 ` keith
2005-11-12 5:03 ` keith [this message]
2005-11-15 5:36 ` [PATCH 1/1] patch to fix acpi_memhotplug.c keith
2005-11-15 9:29 ` [Lhms-devel] " KAMEZAWA Hiroyuki
[not found] ` <4379AA86.5040901-+CUm20s59erQFUHtdCDX3A@public.gmane.org>
2005-11-15 9:33 ` KAMEZAWA Hiroyuki
2005-11-16 2:49 ` keith
2005-11-16 3:26 ` KAMEZAWA Hiroyuki
2005-11-15 10:20 ` Yasunori Goto
[not found] ` <20051115171221.7E99.Y-GOTO-+CUm20s59erQFUHtdCDX3A@public.gmane.org>
2005-11-17 4:18 ` keith
2005-11-17 6:08 ` KAMEZAWA Hiroyuki
[not found] ` <437C1E6C.6000404-+CUm20s59erQFUHtdCDX3A@public.gmane.org>
2005-11-18 2:22 ` keith
2005-11-18 2:56 ` KAMEZAWA Hiroyuki
[not found] ` <437D42F1.6080407-+CUm20s59erQFUHtdCDX3A@public.gmane.org>
2005-11-18 18:54 ` keith
2005-11-17 7:01 ` Yasunori Goto
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=1131771825.20603.44.camel@knk \
--to=kmannth-r/jw6+rmf7hqt0dzr+alfa@public.gmane.org \
--cc=acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org \
--cc=lhms-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org \
--cc=naveen.b.s-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
/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
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox