Received: by 2002:a05:6359:6284:b0:131:369:b2a3 with SMTP id se4csp571655rwb; Fri, 4 Aug 2023 18:44:04 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFDE3aEG07lyBjqO0m0g+BnZSL8CIlDfA50AdEBio4F0+iVJqdFC64eBl2gt/r/aeJPFuJh X-Received: by 2002:a05:6808:5c5:b0:3a3:6aaa:f284 with SMTP id d5-20020a05680805c500b003a36aaaf284mr3806860oij.47.1691199844588; Fri, 04 Aug 2023 18:44:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691199844; cv=none; d=google.com; s=arc-20160816; b=L0W3WjqzIM40wnAtcDSxZq7oKcoWGV8drm9lkyQrg66I8MZTSL6/dv9AOqgjMCxMVs J4aBdJVFdzROEOBbRQ+BgsxWX9GCtjR4BSNvOTu1mb0CeojLD14gO8KMQ1XhkhEUIji7 C4fkJIJJvevCMTlr0LLFHmX+xPEZsKVXCvFVCjDk9kDRSxWOetaK0IKn83dxpcGRP3WL a/xCKODA5b+OhpupfsHCv16TCrqqdH+hhsDT91MHANIwecOA2YSjBJGHI3btAzm+jBG/ W6rF/qtGubOaTy7UN6QF33kaQj1f1y1NKmaBeNSwd20qIbLB3PceJMfkc2XbN5rAq2ym jsvQ== 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=ci8WuP6g2LqliK0OHhqNPGA26G25KgSCEbHqWe0PT68=; fh=33RHXZ70P5f+4Hef8MXw5trsN7VYzHbDMxeM1fmxqHM=; b=X6nyoCdd9r6/3IN9E/SY/c8dYyAP86Pukk4Ak0s+p/lIGhixJ4LNVLb7G3bfpbcMFh TcOWEZr9vPOwnLShtuzFnRrvgJYye5+Sp4t18u4cyVa8Ni1S1V5IUDzYXJDAezESL0pP C7zdT4yAwzTL0LIhVADdcfO9Ok40MGCb3o7n/deEawdeoCTQE5Oo6wVTIjzNxfT10YOI ll2xNZdYLGHLV9T03Vu2vDNHrCzXuT1IjdJAnGcl+J/EFTlS9gg7M3V3bIFeWdi6oWbm 6d+s7cNTVKfRPdTvMZfbOVE7n76D75/10dD5xwM7i4KcshgOyhKpqji8pzvrOXMOqGK7 J2bw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=QA3cE8I1; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l189-20020a6388c6000000b005641dfc74casi2572038pgd.745.2023.08.04.18.43.51; Fri, 04 Aug 2023 18:44:04 -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=@kernel.org header.s=k20201202 header.b=QA3cE8I1; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229600AbjHEBbk (ORCPT + 99 others); Fri, 4 Aug 2023 21:31:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51904 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229450AbjHEBbi (ORCPT ); Fri, 4 Aug 2023 21:31:38 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 90F0BE72; Fri, 4 Aug 2023 18:31:37 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 25C0E62193; Sat, 5 Aug 2023 01:31:37 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8B4BEC433CC; Sat, 5 Aug 2023 01:31:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1691199096; bh=ci8WuP6g2LqliK0OHhqNPGA26G25KgSCEbHqWe0PT68=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=QA3cE8I1zOdVnBlgr6ab50bKaWyj8synF3xXyhjxdE4vBfRvLRXpFLYpvdCRUmIsf 8PkIa7yZDIjmG0Tt9ECDlTGPwfNNaDRNi25lzVsAGKvtx+QW8V+cuIL6e0ZYNDJB8M UZ/rYO7JybeG7cPBx82sZS9gx8Vueqth4ZHnQ1+73AaJvXbox93IBMkiP65LRZTsjS uR/EsdNk7ejMyirWMZ2HWttPmg8yvKfk6vrhZ+BtDPjigHAFhTS+nmAHYTx5JVK9Dw 79fnWijGBmknBOSqRRp9uu4P4yPy/Xz3rZR9pAEWoc4F9uE7UounFGmwOkBP6+joLo 2W0NiY2+BHLCw== Received: by mail-ed1-f48.google.com with SMTP id 4fb4d7f45d1cf-5221c6a2d3dso3386720a12.3; Fri, 04 Aug 2023 18:31:36 -0700 (PDT) X-Gm-Message-State: AOJu0Yw8EFBS5mG13tPDqW3fx567iZVd44aEnDqHe6ZsOvWIH1i2RgPL xFrakQm0QiC1BaVUefg4vXjwZJ/T8VW8JMwWH5M= X-Received: by 2002:a50:ee81:0:b0:523:1edf:c6b6 with SMTP id f1-20020a50ee81000000b005231edfc6b6mr2011319edr.40.1691199094841; Fri, 04 Aug 2023 18:31:34 -0700 (PDT) MIME-Version: 1.0 References: <35ce2b9f7ca655eb3af13730b1ca9f05b518e08f.1690364259.git.haibo1.xu@intel.com> <20230728-879500f157954d849fb303ec@orel> <20230803-5b7e7c0d95597b004764a296@orel> In-Reply-To: <20230803-5b7e7c0d95597b004764a296@orel> From: Guo Ren Date: Sat, 5 Aug 2023 09:31:23 +0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 1/4] tools: riscv: Add header file csr.h To: Andrew Jones 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 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, 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 On Thu, Aug 3, 2023 at 3:44=E2=80=AFPM Andrew Jones wrote: > > 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=E2=80=AFPM 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 necessar= y > headers to tools/include and modify if necessary. Okay, got it. > > Thanks, > drew --=20 Best Regards Guo Ren