[Intel-xe] [PATCH v3 0/9] Dump + OOB workarounds

Lucas De Marchi lucas.demarchi at intel.com
Wed May 17 04:39:58 UTC 2023


On Tue, May 16, 2023 at 03:19:41PM -0700, Lucas De Marchi wrote:
>Third version adding OOB workarounds, third different approach.
>Gone is the special ELF section and now it's implemented by
>creating a new RTP struct that holds tables containing only rules,
>without the actions interacting with reg-save-restore.
>
>Now a common approach between all types of workarounds is used for
>marking the "active" workarounds. These are the ones in play for the
>running system.  They can be queried over debugfs and for the OOB,
>are checked throughout the code. Last patch converts xe_guc.c to the
>new infra.
>
>In order to be able to implement the simpler XE_WA() requested in
>previous versions, and at the same time avoiding error-prone updates
>in different places of the code, a simple program was written to
>generate xe_wa_oob.c and xe_wa_oob.h. The syntax is kept very simple
>on purpose, with the following goals:
>
>	1) Be similar to the rest of the workarounds. The codegen
>	   just paste together the info in the .rules file
>	   and updated header/source with the appropriate values
>	2) Doesn't increase the build dependencies of the kernel,
>	   so it's implemented in C and built as a hostprog.
>
>Tested on a single DG2 system.

For the Hooks build failure, it seems we are missing a include in the
build system that doesn't get automatically added when passing
M=drivers/gpu/drm/xe/

word diff with and without:

gcc -Wp,-MMD,drivers/gpu/drm/xe/.xe_wa.o.d -nostdinc -I../arch/x86/include -I./arch/x86/include/generated -I../include -I./include -I../arch/x86/include/uapi -I./arch/x86/include/generated/uapi -I../include/uapi -I./include/generated/uapi -include ../include/linux/compiler-version.h -include ../include/linux/kconfig.h -include ../include/linux/compiler_types.h -D__KERNEL__ -fmacro-prefix-map=../= -Wall -Wundef -Werror=strict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -fshort-wchar -fno-PIE -Werror=implicit-function-declaration -Werror=implicit-int -Werror=return-type -Wno-format-security -funsigned-char -std=gnu11 -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -mno-avx -fcf-protection=branch -fno-jump-tables -m64 -falign-jumps=1 -falign-loops=1 -mno-80387 -mno-fp-ret-in-387 -mpreferred-stack-boundary=3 -mskip-rax-setup -mtune=generic -mno-red-zone -mcmodel=kernel -Wno-sign-compare -fno-asynchronous-unwind-tables -mindirect-branch=thunk-extern -mindirect-branch-register -mindirect-branch-cs-prefix -mfunction-return=thunk-extern -fno-jump-tables -fpatchable-function-entry=16,16 -fno-delete-null-pointer-checks -Wno-frame-address -Wno-format-truncation -Wno-format-overflow -Wno-address-of-packed-member -O2 -fno-allow-store-data-races -Wframe-larger-than=2048 -fstack-protector-strong -Wno-main -Wno-unused-but-set-variable -Wno-unused-const-variable -Wno-dangling-pointer -ftrivial-auto-var-init=zero -fno-stack-clash-protection -pg -mrecord-mcount -mfentry -DCC_USING_FENTRY -falign-functions=16 -Wdeclaration-after-statement -Wvla -Wno-pointer-sign -Wcast-function-type -Wno-stringop-truncation -Wno-stringop-overflow -Wno-restrict -Wno-maybe-uninitialized -Wno-array-bounds -Wno-alloc-size-larger-than -Wimplicit-fallthrough=5 -fno-strict-overflow -fno-stack-check -fconserve-stack -Werror=date-time -Werror=incompatible-pointer-types -Werror=designated-init -Wno-packed-not-aligned -g -fno-var-tracking -femit-struct-debug-baseonly -Wall -Wextra -Wno-unused-parameter -Wno-type-limits -Wno-missing-field-initializers -Wno-unused-but-set-variable -Wno-sign-compare -Wno-frame-address -Werror -I../drivers/gpu/drm/xe -I../drivers/gpu/drm/xe/display/ext -I../drivers/gpu/drm/xe/compat-i915-headers -I../drivers/gpu/drm/xe/display/ -I../drivers/gpu/drm/i915/display/ -Ddrm_i915_gem_object=xe_bo -Ddrm_i915_private=xe_device   -fsanitize=kernel-address -fasan-shadow-offset=0xdffffc0000000000   --param asan-globals=1   --param asan-instrumentation-with-call-threshold=0   --param asan-instrument-allocas=1   --param asan-stack=1   {+-I ../drivers/gpu/drm/xe -I ./drivers/gpu/drm/xe+}  -DMODULE  -DKBUILD_BASENAME='"xe_wa"' -DKBUILD_MODNAME='"xe"' -D__KBUILD_MODNAME=kmod_xe -c -o drivers/gpu/drm/xe/xe_wa.o ../drivers/gpu/drm/xe/xe_wa.c

And with this additional diff it solves it for me:

diff --git a/drivers/gpu/drm/xe/Makefile b/drivers/gpu/drm/xe/Makefile
index 07af0d022263..5e89f26fc46b 100644
--- a/drivers/gpu/drm/xe/Makefile
+++ b/drivers/gpu/drm/xe/Makefile
@@ -24,7 +24,7 @@ subdir-ccflags-y += $(call cc-disable-warning, initializer-overrides)
  subdir-ccflags-y += $(call cc-disable-warning, frame-address)
  subdir-ccflags-$(CONFIG_DRM_XE_WERROR) += -Werror
  
-subdir-ccflags-y += -I$(srctree)/$(src)
+subdir-ccflags-y += -I$(srctree)/$(src) -I$(src)
  
  # generated sources
  hostprogs := xe_gen_wa_oob


More information about the Intel-xe mailing list