All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Jani Nikula <jani.nikula@intel.com>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	David Airlie <airlied@linux.ie>,
	dri-devel <dri-devel@lists.freedesktop.org>,
	Thomas Zimmermann <tzimmermann@suse.de>
Subject: Re: mainline build failure due to f1e4c916f97f ("drm/edid: add EDID block count and size helpers")
Date: Sat, 28 May 2022 13:13:31 +0100	[thread overview]
Message-ID: <YpIR67FMtTGCwARZ@debian> (raw)
In-Reply-To: <CAHk-=wisQd8yiPX=SsK3eFiakKo713hq4SyqPWsJ-oyAmLFefQ@mail.gmail.com>

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

WARNING: multiple messages have this Message-ID (diff)
From: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: "Jani Nikula" <jani.nikula@intel.com>,
	"Ville Syrjälä" <ville.syrjala@linux.intel.com>,
	"Maarten Lankhorst" <maarten.lankhorst@linux.intel.com>,
	"Maxime Ripard" <mripard@kernel.org>,
	"Thomas Zimmermann" <tzimmermann@suse.de>,
	"David Airlie" <airlied@linux.ie>,
	"Daniel Vetter" <daniel@ffwll.ch>,
	dri-devel <dri-devel@lists.freedesktop.org>,
	"Linux Kernel Mailing List" <linux-kernel@vger.kernel.org>
Subject: Re: mainline build failure due to f1e4c916f97f ("drm/edid: add EDID block count and size helpers")
Date: Sat, 28 May 2022 13:13:31 +0100	[thread overview]
Message-ID: <YpIR67FMtTGCwARZ@debian> (raw)
In-Reply-To: <CAHk-=wisQd8yiPX=SsK3eFiakKo713hq4SyqPWsJ-oyAmLFefQ@mail.gmail.com>

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

  parent reply	other threads:[~2022-05-28 12:13 UTC|newest]

Thread overview: 90+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-27  9:07 mainline build failure due to f1e4c916f97f ("drm/edid: add EDID block count and size helpers") Sudip Mukherjee
2022-05-27  9:07 ` Sudip Mukherjee
2022-05-27 18:56 ` Linus Torvalds
2022-05-27 18:56   ` Linus Torvalds
2022-05-27 23:40   ` Sudip Mukherjee
2022-05-27 23:40     ` Sudip Mukherjee
2022-05-28  1:04     ` Linus Torvalds
2022-05-28  1:04       ` Linus Torvalds
2022-05-28 10:07       ` Sudip Mukherjee
2022-05-28 10:07         ` Sudip Mukherjee
2022-05-28 12:13       ` Sudip Mukherjee [this message]
2022-05-28 12:13         ` Sudip Mukherjee
2022-05-28 17:40         ` Linus Torvalds
2022-05-28 17:40           ` Linus Torvalds
2022-05-28 18:08           ` Linus Torvalds
2022-05-28 18:08             ` Linus Torvalds
2022-05-28 18:08             ` Linus Torvalds
2022-05-28 18:58             ` Arnd Bergmann
2022-05-28 18:58               ` Arnd Bergmann
2022-05-28 18:58               ` Arnd Bergmann
2022-05-28 20:31               ` Linus Torvalds
2022-05-28 20:31                 ` Linus Torvalds
2022-05-28 20:31                 ` Linus Torvalds
2022-05-28 21:08                 ` Arnd Bergmann
2022-05-28 21:08                   ` Arnd Bergmann
2022-05-28 21:08                   ` Arnd Bergmann
2022-05-30  9:31                 ` Jani Nikula
2022-05-30  9:31                   ` Jani Nikula
2022-05-30  9:31                   ` Jani Nikula
2022-05-30  9:33                   ` Jani Nikula
2022-05-30  9:33                     ` Jani Nikula
2022-05-30  9:33                     ` Jani Nikula
2022-05-30 12:43                     ` Arnd Bergmann
2022-05-30 12:43                       ` Arnd Bergmann
2022-05-30 12:43                       ` Arnd Bergmann
2022-05-30 13:10                       ` Jani Nikula
2022-05-30 13:10                         ` Jani Nikula
2022-05-30 13:10                         ` Jani Nikula
2022-05-30 13:35                         ` Arnd Bergmann
2022-05-30 13:35                           ` Arnd Bergmann
2022-05-30 14:08                           ` Jani Nikula
2022-05-30 14:08                             ` Jani Nikula
2022-05-30 14:08                             ` Jani Nikula
2022-05-30 14:26                             ` Arnd Bergmann
2022-05-30 14:26                               ` Arnd Bergmann
2022-05-30 14:26                               ` Arnd Bergmann
2022-05-31  6:26                               ` Julia Lawall
2022-05-31  6:26                                 ` Julia Lawall
2022-05-31  6:26                                 ` Julia Lawall
2022-05-31  8:04                                 ` Arnd Bergmann
2022-05-31  8:04                                   ` Arnd Bergmann
2022-05-31  8:04                                   ` Arnd Bergmann
2022-05-31 16:41                                   ` Linus Torvalds
2022-05-31 16:41                                     ` Linus Torvalds
2022-05-31 16:41                                     ` Linus Torvalds
2022-06-01 22:28                                     ` Keisuke Nishimura
2022-06-01 22:28                                       ` Keisuke Nishimura
2022-06-01 22:28                                       ` Keisuke Nishimura
2022-06-02  1:08                                       ` Linus Torvalds
2022-06-02  1:08                                         ` Linus Torvalds
2022-06-02  1:08                                         ` Linus Torvalds
2022-06-02  7:38                                         ` Arnd Bergmann
2022-06-02  7:38                                           ` Arnd Bergmann
2022-06-02  7:38                                           ` Arnd Bergmann
2022-06-02 11:21                                           ` Tetsuo Handa
2022-06-02 11:21                                             ` Tetsuo Handa
2022-06-02 11:21                                             ` Tetsuo Handa
2022-06-02 12:11                                             ` Arnd Bergmann
2022-06-02 12:11                                               ` Arnd Bergmann
2022-06-02 12:11                                               ` Arnd Bergmann
2022-06-02 13:18                                               ` Ard Biesheuvel
2022-06-02 13:18                                                 ` Ard Biesheuvel
2022-06-02 13:18                                                 ` Ard Biesheuvel
2022-06-02 12:19                                           ` Christoph Hellwig
2022-06-02 12:19                                             ` Christoph Hellwig
2022-06-06 10:51                                           ` Keisuke Nishimura
2022-06-06 10:51                                             ` Keisuke Nishimura
2022-06-06 10:51                                             ` Keisuke Nishimura
2022-05-30 16:56                           ` Russell King (Oracle)
2022-05-30 16:56                             ` Russell King (Oracle)
2022-05-30 16:56                             ` Russell King (Oracle)
2022-05-30 16:54                       ` Russell King (Oracle)
2022-05-30 16:54                         ` Russell King (Oracle)
2022-05-30 16:54                         ` Russell King (Oracle)
2022-05-30 16:53                     ` Russell King (Oracle)
2022-05-30 16:53                       ` Russell King (Oracle)
2022-05-30 16:53                       ` Russell King (Oracle)
2022-05-28 20:32             ` Russell King (Oracle)
2022-05-28 20:32               ` Russell King (Oracle)
2022-05-28 20:32               ` Russell King (Oracle)

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=YpIR67FMtTGCwARZ@debian \
    --to=sudipm.mukherjee@gmail.com \
    --cc=airlied@linux.ie \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=jani.nikula@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@linux-foundation.org \
    --cc=tzimmermann@suse.de \
    /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.