On Tuesday, April 22, 2014 02:01:57 AM Zheng, Lv wrote: > Hi, > > <skip> > > > > +#define ACPI_NATIVE_INTERFACE_HEADER <acpi/platform/aclinuxxf.h> > > > > This is not good. > > > > We don't do things like this in the kernel, because they are confusing and hard > > to debug if necessary, so please find a different way to make this work. > > I use this extra header file to collect: I was not talking about the new header, which is basically OK, but about the #define above, which is just too confusing to live. Please use header file paths directly with #include. > 1. static inline OSL functions > 2. divergences of prototypes that haven't been back ported to ACPICA. > This file is useful for ACPICA release automation. > > There are the following concerns that lead to the use of this solution: > 1. for this extra header file itself > A. The new header file is OSPM specific, thus it needn't be upstreamed to ACPICA; > B. Since it needn't be upstreamed to ACPICA, ACPICA needn't determine the name of this extra header; > C. It has to be the last file included by <acpi/acpi.h>. > 2. for the file that includes this extra header file > A. Currently there is no OSPM specific code in <acpi/acpi.h>. > Thus I use a macro so that there is still no OSPM specific code in <acpi/acpi.h> and the name of the extra header can be determined by OSPM. > > If you want another solution, is the following acceptable? > 1. In <acpi/platform/aclinux.h> > #define ACPI_INCLUDE_EXTRA_NATIVE_HEADER 1 > 2. In <acpi/acpi.h> <- this is an ACPICA header file, > #ifdef ACPI_INCLUDE_EXTRA_NATIVE_HEADER > #include <acpi/platform/acextra.h> > #endif > Note that in this solution, the name of the extra header file will be determined by ACPICA. I think I see what you're trying to do now. And I see that this ACPI_NATIVE_INTERFACE_HEADER thing is already there in the Linus' tree which is not good at all. I probably would create an extra ACPICA header, something like <acpios_opt.h>, that would be empty for all hosts except for Linux and that would contain the stuff you want to put into acextra.h in Linux. That would be clean enough I suppose? Rafael -- 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