Received: by 2002:ab2:7407:0:b0:1f4:b336:87c4 with SMTP id e7csp253782lqn; Thu, 11 Apr 2024 23:28:00 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCV7dLkEm5GeaqOitrpJex2cgwYlFq4jg02whdSv4ga1MKCq+ZHO5iLFRhLPPy+D9+xaLnaUQloQ+Oh8KuoeqCpAV/KE82715802FmO/zg== X-Google-Smtp-Source: AGHT+IFdbhVhib9Ae0oZ4UMndD9OAFxO3nm8slvWGYdYgZC/0+Ic94QtyeM7OozuQ8kmyO2nZ58f X-Received: by 2002:a17:907:3da3:b0:a51:b463:6b62 with SMTP id he35-20020a1709073da300b00a51b4636b62mr1271476ejc.55.1712903279980; Thu, 11 Apr 2024 23:27:59 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712903279; cv=pass; d=google.com; s=arc-20160816; b=EXMz1osDHNgV9Ae2g50v0ZJy0hqZ4z2c5U/etuMUus2sai4LqOs45TfKGC8kb89AYZ 1vPDqykO/wT5haCMfg3Djf52LNHNmIqMbv5iQ3+HgdiqFUJv3V8JKDnGIUDZegyceSx0 8ZPF/vokpFKNBv6B0VPH0xlmGQot4SBDhhS4S7QG3px+DuTEh7opuxdmsMINPbcVgkvk 4XyVK8OWhnoeH5mAy4UGrkhlzTpPlF3WXyAIbTPiufzydXrfl4tjfxTCSVeM/hDREW+I b94mVEf3y1aBaeK0lWbjX1w+oarNKHlTMAV2jf/wLeX0MKIMQI1rZgOFlmfPIwheySK9 VWyg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:date :subject:cc:to:from:message-id:dkim-signature; bh=D8d08kdXjrFd28ginRdzdAdRNU2wwkO/zqvD1S6aOGE=; fh=4KWEOblxXA8PZoP89E/oiTdU0tZOtBeLwSCfEfAmPA0=; b=iHny3CeIEoVG+VzT6rDOQn7M5DBaa8wtC9Bd0VfDBw066drBJ2679BKkMIsf7k5Ofv nSxUyy/HMRYLQxbmIJe6e+HImassm5G1vlZWqksAzHE+dtma6w+TI3UP4shASPxXUwWk Ey940eEF7FCIg34OhfFwnzojYj4AxrcyFEvFpsjXRJ3pH2nhRPTzIJkXl2RwWg+FlXjq c8LZUyrRYyBvhQTpydXo6P6ujDtKeW0F47/xY4vp/IpAc6A0xcTfhdWwYdbM2AtZvROl sDN6j+GHE63LfwSo4VauALOr/JDkRLJcWGrfUVf6pCYoU9KMJhJhSq37+W7+IreUMSwL QR3w==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@qq.com header.s=s201512 header.b=omulzr0l; arc=pass (i=1 dkim=pass dkdomain=qq.com); spf=pass (google.com: domain of linux-kernel+bounces-142034-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-142034-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id js13-20020a17090797cd00b00a51af7d4654si1462441ejc.205.2024.04.11.23.27.59 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Apr 2024 23:27:59 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-142034-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@qq.com header.s=s201512 header.b=omulzr0l; arc=pass (i=1 dkim=pass dkdomain=qq.com); spf=pass (google.com: domain of linux-kernel+bounces-142034-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-142034-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id B450D1F24BC4 for ; Fri, 12 Apr 2024 06:27:59 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id BEBC73FB14; Fri, 12 Apr 2024 06:27:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=qq.com header.i=@qq.com header.b="omulzr0l" Received: from out203-205-221-149.mail.qq.com (out203-205-221-149.mail.qq.com [203.205.221.149]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9B98B3F9E0 for ; Fri, 12 Apr 2024 06:27:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=203.205.221.149 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712903261; cv=none; b=Wf1rDZzo7rDOVL785bVYngX/P238ojX5pWCQYzmU6LuP82AKWsXIcq3mDt4QNwlNncQCN8sKJsPSZ4AblluwolNIGNdism5QFt7d/KLzRW5D31jhK1vIsNmzTQxGdWRKPYyxBNTlj2OcN2bBhtYEn4v0Ip/G5zM9LgWn8+ZVGkw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712903261; c=relaxed/simple; bh=mpG73ntkI+bKnWbZWLV1SvgJybIvz4F5Ii6CWsA53Qs=; h=Message-ID:From:To:Cc:Subject:Date:In-Reply-To:References: MIME-Version; b=NA9mj0biL3l8ot73iAIM9lkEFMwl1FyLmxPzEcYk/UWq2vnvcnpwUA/1iyqCScbfrawnUkfakqOFe4QKbHB3ympGt+rv5pNTigy9ej80hQundnlp5zB3qoDsDToI8aNtNsS/ot8pAtaL/XfvmDZgrH4eVGO9CT5gRXnn8lB6GC4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=cyyself.name; spf=none smtp.mailfrom=cyyself.name; dkim=pass (1024-bit key) header.d=qq.com header.i=@qq.com header.b=omulzr0l; arc=none smtp.client-ip=203.205.221.149 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=cyyself.name Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=cyyself.name DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qq.com; s=s201512; t=1712903254; bh=D8d08kdXjrFd28ginRdzdAdRNU2wwkO/zqvD1S6aOGE=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=omulzr0leRzsi57LqNmlKQHklbB3iyYiKql9AigtmqNk/ZoKOS9po86lTcwDR7TxB mrCsruuospHXDPbmi5UTU6ZafuLMOxsk6KPftcXX6l8ekHB8O+NzBgW5pkhow8RZFO gCHrtBgN9zMC7pJX0bBIKzJcgb4Lm4zG1LxV14lo= Received: from Yangyus-MBP-2.lan ([219.141.235.82]) by newxmesmtplogicsvrszc6-0.qq.com (NewEsmtp) with SMTP id 6DDA90ED; Fri, 12 Apr 2024 14:27:29 +0800 X-QQ-mid: xmsmtpt1712903249tchi8hoao Message-ID: X-QQ-XMAILINFO: M6lqjKFHeg8FipVhaxR+kEqYAYB7tJUinzNVL1AmDc5DgmTMqHVxOFMH9MdVvV RjPhvTEMHFHFNzmcs9Aso2kRDaElcQapDDlJwGkBBhWa59KhptInSCzFi03vMg4LzERqRTZQ1sJH CNwnCmgUbBUIIERkAWWI5ZK2gZuvi4zwiiGC+wR497dv+g43C3eN2JS5O7Je9Y6JSbC3b+djrjzT is/rS4G4tjTzsKLPax7qS7oAx7SJLE/XmKBeXrzrz3Qmc4F5hfqJ/3hZN3FsWWH3VcgFyuw8qf+j eiV9+dyW/PuokfeGq0Ko589nTnyFWgZECvR4yt5fKkP9bIgQDqLM6G2g5mly91OlFrL9On6PMTif FJdE9a192NEFtCl+UWCfyxh8ZZ2wbYvMmvE9UOb3GS6xU/Tr7TbPjPINZZ9ecjgnobJ7ocdNqNHi 1s7o3Zq+t8JEi9C+16Uwe6O8ssdxqdtAgsbhco7k6BKEiBYkZUu0E2UYmS0rwFsMuIn6f/lAu646 wLzCtFhObPbbeMQkiyf1dpvjVC8A/nXkupyawyK4+ldMuF8chHbnuffrn/WczlsV08UGuU/V/If4 z2gvOQt8/PBLvTLv9w+dLovbn+7popyN1zfKg1MdqMOwjmGzK1Dj+cMMQjxZpQBC8+D9XbpFTRa3 c9Px4pQB2KSD4hUsvPtpQfuNN42fQE5utHLK5kJYr2XOhgGy0Y6j79KVhI26e7m59RHkbRoxyWcc pGVurjjQF0Vgt0CP2K/RhKXKmXGR6Ez24GgnCCEp9v/RCWowSHECv6IIECzBfDlH+98UUR58dsiG DftcNxVBMSIoVMU24t23HUMnay7tCqipq67fxLzF0UsIlkLT/nUqJ/DjJVRXTB54DSsbMM/6SeKD qwUrpMixt0xaelMdd/Ucma3hsRRjqDxmo9LwXdiEYBcOUrjTeY+LpFcaolblLmrzLNU1tEYeaghx VEqmBD/GaU1ukUuKp4//LrQaxRNyClcp71h31IuKwmHJU5f/IiWqKhwnP8NevXBzJFk/yZem4= X-QQ-XMRINFO: NS+P29fieYNw95Bth2bWPxk= From: Yangyu Chen To: conor@kernel.org Cc: ajones@ventanamicro.com, anup@brainfault.org, aou@eecs.berkeley.edu, atishp@atishpatra.org, conor.dooley@microchip.com, dqfext@gmail.com, guoren@kernel.org, heiko@sntech.de, inochiama@outlook.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org, mark.rutland@arm.com, palmer@dabbelt.com, paul.walmsley@sifive.com, will@kernel.org Subject: Re: [PATCH] perf: RISC-V: fix IRQ detection on T-Head C908 Date: Fri, 12 Apr 2024 14:27:28 +0800 X-OQ-MSGID: <20240412062728.71533-1-cyy@cyyself.name> X-Mailer: git-send-email 2.39.3 (Apple Git-146) In-Reply-To: <20240314-pep-announcer-2d7f10ff8b65@spud> References: <20240314-pep-announcer-2d7f10ff8b65@spud> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit >> IMHO, it may be better to use a new DT property like "riscv,cpu-errata" or >> ",cpu-errata". It can achieve almost everything like using pseudo >> isa. And the only cost I think is a small amount code to parse this. > > I suppose we could do that, but accounting for vendor specifics was one > of the goals for the property I only just added and that I am suggesting > to use here. I think there is a simpler way to do that. We use T-Head PMU by default for All T-Head CPUs (from mvendor id). Then, to test there is sscofpmf in the ISA string being probed by the kernel. If yes, then use scofpmf. Otherwise, use T-Head PMU. I will check if this can also be switched in any vendor CSR like Svpbmt and T-Head MAE we discussed before. Thanks, Yangyu Chen