lkml.org 
[lkml]   [2003]   [Dec]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [ACPI] ACPI global lock macros
On Tue, 09 Dec 2003 01:22:09 -0800
Paul Menage <menage@google.com> wrote:

> Hi Andy,
>
> The ACPI_ACQUIRE_GLOBAL_LOCK() macro in include/asm-i386/acpi.h looks a
> little odd:

[...]

Thanks. I fixed the x86-64 version. RELEASE also needed similar treatment.


> Given the comments above the definition, I'm guessing that the "dummy"
> parameter was added later for some reason (to tell gcc that ecx would
> get clobbered? - but it doesn't seem to be clobbered), and the parameter
> substitutions in the asm weren't updated. Unless I'm missing something
> fundamental, shouldn't the definition be something more like this:

Numeric asm parameters are always evil and cause such bugs all the time.
gcc 3.2+ has named asm parameters which makes this much cleaner and less error prone.
Unfortunately they cannot be used in i386 because there are still people who insist
on using ancient compilers :-(

-Andi

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:59    [W:0.200 / U:0.000 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site