You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
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>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
67bad2fdb7
commit
2b9c1f0327
@@ -1110,7 +1110,7 @@ static int do_amba_entry(const char *filename,
|
||||
}
|
||||
ADD_TO_DEVTABLE("amba", amba_id, do_amba_entry);
|
||||
|
||||
/* LOOKS like x86cpu:vendor:VVVV:family:FFFF:model:MMMM:feature:*,FEAT,*
|
||||
/* LOOKS like cpu:type:x86,venVVVVfamFFFFmodMMMM:feature:*,FEAT,*
|
||||
* All fields are numbers. It would be nicer to use strings for vendor
|
||||
* and feature, but getting those out of the build system here is too
|
||||
* complicated.
|
||||
@@ -1124,10 +1124,10 @@ static int do_x86cpu_entry(const char *filename, void *symval,
|
||||
DEF_FIELD(symval, x86_cpu_id, model);
|
||||
DEF_FIELD(symval, x86_cpu_id, vendor);
|
||||
|
||||
strcpy(alias, "x86cpu:");
|
||||
ADD(alias, "vendor:", vendor != X86_VENDOR_ANY, vendor);
|
||||
ADD(alias, ":family:", family != X86_FAMILY_ANY, family);
|
||||
ADD(alias, ":model:", model != X86_MODEL_ANY, model);
|
||||
strcpy(alias, "cpu:type:x86,");
|
||||
ADD(alias, "ven", vendor != X86_VENDOR_ANY, vendor);
|
||||
ADD(alias, "fam", family != X86_FAMILY_ANY, family);
|
||||
ADD(alias, "mod", model != X86_MODEL_ANY, model);
|
||||
strcat(alias, ":feature:*");
|
||||
if (feature != X86_FEATURE_ANY)
|
||||
sprintf(alias + strlen(alias), "%04X*", feature);
|
||||
|
||||
Reference in New Issue
Block a user