Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp5455400pxu; Tue, 22 Dec 2020 18:33:25 -0800 (PST) X-Google-Smtp-Source: ABdhPJwx9IAxhAERIJT+MDFT7s1KX4py5ER2y2D5CxB9DMJ/ASPlm258bLKo/teJu6hp05lfSixn X-Received: by 2002:a50:e846:: with SMTP id k6mr23196055edn.245.1608690805001; Tue, 22 Dec 2020 18:33:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1608690804; cv=none; d=google.com; s=arc-20160816; b=jr1+B0zc5xDHewumRvabxqMFlhk1f9Rn+4QrwGy2yky5iOTEoN1fOsok1LN2N+vJhX HqwD2wDRHlIu5GnxV94MEM5jh+kZ7kl+UV3m/mUAexeodcYdvpvUdO9qyJaRFfFtSpur G7uvIk5mNZkhgJMKS+5HbYa29Kxpouy0DYg9wNvZWokTpQVBpvuu8rqLzrjRUF1gvZNM LAYO/fL/D0KHJ+VxMA61XynyRSdQX42v7QYfXwi7PWlahG3B6dddiENAmRYDbkYIVh5Q /aUOtDYcoIQxQGm1zNQEEbW/31fbpudaRg8FqQzZ7cvda5o347FlUoevzFPDLRcgadfT C32g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=hJYV9T0G3B5sqaHuZ67qRHqaOvktDx25o29o6SPVfkM=; b=XvKT7cYL14FnGjFx2bPK8MqsR8eGNfOMV/aLPp4PQCU1iqDInKCJ0MXN5qeb+cMmKr FMssQmPgKA89MiacX08LVOV6oATkym14XCBHlIK3By5kWt7IDvERzUmhkHA55vLDbfoO 5/qS5pqkHSmOF2cHRoFJCvh673+Fo9n1vwr0fNZvN+CSnNAt+/HVi9IOwV7wZgiJ/eyX QbYIbtcSxgq+6rlqInfa3hoLWQTKEkohZLqW2UHZZ1gH/YTkyTwQZzxb/WFRybih4qvx y3mM8X6JBKHiHAkPZLt24mwRaaaqOl9J0zNENSUVSkTnsPTK0cmbQHFNe8FsyvvWE0em spWg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=IYyycRco; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a6si11303754ejy.167.2020.12.22.18.33.02; Tue, 22 Dec 2020 18:33:24 -0800 (PST) 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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=IYyycRco; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730363AbgLWCca (ORCPT + 99 others); Tue, 22 Dec 2020 21:32:30 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37898 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729582AbgLWCc1 (ORCPT ); Tue, 22 Dec 2020 21:32:27 -0500 Received: from mail-ej1-x631.google.com (mail-ej1-x631.google.com [IPv6:2a00:1450:4864:20::631]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 93364C0613D3; Tue, 22 Dec 2020 18:31:46 -0800 (PST) Received: by mail-ej1-x631.google.com with SMTP id qw4so20834386ejb.12; Tue, 22 Dec 2020 18:31:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=hJYV9T0G3B5sqaHuZ67qRHqaOvktDx25o29o6SPVfkM=; b=IYyycRcoGYOP/KTETWj/vmhg9C2RGMb/P3JuA4pRuUW+wTLsd4j+sbJVNZaoq/HFsW y903BXueXgsFDIJawkPdEAj6Zi8tRpLp17vvYB1L5zx0NitBG17XFdyRhl4qMz1Wms84 kczQbYle8rJRw9jLY7MpqGjC61nPY4vNhno+U6jbqhaiqaf7Yfif+2S/QRLVV7Nk2hcM fz1OUEHC/vKjdJ0o5oNmLGZ0iwMjGalO60W1QDSPp5JnvEaTf4d6efMk/YzbY4t5z+MA KotriduRqDYzYBozzgMRonapm8XqO6IfVYMlEqpVvhbPgwRJ8LBWG8ViphBp5ULQAYWs Nnyg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=hJYV9T0G3B5sqaHuZ67qRHqaOvktDx25o29o6SPVfkM=; b=gNVyRWQoxAQHVFoJ9jxkVqVaREc8eT4vMer3T66vVmHlGYlGDoQ8fMlEV/fHBPilyV 89fzDsCD200X7+qzdKZP9zel3J91pUecN03jVMC+UC4Wx6Ope9v/eDfKBTLC1ZQB3PL7 dxj4L3TulU9tPT9DHhGIXqX2Qob7R/4GlI0F+4Y3f/3fBiw8VdRjYTDcb3Um+DHVa+xx poYNnPV+T1Df4lWtpF5Uea5E0qETgj9nV1Ub38AVzUe6189onYuM3FBnC1u0SASTVBUW 8TNw2FqgNTh5q3Yrk3aiZUb1a+DfnYFtJkg4qwg1PdQALqpxfRAwpl7K+gEa2KErJm7M oDaQ== X-Gm-Message-State: AOAM532PTKQk2wEeh2sWUQ3YzdgzxJoLnUOljR0J10mARbaciNPmVMuD OftXdMazQAry9Ge3pGdUzsTgp4W98/n7T9+vQIs= X-Received: by 2002:a17:906:2681:: with SMTP id t1mr22464503ejc.29.1608690705392; Tue, 22 Dec 2020 18:31:45 -0800 (PST) MIME-Version: 1.0 References: <20200922091505.471-1-zhenzhong.duan@gmail.com> <20200922162901.GA3421308@ZenIV.linux.org.uk> <20200923002315.GC3421308@ZenIV.linux.org.uk> <20200923045231.GH3421308@ZenIV.linux.org.uk> In-Reply-To: <20200923045231.GH3421308@ZenIV.linux.org.uk> From: Zhenzhong Duan Date: Wed, 23 Dec 2020 10:31:34 +0800 Message-ID: Subject: Re: [PATCH] csky: Fix a size determination in gpr_get() To: Al Viro Cc: Guo Ren , Linux Kernel Mailing List , linux-csky@vger.kernel.org, Oleg Nesterov Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Sep 23, 2020 at 12:52 PM Al Viro wrote: > > 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] =3D fp[0] & vr[0] vr[1], vr[2], vr[3] =3D vdsp reg[0] > > ... > > vr[60], vr[61] =3D fp[15] & vr[60] vr[61], vr[62], vr[63] =3D vdsp reg[= 15] > > vr[64], vr[65] =3D fp[16] > > vr[66], vr[67] =3D fp[17] > > ... > > vr[94], vr[95] =3D 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. Hi Al, Guo Seems this patch is still pending=EF=BC=8C could you help check it=EF=BC=9F= Thanks Zhenzhong