public inbox for linux-acpi@vger.kernel.org
 help / color / mirror / Atom feed
* RE: Re: [Lhms-devel] [PATCH 1/1]  patch to fix acpi_memhotplug.c
@ 2005-11-18 20:51 Moore, Robert
       [not found] ` <971FCB6690CD0E4898387DBF7552B90E0378BEE7-sBd4vmA9Se5Qxe9IK+vIArfspsVTdybXVpNB7YpNyf8@public.gmane.org>
  0 siblings, 1 reply; 26+ messages in thread
From: Moore, Robert @ 2005-11-18 20:51 UTC (permalink / raw)
  To: Moore, Robert, KAMEZAWA Hiroyuki, keith
  Cc: Yasunori Goto, Brown, Len, S, Naveen B, acpi-devel,
	external hotplug mem list, Tolentino, Matthew E

FYI, here are the strings supported:

/*
 * Strings supported by the _OSI predefined (internal) method.
 * When adding strings, be sure to update ACPI_NUM_OSI_STRINGS.
 */
const char
*AcpiGbl_ValidOsiStrings[ACPI_NUM_OSI_STRINGS] =
{
    /* Operating System Vendor Strings */

    "Linux",
    "Windows 2000",
    "Windows 2001",
    "Windows 2001.1",
    "Windows 2001 SP0",
    "Windows 2001 SP1",
    "Windows 2001 SP2",
    "Windows 2001 SP3",
    "Windows 2001 SP4",

    /* Feature Group Strings */

    "Extended Address Space Descriptor"
};

> -----Original Message-----
> From: acpi-devel-admin-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org [mailto:acpi-devel-
> admin-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org] On Behalf Of Moore, Robert
> Sent: Friday, November 18, 2005 11:47 AM
> To: KAMEZAWA Hiroyuki; keith
> Cc: Yasunori Goto; Brown, Len; S, Naveen B; acpi-devel; external
hotplug
> mem list; Tolentino, Matthew E
> Subject: RE: [ACPI] Re: [Lhms-devel] [PATCH 1/1] patch to fix
> acpi_memhotplug.c
> 
> The ACPICA code supports _OSI and will respond TRUE when shown the
> "Windows 2001" string.
> Bob
> 
> 
> > -----Original Message-----
> > From: acpi-devel-admin-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org [mailto:acpi-devel-
> > admin-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org] On Behalf Of KAMEZAWA Hiroyuki
> > Sent: Thursday, November 17, 2005 6:57 PM
> > To: keith
> > Cc: Yasunori Goto; Brown, Len; S, Naveen B; acpi-devel; external
> hotplug
> > mem list; Tolentino, Matthew E
> > Subject: Re: [ACPI] Re: [Lhms-devel] [PATCH 1/1] patch to fix
> > acpi_memhotplug.c
> >
> > keith wrote:
> > >> >
> > >>Could you show your AML tree around Memory ?
> > >
> > >
> > > See attached SSDT.
> > >
> > Thanks, at the first look.....
> >
> > >         Device (ME00)
> > >         {
> > <snip>
> > >             Method (_STA, 0, NotSerialized)
> > >             {
> > >                 If (CondRefOf (_OSI, Local0))
> > >                 {
> > >                     If (\_OSI ("Windows 2001"))
> > >                     {
> > >                         If (LAnd (LEqual (BADH, EADH), LEqual
(BADL,
> > EADL)))
> > >                         {
> > >                             Or (MEID, \_SB.MEMI, \_SB.MEMI)
> > >                             Return (0x00)
> > >                         }
> > >                         Else
> > >                         {
> > >                             And (Not (MEID), \_SB.MEMI, \_SB.MEMI)
> > >                             Return (0x0F)
> > >                         }
> > >                     }
> > >                 }
> > >
> > >                 Return (0x00)
> > >             }
> > It seems memory device's  _STA never returns 0xF always returns 0x0.
> > (Device is online and enabled) when OS is not Windows2001.
> > All PNP0C80 decvices in this SSDT has same _STA function.
> >
> > So, I think why your hot add failes is _STA has no present bit.
> > ==
> > drivers/acpi/scan.c
> >
> > acpi_add_single_object()
> > <snip>
> >          case ACPI_BUS_TYPE_DEVICE:
> >                  result = acpi_bus_get_status(device);  in
> > drivers/acpi/bus.c
> >                  if (ACPI_FAILURE(result) ||
!device->status.present)
> { <-
> > ---(*)
> >                          result = -ENOENT;
> >                          goto end;
> >                  }
> >                  break;
> > ==
> >
> > rewriting your DSDT would be sane approach.
> >
> > -- Kame
> >
> >
> >
> >
> >
> > -------------------------------------------------------
> > This SF.Net email is sponsored by the JBoss Inc.  Get Certified
Today
> > Register for a JBoss Training Course.  Free Certification Exam
> > for All Training Attendees Through End of 2005. For more info visit:
> > http://ads.osdn.com/?ad_id=7628&alloc_id=16845&op=click
> > _______________________________________________
> > Acpi-devel mailing list
> > Acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
> > https://lists.sourceforge.net/lists/listinfo/acpi-devel
> 
> 
> -------------------------------------------------------
> This SF.Net email is sponsored by the JBoss Inc.  Get Certified Today
> Register for a JBoss Training Course.  Free Certification Exam
> for All Training Attendees Through End of 2005. For more info visit:
> http://ads.osdn.com/?ad_idv28&alloc_id\x16845&op=ick
> _______________________________________________
> Acpi-devel mailing list
> Acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
> https://lists.sourceforge.net/lists/listinfo/acpi-devel


-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc.  Get Certified Today
Register for a JBoss Training Course.  Free Certification Exam
for All Training Attendees Through End of 2005. For more info visit:
http://ads.osdn.com/?ad_idv28&alloc_id\x16845&op=click

^ permalink raw reply	[flat|nested] 26+ messages in thread
* RE: Re: [Lhms-devel] [PATCH 1/1]  patch to fix acpi_memhotplug.c
@ 2005-11-18 19:47 Moore, Robert
       [not found] ` <971FCB6690CD0E4898387DBF7552B90E0378BDDE-sBd4vmA9Se5Qxe9IK+vIArfspsVTdybXVpNB7YpNyf8@public.gmane.org>
  0 siblings, 1 reply; 26+ messages in thread
