diff options
Diffstat (limited to 'scripts/mod')
-rw-r--r-- | scripts/mod/file2alias.c | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/scripts/mod/file2alias.c b/scripts/mod/file2alias.c index b89efe6e4c85..8e730ccc3f2b 100644 --- a/scripts/mod/file2alias.c +++ b/scripts/mod/file2alias.c | |||
@@ -1029,6 +1029,31 @@ static int do_amba_entry(const char *filename, | |||
1029 | } | 1029 | } |
1030 | ADD_TO_DEVTABLE("amba", struct amba_id, do_amba_entry); | 1030 | ADD_TO_DEVTABLE("amba", struct amba_id, do_amba_entry); |
1031 | 1031 | ||
1032 | /* LOOKS like x86cpu:vendor:VVVV:family:FFFF:model:MMMM:feature:*,FEAT,* | ||
1033 | * All fields are numbers. It would be nicer to use strings for vendor | ||
1034 | * and feature, but getting those out of the build system here is too | ||
1035 | * complicated. | ||
1036 | */ | ||
1037 | |||
1038 | static int do_x86cpu_entry(const char *filename, struct x86_cpu_id *id, | ||
1039 | char *alias) | ||
1040 | { | ||
1041 | id->feature = TO_NATIVE(id->feature); | ||
1042 | id->family = TO_NATIVE(id->family); | ||
1043 | id->model = TO_NATIVE(id->model); | ||
1044 | id->vendor = TO_NATIVE(id->vendor); | ||
1045 | |||
1046 | strcpy(alias, "x86cpu:"); | ||
1047 | ADD(alias, "vendor:", id->vendor != X86_VENDOR_ANY, id->vendor); | ||
1048 | ADD(alias, ":family:", id->family != X86_FAMILY_ANY, id->family); | ||
1049 | ADD(alias, ":model:", id->model != X86_MODEL_ANY, id->model); | ||
1050 | strcat(alias, ":feature:*"); | ||
1051 | if (id->feature != X86_FEATURE_ANY) | ||
1052 | sprintf(alias + strlen(alias), "%04X*", id->feature); | ||
1053 | return 1; | ||
1054 | } | ||
1055 | ADD_TO_DEVTABLE("x86cpu", struct x86_cpu_id, do_x86cpu_entry); | ||
1056 | |||
1032 | /* Does namelen bytes of name exactly match the symbol? */ | 1057 | /* Does namelen bytes of name exactly match the symbol? */ |
1033 | static bool sym_is(const char *name, unsigned namelen, const char *symbol) | 1058 | static bool sym_is(const char *name, unsigned namelen, const char *symbol) |
1034 | { | 1059 | { |