Re: [PATCH 1/1] intel_txt: to fix build errors of CONFIG_ACPI_SLEEP

From: H. Peter Anvin
Date: Thu Aug 13 2009 - 11:59:02 EST


On 08/13/2009 08:46 AM, Ingo Molnar wrote:
>
>> Consider the attached instead patch, which abstracts some of the
>> (way more complex than it should be) open-coded stuff and
>> therefore makes it stick out less.
>
> it's better, but why not put these:
>
>> +#ifdef CONFIG_ACPI_SLEEP
>> tboot->acpi_sinfo.kernel_s3_resume_vector = acpi_wakeup_address;
>> +#endif
>
> into a helper inline in a header file and let the #ifdefs be there,
> or something like that. That way the .c file stays readable.
>

That would probably be a good thing, *but* I think that that is more
cleaner done as a pass over the entire ACPI code and its dependencies.

acpi_wakeup_address is arguably wrong interface, in the first place:
it's exported as a physical address, but we actually need the virtual
address in several places, and so there is a lot of back-and-forth (if
we had the va interface this wouldn't be the only place in the case
which would be cleaner.) However, again, this is an ACPI-global issue.

-hpa

--
H. Peter Anvin, Intel Open Source Technology Center
I work for Intel. I don't speak on their behalf.

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