[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <17ab0a11-7ca2-ff22-35d6-7446dbccc3ea@huawei.com>
Date: Tue, 28 Nov 2017 19:17:40 +0800
From: gengdongjiu <gengdongjiu@...wei.com>
To: <suzuki.poulose@....com>,
"mark.rutland@....com" <mark.rutland@....com>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: [question] extract the feature bits width to 4
Hi,suzuki/mark,
very sorry to disturb you, I have a question that want to consult with you. For the CPU feature detection,
why we use extract 4 bits width for the feature match instead of the actual bits number[1]? may be the actual hardware feature bit more than 4 bits.
thanks!
static inline int __attribute_const__
cpuid_feature_extract_field(u64 features, int field, bool sign)
{
return cpuid_feature_extract_field_width(features, field, 4, sign);
}
static bool
feature_matches(u64 reg, const struct arm64_cpu_capabilities *entry)
{
int val = cpuid_feature_extract_field(reg, entry->field_pos, entry->sign);
return val >= entry->min_field_value;
}
Powered by blists - more mailing lists