Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp1226085rwb; Fri, 23 Sep 2022 09:41:31 -0700 (PDT) X-Google-Smtp-Source: AMsMyM60k7wEH8tHkx6utWF3cK1ttlt7UWyfPU8ck0WNRopP36UWqc2voVp2dFykDIa5VClTqrsq X-Received: by 2002:a17:907:7289:b0:780:2017:3898 with SMTP id dt9-20020a170907728900b0078020173898mr7902844ejc.276.1663951290977; Fri, 23 Sep 2022 09:41:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663951290; cv=none; d=google.com; s=arc-20160816; b=FK9MswdF7cKKliKb9fYP8L7b11cECHGZABPHhmW9jldNW9tZWiRiY9K223qBgcl70K xh0q2T+bBaNqBx5e5WuGhk08I+eQhnJkPFOdDA+uJdzKrCUW/V9BNVGh/7NH/QuWkqyI 0IACiaUJyD53lDEP7U0ac+Vqkqtqi+A0aWSX/23RPCB07CvcOiyIUYX8deTvnTHDnbke lHxPxy5f1i0AFn2QnqML1N+zOo6K3T4alAX7G6S8rWRD6yKevxg6/lTTeOcatYGpuPAL OLcRh/MhOjYIL0FIon08cKOwYjN3J746939qJyhKjEh2CkOoDkw1Zr53G7143Nrb4p/A /qpA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=oYS931QxypUChKHoLGJVldhhe0rE/S6dyM7vUBrMOiU=; b=YodMzxlrhgacVRDnEMJbQQTpiFmrlFbI7FnRvh87eChTPkiFRx4RjEivPXeZS21DwC aUq9yTAbceMcoapEv+bXLSlJR362TrmTdbIx7JHFjv9HKvaX/v7TeavHJ95EXb6iE7Xi bZPkyekw9u4wPgM5hLrIAnflscFCp03ZYFTAudVqiVEBUi0CJXCE43N5AsKAJNyWF4QP hZzhVAku6wfhykwpp5ZSUQ1LAPnOcsJzJg6yzoE27L4G9jt5Mo9yF5nEXWIqg3A27cwx TwKMUQ0StXJopfb6OjSRKcM8nNRs77SRecm7n9fOfNj0T6Wre6hmh5d/61VvTvl01ozU CvJQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@rivosinc-com.20210112.gappssmtp.com header.s=20210112 header.b=Zqvxfogh; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id js16-20020a17090797d000b0074145082ee4si9019942ejc.899.2022.09.23.09.41.04; Fri, 23 Sep 2022 09:41:30 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@rivosinc-com.20210112.gappssmtp.com header.s=20210112 header.b=Zqvxfogh; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231673AbiIWQ2a (ORCPT + 99 others); Fri, 23 Sep 2022 12:28:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33602 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232935AbiIWQ2C (ORCPT ); Fri, 23 Sep 2022 12:28:02 -0400 Received: from mail-wr1-x42d.google.com (mail-wr1-x42d.google.com [IPv6:2a00:1450:4864:20::42d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1F5EC147CCA for ; Fri, 23 Sep 2022 09:27:39 -0700 (PDT) Received: by mail-wr1-x42d.google.com with SMTP id z6so830931wrq.1 for ; Fri, 23 Sep 2022 09:27:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rivosinc-com.20210112.gappssmtp.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date; bh=oYS931QxypUChKHoLGJVldhhe0rE/S6dyM7vUBrMOiU=; b=Zqvxfogh49z4nlATM3a1Eir2F6ueo9XGy+Fz9Cg3TMolya41ElD6+i28w7JiBO9t2V CdzJMPfpEyYyKFELjyeOFaAtW1b1lE4oHFiuXAn+phX7oywMEOLfB+FcOVthnIj1sxxt 7tX8CLKT6jMnfgxmR/yTDgR5c7JH7kz32e9Ii0InpCF2HHrAzC0JBewslzjDNSV/4Ca+ GTmlEOQ1BqWhEFXPO5Nq7D4C2NIY6WaG68pmWCFLvGpAEdzA9Nm0Dspv3VrEBKOYNoLe +cZVbl15ruEzeGom+SFtXtImJuqFm1qAMQfIlY+/aiFIdhBTiVRnu771V4HXhPPr4x0Q ZsrA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date; bh=oYS931QxypUChKHoLGJVldhhe0rE/S6dyM7vUBrMOiU=; b=v2zZe8G1ra8hiFdI0jPNRgkOFoDjp/Ep1TuHo9fICkYXat/hkFMvUzQN+lAUhQ2xxI a5J6O/JtZv7CtVSh3XU1RArMZnzGjq6jz0u5oRLSoD9nQCxNzsAo8VJf8GsgZ9wFNapO WpNUSBC684mARCiZ8b5e5gfsWBYXs5ouSMFn8t2TjJaka2/phXqt3CQMP4g26yujF4si OrZcIJ4Iy/bn2swzbSv1mBrDs7mGdd9dvf0rN6mRsyuJ1V938H2BRcFT7OfzhTyGptL1 hIybkJrE2uSQgyLS8kaGgBfIiG0f2TBtDq3QDqRfhXIeWx0rDKPkgT6NUE45iEhH0279 N6Kg== X-Gm-Message-State: ACrzQf133zHbPiWkhRCMDO/MpR5T0G0TjHvECYWg5TyPZeKeXk9S1XsB fa58wRari7DFSAniGIiR2787dDQFGC39wa105z7GMA== X-Received: by 2002:a05:6000:1886:b0:22a:2944:a09 with SMTP id a6-20020a056000188600b0022a29440a09mr5840574wri.391.1663950457617; Fri, 23 Sep 2022 09:27:37 -0700 (PDT) MIME-Version: 1.0 References: <20220921214439.1491510-1-stillson@rivosinc.com> <20220921214439.1491510-5-stillson@rivosinc.com> In-Reply-To: From: Chris Stillson Date: Fri, 23 Sep 2022 09:27:01 -0700 Message-ID: Subject: Re: [PATCH v12 05/17] riscv: Add has_vector/riscv_vsize to save vector features. To: Samuel Holland Cc: Greentime Hu , Guo Ren , Vincent Chen , Paul Walmsley , Palmer Dabbelt , Albert Ou , Eric Biederman , Kees Cook , Anup Patel , Atish Patra , Oleg Nesterov , Guo Ren , Heinrich Schuchardt , Arnaud Pouliquen , Paolo Bonzini , Alexandre Ghiti , Arnd Bergmann , Heiko Stuebner , Jisheng Zhang , Dao Lu , Sunil V L , Ruinland Tsai , Han-Kuan Chen , linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org (resending, as I forgot to set it to plain mail) This is the way the original set of patches worked. I tried to change them as little as possible for the rebase. On Wed, Sep 21, 2022 at 9:23 PM Samuel Holland wrote: > > On 9/21/22 16:43, Chris Stillson wrote: > > From: Greentime Hu > > > > This patch is used to detect vector support status of CPU and use > > riscv_vsize to save the size of all the vector registers. It assumes > > all harts has the same capabilities in SMP system. > > > > [guoren@linux.alibaba.com: add has_vector checking] > > Co-developed-by: Guo Ren > > Signed-off-by: Guo Ren > > Co-developed-by: Vincent Chen > > Signed-off-by: Vincent Chen > > Signed-off-by: Greentime Hu > > --- > > arch/riscv/include/asm/vector.h | 14 +++++ > > arch/riscv/kernel/cpufeature.c | 19 +++++++ > > arch/riscv/kernel/riscv_ksyms.c | 6 +++ > > arch/riscv/kernel/vector.S | 93 +++++++++++++++++++++++++++++++++ > > This file is not added to the Makefile until patch 8. > > > 4 files changed, 132 insertions(+) > > create mode 100644 arch/riscv/include/asm/vector.h > > create mode 100644 arch/riscv/kernel/vector.S >