From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f43.google.com (mail-wm1-f43.google.com [209.85.128.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 97ADE330D5D for ; Fri, 14 Nov 2025 15:21:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.43 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763133695; cv=none; b=c5pwkAtDJ7SGCMzVxq4QtwaFVr3Re0SKqKLigkL4hU8W1UL1k1/Buso7O6jlV7I+6IKneSEVZfKkq9VdHPd/BTyVK4i0qdGQSG/uFrs9dDfqBSzW8/9RbqTfiXNeYFnJruG09EWVRZGwsDF+nVbAs1xawbsCGOyFnZYSQJfyle8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763133695; c=relaxed/simple; bh=MrG1YgyG9c8+KsutI7GttgCEPGm1ZrzOq7F+ESwUzzQ=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=ICjIQNy7icZ6dDWBg81Hes0ZYN/r5pRlTKsFKIDcw+N3dnMV8WPXBlbs4xhm3w31ZuIESOiqP/tEiTdy775v6HsJRFB111QJvhvout/VAyoeJnw/5hYQzkl2wuKTbSV3+JPb1oBc2w8uPovEAwEb0whSXLpV7lRgUaarPpD8Tjs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=X1E6j10Y; arc=none smtp.client-ip=209.85.128.43 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="X1E6j10Y" Received: by mail-wm1-f43.google.com with SMTP id 5b1f17b1804b1-47117f92e32so18077315e9.1 for ; Fri, 14 Nov 2025 07:21:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1763133691; x=1763738491; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=spQr/NA76+OWDiEmTNKSTkOX2yR6kDRejGdoeHR8vFc=; b=X1E6j10YJ3DhNpyWZOJSwcscsV+2yBGjTEoHXbkcjBTuZ7SDN0PSslEvJIbQoHK9ix aCERYKI8wBV5TEQQFohN1psRZSff6yWZu/mNWCa901En0Te5OvXZDXMkf9AnwOTVyPB+ GO8qBgHkOQ/FmGbUXZG5LMwGnLAV3Rs2r/sUhiifDk6TTvGNIIRFMaeWkKnYjAmVnVS0 GE8Gemqv5FxKOmgQv4AUZD2IcFnDKaC3oxD1u0mjncm5IYoKIVkUxr6Q0Np4Pn1oT2h/ /JHWLcPa9fPUS6GkuOjKpxHQ6qGqbin45/Uhn6PGfS/8kuSyTrvUNVk0FvpEBkmyqTSt MgdA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1763133691; x=1763738491; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=spQr/NA76+OWDiEmTNKSTkOX2yR6kDRejGdoeHR8vFc=; b=Gk4BDS268OS4NatpI5zkUV9mNDNVS97stMvhH5PWs0j0UCM38ErRh1cMQ0PcrIsfJO 9XktT9j8Tgwpv0KqjfoXZt/tE7qHtBQLzvxLYwSP4aB4TF4TD9sIUMbWnYkPVtD58Tl0 Mfq36f9ummAu/8cbe6BevTNeT4qEhK0gepqVq6DrZ5kcGUrAJ5/cSo2ekl/JrdnpFiwI PvhNkZyJB/3BJO4cYUYcWRzvmf+CElBrrqeoCbEy0fZPLQfs2leqys1hg24J+OUZyhSu vDJOw7K3Bxv5mUA3RARz2InDfieT9uvj+FYTEVZy00MkWwT2QAuh3BzKVtY/CHU8+KKx lFlA== X-Forwarded-Encrypted: i=1; AJvYcCWdV6hsqa0JwvpOZzeU3iU0CcOG5MgMMXf2NnQH1fMtsbmz3GrqD02jWgXMxneCiRADGxC+7nxCQi6b2LI=@vger.kernel.org X-Gm-Message-State: AOJu0YydkB3erqndnmwpNTVBXGbbTXlPKpzEAPMYHBmz4VMATG4QT+Jc qyMU4KnUb7XL6vVP0+8BW35ZFj0wGxdvqXsIC5qWCT4g1z2VeJnvIUGu3QAkJM7aDWU= X-Gm-Gg: ASbGncv9pkzRvDXeq2saBoRU8fSfeli6Vjc2cbnW//nYxNXPgq13LdET8HrQRZLHL5m MWJsadS28oMb5Y22DUf+V4hULz+p1KpBd/dByVMtQUlHQV/vUlQ08/kOxel9OQFuzrOgUN+wFaC jK5iY+eBZlmj04pE6uDVdjLVbR90kzdfaV1HndbeVYJu7uZxgXK6y4ngBO9EoF5xlv+TIm/u16I ThJoGmUObLWedfdbp3zqKGlKjkoM75JOdQMGUbSDBB9gPMLsKKpAz/++PMrGLw8OZc3WMDq4cKQ fDpJcuzUDENeLlHwzwR7cV+tQDjRxvohVx3zXhdTmjT/BD9T0CTJ3lGCUxllju6F8rdGpbVWBPI VOQbXeZ2XDuTEWR3PVTiPSuesOrOd9aq3eBVrKxFmsBBL09BysmTliqin1katleSBkjIdlCG3Q/ dW/jaM93ag07Vq0NJr X-Google-Smtp-Source: AGHT+IFF1t1CoxEZ5R530Db9r2XX566FpGv1PPCAcKESuGedkS3oZfaEcKSquxVavWe1ChO/EKFlrA== X-Received: by 2002:a05:600c:6288:b0:46e:4a60:ea2c with SMTP id 5b1f17b1804b1-4778feb83eemr31863195e9.37.1763133690910; Fri, 14 Nov 2025 07:21:30 -0800 (PST) Received: from [192.168.1.3] ([185.48.77.170]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-477952823d3sm12900885e9.11.2025.11.14.07.21.30 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 14 Nov 2025 07:21:30 -0800 (PST) Message-ID: Date: Fri, 14 Nov 2025 15:21:29 +0000 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v4 07/13] coresight: Don't reject unrecognized ETMv3 format attributes To: Leo Yan Cc: Suzuki K Poulose , Mike Leach , Alexander Shishkin , Jonathan Corbet , coresight@lists.linaro.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org References: <20251112-james-cs-syncfreq-v4-0-165ba21401dc@linaro.org> <20251112-james-cs-syncfreq-v4-7-165ba21401dc@linaro.org> <20251114151810.GG3568724@e132581.arm.com> Content-Language: en-US From: James Clark In-Reply-To: <20251114151810.GG3568724@e132581.arm.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 14/11/2025 3:18 pm, Leo Yan wrote: > On Wed, Nov 12, 2025 at 03:22:13PM +0000, James Clark wrote: >> config isn't the only field, there are also config1, config2, etc. >> Rejecting unrecognized attributes is therefore inconsistent as it wasn't >> done for all fields. It was only necessary when we were directly >> programming attr->config into ETMCR and didn't hide the unsupported >> fields, but now it's not needed so remove it. > > It is fine for not validating all configs (please ignore my comment for > checking all configs in my reply for patch 04). > > I am wandering if need to remove ETM3X_SUPPORTED_OPTIONS totally. I > saw etm_enable_hw() uses it to clear config bits, so it makes sense to > keep it. > > Reviewed-by: Leo Yan > I tried to remove it, but as you saw it's used to clear the old config. It wasn't obvious to me if there was some other state in ETMCR that needed to be preserved, so only selected bits are cleared. I assumed there was a reason it wasn't just overwritten with config->ctrl to begin with as that would have been much simpler. There wasn't a comment and I didn't want to spend much more time digging so I just left it. I think it's harmless to leave for now. >> >> Signed-off-by: James Clark >> --- >> drivers/hwtracing/coresight/coresight-etm3x-core.c | 7 ------- >> 1 file changed, 7 deletions(-) >> >> diff --git a/drivers/hwtracing/coresight/coresight-etm3x-core.c b/drivers/hwtracing/coresight/coresight-etm3x-core.c >> index 4511fc2f8d72..584d653eda81 100644 >> --- a/drivers/hwtracing/coresight/coresight-etm3x-core.c >> +++ b/drivers/hwtracing/coresight/coresight-etm3x-core.c >> @@ -333,13 +333,6 @@ static int etm_parse_event_config(struct etm_drvdata *drvdata, >> if (config->mode) >> etm_config_trace_mode(config); >> >> - /* >> - * At this time only cycle accurate, return stack and timestamp >> - * options are available. >> - */ >> - if (attr->config & ~ETM3X_SUPPORTED_OPTIONS) >> - return -EINVAL; >> - >> config->ctrl = 0; >> >> if (ATTR_CFG_GET_FLD(attr, cycacc)) >> >> -- >> 2.34.1 >>