From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.3 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id AD2EDCA9EAF for ; Wed, 30 Oct 2019 09:02:21 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 83851208C0 for ; Wed, 30 Oct 2019 09:02:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1572426141; bh=qDDn6Pqi5gdg0xPqXhf/M0A/TQfM681Mptbd731RAOg=; h=Date:From:To:Cc:Subject:References:In-Reply-To:List-ID:From; b=MjvorqLADXHBX+1rqd73ZOVYyzZXecXgEmPldWg65u47XYmWiC2nde+Hzn1o/3xQX DF/NyI1i5iySd45V+tdleg4xueCA2Ir32q0bBfODDyfJhO716riU7REFBc7h/OZ2lv 3UrovOXe6P+hvRxtIRlOGCxxRtMCc/wVdewZmYZ8= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726664AbfJ3JCU (ORCPT ); Wed, 30 Oct 2019 05:02:20 -0400 Received: from mail.kernel.org ([198.145.29.99]:35346 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726084AbfJ3JCU (ORCPT ); Wed, 30 Oct 2019 05:02:20 -0400 Received: from localhost (unknown [91.217.168.176]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id BE7742083E; Wed, 30 Oct 2019 09:02:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1572426138; bh=qDDn6Pqi5gdg0xPqXhf/M0A/TQfM681Mptbd731RAOg=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=RC/Tpy5ZNRHF6PoKQHXz0uRgEcUe20OnXfZiM9/V4ayevaeTbGlZ8JzjHjG1AUlS9 8O0uw5k1oePaQb9QFj44dStIAfTgZQ83ebpLqpPJvdiXGIC8qx6cNmVXubeg6p56xz FJykEcfDv0CQTfU91w/FA2gg0o47M6sP4JfcB294= Date: Wed, 30 Oct 2019 10:02:14 +0100 From: Greg Kroah-Hartman To: Jiaxun Yang Cc: linux-kernel@vger.kernel.org, stable@vger.kernel.org, Meng Zhuo , linux-mips@vger.kernel.org, Paul Burton , Sasha Levin Subject: Re: [PATCH 4.14 027/119] MIPS: elf_hwcap: Export userspace ASEs Message-ID: <20191030090214.GA628862@kroah.com> References: <20191027203259.948006506@linuxfoundation.org> <20191027203308.417745883@linuxfoundation.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.12.2 (2019-09-21) Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org On Tue, Oct 29, 2019 at 06:50:38PM +0800, Jiaxun Yang wrote: > > 在 2019/10/28 上午5:00, Greg Kroah-Hartman 写道: > > From: Jiaxun Yang > > > > [ Upstream commit 38dffe1e4dde1d3174fdce09d67370412843ebb5 ] > > > > A Golang developer reported MIPS hwcap isn't reflecting instructions > > that the processor actually supported so programs can't apply optimized > > code at runtime. > > > > Thus we export the ASEs that can be used in userspace programs. > > > > Reported-by: Meng Zhuo > > Signed-off-by: Jiaxun Yang > > Cc: linux-mips@vger.kernel.org > > Cc: Paul Burton > > Cc: # 4.14+ > > Signed-off-by: Paul Burton > > Signed-off-by: Sasha Levin > > --- > > arch/mips/include/uapi/asm/hwcap.h | 11 ++++++++++ > > arch/mips/kernel/cpu-probe.c | 33 ++++++++++++++++++++++++++++++ > > 2 files changed, 44 insertions(+) > > > > diff --git a/arch/mips/include/uapi/asm/hwcap.h b/arch/mips/include/uapi/asm/hwcap.h > > index 600ad8fd68356..2475294c3d185 100644 > > --- a/arch/mips/include/uapi/asm/hwcap.h > > +++ b/arch/mips/include/uapi/asm/hwcap.h > > @@ -5,5 +5,16 @@ > > /* HWCAP flags */ > > #define HWCAP_MIPS_R6 (1 << 0) > > #define HWCAP_MIPS_MSA (1 << 1) > > +#define HWCAP_MIPS_MIPS16 (1 << 3) > > +#define HWCAP_MIPS_MDMX (1 << 4) > > +#define HWCAP_MIPS_MIPS3D (1 << 5) > > +#define HWCAP_MIPS_SMARTMIPS (1 << 6) > > +#define HWCAP_MIPS_DSP (1 << 7) > > +#define HWCAP_MIPS_DSP2 (1 << 8) > > +#define HWCAP_MIPS_DSP3 (1 << 9) > > +#define HWCAP_MIPS_MIPS16E2 (1 << 10) > > +#define HWCAP_LOONGSON_MMI (1 << 11) > > +#define HWCAP_LOONGSON_EXT (1 << 12) > > +#define HWCAP_LOONGSON_EXT2 (1 << 13) > > #endif /* _UAPI_ASM_HWCAP_H */ > > diff --git a/arch/mips/kernel/cpu-probe.c b/arch/mips/kernel/cpu-probe.c > > index 3007ae1bb616a..c38cd62879f4e 100644 > > --- a/arch/mips/kernel/cpu-probe.c > > +++ b/arch/mips/kernel/cpu-probe.c > > @@ -2080,6 +2080,39 @@ void cpu_probe(void) > > elf_hwcap |= HWCAP_MIPS_MSA; > > } > > + if (cpu_has_mips16) > > + elf_hwcap |= HWCAP_MIPS_MIPS16; > > + > > + if (cpu_has_mdmx) > > + elf_hwcap |= HWCAP_MIPS_MDMX; > > + > > + if (cpu_has_mips3d) > > + elf_hwcap |= HWCAP_MIPS_MIPS3D; > > + > > + if (cpu_has_smartmips) > > + elf_hwcap |= HWCAP_MIPS_SMARTMIPS; > > + > > + if (cpu_has_dsp) > > + elf_hwcap |= HWCAP_MIPS_DSP; > > + > > + if (cpu_has_dsp2) > > + elf_hwcap |= HWCAP_MIPS_DSP2; > > + > > + if (cpu_has_dsp3) > > + elf_hwcap |= HWCAP_MIPS_DSP3; > > + > > + if (cpu_has_loongson_mmi) > > + elf_hwcap |= HWCAP_LOONGSON_MMI; > > + > > + if (cpu_has_loongson_mmi) > > + elf_hwcap |= HWCAP_LOONGSON_CAM; > > Hi: > > Sorry, there is a typo causing build failure. > > Should be: Can you resend this in a format we can apply it in? thanks, greg k-h