From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 DE84F21FF2B; Mon, 23 Jun 2025 21:58:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1750715895; cv=none; b=Q0zyGZjC9AIC39CsnrH2OkbnnEWYAHL0Sg+74fydFACgs61fg9TMq6p8J7rJJbfAnxiCYFpYsZ/dL2hsRwVipL+V8FsnBFB95bGErpEKjhuywinUOJ9xl/tkBpkGIYARZd19+L7ulw9Um48M+FesyIUO74X5dH3d91AK300V5hU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1750715895; c=relaxed/simple; bh=Uj8qY3wSRxUtpW44zE1rFzwSf7R1jYNe+ZpR4MfFXpQ=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=DFRldLepbu2dJ/qUzJUeIpfKXYtlrzQNuft5CFCmEVGgwnZr1oQuqWFjCwBaGOEKvON3jL/IYd/ZAHt+AihnuXeqkG6uHR/Nh8HYjAwHU9MilXf5tQsOm8WgZDn3Ny6TzRlw2q3g94LqYbBRihvPS1TtFxBOmE1QiAF378Ceirg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=PQ6vTWED; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="PQ6vTWED" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6F691C4CEEA; Mon, 23 Jun 2025 21:58:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1750715892; bh=Uj8qY3wSRxUtpW44zE1rFzwSf7R1jYNe+ZpR4MfFXpQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=PQ6vTWEDdwvsWesud9WCTCk+FE+37Su7RbWOIkY/HuafudSIJX+ReBEunfhSSnaOr uN3BOmY2gsqB9hpKnJxnTK+MgDxuiGSeityC6X1WXyvw4eLhCGpAKNEJnFeoM9Eiy5 aZtErqpqgEy7GuZkOljED266VFILvyJmyaI2m4cY= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Nathan Chancellor , Tzung-Bi Shih , Tvrtko Ursulin , Joonas Lahtinen , Sasha Levin Subject: [PATCH 6.6 248/290] drm/i915/pmu: Fix build error with GCOV and AutoFDO enabled Date: Mon, 23 Jun 2025 15:08:29 +0200 Message-ID: <20250623130634.384920476@linuxfoundation.org> X-Mailer: git-send-email 2.50.0 In-Reply-To: <20250623130626.910356556@linuxfoundation.org> References: <20250623130626.910356556@linuxfoundation.org> User-Agent: quilt/0.68 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.6-stable review patch. If anyone has any objections, please let me know. ------------------ From: Tzung-Bi Shih [ Upstream commit a7137b1825b535eb7258b25beeb0d5425e0037d2 ] i915_pmu.c may fail to build with GCOV and AutoFDO enabled. ../drivers/gpu/drm/i915/i915_pmu.c:116:3: error: call to '__compiletime_assert_487' declared with 'error' attribute: BUILD_BUG_ON failed: bit > BITS_PER_TYPE(typeof_member(struct i915_pmu, enable)) - 1 116 | BUILD_BUG_ON(bit > | ^ Here is a way to reproduce the issue: $ git checkout v6.15 $ mkdir build $ ./scripts/kconfig/merge_config.sh -O build -n -m <(cat < Signed-off-by: Tzung-Bi Shih Signed-off-by: Tvrtko Ursulin Link: https://lore.kernel.org/r/20250612083023.562585-1-tzungbi@kernel.org (cherry picked from commit 686d773186bf72b739bab7e12eb8665d914676ee) Signed-off-by: Joonas Lahtinen Signed-off-by: Sasha Levin --- drivers/gpu/drm/i915/i915_pmu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_pmu.c b/drivers/gpu/drm/i915/i915_pmu.c index 7b1076b5e748c..33ab82c334a88 100644 --- a/drivers/gpu/drm/i915/i915_pmu.c +++ b/drivers/gpu/drm/i915/i915_pmu.c @@ -105,7 +105,7 @@ static u32 config_mask(const u64 config) { unsigned int bit = config_bit(config); - if (__builtin_constant_p(config)) + if (__builtin_constant_p(bit)) BUILD_BUG_ON(bit > BITS_PER_TYPE(typeof_member(struct i915_pmu, enable)) - 1); @@ -114,7 +114,7 @@ static u32 config_mask(const u64 config) BITS_PER_TYPE(typeof_member(struct i915_pmu, enable)) - 1); - return BIT(config_bit(config)); + return BIT(bit); } static bool is_engine_event(struct perf_event *event) -- 2.39.5