public inbox for linux-acpi@vger.kernel.org
 help / color / mirror / Atom feed
From: Mattia Dongili <malattia-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: "Starikovskiy,
	Alexey Y"
	<alexey.y.starikovskiy-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Cc: Norbert Preining <preining-DX+603jRYB8@public.gmane.org>,
	Thomas Renninger <trenn-l3A5Bk7waGM@public.gmane.org>,
	ACPI Devel Maling List
	<acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org>
Subject: Re: utmisc-0131: *** Error: Invalid owner_id: 00
Date: Thu, 25 Aug 2005 12:36:52 +0200	[thread overview]
Message-ID: <2fc0cdd205082503364f255347@mail.gmail.com> (raw)
In-Reply-To: <6694B22B6436BC43B429958787E454983CBD0C@mssmsx402nb>

[-- Attachment #1: Type: text/plain, Size: 335 bytes --]

On 8/25/05, Starikovskiy, Alexey Y <alexey.y.starikovskiy-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org> wrote:
>  Could you try this patch?

That fixes it! (I attached again the diff to apply cleanly to .13-rc6-mm2)
I'll test the thing some more to verify that the random "Invalid
owner_id" don't appear anymore.

-- 
mattia
:wq!

[-- Attachment #2: owner_id-2.patch.rc6-mm2 --]
[-- Type: application/octet-stream, Size: 4724 bytes --]

diff -rup linux-2.6.13-rc6-mm2/drivers/acpi/dispatcher/dsmethod.c linux-clean/drivers/acpi/dispatcher/dsmethod.c
--- linux-2.6.13-rc6-mm2/drivers/acpi/dispatcher/dsmethod.c	2005-08-25 10:23:18.949991250 +0200
+++ linux-clean/drivers/acpi/dispatcher/dsmethod.c	2005-08-25 12:22:47.413992250 +0200
@@ -289,11 +289,6 @@ acpi_ds_call_control_method(struct acpi_
 		return_ACPI_STATUS(AE_NULL_OBJECT);
 	}
 
-	status = acpi_ut_allocate_owner_id(&obj_desc->method.owner_id);
-	if (ACPI_FAILURE(status)) {
-		return_ACPI_STATUS(status);
-	}
-
 	/* Init for new method, wait on concurrency semaphore */
 
 	status = acpi_ds_begin_method_execution(method_node, obj_desc,
@@ -302,6 +297,13 @@ acpi_ds_call_control_method(struct acpi_
 		goto cleanup;
 	}
 
+	if (obj_desc->method.thread_count == 1) {
+		status = acpi_ut_allocate_owner_id (&obj_desc->method.owner_id);
+		if (ACPI_FAILURE (status)) {
+			return_ACPI_STATUS (status);
+		}
+	}
+
 	if (!(obj_desc->method.method_flags & AML_METHOD_INTERNAL_ONLY)) {
 		/* 1) Parse: Create a new walk state for the preempting walk */
 
@@ -335,6 +337,8 @@ acpi_ds_call_control_method(struct acpi_
 		acpi_ps_delete_parse_tree(op);
 	}
 
+	obj_desc->method.thread_count--;
+
 	/* 2) Execute: Create a new state for the preempting walk */
 
 	next_walk_state = acpi_ds_create_walk_state(obj_desc->method.owner_id,
@@ -388,7 +392,9 @@ acpi_ds_call_control_method(struct acpi_
 	/* On error, we must delete the new walk state */
 
       cleanup:
-	acpi_ut_release_owner_id(&obj_desc->method.owner_id);
+	if (!obj_desc->method.thread_count && obj_desc->method.owner_id) {
+		acpi_ut_release_owner_id (&obj_desc->method.owner_id);
+	}
 	if (next_walk_state && (next_walk_state->method_desc)) {
 		/* Decrement the thread count on the method parse tree */
 
@@ -534,14 +540,12 @@ acpi_status acpi_ds_terminate_control_me
 		}
 	}
 
-	if (walk_state->method_desc->method.thread_count) {
+	if (walk_state->method_desc->method.thread_count > 1) {
 		ACPI_DEBUG_PRINT((ACPI_DB_DISPATCH,
 				  "*** Not deleting method namespace, there are still %d threads\n",
 				  walk_state->method_desc->method.
 				  thread_count));
-	}
-
-	if (!walk_state->method_desc->method.thread_count) {
+	} else {
 		/*
 		 * Support to dynamically change a method from not_serialized to
 		 * Serialized if it appears that the method is written foolishly and

diff -rup linux-2.6.13-rc6-mm2/drivers/acpi/parser/psparse.c linux-clean/drivers/acpi/parser/psparse.c
--- linux-2.6.13-rc6-mm2/drivers/acpi/parser/psparse.c	2005-08-25 10:23:19.970055000 +0200
+++ linux-clean/drivers/acpi/parser/psparse.c	2005-08-25 12:23:37.425117750 +0200
@@ -524,14 +524,6 @@ acpi_status acpi_ps_parse_aml(struct acp
 			}
 		}
 
-		if (walk_state->method_desc) {
-			/* Decrement the thread count on the method parse tree */
-
-			if (walk_state->method_desc->method.thread_count) {
-				walk_state->method_desc->method.thread_count--;
-			}
-		}
-
 		/* We are done with this walk, move on to the parent if any */
 
 		walk_state = acpi_ds_pop_walk_state(thread);

diff -rup linux-2.6.13-rc6-mm2/drivers/acpi/parser/psxface.c linux-clean/drivers/acpi/parser/psxface.c
--- linux-2.6.13-rc6-mm2/drivers/acpi/parser/psxface.c	2005-08-25 10:23:20.014057750 +0200
+++ linux-clean/drivers/acpi/parser/psxface.c	2005-08-25 12:25:04.870582750 +0200
@@ -103,9 +103,11 @@ acpi_status acpi_ps_execute_method(struc
 	 * objects (such as Operation Regions) can be created during the
 	 * first pass parse.
 	 */
-	status = acpi_ut_allocate_owner_id(&info->obj_desc->method.owner_id);
-	if (ACPI_FAILURE(status)) {
-		return_ACPI_STATUS(status);
+	if (info->obj_desc->method.thread_count == 1) {
+		status = acpi_ut_allocate_owner_id (&info->obj_desc->method.owner_id);
+		if (ACPI_FAILURE (status)) {
+			return_ACPI_STATUS (status);
+		}
 	}
 
 	/*
@@ -138,8 +140,11 @@ acpi_status acpi_ps_execute_method(struc
 	info->pass_number = 3;
 	status = acpi_ps_execute_pass(info);
 
+	info->obj_desc->method.thread_count--;
+
       cleanup:
-	if (info->obj_desc->method.owner_id) {
+	if (!info->obj_desc->method.thread_count && 
+	    info->obj_desc->method.owner_id) {
 		acpi_ut_release_owner_id(&info->obj_desc->method.owner_id);
 	}
 
diff -rup linux-2.6.13-rc6-mm2/drivers/acpi/utilities/utmisc.c linux-clean/drivers/acpi/utilities/utmisc.c
--- linux-2.6.13-rc6-mm2/drivers/acpi/utilities/utmisc.c	2005-08-25 10:23:20.550091250 +0200
+++ linux-clean/drivers/acpi/utilities/utmisc.c	2005-08-25 12:25:36.632567750 +0200
@@ -67,6 +67,8 @@ acpi_status acpi_ut_allocate_owner_id(ac
 
 	ACPI_FUNCTION_TRACE("ut_allocate_owner_id");
 
+	WARN_ON (*owner_id);
+
 	/* Mutex for the global ID mask */
 
 	status = acpi_ut_acquire_mutex(ACPI_MTX_CACHES);

  reply	other threads:[~2005-08-25 10:36 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-08-25 10:14 utmisc-0131: *** Error: Invalid owner_id: 00 Starikovskiy, Alexey Y
2005-08-25 10:36 ` Mattia Dongili [this message]
     [not found]   ` <2fc0cdd205082503364f255347-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2005-08-25 17:22     ` Mattia Dongili
     [not found]       ` <20050825172227.GA4055-MEqNC12sBsHxa7XIdbXXog@public.gmane.org>
2005-08-25 17:32         ` Mattia Dongili
2005-08-25 15:20 ` Norbert Preining
  -- strict thread matches above, loose matches on Subject: below --
2005-08-26 15:51 Starikovskiy, Alexey Y
2005-08-26 21:18 ` Norbert Preining
2005-08-27 18:28 ` Mattia Dongili
2005-08-25  5:56 Starikovskiy, Alexey Y
2005-08-25  8:55 ` Mattia Dongili
2005-08-24 10:51 Starikovskiy, Alexey Y
2005-08-24 19:20 ` Mattia Dongili
     [not found] <971FCB6690CD0E4898387DBF7552B90E0272D21C@orsmsx403.amr.corp.intel.com>
     [not found] ` <20050818201400.GA13121@inferi.kami.home>
     [not found]   ` <20050818201400.GA13121-MEqNC12sBsHxa7XIdbXXog@public.gmane.org>
2005-08-18 20:15     ` Mattia Dongili
2005-08-18 18:21 Mattia Dongili
     [not found] ` <20050818182153.GA6032-MEqNC12sBsHxa7XIdbXXog@public.gmane.org>
2005-08-18 19:09   ` Mattia Dongili
     [not found]     ` <430764C6.508@suse.de>
     [not found]       ` <430764C6.508-l3A5Bk7waGM@public.gmane.org>
2005-08-21  8:25         ` Mattia Dongili
2005-08-21 17:41         ` Mattia Dongili

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=2fc0cdd205082503364f255347@mail.gmail.com \
    --to=malattia-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
    --cc=acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org \
    --cc=alexey.y.starikovskiy-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
    --cc=preining-DX+603jRYB8@public.gmane.org \
    --cc=trenn-l3A5Bk7waGM@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