Received: by 2002:a05:6358:700f:b0:131:369:b2a3 with SMTP id 15csp1928164rwo; Thu, 3 Aug 2023 01:53:53 -0700 (PDT) X-Google-Smtp-Source: APBJJlGxL+sz9Jtk7drwxG9RRSZxldcg/sSR7z/ZQnV4byqoAQn5OcoTzwfOOxufeq1GIdxhYbDS X-Received: by 2002:a05:6a20:549a:b0:13c:ca8b:7e29 with SMTP id i26-20020a056a20549a00b0013cca8b7e29mr21983391pzk.12.1691052833100; Thu, 03 Aug 2023 01:53:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691052833; cv=none; d=google.com; s=arc-20160816; b=eP2J8C4RcvlXVdHoRLDCOvhzyiLbyNzWQzNg9OZ8/8cfERWuX2/PkilL3GUd3PXMoT x9Ypj8OTL3zAwpocWsazXo2aIIrTtjDweAwUZmWWvZVxRC6kBLIz1CUXSkgS+RQI2/FM oXw6SebkHGRrwRYIRTs6uaSfFpQ/Z5br/SXY8zLax+oa1vn7Rce6p3mrImlaSdkDvy94 RvfHWimXr57tMv1fEeznh+UrdJOLGmuobqd7zo8KOBiRfdz2+8tqp/fkngSUTf2kDpCn nYu4ojd0Sk0uYr1B/3ZCLme7stnWG1TPCMdiQy6jg5KIFxlyb2eKHc3H/PmX558fZPJe IsXQ== 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-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=CSSRhpwsXf70z+1rxlQ2+hkymtm2lwEBhyh07kPB2pk=; fh=OlTr1BkSN+T4/jXbB5R+QH0tzs35uECX344h0VCR594=; b=rDGT35+MimG9makGGSY75PmcvPUsT9CS5DyZqK0vX9yIRVUrnry4in2raex3jyncvM qqETuNwq+RGs+81ruujCQUTEW+X2m3+6flVWXBfWO/8HyeHiuzrchTS/JMWbaDCoRjYR cAlFLuIcs2ykCH/4p+mK8eRSWjIoj81zxRRpOluJReydisxv1u6fHEUbj3PBvvrwwdsj MtFKvs1bkePlQzjoP7GX/8Wm1+SA+3VTjafOYs04BQf9+x3DiLDMOKGHSZqRITFS7O+7 tV5ogCYlrI7kQTysG/BJzqxv1sqOeOmxttpFqTd0rHGfBpV2tdJIRZRaPUhof4eH8ArI amoQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ventanamicro.com header.s=google header.b=hVshpXD1; 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 bw13-20020a056a00408d00b00687427c1ac1si6000009pfb.25.2023.08.03.01.53.40; Thu, 03 Aug 2023 01:53:53 -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=@ventanamicro.com header.s=google header.b=hVshpXD1; 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 S233397AbjHCH55 (ORCPT + 99 others); Thu, 3 Aug 2023 03:57:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32966 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233188AbjHCH5G (ORCPT ); Thu, 3 Aug 2023 03:57:06 -0400 Received: from mail-ej1-x62a.google.com (mail-ej1-x62a.google.com [IPv6:2a00:1450:4864:20::62a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2B50F93EA for ; Thu, 3 Aug 2023 00:44:53 -0700 (PDT) Received: by mail-ej1-x62a.google.com with SMTP id a640c23a62f3a-99c10ba30afso381911566b.1 for ; Thu, 03 Aug 2023 00:44:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ventanamicro.com; s=google; t=1691048689; x=1691653489; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:from:to :cc:subject:date:message-id:reply-to; bh=CSSRhpwsXf70z+1rxlQ2+hkymtm2lwEBhyh07kPB2pk=; b=hVshpXD1f4VzOD4XcxN3LbCb5HapivOPgFQ+ILU0E4alQRUTVmJwgTwVgUvmzBMszt NDqQtPAZmoLrTkgoPimF8eEzhIDPdpAKz+2EKqLtmx7HB/j2CAUcEcg/+5rMoDpwE0nO 3eWEEAyYy1dNbtgfyBWfxn0dYcGaX5y2VC5pxwRD13Nkz2YIkx8/HrOFqbbgo1cDi1xv RefAjQl5EQ0h6nMKJja2YklPKW0V8kuY+qiTMI5yn3SCwLsVjJpvexcAFsqNgXTVLnRH QkGpbWuDmvFT02VSc55AQg68lHgTe2htKOM4EvvpIE/Tk4ZGfEhGvwHg19itDFbM26AX qdMQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691048689; x=1691653489; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=CSSRhpwsXf70z+1rxlQ2+hkymtm2lwEBhyh07kPB2pk=; b=XZ5uVcV88Xp4EUYetXsreFNz6nluv+bqUS381aDLkaOQ59iSc96KYS1t9FHlAcm5cf UGITqfzxYjGkfQhG+UCo7G0Of/PrvgIGe9PqDNqtoyZDV3OCD81NnkEjhwjG+Rz3gY+L Mpp3p9plYuDAE2H2sX+0nKf0jrsgbXrPEm2xV425Ukc6efNA/fQwglp2C2dJtqZ2LyEc 9SXOUqZRzJuDrHUeZF+SSvYzJ/u7sxJ3D/ZgJ644E8H7hMnBlCarQz9n57lMAMWnkMm8 h8hxd7ApKW7eiLrkmDSHSrzWF2zzkw1u3RKbPM6L1HhJBQiUu36zFK3TLXo1pKxBvwka ZfUw== X-Gm-Message-State: ABy/qLbEM5Y0GMa66wpLxFW4oSScR7W0iIscN0nFa0jJK1w5E2spDzf6 xcLm8eRx3qR2bfk0R9QwZ+2ugw== X-Received: by 2002:a17:906:8a4d:b0:993:da0b:8783 with SMTP id gx13-20020a1709068a4d00b00993da0b8783mr8855806ejc.3.1691048689638; Thu, 03 Aug 2023 00:44:49 -0700 (PDT) Received: from localhost (212-5-140-29.ip.btc-net.bg. [212.5.140.29]) by smtp.gmail.com with ESMTPSA id si15-20020a170906cecf00b00993004239a4sm10128648ejb.215.2023.08.03.00.44.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 03 Aug 2023 00:44:49 -0700 (PDT) Date: Thu, 3 Aug 2023 10:44:47 +0300 From: Andrew Jones To: Guo Ren Cc: Haibo Xu , Haibo Xu , Paul Walmsley , Palmer Dabbelt , Albert Ou , Paolo Bonzini , Shuah Khan , Anup Patel , Atish Patra , Sean Christopherson , Vipin Sharma , Marc Zyngier , Colton Lewis , Andrew Jones , Vishal Annapurve , linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org, kvm@vger.kernel.org, linux-kselftest@vger.kernel.org, kvm-riscv@lists.infradead.org Subject: Re: [PATCH 1/4] tools: riscv: Add header file csr.h Message-ID: <20230803-5b7e7c0d95597b004764a296@orel> References: <35ce2b9f7ca655eb3af13730b1ca9f05b518e08f.1690364259.git.haibo1.xu@intel.com> <20230728-879500f157954d849fb303ec@orel> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable 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 On Wed, Aug 02, 2023 at 11:13:34PM -0400, Guo Ren wrote: > On Wed, Aug 02, 2023 at 10:05:00AM +0800, Haibo Xu wrote: > > On Fri, Jul 28, 2023 at 5:43 PM Andrew Jones wrote: > > > > > > On Thu, Jul 27, 2023 at 03:20:05PM +0800, Haibo Xu wrote: > > > > Borrow some of the csr definitions and operations from kernel's > > > > arch/riscv/include/asm/csr.h to tools/ for riscv. > > > > > > You should copy the entire file verbatim. > > > > > > > Ok, will copy all the definitions in the original csr.h > Why not include the original one? Maintain the one csr.h is more > comfortable. selftests and other userspace tools can't always compile when including a kernel header without modifying the header in some way. Rather than polluting headers with #ifdeffery, the practice has been to copy necessary headers to tools/include and modify if necessary. Thanks, drew