From: Jani Nikula <jani.nikula@linux.intel.com>
To: flyingpenghao@gmail.com, airlied@gmail.com, daniel@ffwll.ch
Cc: dri-devel@lists.freedesktop.org, Peng Hao <flyingpeng@tencent.com>
Subject: Re: [PATCH] i915: increase frame warning limit in intel_workaround when using KASAN or KCSAN
Date: Thu, 13 Jun 2024 12:57:16 +0300 [thread overview]
Message-ID: <87ikydi2rn.fsf@intel.com> (raw)
In-Reply-To: <20240613022343.49254-1-flyingpeng@tencent.com>
On Thu, 13 Jun 2024, flyingpenghao@gmail.com wrote:
> From: Peng Hao <flyingpeng@tencent.com>
>
> When building kernel with clang, which will typically
> have sanitizers enabled, there is a warning about a large stack frame.
>
> drivers/gpu/drm/i915/gt/intel_workarounds.c:3044:6: error: stack frame size (5176)
> exceeds limit (2048) in 'intel_engine_init_workarounds' [-Werror,-Wframe-larger-than]
> void intel_engine_init_workarounds(struct intel_engine_cs *engine)
> ^
> 128/5176 (2.47%) spills, 5048/5176 (97.53%) variables
>
> so increase the limit for configurations that have KASAN or KCSAN enabled for not
> breaking the majority of builds.
We need to fix the issue instead of sweeping it under the carpet.
Also, please see MAINTAINERS for where to send i915 patches.
BR,
Jani.
>
> Signed-off-by: Peng Hao <flyingpeng@tencent.com>
> ---
> drivers/gpu/drm/i915/Makefile | 6 +++++-
> 1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/i915/Makefile b/drivers/gpu/drm/i915/Makefile
> index fba73c38e235..884e2f010bdd 100644
> --- a/drivers/gpu/drm/i915/Makefile
> +++ b/drivers/gpu/drm/i915/Makefile
> @@ -36,7 +36,11 @@ subdir-ccflags-$(CONFIG_DRM_I915_WERROR) += -Werror
> CFLAGS_i915_pci.o = -Wno-override-init
> CFLAGS_display/intel_display_device.o = -Wno-override-init
> CFLAGS_display/intel_fbdev.o = -Wno-override-init
> -
> +ifneq ($(CONFIG_FRAME_WARN),0)
> +ifeq ($(filter y,$(CONFIG_KASAN)$(CONFIG_KCSAN)),y)
> +CFLAGS_gt/intel_workarounds.o = -Wframe-larger-than=5272
> +endif
> +endif
> # Support compiling the display code separately for both i915 and xe
> # drivers. Define I915 when building i915.
> subdir-ccflags-y += -DI915
--
Jani Nikula, Intel
prev parent reply other threads:[~2024-06-13 9:57 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-13 2:23 [PATCH] i915: increase frame warning limit in intel_workaround when using KASAN or KCSAN flyingpenghao
2024-06-13 9:57 ` Jani Nikula [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87ikydi2rn.fsf@intel.com \
--to=jani.nikula@linux.intel.com \
--cc=airlied@gmail.com \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=flyingpeng@tencent.com \
--cc=flyingpenghao@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.