于 2019年10月24日 GMT+08:00 下午12:06:24, Paul Burton paulburton@kernel.org 写到:
Hi Jiaxun,
On Wed, Oct 23, 2019 at 11:25:51PM +0800, Jiaxun Yang wrote:
After further discussion with userland library develpoer, we addressed another two ASEs that can be used runtimely in programs.
Export them in hwcap as well to benefit userspace programs.
Signed-off-by: Jiaxun Yang jiaxun.yang@flygoat.com Cc: stable@vger.kernel.org # 4.4+
arch/mips/include/uapi/asm/hwcap.h | 2 ++ arch/mips/kernel/cpu-probe.c | 7 ++++++- 2 files changed, 8 insertions(+), 1 deletion(-)
diff --git a/arch/mips/include/uapi/asm/hwcap.h
b/arch/mips/include/uapi/asm/hwcap.h
index 1ade1daa4921..e1a9bac62149 100644 --- a/arch/mips/include/uapi/asm/hwcap.h +++ b/arch/mips/include/uapi/asm/hwcap.h @@ -17,5 +17,7 @@ #define HWCAP_LOONGSON_MMI (1 << 11) #define HWCAP_LOONGSON_EXT (1 << 12) #define HWCAP_LOONGSON_EXT2 (1 << 13) +#define HWCAP_MIPS_MICROMIPS (1 << 14) +#define HWCAP_MIPS_VZ (1 << 15)
What's the motivation for exposing VZ? Userland can't actually use it without something like KVM, which already exposes a means of detecting whether VZ is supported (try the creating a VM of type KVM_VM_MIPS_VZ & see if it works). I'm not sure what userland would be able to do with this information in AT_HWCAP
Hi Paul,
Well, that was preposed by a kvm developer from Loongson. They want to use it to implement CPU_AUTOPROBE and load required modules automatically.
As they said they will submit KVM support to mainline later, I'm just occupied a place for them.
Out of tree commit:
http://cgit.loongnix.org/cgit/linux-3.10/commit/?id=4db9301cca3b49358d46fd0d...