public inbox for linux-acpi@vger.kernel.org
 help / color / mirror / Atom feed
* RE: Make LEqual less strict
@ 2004-09-03 17:38 Moore, Robert
       [not found] ` <37F890616C995246BE76B3E6B2DBE05501E638C4-sBd4vmA9Se5Qxe9IK+vIArfspsVTdybXVpNB7YpNyf8@public.gmane.org>
  0 siblings, 1 reply; 2+ messages in thread
From: Moore, Robert @ 2004-09-03 17:38 UTC (permalink / raw)
  To: Alex Williamson; +Cc: acpi-devel

We are working to get this into the ACPI 3.0 specification.

The code has been released in ACPI CA version 20040827.  It may not have
been released to Linux yet.



> -----Original Message-----
> From: Alex Williamson [mailto:alex.williamson-VXdhtT5mjnY@public.gmane.org]
> Sent: Friday, September 03, 2004 10:13 AM
> To: Moore, Robert
> Cc: acpi-devel
> Subject: Make LEqual less strict
> 
> Hi Bob,
> 
>    We discussed making LEqual less strict about requiring both
operands
> to be identical types a couple weeks ago.  It sounded like the plan
was
> to convert the second operand to match the first for the case where
> they're not equal.  I haven't seen a code change for this yet, so I'll
> toss this out in case it helps someone else.  It works for me, and
gets
> rid of all the errors my box was spewing with the new CA.  Thanks,
> 
> 	Alex
> 
> --
> Signed-off-by: Alex Williamson <alex.williamson-VXdhtT5mjnY@public.gmane.org>
> 
> ===== drivers/acpi/executer/exoparg2.c 1.25 vs edited =====
> --- 1.25/drivers/acpi/executer/exoparg2.c	2004-06-21 18:35:22
-06:00
> +++ edited/drivers/acpi/executer/exoparg2.c	2004-09-03 10:35:06
-06:00
> @@ -573,17 +573,48 @@
>  	 * Execute the Opcode
>  	 */
>  	if (walk_state->op_info->flags & AML_LOGICAL) /* logical_op
> (Operand0, Operand1) */ {
> -		/* Both operands must be of the same type */
> +		union acpi_operand_object *temp_desc = NULL;
> 
> -		if (ACPI_GET_OBJECT_TYPE (operand[0]) !=
> -			ACPI_GET_OBJECT_TYPE (operand[1])) {
> -			status = AE_AML_OPERAND_TYPE;
> -			goto cleanup;
> +		/*
> +		 * Convert the second operand if necessary.  The first
> +		 * operand determines the type of the second operand.
> +		 */
> +		switch (ACPI_GET_OBJECT_TYPE (operand[0])) {
> +		case ACPI_TYPE_INTEGER:
> +			status = acpi_ex_convert_to_integer (operand[1],
> +			                                     &temp_desc,
> +
walk_state);
> +			break;
> +
> +		case ACPI_TYPE_STRING:
> +			status = acpi_ex_convert_to_string (operand[1],
> +			                                    &temp_desc,
16,
> +
ACPI_UINT32_MAX,
> +							    walk_state);
> +			break;
> +
> +		case ACPI_TYPE_BUFFER:
> +			status = acpi_ex_convert_to_buffer (operand[1],
> +			                                    &temp_desc,
> +							    walk_state);
> +			break;
> +
> +		default:
> +			ACPI_REPORT_ERROR (("logical_op - invalid obj
type:
> %X\n",
> +					ACPI_GET_OBJECT_TYPE
(operand[0])));
> +			status = AE_AML_INTERNAL;
>  		}
> 
> +		if (ACPI_FAILURE (status))
> +			goto cleanup;
> +
>  		logical_result = acpi_ex_do_logical_op
(walk_state->opcode,
>  				 operand[0],
> -				 operand[1]);
> +				 temp_desc);
> +
> +		if (temp_desc != operand[1])
> +			acpi_ut_remove_reference(temp_desc);
> +
>  		goto store_logical_result;
>  	}
> 
> 



-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_idP47&alloc_id\x10808&op=click

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

end of thread, other threads:[~2004-10-11 15:27 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-09-03 17:38 Make LEqual less strict Moore, Robert
     [not found] ` <37F890616C995246BE76B3E6B2DBE05501E638C4-sBd4vmA9Se5Qxe9IK+vIArfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2004-10-11 15:27   ` LEqual fix for 2.6.9? Alex Williamson

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