aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/mod
diff options
context:
space:
mode:
authorArd Biesheuvel <ard.biesheuvel@linaro.org>2014-02-08 07:34:10 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-02-18 15:45:38 -0500
commit2b9c1f03278ab7cd421f14ce24dee39091ecb064 (patch)
treea27c0b56578e8063a164cdf184eead5b9bb35aa1 /scripts/mod
parent67bad2fdb754dbef14596c0b5d28b3a12c8dfe84 (diff)
x86: align x86 arch with generic CPU modalias handling
The x86 CPU feature modalias handling existed before it was reimplemented generically. This patch aligns the x86 handling so that it (a) reuses some more code that is now generic; (b) uses the generic format for the modalias module metadata entry, i.e., it now uses 'cpu:type:x86,venVVVVfamFFFFmodMMMM:feature:,XXXX,YYYY' instead of the 'x86cpu:vendor:VVVV:family:FFFF:model:MMMM:feature:,XXXX,YYYY' that was used before. Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Acked-by: H. Peter Anvin <hpa@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'scripts/mod')
-rw-r--r--scripts/mod/file2alias.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/scripts/mod/file2alias.c b/scripts/mod/file2alias.c
index 506146e5f4a8..25f6f5970552 100644
--- a/scripts/mod/file2alias.c
+++ b/scripts/mod/file2alias.c
@@ -1110,7 +1110,7 @@ static int do_amba_entry(const char *filename,
1110} 1110}
1111ADD_TO_DEVTABLE("amba", amba_id, do_amba_entry); 1111ADD_TO_DEVTABLE("amba", amba_id, do_amba_entry);
1112 1112
1113/* LOOKS like x86cpu:vendor:VVVV:family:FFFF:model:MMMM:feature:*,FEAT,* 1113/* LOOKS like cpu:type:x86,venVVVVfamFFFFmodMMMM:feature:*,FEAT,*
1114 * All fields are numbers. It would be nicer to use strings for vendor 1114 * All fields are numbers. It would be nicer to use strings for vendor
1115 * and feature, but getting those out of the build system here is too 1115 * and feature, but getting those out of the build system here is too
1116 * complicated. 1116 * complicated.
@@ -1124,10 +1124,10 @@ static int do_x86cpu_entry(const char *filename, void *symval,
1124 DEF_FIELD(symval, x86_cpu_id, model); 1124 DEF_FIELD(symval, x86_cpu_id, model);
1125 DEF_FIELD(symval, x86_cpu_id, vendor); 1125 DEF_FIELD(symval, x86_cpu_id, vendor);
1126 1126
1127 strcpy(alias, "x86cpu:"); 1127 strcpy(alias, "cpu:type:x86,");
1128 ADD(alias, "vendor:", vendor != X86_VENDOR_ANY, vendor); 1128 ADD(alias, "ven", vendor != X86_VENDOR_ANY, vendor);
1129 ADD(alias, ":family:", family != X86_FAMILY_ANY, family); 1129 ADD(alias, "fam", family != X86_FAMILY_ANY, family);
1130 ADD(alias, ":model:", model != X86_MODEL_ANY, model); 1130 ADD(alias, "mod", model != X86_MODEL_ANY, model);
1131 strcat(alias, ":feature:*"); 1131 strcat(alias, ":feature:*");
1132 if (feature != X86_FEATURE_ANY) 1132 if (feature != X86_FEATURE_ANY)
1133 sprintf(alias + strlen(alias), "%04X*", feature); 1133 sprintf(alias + strlen(alias), "%04X*", feature);