Received: by 2002:a05:6500:1b8f:b0:1fa:5c73:8e2d with SMTP id df15csp825494lqb; Wed, 29 May 2024 11:34:37 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXS1CU3jz/rOgJlWhJVxJtz9NNF31sODnMl2JFgRcjnz9n5TVSWytoXw/JSysG7elphqJgTdUSgCkwPb9VBDto45t/grOGD7fkhuIdrDA== X-Google-Smtp-Source: AGHT+IF604uLWk1xNrKv4w+Z6UGZ/m9vpUwfGAIUCCp/hBYcvfHNUIIRXr/U2XhlcpAOq/9vQwoy X-Received: by 2002:a17:902:d50c:b0:1f4:b313:3e9a with SMTP id d9443c01a7336-1f4b3134380mr89724745ad.65.1717007677146; Wed, 29 May 2024 11:34:37 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717007677; cv=pass; d=google.com; s=arc-20160816; b=Jaa+tNbm/Ouev7l802WhkaDcEvyKzI6psunxGT1Z7M1cQJJfyYWmYAHPwfJl1mRJxO jCoeGYbIz0ncEwZ66OGO28lAPx0VdMdYGcIAFcz3GlPeJZWYAwLj3dh/1iqWLLZrJ5uU CJM8pG5NKKGTOU4uxRENO4KWaXLgD8OBcc906muVSDgEBL1FAcFxByYRCODbLrCB6HPu WutgWXLYuKwcDJhKkseHsZ1FBqnLL+p18yHjmex9GZ4oZIn/MItdjgMfyBvRcmjP16VX znxelZl07ZpngP8wK7l4QEssO/QeNlXoe/K8ZiumaVroZ87qapJWQK8DbERK5uiqt9CR 4NPw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:dkim-signature; bh=hD6ZFR8cVhkF2jyWECX8kqG1Td4lUwUC/HVkt49WWDc=; fh=QJG5Kb3gQmn7ZvGWdH6dyomQgBZniwzzZ9MBzq16pYU=; b=Ap7i3hyXAT8+u4rzYLFE3IPvDY4tna98x+c56eXSNwMqIrAtFuyft/R6mnxCDoaJso Mhu/UNf6XFyPcWhDeyKYAIruJ9qyt7p/FkUtah6n1aVNkRS9R4h20xVZxo91cIGNh/m5 CwLyfG2RCh4yWfNaEG9zx2Edmp81KJ6oCaniW+0Ipi5wxUEtlRvDnoSFAGqM+Iv10fEz g7w4OsGJcGJHgrUzih4L0DXvPaSTseb6w45axXwtKiSCLL/wFhthxanHC8snAHb+bOGQ qhtqIZHi/AAnAnjgyfpouN0O2Z7KM6vODCLXuN4P8PPyOmDyjkAyUI9K5FASHEiR2+4b NCUw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@rivosinc-com.20230601.gappssmtp.com header.s=20230601 header.b=OgZhJ1v3; arc=pass (i=1 spf=pass spfdomain=rivosinc.com dkim=pass dkdomain=rivosinc-com.20230601.gappssmtp.com); spf=pass (google.com: domain of linux-kernel+bounces-194573-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-194573-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id d9443c01a7336-1f49b487b12si4067145ad.359.2024.05.29.11.34.36 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 May 2024 11:34:37 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-194573-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@rivosinc-com.20230601.gappssmtp.com header.s=20230601 header.b=OgZhJ1v3; arc=pass (i=1 spf=pass spfdomain=rivosinc.com dkim=pass dkdomain=rivosinc-com.20230601.gappssmtp.com); spf=pass (google.com: domain of linux-kernel+bounces-194573-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-194573-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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 96E42B22B3E for ; Wed, 29 May 2024 18:34:31 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0B0171C0DEB; Wed, 29 May 2024 18:34:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=rivosinc-com.20230601.gappssmtp.com header.i=@rivosinc-com.20230601.gappssmtp.com header.b="OgZhJ1v3" Received: from mail-ed1-f43.google.com (mail-ed1-f43.google.com [209.85.208.43]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B8C8B15CD55 for ; Wed, 29 May 2024 18:34:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.43 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717007663; cv=none; b=Q/ZZRmdnHj89pAUBVM7KK3EvNHR6dljbs0wNKZ6AxjuVG2BTXxY6uowFqDEvEf6LekyVMkjORDCjR1a5M9I9GDvYNs1Q7xWbJKNx5a31xFFtMgsn0WWUKVYeq0Pz6qcdyVonU1bPcUlm+mBqDl+n7JwuxLwVdL80eKPXEMd84uc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717007663; c=relaxed/simple; bh=/LUGPZ8sRhOa4AmLVDY/nkUbCDAoK3NG9aCU9NfcpLI=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=itc3JihCd5xjukFHOZuOwUai1wlQoPSSkDB1s0cpqxqCVci5gRxjI+udABGGc1IPCw3tCWZBAkoWlET7KRvsK6UjTyU7wlBKKVVU5wMMa8PKZDx/zBDNf9DOtIyg3VAsLTvC+ve4DYSnrDIOK355z0XZsmkHbxd8LzcBB4qC/YQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=rivosinc.com; spf=pass smtp.mailfrom=rivosinc.com; dkim=pass (2048-bit key) header.d=rivosinc-com.20230601.gappssmtp.com header.i=@rivosinc-com.20230601.gappssmtp.com header.b=OgZhJ1v3; arc=none smtp.client-ip=209.85.208.43 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=rivosinc.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=rivosinc.com Received: by mail-ed1-f43.google.com with SMTP id 4fb4d7f45d1cf-579cd80450fso528056a12.0 for ; Wed, 29 May 2024 11:34:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rivosinc-com.20230601.gappssmtp.com; s=20230601; t=1717007659; x=1717612459; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=hD6ZFR8cVhkF2jyWECX8kqG1Td4lUwUC/HVkt49WWDc=; b=OgZhJ1v3llbSl+P7ybHZpo77dFkoRJCUzreIynVyMlYFmB8JN1xCZfZtq4+H3R3kLf Q87UWZtausi4A9hi4rPQ4LeW628vpUkJznLoo8zp5g2ZdlB1iZSdPnGlFxY6CuSTVkIG VHnASZeLtUDC+eAqzVcx012e+3s5fLzgAmJLJeN7sNHJX8To3hLQeu0brJ9UwKgrA0E1 ZOx6gAs23Q6hzFNNPu+VkNNipJ7f5gNwinK9kZxKyxLTDXHDVcxjsjSMtUOGr9SdQuWq VfvSda0Z3ccvlOPOp1qO22lickpvUPkjtjeZYy6r643JqSE2KET1gJ03R3hLsUYuWyH1 cqcg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717007659; x=1717612459; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=hD6ZFR8cVhkF2jyWECX8kqG1Td4lUwUC/HVkt49WWDc=; b=HE29nxdS8SEL4zX5t9cBacd4j7U7NqzGLd4p3GVJUu5lRXHnJP3CM06+/jJOn/8L1h g2MbJCB7bj44oOGAYVeBkhubh3vweDFu4wyO5mpsTQmmXRYkVvkFjHUk/inQXlp1xBU7 NT43cJCapRFZ39Pt942FHSxQDnZ+uHVWyRwqJqCKABoAS7K7Bvecp/HrmKi6s8TUtuaE tQiC5kbzWoarpldEn+6WTRfxFasKPepHe05Su26MlyZr4gjF82Ob4qxQDaFIQnX/22oN erpA9stN5vRjntt1NDoOqnjov4yVtDCobc9gZ2gUMm2UzTJKIPrQuLYWCxJQN9/PYkqh jlmQ== X-Forwarded-Encrypted: i=1; AJvYcCX1SeV1M/wrctIZx+HFL4MTncWD+3/H77GImlWEqoG2hzG5IEWFwK0hI/BNNdKBlTA1nuSr3Tynul1tRrQniVVlRlCir0M7zK/EN857 X-Gm-Message-State: AOJu0YxTY7VFb5P1BeyL7tr4Wx4jR7Pzbf4YKDHtDbDAFVOLVtfmHnFE mkrc+Lpy+bhRL1vR20SkAuI9YCaArxXKpl2DqGjqbJ0j7ZgG+XgG7tyv61IbaEZjNTsYZZaFf46 jLuF3vTauMjWWLkGn2z3egLhwFZtL0iiCaUJ4LA== X-Received: by 2002:a17:906:66d0:b0:a59:be21:3587 with SMTP id a640c23a62f3a-a642d2780fbmr270278866b.8.1717007658800; Wed, 29 May 2024 11:34:18 -0700 (PDT) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: In-Reply-To: From: Evan Green Date: Wed, 29 May 2024 11:33:42 -0700 Message-ID: Subject: Re: [PATCH v2 3/3] RISC-V: hwprobe: not treat KEY_CPUPERF_0 as bitmask To: Yangyu Chen Cc: linux-riscv@lists.infradead.org, Elliott Hughes , Charlie Jenkins , Jonathan Corbet , Paul Walmsley , Palmer Dabbelt , =?UTF-8?B?Q2zDqW1lbnQgTMOpZ2Vy?= , Conor Dooley , Andrew Jones , linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Thu, May 23, 2024 at 8:36=E2=80=AFPM Yangyu Chen wrot= e: > > Since the value in KEY_CPUPERF_0 is not bitmask, remove the wrong code > in hwprobe.h. > > Signed-off-by: Yangyu Chen I'd expect a Fixes tag, and ideally some discussion on the reasoning and ramifications of this change. I posted the other possible fix, declaring a new key, at [1], mostly so we could see the two options and discuss. I'm okay with either patch. -Evan [1] https://lore.kernel.org/lkml/20240529182649.2635123-1-evan@rivosinc.com= /T/#u > --- > arch/riscv/include/asm/hwprobe.h | 1 - > 1 file changed, 1 deletion(-) > > diff --git a/arch/riscv/include/asm/hwprobe.h b/arch/riscv/include/asm/hw= probe.h > index 630507dff5ea..f24cad22bbe1 100644 > --- a/arch/riscv/include/asm/hwprobe.h > +++ b/arch/riscv/include/asm/hwprobe.h > @@ -20,7 +20,6 @@ static inline bool hwprobe_key_is_bitmask(__s64 key) > switch (key) { > case RISCV_HWPROBE_KEY_BASE_BEHAVIOR: > case RISCV_HWPROBE_KEY_IMA_EXT_0: > - case RISCV_HWPROBE_KEY_CPUPERF_0: > return true; > } > > -- > 2.45.1 >