mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-22 20:23:57 +08:00
abbf1590de
Partition the header include path flags into two sets, one for kernelspace builds and one for userspace builds. Add the following directories to build after the ordinary include directories so that #include will pick up the UAPI header directly if the kernel header has been moved there. The userspace set (represented by the USERINCLUDE make variable) contains: -I $(srctree)/arch/$(hdr-arch)/include/uapi -I arch/$(hdr-arch)/include/generated/uapi -I $(srctree)/include/uapi -I include/generated/uapi -include $(srctree)/include/linux/kconfig.h and the kernelspace set (represented by the LINUXINCLUDE make variable) contains: -I $(srctree)/arch/$(hdr-arch)/include -I arch/$(hdr-arch)/include/generated -I $(srctree)/include -I include --- if not building in the source tree plus everything in the USERINCLUDE set. Then use USERINCLUDE in building the x86 boot code. Signed-off-by: David Howells <dhowells@redhat.com> Acked-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Thomas Gleixner <tglx@linutronix.de> Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Acked-by: Dave Jones <davej@redhat.com>
52 lines
1.3 KiB
C
52 lines
1.3 KiB
C
/* ----------------------------------------------------------------------- *
|
|
*
|
|
* Copyright 2008 rPath, Inc. - All Rights Reserved
|
|
*
|
|
* This file is part of the Linux kernel, and is made available under
|
|
* the terms of the GNU General Public License version 2 or (at your
|
|
* option) any later version; incorporated herein by reference.
|
|
*
|
|
* ----------------------------------------------------------------------- */
|
|
|
|
/*
|
|
* This is a host program to preprocess the CPU strings into a
|
|
* compact format suitable for the setup code.
|
|
*/
|
|
|
|
#include <stdio.h>
|
|
|
|
#include "../include/asm/required-features.h"
|
|
#include "../include/asm/cpufeature.h"
|
|
#include "../kernel/cpu/capflags.c"
|
|
|
|
int main(void)
|
|
{
|
|
int i, j;
|
|
const char *str;
|
|
|
|
printf("static const char x86_cap_strs[] =\n");
|
|
|
|
for (i = 0; i < NCAPINTS; i++) {
|
|
for (j = 0; j < 32; j++) {
|
|
str = x86_cap_flags[i*32+j];
|
|
|
|
if (i == NCAPINTS-1 && j == 31) {
|
|
/* The last entry must be unconditional; this
|
|
also consumes the compiler-added null
|
|
character */
|
|
if (!str)
|
|
str = "";
|
|
printf("\t\"\\x%02x\\x%02x\"\"%s\"\n",
|
|
i, j, str);
|
|
} else if (str) {
|
|
printf("#if REQUIRED_MASK%d & (1 << %d)\n"
|
|
"\t\"\\x%02x\\x%02x\"\"%s\\0\"\n"
|
|
"#endif\n",
|
|
i, j, i, j, str);
|
|
}
|
|
}
|
|
}
|
|
printf("\t;\n");
|
|
return 0;
|
|
}
|