From: Moore, Robert @ 2005-11-18 19:47 UTC (permalink / raw)
  To: KAMEZAWA Hiroyuki, keith
  Cc: Yasunori Goto, Brown, Len, S, Naveen B, acpi-devel,
	external hotplug mem list, Tolentino, Matthew E

The ACPICA code supports _OSI and will respond TRUE when shown the
"Windows 2001" string.
Bob


> -----Original Message-----
> From: acpi-devel-admin-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org [mailto:acpi-devel-
> admin-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org] On Behalf Of KAMEZAWA Hiroyuki
> Sent: Thursday, November 17, 2005 6:57 PM
> To: keith
> Cc: Yasunori Goto; Brown, Len; S, Naveen B; acpi-devel; external
hotplug
> mem list; Tolentino, Matthew E
> Subject: Re: [ACPI] Re: [Lhms-devel] [PATCH 1/1] patch to fix
> acpi_memhotplug.c
> 
> keith wrote:
> >> >
> >>Could you show your AML tree around Memory ?
> >
> >
> > See attached SSDT.
> >
> Thanks, at the first look.....
> 
> >         Device (ME00)
> >         {
> <snip>
> >             Method (_STA, 0, NotSerialized)
> >             {
> >                 If (CondRefOf (_OSI, Local0))
> >                 {
> >                     If (\_OSI ("Windows 2001"))
> >                     {
> >                         If (LAnd (LEqual (BADH, EADH), LEqual (BADL,
> EADL)))
> >                         {
> >                             Or (MEID, \_SB.MEMI, \_SB.MEMI)
> >                             Return (0x00)
> >                         }
> >                         Else
> >                         {
> >                             And (Not (MEID), \_SB.MEMI, \_SB.MEMI)
> >                             Return (0x0F)
> >                         }
> >                     }
> >                 }
> >
> >                 Return (0x00)
> >             }
> It seems memory device's  _STA never returns 0xF always returns 0x0.
> (Device is online and enabled) when OS is not Windows2001.
> All PNP0C80 decvices in this SSDT has same _STA function.
> 
> So, I think why your hot add failes is _STA has no present bit.
> ==
> drivers/acpi/scan.c
> 
> acpi_add_single_object()
> <snip>
>          case ACPI_BUS_TYPE_DEVICE:
>                  result = acpi_bus_get_status(device);  in
> drivers/acpi/bus.c
>                  if (ACPI_FAILURE(result) || !device->status.present)
{ <-
> ---(*)
>                          result = -ENOENT;
>                          goto end;
>                  }
>                  break;
> ==
> 
> rewriting your DSDT would be sane approach.
> 
> -- Kame
> 
> 
> 
> 
> 
> -------------------------------------------------------
> This SF.Net email is sponsored by the JBoss Inc.  Get Certified Today
> Register for a JBoss Training Course.  Free Certification Exam
> for All Training Attendees Through End of 2005. For more info visit:
> http://ads.osdn.com/?ad_id=7628&alloc_id=16845&op=click
> _______________________________________________
> Acpi-devel mailing list
> Acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
> https://lists.sourceforge.net/lists/listinfo/acpi-devel


-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc.  Get Certified Today
Register for a JBoss Training Course.  Free Certification Exam
for All Training Attendees Through End of 2005. For more info visit:
http://ads.osdn.com/?ad_idv28&alloc_id\x16845&op=click

^ permalink raw reply	[flat|nested] 26+ messages in thread
* [RFC][PATCH]  patch to fix acpi_memhotplug.c for my hardware
@ 2005-11-12  5:03 keith
  2005-11-15  5:36 ` [PATCH 1/1] patch to fix acpi_memhotplug.c keith
  0 siblings, 1 reply; 26+ messages in thread
From: keith @ 2005-11-12  5:03 UTC (permalink / raw)
  To: external hotplug mem list; +Cc: naveen.b.s-ral2JQCrhuEAvxtiuMwx3w, acpi-devel

[-- 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);
 }
 

^ permalink raw reply	[flat|nested] 26+ messages in thread

end of thread, other threads:[~2006-06-22 19:07 UTC | newest]

Thread overview: 26+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-11-18 20:51 Re: [Lhms-devel] [PATCH 1/1] patch to fix acpi_memhotplug.c Moore, Robert
     [not found] ` <971FCB6690CD0E4898387DBF7552B90E0378BEE7-sBd4vmA9Se5Qxe9IK+vIArfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2005-11-19 10:44   ` Erik Slagter
2005-11-19 12:15   ` Kamezawa Hiroyuki
     [not found]     ` <1150853300.5873.49.camel@keithlap>
2006-06-21  2:10       ` [Lhms-devel] [RFC] Patch [1/1] for acpi_memhotplug.c keith mannthey
     [not found]       ` <20060621114334.1b954854.kamezawa.hiroyu@jp.fujitsu.com>
     [not found]         ` <1150863525.7865.6.camel@keithlap>
     [not found]           ` <20060621194832.37124aae.kamezawa.hiroyu@jp.fujitsu.com>
2006-06-21 18:43             ` [Lhms-devel] [RFC] Patch [1/2] " keith mannthey
2006-06-21 23:23               ` keith mannthey
2006-06-22  0:13                 ` KAMEZAWA Hiroyuki
2006-06-22  1:37                   ` keith mannthey
2006-06-22  1:58                     ` KAMEZAWA Hiroyuki
2006-06-22  2:19                       ` keith mannthey
2006-06-22  3:13                         ` KAMEZAWA Hiroyuki
2006-06-22  3:55                           ` keith mannthey
2006-06-22  5:20                             ` KAMEZAWA Hiroyuki
2006-06-22  6:11                               ` KAMEZAWA Hiroyuki
2006-06-22  7:01                               ` KAMEZAWA Hiroyuki
2006-06-22 17:25                               ` keith mannthey
2006-06-22 17:41                                 ` KAMEZAWA Hiroyuki
2006-06-22 18:29                                   ` keith mannthey
2006-06-22 19:07                                     ` keith mannthey
2006-06-22  2:28                       ` keith mannthey
  -- strict thread matches above, loose matches on Subject: below --
2005-11-18 19:47 Re: [Lhms-devel] [PATCH 1/1] patch to fix acpi_memhotplug.c Moore, Robert
     [not found] ` <971FCB6690CD0E4898387DBF7552B90E0378BDDE-sBd4vmA9Se5Qxe9IK+vIArfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2005-11-19 12:03   ` Kamezawa Hiroyuki
2005-11-12  5:03 [RFC][PATCH] patch to fix acpi_memhotplug.c for my hardware keith
2005-11-15  5:36 ` [PATCH 1/1] patch to fix acpi_memhotplug.c keith
2005-11-15 10:20   ` [Lhms-devel] " Yasunori Goto
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox