linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dave Martin <Dave.Martin@arm.com>
To: gengdongjiu <gengdongjiu@huawei.com>
Cc: Mark Rutland <Mark.Rutland@arm.com>,
	"guohanjun@huawei.com" <guohanjun@huawei.com>,
	"linux-doc@vger.kernel.org" <linux-doc@vger.kernel.org>,
	Suzuki Poulose <Suzuki.Poulose@arm.com>,
	Catalin Marinas <Catalin.Marinas@arm.com>,
	"corbet@lwn.net" <corbet@lwn.net>,
	Will Deacon <Will.Deacon@arm.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linuxarm@huawei.com" <linuxarm@huawei.com>,
	"zhihui.gao@huawei.com" <zhihui.gao@huawei.com>,
	"huangshaoyu@huawei.com" <huangshaoyu@huawei.com>,
	"gregkh@linuxfoundation.org" <gregkh@linuxfoundation.org>,
	"arvind.yadav.cs@gmail.com" <arvind.yadav.cs@gmail.com>,
	Robin Murphy <Robin.Murphy@arm.com>,
	"linux-arm-kernel@lists.infradead.org" 
	<linux-arm-kernel@lists.infradead.org>,
	"zhanghaibin7@huawei.com" <zhanghaibin7@huawei.com>
Subject: Re: [RESEND PATCH] arm64: v8.4: Support for new floating point multiplication variant
Date: Mon, 11 Dec 2017 13:29:16 +0000	[thread overview]
Message-ID: <20171211132914.GJ22781@e103592.cambridge.arm.com> (raw)
In-Reply-To: <4c6d83f1-e8f3-46d7-f3cd-af2db77e3a9c@huawei.com>

On Mon, Dec 11, 2017 at 08:47:00PM +0800, gengdongjiu wrote:
> 
> On 2017/12/11 19:59, Dave P Martin wrote:
> > On Sat, Dec 09, 2017 at 03:28:42PM +0000, Dongjiu Geng wrote:
> >> ARM v8.4 extensions include support for new floating point
> >> multiplication variant instructions to the AArch64 SIMD
> > 
> > Do we have any human-readable description of what the new instructions
> > do?
> > 
> > Since the v8.4 spec itself only describes these as "New Floating
> > Point Multiplication Variant", I wonder what "FHM" actually stands
> > for.
> Thanks for the point out.
> In fact, this feature only adds two instructions:
> FP16 * FP16 + FP32
> FP16 * FP16 - FP32
> 
> The spec call this bit to ID_AA64ISAR0_EL1.FHM, I do not know why it
> will call "FHM", I  think call it "FMLXL" may be better, which can
> stand for FMLAL/FMLSL instructions.

Although "FHM" is cryptic, I think it makes sense to keep this as "FHM"
to match the ISAR0 field name -- we've tended to follow this policy
for other extension names unless there's a much better or more obvious
name available.

For "FMLXL", new instructions might be added in the future that match
the same pattern, and then "FMLXL" could become ambiguous.  So maybe
this is not the best choice.

> > Maybe something like "widening half-precision floating-point multiply
> > accumulate" is acceptable wording consistent with the existing
> > architecture, but I just made that up, so it's not official ;)
> 
> how about something like "performing a multiplication of each FP16
> element of one vector with the corresponding FP16 element of a second
> vector, and to add or subtract this without an intermediate rounding
> to the corresponding FP32 element in a third vector."?

We could have that, I guess.

> > 
> >> instructions set. Let the userspace know about it via a
> >> HWCAP bit and MRS emulation.
> >>
> >> Cc: Suzuki K Poulose <suzuki.poulose@arm.com>
> >> Signed-off-by: Dongjiu Geng <gengdongjiu@huawei.com>
> >> ---
> >> My platform supports this feature, so I need to add it.
> >> ---
> >>  Documentation/arm64/cpu-feature-registers.txt | 4 +++-
> >>  arch/arm64/include/asm/sysreg.h               | 1 +
> >>  arch/arm64/include/uapi/asm/hwcap.h           | 1 +
> >>  arch/arm64/kernel/cpufeature.c                | 2 ++
> >>  arch/arm64/kernel/cpuinfo.c                   | 1 +
> >>  5 files changed, 8 insertions(+), 1 deletion(-)
> >>
> >> diff --git a/Documentation/arm64/cpu-feature-registers.txt b/Documentation/arm64/cpu-feature-registers.txt
> >> index bd9b3fa..a70090b 100644
> >> --- a/Documentation/arm64/cpu-feature-registers.txt
> >> +++ b/Documentation/arm64/cpu-feature-registers.txt
> >> @@ -110,7 +110,9 @@ infrastructure:
> >>       x--------------------------------------------------x
> >>       | Name                         |  bits   | visible |
> >>       |--------------------------------------------------|
> >> -     | RES0                         | [63-48] |    n    |
> >> +     | RES0                         | [63-52] |    n    |
> >> +     |--------------------------------------------------|
> >> +     | FHM                          | [51-48] |    y    |
> > 
> > You also need to update Documentation/arm64/elf_hwcaps.txt.
> I will update it, thanks for the point out
> 
> > 
> > Otherwise, looks OK.
> Appreciate for your review.

[...]

Cheers
---Dave

  reply	other threads:[~2017-12-11 13:29 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-09 15:28 [RESEND PATCH] arm64: v8.4: Support for new floating point multiplication variant Dongjiu Geng
2017-12-11 11:59 ` Dave P Martin
2017-12-11 12:47   ` gengdongjiu
2017-12-11 13:29     ` Dave Martin [this message]
2017-12-11 18:58       ` Suzuki K Poulose
2017-12-12  2:07         ` gengdongjiu
2017-12-12  1:44       ` gengdongjiu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20171211132914.GJ22781@e103592.cambridge.arm.com \
    --to=dave.martin@arm.com \
    --cc=Catalin.Marinas@arm.com \
    --cc=Mark.Rutland@arm.com \
    --cc=Robin.Murphy@arm.com \
    --cc=Suzuki.Poulose@arm.com \
    --cc=Will.Deacon@arm.com \
    --cc=arvind.yadav.cs@gmail.com \
    --cc=corbet@lwn.net \
    --cc=gengdongjiu@huawei.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=guohanjun@huawei.com \
    --cc=huangshaoyu@huawei.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxarm@huawei.com \
    --cc=zhanghaibin7@huawei.com \
    --cc=zhihui.gao@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).