Kernel: Use a descriptive name for x86-64 cpu_feature_to_string_view

Settled for `cpu_feature_to_name` as that naming is more descriptive
and similarly named `cpu_feature_to_description` function will be
provided for Aarch64.
This commit is contained in:
konrad 2023-01-02 00:15:41 +01:00 committed by Jelle Raaijmakers
parent 649f78d0a4
commit 823aab8296
3 changed files with 3 additions and 3 deletions

View file

@ -8,7 +8,7 @@
namespace Kernel {
StringView cpu_feature_to_string_view(CPUFeature::Type const& feature)
StringView cpu_feature_to_name(CPUFeature::Type const& feature)
{
if (feature == CPUFeature::SSE3)
return "sse3"sv;

View file

@ -237,6 +237,6 @@ AK_MAKE_ARBITRARY_SIZED_ENUM(CPUFeature, u256,
NONSTOP_TSC = CPUFeature(1u) << 191u, // Invariant TSC
__End = CPUFeature(1u) << 255u);
StringView cpu_feature_to_string_view(CPUFeature::Type const&);
StringView cpu_feature_to_name(CPUFeature::Type const&);
}

View file

@ -111,7 +111,7 @@ NonnullOwnPtr<KString> ProcessorInfo::build_features_string(Processor const& pro
first = false;
else
MUST(builder.try_append(' '));
MUST(builder.try_append(cpu_feature_to_string_view(feature)));
MUST(builder.try_append(cpu_feature_to_name(feature)));
}
}
return KString::must_create(builder.string_view());