diff options
Diffstat (limited to 'scripts/mod')
| -rw-r--r-- | scripts/mod/file2alias.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/scripts/mod/file2alias.c b/scripts/mod/file2alias.c index c0e14b3f230..026ba38759c 100644 --- a/scripts/mod/file2alias.c +++ b/scripts/mod/file2alias.c | |||
| @@ -1013,6 +1013,30 @@ static int do_amba_entry(const char *filename, | |||
| 1013 | } | 1013 | } |
| 1014 | ADD_TO_DEVTABLE("amba", struct amba_id, do_amba_entry); | 1014 | ADD_TO_DEVTABLE("amba", struct amba_id, do_amba_entry); |
| 1015 | 1015 | ||
| 1016 | /* LOOKS like x86cpu:vendor:VVVV:family:FFFF:model:MMMM:feature:*,FEAT,* | ||
| 1017 | * All fields are numbers. It would be nicer to use strings for vendor | ||
| 1018 | * and feature, but getting those out of the build system here is too | ||
| 1019 | * complicated. | ||
| 1020 | */ | ||
| 1021 | |||
| 1022 | static int do_x86cpu_entry(const char *filename, struct x86_cpu_id *id, | ||
| 1023 | char *alias) | ||
| 1024 | { | ||
| 1025 | id->feature = TO_NATIVE(id->feature); | ||
| 1026 | id->family = TO_NATIVE(id->family); | ||
| 1027 | id->model = TO_NATIVE(id->model); | ||
| 1028 | id->vendor = TO_NATIVE(id->vendor); | ||
| 1029 | |||
| 1030 | strcpy(alias, "x86cpu:"); | ||
| 1031 | ADD(alias, "vendor:", id->vendor != X86_VENDOR_ANY, id->vendor); | ||
| 1032 | ADD(alias, ":family:", id->family != X86_FAMILY_ANY, id->family); | ||
| 1033 | ADD(alias, ":model:", id->model != X86_MODEL_ANY, id->model); | ||
| 1034 | ADD(alias, ":feature:*,", id->feature != X86_FEATURE_ANY, id->feature); | ||
| 1035 | strcat(alias, ",*"); | ||
| 1036 | return 1; | ||
| 1037 | } | ||
| 1038 | ADD_TO_DEVTABLE("x86cpu", struct x86_cpu_id, do_x86cpu_entry); | ||
| 1039 | |||
| 1016 | /* Does namelen bytes of name exactly match the symbol? */ | 1040 | /* Does namelen bytes of name exactly match the symbol? */ |
| 1017 | static bool sym_is(const char *name, unsigned namelen, const char *symbol) | 1041 | static bool sym_is(const char *name, unsigned namelen, const char *symbol) |
| 1018 | { | 1042 | { |
