Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp138997pxk; Tue, 22 Sep 2020 21:54:27 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxPe6a7jJ6AyGSl5ZjBi6kEx4sX9q0iw4XMkRaXssH1zrP/M7BsvPV61gQ2z8X1OMCvPX+s X-Received: by 2002:a17:907:110f:: with SMTP id qu15mr8777934ejb.359.1600836867259; Tue, 22 Sep 2020 21:54:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600836867; cv=none; d=google.com; s=arc-20160816; b=SylG3Yiqg6GEC+Z/7vRHXJd8ILT06MfpEOB8pI9AxkZYbXqXQxw60jJc047IJoog8n TAHXz23N3lyEu1k04c8REWP67cJdNuZDeuX/qpx4u9/xEq0J4r6celu7K7+4BGmU7ZGu c159gMmxlzJr0ospSUAg4DhorO59akpGOhQYodhzzi7ObZqqluRtvSN8TXECkluQtxnc V71xjfDIYHyVPTTjZSN0ejhybwnzFxZ+Zuzi0xk/+1+aGCDckKvUIjeRHZKHCmyLRp7C LJKgo+DDIURN3WNtXUL/aIXVO37AJZEqstNkMLgVN0jvsrAqag69dyFJe6ZJ2VgOZp2e wnMw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=oXL0d832p/v7ULU8i0ySkgjJBLrPLAb91P52VIEUF5c=; b=ZKtp3WufyOgzV1EJlZCXUxNCHmMH7cSB3MWdC9djdx5DfIFDG3EM5ohySKq2SjFMaW 6CKUIeBAB6zaolixspmdZCkbVcmiblyCJ11xvTejXCSoij6ZzyAFk5UKuae503n2Q0aO zdmT/bI6d/0EN3IieCY+8Rmmj8X7GaTyTZrn+j6Tz5k6OTje9Wj5w96xfY3G+Gmi1CcV /ASJRl7CPIk9Rj0PbebWr4aO8FJVe9vb53//x+IJRuUUM6W5nX73YVSMbeiDnTXni4LA enOMErPpEnz5+g9cWa1Zi8GX4rELrZJ3ERlF8x8eJa6RqwVBoKKgHDOkHaAClBcXxEVS qR7w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d6si11956088ejm.636.2020.09.22.21.54.02; Tue, 22 Sep 2020 21:54:27 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726883AbgIWEwf (ORCPT + 99 others); Wed, 23 Sep 2020 00:52:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57656 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726198AbgIWEwe (ORCPT ); Wed, 23 Sep 2020 00:52:34 -0400 Received: from ZenIV.linux.org.uk (zeniv.linux.org.uk [IPv6:2002:c35c:fd02::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 974E3C061755; Tue, 22 Sep 2020 21:52:34 -0700 (PDT) Received: from viro by ZenIV.linux.org.uk with local (Exim 4.92.3 #3 (Red Hat Linux)) id 1kKwlb-004Ihd-2q; Wed, 23 Sep 2020 04:52:31 +0000 Date: Wed, 23 Sep 2020 05:52:31 +0100 From: Al Viro To: Guo Ren Cc: Zhenzhong Duan , Linux Kernel Mailing List , linux-csky@vger.kernel.org, Oleg Nesterov Subject: Re: [PATCH] csky: Fix a size determination in gpr_get() Message-ID: <20200923045231.GH3421308@ZenIV.linux.org.uk> References: <20200922091505.471-1-zhenzhong.duan@gmail.com> <20200922162901.GA3421308@ZenIV.linux.org.uk> <20200923002315.GC3421308@ZenIV.linux.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: Al Viro Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Sep 23, 2020 at 10:37:31AM +0800, Guo Ren wrote: > > What's going on there? The mapping is really weird - assuming > > you had v0..v31 in the first 32 elements of regs->vr[], you > > end up with > > > > v0 v1 v2 v3 v2 v3 v6 v7 v4 v5 v10 v11 v6 v7 v14 v15 > > v8 v9 v18 v19 v10 v11 v22 v23 v12 v13 v26 v27 v14 v15 v30 v31 > > > > in the beginning of the output. Assuming it is the intended > > behaviour, it's probably worth some comments... > FPU & VDSP use the same regs. 32 FPU regs' width is 64b and 16 VDSP > regs' width is 128b. > > vr[0], vr[1] = fp[0] & vr[0] vr[1], vr[2], vr[3] = vdsp reg[0] > ... > vr[60], vr[61] = fp[15] & vr[60] vr[61], vr[62], vr[63] = vdsp reg[15] > vr[64], vr[65] = fp[16] > vr[66], vr[67] = fp[17] > ... > vr[94], vr[95] = fp[31] > > Yeah, this is confusing and I'll add a comment later. Umm... It would help if you described these 3 layouts: 1) kernel-side with VDSP 2) userland (identical to (1)?) 3) kernel-side without VDSP Still confused... PS: my apologies re commit message - I left a note to myself when doing that series and then forgot about it ;-/ Anyway, which tree should it go through? In any case, that fix is Acked-by: Al Viro and I can take it through vfs.git or you guys can pick in csky tree; up to you.