Received: by 2002:a25:31c3:0:0:0:0:0 with SMTP id x186csp609927ybx; Wed, 30 Oct 2019 02:04:10 -0700 (PDT) X-Google-Smtp-Source: APXvYqzAzjrZQI+HMMSo2cN1iokTaXdjDwJxWfnFu6zuk0Tjgzn46UnvF/GYQk4whkiH/9IQ1g2T X-Received: by 2002:a17:906:6d4f:: with SMTP id a15mr7640736ejt.33.1572426250060; Wed, 30 Oct 2019 02:04:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1572426250; cv=none; d=google.com; s=arc-20160816; b=AH6N2FIE/L0AE6qJQJr/0V3cx/7ed7AcmmVQwkozFu8KeFzj80DEouYkREgWOME+CV hNibKQh29Rvho+V4kbbZOpf/3OJGHkZZdH4he04MAJr0d56JtZqMcm662Bnp0xNWrqgl okPGUV7MVDoon4wI/mQFYR9RAbtnc/ml3BASDfEIkAt/XPDoAPGxzw2x8McaVYlMh+Wo 99oD0VNqpqlbPxi/wjexmb/+0XHvkjuRfPtEGvguAdHNTa+0hTU72Uw6cy2//um2TTwJ +JKC2OsjJHxfQ5pmvlvCaMkFolFHJXF48po3+rQ0okmflRKhI7PqT7awMM9cZzdxYcS0 /O2A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=+myhJlzWRI0HZoSfdSO+aHJZ2sNRDrGCMwkjOuOlTv4=; b=QpXcEDBALJPphzkHZKE2UVL7MvKiDRIhe7sOn3c0iu1yD4EBe0fnpZFISx/hv7hwnC r4j+uy/x3bKqiSuztvGv/ji4vJQa5TdEKxlsu+65BpMvDt5+Z2BA585nMek3I8UgGdb8 q9LlJQoQs7HbMp6L+CRXZiZmAZ+qXcnL90AlBLJlDJSxZPpKR0fADIJQPSIj638HbBPX TTriR9xO2rZJvlD/QuL3qFpM5zayznmYR6WoTyKAX7iqi81yzJjkTRrsphMiJlJYEYdL ipZu3NyfvvHmY9X+LYUB3Q02uMD7ehjGuyAVIb54HbILfY9W5Y91DKmA+swsd0iaeE1B nM8w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="RC/Tpy5Z"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h6si910455eda.258.2019.10.30.02.03.46; Wed, 30 Oct 2019 02:04:10 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="RC/Tpy5Z"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726673AbfJ3JCV (ORCPT + 99 others); Wed, 30 Oct 2019 05:02:21 -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: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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