Received: by 2002:ac0:da4c:0:0:0:0:0 with SMTP id a12csp395962imi; Fri, 22 Jul 2022 01:11:14 -0700 (PDT) X-Google-Smtp-Source: AGRyM1tF0OWG8Nfy2qd+mo1nLjgRSn52FofIZeOoCPnWrpE4UPWYxqHysQqyFOOdXG7CDtqzp6kt X-Received: by 2002:a17:90a:ea04:b0:1f2:242d:e2af with SMTP id w4-20020a17090aea0400b001f2242de2afmr12079405pjy.45.1658477474400; Fri, 22 Jul 2022 01:11:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658477474; cv=none; d=google.com; s=arc-20160816; b=LrbefP5zYpvZqD4AWI5WyMN6/y25OOcSW+rhf09UAWKv+3yptnAacV923ce874V7g3 20ZnKqjCleAJORZfRx4cUSdpGsKgKibI3gjHbuD8Bb7Yihh0Mx0ri7fyIJ7D0XZt0m1h uINab9qKs9GyP6k0x8omSJ+lpqHq9+oEstQmDdS3FKe6MvEKj24X0bincta1F7ssxIjv MBRbVzTedFBu/pD20vqM+S9xWp8kmwJQkLv4L45AV9dyHH3AQ4FKyYT73+bSJWAB8W3S L+A/2bB5ShqD4Qu8mWLOpGwh0wyjvZRYsBWJ7liNSdOxBD8KDqgFsSlH4EysALPOi7VO yr6A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=iLf5HYu1b4t7m/s9S5EnkWFd580z8KhaV5A2w//ysjU=; b=X+73QjxSH95rSiGORS8pCv4yXFFyLBMIuZenpVbulixHBBEgSYcM8a6zLvMLL/X5wB +EptN9TiWvjP38A795+ZhmoGy7a2d0kA/k5IVaOw5ymXcf4u+uwl93yS9Zodh1upeumV 5RNAnd7WR/0L9/llAtUVNzch6hPYak+BQWzmbhJA7v0w/qSFz0NtesX7s5AorIC4DuKk FKxaXua71R1AFoo/EnjSbssqv/61IaDj8EzzKNvhG23NglU9rP3EktfGDLrfjvwI7gB/ dsC27wUMXe+tnX0+uoC4rOx2G43QYvIQcgeW6k2+wM6hsCqSQ+fDLiEATy04YlWcycRQ Wrfw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@xen0n.name header.s=mail header.b=guTB4N9R; 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 l10-20020a654c4a000000b00412aa446decsi5097120pgr.356.2022.07.22.01.10.58; Fri, 22 Jul 2022 01:11:14 -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=@xen0n.name header.s=mail header.b=guTB4N9R; 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 S234243AbiGVHd6 (ORCPT + 99 others); Fri, 22 Jul 2022 03:33:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59072 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233950AbiGVHd5 (ORCPT ); Fri, 22 Jul 2022 03:33:57 -0400 Received: from mailbox.box.xen0n.name (mail.xen0n.name [115.28.160.31]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1D63D9823E for ; Fri, 22 Jul 2022 00:33:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=xen0n.name; s=mail; t=1658475231; bh=T33GVH8f5eLsNBuftvVxlcnpfNmKejbXJKmjJ5lvpUk=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=guTB4N9RgJi3l17IYvwKjfR/E+cJUrUTz9TupsvIv7hcHB1vATgZGyMXoB8WGLwsq EGHudXUjV30Vrf/yhWnw0qkWhihU2JNCKdOEAAu7zBwGe904Gmqy0HNbAzq0abyCXo xKiOyn7teymo3FcQzK8VSbW4n3bYu+9AXYhGkzlo= Received: from [100.100.35.250] (unknown [58.34.185.106]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mailbox.box.xen0n.name (Postfix) with ESMTPSA id 8C1526061B; Fri, 22 Jul 2022 15:33:51 +0800 (CST) Message-ID: Date: Fri, 22 Jul 2022 15:33:51 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:104.0) Gecko/20100101 Thunderbird/104.0a1 Subject: Re: [PATCH v2] LoongArch: Remove LOONGARCH_CPUCFG48 and some CSR definitions Content-Language: en-US To: Tiezhu Yang , Huacai Chen Cc: WANG Xuerui , Jiaxun Yang , loongarch@lists.linux.dev, linux-kernel@vger.kernel.org, Jianmin Lv References: <1658305979-2073-1-git-send-email-yangtiezhu@loongson.cn> From: WANG Xuerui In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,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 2022/7/22 14:58, Tiezhu Yang wrote: > > > On 07/20/2022 04:32 PM, Tiezhu Yang wrote: >> According to the configuration information accessible by the CPUCFG >> instruction [1] and the Overview of Control and Status Registers [2], >> we can not see the descriptions about LOONGARCH_CPUCFG48 (0x30), >> LOONGARCH_CSR_PRID (0xc0), LOONGARCH_CSR_MCSR* (0xc0 ~ 0xff) and >> LOONGARCH_CSR_UCAWIN* (0x100 ~ 0x109), they are not used in the >> current kernel code. >> >> LOONGARCH_CPUCFG48 may be used only in the firmware layer, it should >> not be used in the future for kernel developers, remove the related >> LOONGARCH_CPUCFG48 definitions. >> >> LOONGARCH_CSR_MCSR* is shadow of LOONGARCH_CPUCFG*, no need to access >> LOONGARCH_CSR_MCSR* and LOONGARCH_CSR_PRID through CSR instruction, >> use CPUCFG instruction to access LOONGARCH_CPUCFG* is enough, so also >> remove LOONGARCH_CSR_MCSR* and LOONGARCH_CSR_PRID definitions. >> >> LOONGARCH_CSR_UCAWIN* may be not implemented in hardware, use CSR >> instruction to access them is meaningless, so also remove the related >> LOONGARCH_CSR_UCAWIN* definitions. >> >> The intention of this patch is to keep consistent between the code and >> the manual. >> >> [1] >> https://loongson.github.io/LoongArch-Documentation/LoongArch-Vol1-EN.html#the-configuration-information-accessible-by-the-cpucfg-instruction >> [2] >> https://loongson.github.io/LoongArch-Documentation/LoongArch-Vol1-EN.html#table-overview-of-control-and-status-registers >> >> Signed-off-by: Tiezhu Yang >> --- >> >> v2: >>   -- Remove LOONGARCH_CSR_PRID and LOONGARCH_CSR_UCAWIN* >>   -- Modify the patch subject and update the commit message >> >>  arch/loongarch/include/asm/loongarch.h | 229 >> --------------------------------- >>  1 file changed, 229 deletions(-) >> Hi all, > > Are you OK with this change? Any comments will be much appreciated. Sorry for not getting to this earlier; $DAY_JOB is taking its toll on my Linux contributions these days. IMO, it's probably better to keep the definitions for documentation purposes. As a Loongson employee, you may be aware of the fact that your company's "official" documentation is often lacking, and this information you're removing is not found elsewhere. So for preserving this knowledge, either (1) ask your documentation people to properly record these information in official docs then you can go ahead removing them here, or (2) just keep the content here if (1) isn't doable for any reason. You do want 3rd-parties to freely develop on your platforms, making full use of the products' capabilities, don't you? ;-)