Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/acpi/acpica/Subsystem fix for ThinkPad 'large refere...
details: https://anonhg.NetBSD.org/src/rev/d6c545fbd338
branches: trunk
changeset: 555538:d6c545fbd338
user: kochi <kochi%NetBSD.org@localhost>
date: Thu Nov 20 15:42:16 2003 +0000
description:
fix for ThinkPad 'large reference count' problem.
from shaohua.li at intel.com
diffstat:
sys/dev/acpi/acpica/Subsystem/utdelete.c | 42 +++++++++++++++++++++++++++++--
1 files changed, 39 insertions(+), 3 deletions(-)
diffs (113 lines):
diff -r 6668c5e16c05 -r d6c545fbd338 sys/dev/acpi/acpica/Subsystem/utdelete.c
--- a/sys/dev/acpi/acpica/Subsystem/utdelete.c Thu Nov 20 15:07:07 2003 +0000
+++ b/sys/dev/acpi/acpica/Subsystem/utdelete.c Thu Nov 20 15:42:16 2003 +0000
@@ -115,7 +115,7 @@
*****************************************************************************/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: utdelete.c,v 1.8 2003/11/09 11:51:01 kochi Exp $");
+__KERNEL_RCSID(0, "$NetBSD: utdelete.c,v 1.9 2003/11/20 15:42:16 kochi Exp $");
#define __UTDELETE_C__
@@ -513,6 +513,7 @@
UINT32 i;
ACPI_GENERIC_STATE *StateList = NULL;
ACPI_GENERIC_STATE *State;
+ ACPI_OPERAND_OBJECT *tmp;
ACPI_FUNCTION_TRACE_PTR ("UtUpdateObjectReference", Object);
@@ -549,8 +550,15 @@
{
case ACPI_TYPE_DEVICE:
- AcpiUtUpdateRefCount (Object->Device.SystemNotify, Action);
- AcpiUtUpdateRefCount (Object->Device.DeviceNotify, Action);
+ tmp = Object->Device.SystemNotify;
+ if (tmp && (tmp->Common.ReferenceCount <= 1) && Action == REF_DECREMENT)
+ Object->Device.SystemNotify = NULL;
+ AcpiUtUpdateRefCount (tmp, Action);
+
+ tmp = Object->Device.DeviceNotify;
+ if (tmp && (tmp->Common.ReferenceCount <= 1) && Action == REF_DECREMENT)
+ Object->Device.DeviceNotify = NULL;
+ AcpiUtUpdateRefCount (tmp, Action);
break;
@@ -573,6 +581,10 @@
{
goto ErrorExit;
}
+
+ tmp = Object->Package.Elements[i];
+ if (tmp && (tmp->Common.ReferenceCount <= 1) && Action == REF_DECREMENT)
+ Object->Package.Elements[i] = NULL;
}
break;
@@ -585,6 +597,10 @@
{
goto ErrorExit;
}
+
+ tmp = Object->BufferField.BufferObj;
+ if (tmp && (tmp->Common.ReferenceCount <= 1) && Action == REF_DECREMENT)
+ Object->BufferField.BufferObj = NULL;
break;
@@ -596,6 +612,10 @@
{
goto ErrorExit;
}
+
+ tmp = Object->Field.RegionObj;
+ if (tmp && (tmp->Common.ReferenceCount <= 1) && Action == REF_DECREMENT)
+ Object->Field.RegionObj = NULL;
break;
@@ -608,12 +628,20 @@
goto ErrorExit;
}
+ tmp = Object->BankField.BankObj;
+ if (tmp && (tmp->Common.ReferenceCount <= 1) && Action == REF_DECREMENT)
+ Object->BankField.BankObj = NULL;
+
Status = AcpiUtCreateUpdateStateAndPush (
Object->BankField.RegionObj, Action, &StateList);
if (ACPI_FAILURE (Status))
{
goto ErrorExit;
}
+
+ tmp = Object->BankField.RegionObj;
+ if (tmp && (tmp->Common.ReferenceCount <= 1) && Action == REF_DECREMENT)
+ Object->BankField.RegionObj = NULL;
break;
@@ -626,12 +654,20 @@
goto ErrorExit;
}
+ tmp = Object->IndexField.IndexObj;
+ if (tmp && (tmp->Common.ReferenceCount <= 1) && Action == REF_DECREMENT)
+ Object->IndexField.IndexObj = NULL;
+
Status = AcpiUtCreateUpdateStateAndPush (
Object->IndexField.DataObj, Action, &StateList);
if (ACPI_FAILURE (Status))
{
goto ErrorExit;
}
+
+ tmp = Object->IndexField.DataObj;
+ if (tmp && (tmp->Common.ReferenceCount <= 1) && Action == REF_DECREMENT)
+ Object->IndexField.DataObj = NULL;
break;
Home |
Main Index |
Thread Index |
Old Index