Content-Type: multipart/mixed; boundary="===============9095530339984573975==" MIME-Version: 1.0 From: Peter Zijlstra To: kbuild-all@lists.01.org Subject: Re: drivers/gpu/drm/i915/i915.prelink.o: warning: objtool: __intel_wait_for_register_fw.cold()+0xce: relocation to !ENDBR: vlv_allow_gt_wake.cold+0x0 Date: Thu, 07 Apr 2022 11:24:05 +0200 Message-ID: <20220407092405.GI2731@worktop.programming.kicks-ass.net> In-Reply-To: <20220406163703.hhet4ai7ztd7g4j4@treble> List-Id: --===============9095530339984573975== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable On Wed, Apr 06, 2022 at 09:37:03AM -0700, Josh Poimboeuf wrote: > On Wed, Apr 06, 2022 at 09:43:30AM +0200, Peter Zijlstra wrote: > > On Tue, Apr 05, 2022 at 10:32:51PM -0700, Josh Poimboeuf wrote: > > > More broadly, this issue could theoretically happen in some other pla= ces > > > throughout the kernel tree, since _THIS_IP_ is fundamentally unreliab= le > > > as currently written. > > > = > > > So we could look at making _THIS_IP_ more predictable. > > > = > > > Inline asm would work better ("lea 0(%rip), %[rip]"), but then you ne= ed > > > an arch-dependent implementation... > > = > > Well, there's a ton of _THIS_IP_ instances all around, and it would be > > unfortunate to have them grow into actual code :/ > = > What do you mean by growing into actual code? It's still just a single > instruction, as was the immediate load before. Aah, indeed. I was somehow thinking we'd get extra instructions. > Though, you pasted this on irc: > = > #define _THIS_IP_ ({ __label__ __here; __here: asm_volatile_goto (""::= :: __here); (unsigned long)&&__here; }) > = > which seems decent to me, though less than ideal because it grows an > ENDBR. But I like its arch-independence, so yeah, LGTM. I did send hjl an email about that extra endbr, because I really don't like that. And jump_label (also using asm-goto) doesn't grow those endbr instructions, so something is weird. --===============9095530339984573975==--