Received: by 2002:a05:6a10:eb17:0:0:0:0 with SMTP id hx23csp245570pxb; Wed, 8 Sep 2021 23:19:20 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz6CmxOZey/T/xLQ3WDEcYhCIHwWwt+L+uHfvGCzGAMrb2Zof9GMPagRplZI+Z82O0Vw0qU X-Received: by 2002:a02:85c2:: with SMTP id d60mr1414444jai.85.1631168360487; Wed, 08 Sep 2021 23:19:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631168360; cv=none; d=google.com; s=arc-20160816; b=SR95tm8NwNxrWbheJ1ZshYvBsaxhSX5j6jyEGYuRuQ/He4xC2xmIxb0Y6qTIjTUEhP RsZieh3IjheJgmZrGyQ08Y34pxbrOhAeCOrGDs0/d0IrRhyJDS9omMCExXg+dXvdPLrK fm+PYeyP+J4/0bPmVy3mqjs6IE0VWCc9MDaIm7F+gRxa9QdqQOXYUjT413H4FclFaMHa Pu1NPeQag+q9w948lMob8Y6ON+u+L+9bIG8qMNPEOPO1zeDoOWH2hY1yC0Hegf551UR2 Lq6pl0nLEOgVp4lv2jbXEtrGf+p9QvQdRwIlpItMuyCc8xgHM+4NCiICa5exaUlo86oG VaPg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=+rDn9niI6auN6DppWd/XkbmHQC+Jn0nMdhztebELsuk=; b=OWX3BKH/p3smL8GDnDvuOxxhEBCb9LT/kPKU36AyAc26O699i+laffQ9d1mQxWNTnS bVngCd5TFZGCDtIrIFCrR+F8RbN1JYEaP0UdjwpY0ylZeVWoDMjT5F1Z3I6QGSUgwFsh L/CCAnGH8kwmrElA8ZEKYI1guDC/mT6jjYgo1jAM1LeJ3n/dK1T7JANKI40Cc2DpEvge 6chv6dYbFP/IlVc2M3I+ThB0ZfhvBvro6Yyb88PYoZn4+yY9BDusXLpTkiYnVIpZK2hE jYIOv1ICajHBwBse6fLFkKR2aeJizZZ9poCkA+9H8eCLoCzuGKSJhy4WAs+jM+SMghmn 4FIA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=Oo0TzY1j; 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 q186si851398ioq.108.2021.09.08.23.19.08; Wed, 08 Sep 2021 23:19:20 -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; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=Oo0TzY1j; 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 S1352440AbhIIGTY (ORCPT + 99 others); Thu, 9 Sep 2021 02:19:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47530 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244314AbhIIGTX (ORCPT ); Thu, 9 Sep 2021 02:19:23 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DEB2FC061575 for ; Wed, 8 Sep 2021 23:18:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=+rDn9niI6auN6DppWd/XkbmHQC+Jn0nMdhztebELsuk=; b=Oo0TzY1jbokYJR0ingKXUhlq6l UhWoACOhKO3V2VZGvwjL51JDFzJRPk+o+2nnaef6hBL+emIGtvU9NAN7yjygkSixKAeg7uUhf0MnB lU7P0lofWAlu5PdTtWalAJDMW+c3QttSNMxJam2jdRpi/UzDCZxU1PSi8if2fP53CvsBSk7G5NWKj HizrY6mokzKL/Oh14aB2oQzPvqfz0pgP+6jcdEzRiV9qOqBmA9cJ+IJzjSP5RRRdy0ToQHGW9elwI DVBQXxZKSGBTGg17K/fBWyTRlRkX8TQnU0yul+xHTQYhY+Aj8Pdn6FOkmOSZ/AL6CoOLhicL78A3s 2dGRvgVw==; Received: from hch by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1mODNK-009XPU-0N; Thu, 09 Sep 2021 06:17:40 +0000 Date: Thu, 9 Sep 2021 07:17:29 +0100 From: Christoph Hellwig To: Greentime Hu Cc: linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, aou@eecs.berkeley.edu, palmer@dabbelt.com, paul.walmsley@sifive.com, vincent.chen@sifive.com Subject: Re: [RFC PATCH v8 13/21] riscv: Add support for kernel mode vector Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-SRS-Rewrite: SMTP reverse-path rewritten from by casper.infradead.org. See http://www.infradead.org/rpr.html Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Sep 09, 2021 at 01:45:25AM +0800, Greentime Hu wrote: > +obj-$(CONFIG_VECTOR) += kernel_mode_vector.o > +riscv-march-cflags-$(CONFIG_ARCH_RV32I) := rv32ima > +riscv-march-cflags-$(CONFIG_ARCH_RV64I) := rv64ima > +riscv-march-cflags-$(CONFIG_RISCV_ISA_C) := $(riscv-march-cflags-y)c > +riscv-march-cflags-$(CONFIG_VECTOR) := $(riscv-march-cflags-y)v > +CFLAGS_kernel_mode_vector.o += -march=$(riscv-march-cflags-y) Do we need a helper in arch/riscv/Makefile to define the vector flags instead of open coding them where used? Also I think the variable name should include vector in it. > +EXPORT_SYMBOL(kernel_rvv_begin); > +EXPORT_SYMBOL(kernel_rvv_end); This needs to be EXPORT_SYMBOL_GPL just like x86 kernel_fpu_begin/end