lkml.org 
[lkml]   [2022]   [May]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: mainline build failure due to f1e4c916f97f ("drm/edid: add EDID block count and size helpers")
On Fri, May 27, 2022 at 06:04:14PM -0700, Linus Torvalds wrote:
> On Fri, May 27, 2022 at 4:41 PM Sudip Mukherjee
> <sudipm.mukherjee@gmail.com> wrote:
> >
> > I just tested with various values, sizeof(*edid) is 144 bytes at that place.
>
> Hmm. What compiler do you have? Because it seems very broken.
>
> You don't actually have to try with various sizes, you could have just
> done something like
>
> int size_of_edid(const struct edid *edid)
> {
> return sizeof(*edid);
> }
>
> and then "make drivers/gpu/drm/drm_edid.s" to generate assembly and
> see what it looks like (obviously removing the BUG_ON() in order to
> build).

just tried this with
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- drivers/gpu/drm/drm_edid.s

>
> That obviously generates code like
>
> movl $128, %eax
> ret

and for me it looks like:

.L1030:
.word .LC40
.word .LC41
.word -1431655765
.word .LC39
.size drm_edid_to_sad, .-drm_edid_to_sad
.align 2
.global size_of_edid
.syntax unified
.arm
.type size_of_edid, %function
size_of_edid:
@ args = 0, pretend = 0, frame = 0
@ frame_needed = 1, uses_anonymous_args = 0
mov ip, sp @,
push {fp, ip, lr, pc} @
sub fp, ip, #4 @,,
@ drivers/gpu/drm/drm_edid.c:1573: }
mov r0, #144 @,
ldmfd sp, {fp, sp, pc} @
.size size_of_edid, .-size_of_edid



--
Regards
Sudip

\
 
 \ /
  Last update: 2022-05-28 14:14    [W:0.839 / U:0.108 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site