Received: by 2002:a05:7412:f589:b0:e2:908c:2ebd with SMTP id eh9csp847046rdb; Wed, 1 Nov 2023 04:52:36 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEE8tnuGTDJlAJARcaWwbtx08pqu0/0m+89tgm+6eyq88isFU9RKmv171PNud/qAJfya8JP X-Received: by 2002:a17:903:7c6:b0:1cc:630d:8a5e with SMTP id ko6-20020a17090307c600b001cc630d8a5emr5037493plb.48.1698839556417; Wed, 01 Nov 2023 04:52:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698839556; cv=none; d=google.com; s=arc-20160816; b=gzewhj727k9negbUrZ8Lc7tz0naIlFYm4fHJ871qPm1g5a3MTKuaIpxAQv+3yqbQJR FTMdrnNmOXl1wq9/dz/wKE5ijCct+OapgIWkIfTmMOv/Twuml//Ni3xI6YnabttU0oQN S/BZ1Vkys1xRn/PT8B3nC6ia54X8VdvnUx/k/Qilhk3BUwQJwEAS0i2nSu0br7qbzJqx q1rOyr+1mxQk5plnYUzXqN2vMvZ4M5FHKI8Vd6OzOPrgX5xIxvYJYptoFbQAYbhcOCyd 1GZsm0W4faL3lbl3pXeumb++nge8yQoZZUrlPHrYb+rH260eGJTE+fwAAtqD5NPUpT3Y mOhA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=uv/cV8r2c2bmDEeELYJrYvSFiDTnJ95Qdeg04+l70VY=; fh=q4AlezUzVIEhfhbU9cgbcsdbcUROMSyAiJOdXRtqQpg=; b=Sa7fpu+Dbv1osaEjL7loQf7u7VXY7IYuwHYX7hVyKlVuuBimbQedl20ZRQREAGxYh8 kysLWdozXokmHKDnCXVQFrn+9ylQ+YVQ8cMV7rbKeewNSRUsCe6cgV6lJ6UB+G1BNJpT pcdRpNUSlZGzlysxWUZXRX6kj8b8j94cmffGXq3tkdkKOOSGvo0P/CsLHCkXSwV+CQ1E dTk1iKT/kZuh77kJ1q+3kBEfwovRxPBIF5KfI5/6c+mMeQtwfvhbWBRVV8Kn87oRO3rJ 5mfleqWlmCCVJcT8uabc4beHphTSkFvT6jRdTxoKIv+j/OYhVwWxY15ZB78gEQWU9Ioi PhJA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [2620:137:e000::3:3]) by mx.google.com with ESMTPS id b17-20020a170902d51100b001cb02e6f174si3167878plg.492.2023.11.01.04.52.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Nov 2023 04:52:36 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) client-ip=2620:137:e000::3:3; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id F3A84807386E; Wed, 1 Nov 2023 04:52:33 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235308AbjKALwa (ORCPT + 99 others); Wed, 1 Nov 2023 07:52:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56248 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231538AbjKALw3 (ORCPT ); Wed, 1 Nov 2023 07:52:29 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id CD18BDC; Wed, 1 Nov 2023 04:52:26 -0700 (PDT) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 47ADF2F4; Wed, 1 Nov 2023 04:53:08 -0700 (PDT) Received: from e127643.broadband (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 7E1783F67D; Wed, 1 Nov 2023 04:52:23 -0700 (PDT) From: James Clark To: coresight@lists.linaro.org, suzuki.poulose@arm.com, anshuman.khandual@arm.com, mike.leach@linaro.org Cc: James Clark , stable@vger.kernel.org, Alexander Shishkin , Pratik Patel , Mathieu Poirier , Greg Kroah-Hartman , Kaixu Xia , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v2] coresight: etm4x: Fix width of CCITMIN field Date: Wed, 1 Nov 2023 11:52:06 +0000 Message-Id: <20231101115206.70810-1-james.clark@arm.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Wed, 01 Nov 2023 04:52:34 -0700 (PDT) CCITMIN is a 12 bit field and doesn't fit in a u8, so extend it to u16. This probably wasn't an issue previously because values higher than 255 never occurred. But since commit 0f55b43dedcd ("coresight: etm: Override TRCIDR3.CCITMIN on errata affected cpus"), a comparison with 256 was done to enable the errata, generating the following W=1 build error: coresight-etm4x-core.c:1188:24: error: result of comparison of constant 256 with expression of type 'u8' (aka 'unsigned char') is always false [-Werror,-Wtautological-constant-out-of-range-compare] if (drvdata->ccitmin == 256) Cc: stable@vger.kernel.org Fixes: 2e1cdfe184b5 ("coresight-etm4x: Adding CoreSight ETM4x driver") Reviewed-by: Mike Leach Signed-off-by: James Clark --- Changes since V1: * Change the fixes commit to the original addition of ccitmin, rather than the last refactor of the struct. drivers/hwtracing/coresight/coresight-etm4x.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/hwtracing/coresight/coresight-etm4x.h b/drivers/hwtracing/coresight/coresight-etm4x.h index 20e2e4cb7614..da17b6c49b0f 100644 --- a/drivers/hwtracing/coresight/coresight-etm4x.h +++ b/drivers/hwtracing/coresight/coresight-etm4x.h @@ -1036,7 +1036,7 @@ struct etmv4_drvdata { u8 ctxid_size; u8 vmid_size; u8 ccsize; - u8 ccitmin; + u16 ccitmin; u8 s_ex_level; u8 ns_ex_level; u8 q_support; -- 2.34.1