RE: [PATCH] acpiphp: Match the variable types for ia64

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



>acpi_status
>acpi_evaluate_integer(acpi_handle handle,
>                      acpi_string pathname,
>                      struct acpi_object_list *arguments, unsigned long

This is not an ACPICA interface, it is local to Linux (drivers/acpi/utils.c)

It should be a pointer to a 64-bit number always. acpi_integer * works well.

Bob

>-----Original Message-----
>From: linux-acpi-owner@xxxxxxxxxxxxxxx [mailto:linux-acpi-
>owner@xxxxxxxxxxxxxxx] On Behalf Of Matthew Wilcox
>Sent: Friday, September 12, 2008 11:32 AM
>To: Chen, Justin
>Cc: Jesse Barnes; Chiang, Alexander; Accardi, Kristen C; linux-
>pci@xxxxxxxxxxxxxxx; linux-acpi@xxxxxxxxxxxxxxx; Brown, Len
>Subject: Re: [PATCH] acpiphp: Match the variable types for ia64
>
>On Fri, Sep 12, 2008 at 05:03:50PM +0000, Chen, Justin wrote:
>> >>                 slot->device = device;
>> >> -               slot->sun = sun;
>> >> +               slot->sun = (u64) sun;
>> >
>> >No ... the right thing to do here is make the local variable
>> >'sun' a u64.  adr ought to be a u32, not an unsigned long.
>>
>> If I understand your concern right, you want to change the local
>> variable 'sun' in the routine register_slot() in the file acpiphp_glue.c
>> from unsigned long to u64.  If that's the case, it will introduce the
>> other issue that since the 'sun' is passed as the argument 4 of the
>> routine acpi_evaluate_integer() and it is taking the unsigned long,
>> what's the point to define 'sun' in u64?
>
>Ooh, I think you've found a bug in the ACPI-CA.
>
>Consider this:
>
>/*
> * Acpi integer width. In ACPI version 1, integers are 32 bits.  In ACPI
> * version 2, integers are 64 bits. Note that this pertains to the ACPI
>integer
> * type only, not other integers used in the implementation of the ACPI CA
> * subsystem.
> */
>typedef unsigned long long acpi_integer;
>
>and compare and contrast it with this:
>
>acpi_status
>acpi_evaluate_integer(acpi_handle handle,
>                      acpi_string pathname,
>                      struct acpi_object_list *arguments, unsigned long
>*data);
>
>I would argue 'data' should be an 'acpi_integer *', not an 'unsigned long
>*'
>Len?
>
>--
>Matthew Wilcox                          Intel Open Source Technology Centre
>"Bill, look, we understand that you're interested in selling us this
>operating system, but compare it to ours.  We can't possibly take such
>a retrograde step."
>--
>To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
>the body of a message to majordomo@xxxxxxxxxxxxxxx
>More majordomo info at  http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux