qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v4 27/33] nvdimm acpi: save arg3 for NVDIMM devi


From: Michael S. Tsirkin
Subject: Re: [Qemu-devel] [PATCH v4 27/33] nvdimm acpi: save arg3 for NVDIMM device _DSM method
Date: Tue, 20 Oct 2015 00:19:22 +0300

On Mon, Oct 19, 2015 at 10:29:50AM -0700, Dan Williams wrote:
> On Mon, Oct 19, 2015 at 12:09 AM, Michael S. Tsirkin <address@hidden> wrote:
> > On Mon, Oct 19, 2015 at 12:04:48PM +0800, Xiao Guangrong wrote:
> > I mean don't use ASL to comment C. It's not more readable.
> > Describe why the code is the way it is. Use variables by preference,
> > C does not have weird limitations like ASL so you don't need to call
> > your variables "arg3". What does it hold?
> >
> 
> What it holds is function number specific.  It's similar to
> SYSCALL_DEFINEx where the ASL code is there to marshal arguments from
> the OS through ACPI to a BIOS routine.  See the definition of the
> example _DSM functions here and the usages of "Arg3":
> http://pmem.io/documents/NVDIMM_DSM_Interface_Example.pdf

So it seems to say "3.1.1.1.1 Input (Arg3)".
Is that right? So

Aml *input = aml_arg(3); /* Input (Arg3) */
or even
Aml *input_arg3 =  aml_arg(3); /* Input (Arg3) */

My point is we are not writing ASL. There is no reason
to use cryptic names.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]