From: Lucas De Marchi <lucas.demarchi@intel.com>
To: Jani Nikula <jani.nikula@linux.intel.com>
Cc: intel-xe@lists.freedesktop.org,
"Nathan Chancellor" <nathan@kernel.org>,
"Daniele Ceraolo Spurio" <daniele.ceraolospurio@intel.com>,
"Dafna Hirschfeld" <dhirschfeld@habana.ai>,
"Matt Roper" <matthew.d.roper@intel.com>,
"Niranjana Vishwanathapura" <niranjana.vishwanathapura@intel.com>,
"Thomas Hellström" <thomas.hellstrom@linux.intel.com>
Subject: Re: [PATCH] drm/xe: Generate oob before compiling anything
Date: Thu, 25 Apr 2024 07:48:21 -0500 [thread overview]
Message-ID: <crdry63sz6va3gxsa55fw2dz7zyyxyhcrdboe4cxpre27ydfae@i5qdm3wni22k> (raw)
In-Reply-To: <87le51pu3y.fsf@intel.com>
On Thu, Apr 25, 2024 at 02:19:45PM GMT, Jani Nikula wrote:
>On Thu, 11 Apr 2024, Lucas De Marchi <lucas.demarchi@intel.com> wrote:
>> Instead of keep adding more dependencies as WAs are needed in different
>> places of the driver, just add a rule with all the objects so the code
>> generation happens before anything else.
>>
>> Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
>> ---
>> drivers/gpu/drm/xe/Makefile | 16 ++++------------
>> 1 file changed, 4 insertions(+), 12 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/xe/Makefile b/drivers/gpu/drm/xe/Makefile
>> index 6015c9e41f24..a5809b3ec8a5 100644
>> --- a/drivers/gpu/drm/xe/Makefile
>> +++ b/drivers/gpu/drm/xe/Makefile
>> @@ -46,18 +46,6 @@ $(obj)/generated/%_wa_oob.c $(obj)/generated/%_wa_oob.h: $(obj)/xe_gen_wa_oob \
>> $(srctree)/$(src)/xe_wa_oob.rules
>> $(call cmd,wa_oob)
>>
>> -uses_generated_oob := \
>> - $(obj)/xe_gsc.o \
>> - $(obj)/xe_guc.o \
>> - $(obj)/xe_guc_ads.o \
>> - $(obj)/xe_migrate.o \
>> - $(obj)/xe_ring_ops.o \
>> - $(obj)/xe_vm.o \
>> - $(obj)/xe_wa.o \
>> - $(obj)/xe_ttm_stolen_mgr.o
>> -
>> -$(uses_generated_oob): $(generated_oob)
>> -
>> # Please keep these build lists sorted!
>>
>> # core driver code
>> @@ -319,3 +307,7 @@ quiet_cmd_hdrtest = HDRTEST $(patsubst %.hdrtest,%.h,$@)
>>
>> $(obj)/%.hdrtest: $(src)/%.h FORCE
>> $(call if_changed_dep,hdrtest)
>> +
>> +# make sure the generated header is done before any
>> +# compilation unit is attempted
>> +$(xe-y): $(generated_oob)
>
>I'm sorry, I don't understand why this would ensure the order.
$(xe-y) should expand to every single .o listed here. So this is adding
a dependency "every single .o depends on the generated files. Or at
least it was the intention and appeared to work fine for x86, but no UM.
Before we had:
$(uses_generated_oob): $(generated_oob)
with $(uses_generated_oob) being crafted by hand.
>
>Moreover, I think there should be a way to express the dependency
>accurately and automatically. I'm just not sure how. I guess it's the
>system include <generated/...> that prevents the usual dep handling from
>working.
why? there's nothing special with "generated" or instructing the
compiler to look at the include paths (without looking at the current
dir)
Lucas De Marchi
>
>BR,
>Jani.
>
>
>--
>Jani Nikula, Intel
prev parent reply other threads:[~2024-04-25 12:48 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-11 21:07 [PATCH] drm/xe: Generate oob before compiling anything Lucas De Marchi
2024-04-11 21:33 ` ✓ CI.Patch_applied: success for " Patchwork
2024-04-11 21:34 ` ✓ CI.checkpatch: " Patchwork
2024-04-11 21:34 ` ✗ CI.KUnit: failure " Patchwork
2024-04-24 23:49 ` Lucas De Marchi
2024-04-12 6:56 ` [PATCH] " Jani Nikula
2024-04-12 14:18 ` Lucas De Marchi
2024-04-12 14:39 ` Jani Nikula
2024-04-12 17:08 ` Lucas De Marchi
2024-04-25 11:19 ` Jani Nikula
2024-04-25 12:48 ` Lucas De Marchi [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=crdry63sz6va3gxsa55fw2dz7zyyxyhcrdboe4cxpre27ydfae@i5qdm3wni22k \
--to=lucas.demarchi@intel.com \
--cc=daniele.ceraolospurio@intel.com \
--cc=dhirschfeld@habana.ai \
--cc=intel-xe@lists.freedesktop.org \
--cc=jani.nikula@linux.intel.com \
--cc=matthew.d.roper@intel.com \
--cc=nathan@kernel.org \
--cc=niranjana.vishwanathapura@intel.com \
--cc=thomas.hellstrom@linux.intel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).