lkml.org 
[lkml]   [2019]   [Jul]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH] drm/amd/display: Support clang option for stack alignment
On Fri, Jul 12, 2019 at 8:49 PM 'Nick Desaulniers' via Clang Built
Linux <clang-built-linux@googlegroups.com> wrote:
>
> On Fri, Jul 12, 2019 at 2:37 AM Arnd Bergmann <arnd@arndb.de> wrote:
> >
> > As previously fixed for dml in commit 4769278e5c7f ("amdgpu/dc/dml:
> > Support clang option for stack alignment") and calcs in commit
> > cc32ad8f559c ("amdgpu/dc/calcs: Support clang option for stack
> > alignment"), dcn20 uses an option that is not available with clang:
> >
> > clang: error: unknown argument: '-mpreferred-stack-boundary=4'
> > scripts/Makefile.build:281: recipe for target 'drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_resource.o' failed
> >
> > Use the same trick that we have in the other two files.
>
> Maybe time for a macro in Kbuild.include or some such, if we see this
> pattern being repeated?

I'm not actually convinced that the argument does anything useful
at all, if the kernel stack is normally not 16-byte aligned
when we enter the driver, and it clearly is not needed if the stack
is already aligned.

Unless any code calling into the portions that want the alignment
manually aligns the kernel stack pointer, we could just as well
leave it out. The git history does not explain why it was added in the
first place though, so I really have no idea.

I see in the architecture makefiles that i386 kernels are built with
the same flag globally, but other architectures (including x86_64)
use the default stack alignment, which may be different.

Arnd

\
 
 \ /
  Last update: 2019-07-12 22:31    [W:0.049 / U:0.428 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site