Message ID | 20191002120136.1777161-1-arnd@arndb.de |
---|---|
Headers | show |
Series | amdgpu build fixes | expand |
On Wed, Oct 2, 2019 at 11:39 AM Arnd Bergmann <arnd@arndb.de> wrote: > > On Wed, Oct 2, 2019 at 5:12 PM Alex Deucher <alexdeucher@gmail.com> wrote: > > On Wed, Oct 2, 2019 at 10:51 AM Arnd Bergmann <arnd@arndb.de> wrote: > > > > > > > Nothing should really change with regards to the -msse flag here, only > > > the stack alignment flag changed. Maybe there was some other change > > > in your Makefile that conflicts with my my patch? > > > > This patch on top of yours seems to fix it and aligns better with the > > other Makefiles: > > > > diff --git a/drivers/gpu/drm/amd/display/dc/dcn21/Makefile > > b/drivers/gpu/drm/amd/display/dc/dcn21/Makefile > > index ef673bffc241..e71f3ee76cd1 100644 > > --- a/drivers/gpu/drm/amd/display/dc/dcn21/Makefile > > +++ b/drivers/gpu/drm/amd/display/dc/dcn21/Makefile > > @@ -9,10 +9,10 @@ else ifneq ($(call cc-option, -mstack-alignment=16),) > > cc_stack_align := -mstack-alignment=16 > > endif > > > > -CFLAGS_$(AMDDALPATH)/dc/dcn21/dcn21_resource.o := -mhard-float -msse > > $(cc_stack_align) > > +CFLAGS_dcn21_resource.o := -mhard-float -msse $(cc_stack_align) > > > > ifdef CONFIG_CC_IS_CLANG > > -CFLAGS_$(AMDDALPATH)/dc/dcn21/dcn21_resource.o += -msse2 > > +CFLAGS_dcn21_resource.o += -msse2 > > endif > > Ok, so there is clearly a global change that went into your tree, or > is missing from it: > > I see that as of linux-5.4-rc1, I have commit 54b8ae66ae1a ("kbuild: change > *FLAGS_<basetarget>.o to take the path relative to $(obj)"), which changed > all these path names to include the AMDDALPATH. > > It seems you are either on an older kernel that does not yet have this, > or you have applied another patch that reverts it. Ah, I don't have that patch yet in my tree. That explains it. Alex
On Wed, Oct 2, 2019 at 8:02 AM Arnd Bergmann <arnd@arndb.de> wrote: > > Here are a couple of build fixes from my backlog in the randconfig > tree. It would be good to get them all into linux-5.4. > > Arnd > > Arnd Bergmann (6): > drm/amdgpu: make pmu support optional, again > drm/amdgpu: hide another #warning > drm/amdgpu: display_mode_vba_21: remove uint typedef > drm/amd/display: fix dcn21 Makefile for clang > [RESEND] drm/amd/display: hide an unused variable > [RESEND] drm/amdgpu: work around llvm bug #42576 I've applied 1-5 and I'll send them for 5.4. There still seems to be some debate about 6. Thanks. Alex > > drivers/gpu/drm/amd/amdgpu/Makefile | 2 +- > drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c | 1 + > drivers/gpu/drm/amd/amdgpu/soc15.c | 2 -- > drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2 ++ > drivers/gpu/drm/amd/display/dc/dcn21/Makefile | 12 +++++++++++- > .../amd/display/dc/dml/dcn21/display_mode_vba_21.c | 13 +++++-------- > 6 files changed, 20 insertions(+), 12 deletions(-) > > -- > 2.20.0 > > _______________________________________________ > dri-devel mailing list > dri-devel@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/dri-devel
On Wed, Oct 2, 2019 at 5:03 AM Arnd Bergmann <arnd@arndb.de> wrote: > > Just like all the other variants, this one passes invalid > compile-time options with clang after the new code got > merged: > > clang: error: unknown argument: '-mpreferred-stack-boundary=4' > scripts/Makefile.build:265: recipe for target 'drivers/gpu/drm/amd/amdgpu/../display/dc/dcn21/dcn21_resource.o' failed > > Use the same variant that we have for dcn20 to fix compilation. > > Fixes: eced51f9babb ("drm/amd/display: Add hubp block for Renoir (v2)") > Signed-off-by: Arnd Bergmann <arnd@arndb.de> Thanks for the patch! Reviewed-by: Nick Desaulniers <ndesaulniers@google.com> Tested-by: Nick Desaulniers <ndesaulniers@google.com> (Though I think it's already been merged) Alex, do you know why the AMDGPU driver uses a different stack alignment (16B) than the rest of the x86 kernel? (see arch/x86/Makefile which uses 8B stack alignment). > --- > drivers/gpu/drm/amd/display/dc/dcn21/Makefile | 12 +++++++++++- > 1 file changed, 11 insertions(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/amd/display/dc/dcn21/Makefile b/drivers/gpu/drm/amd/display/dc/dcn21/Makefile > index 8cd9de8b1a7a..ef673bffc241 100644 > --- a/drivers/gpu/drm/amd/display/dc/dcn21/Makefile > +++ b/drivers/gpu/drm/amd/display/dc/dcn21/Makefile > @@ -3,7 +3,17 @@ > > DCN21 = dcn21_hubp.o dcn21_hubbub.o dcn21_resource.o > > -CFLAGS_$(AMDDALPATH)/dc/dcn21/dcn21_resource.o := -mhard-float -msse -mpreferred-stack-boundary=4 > +ifneq ($(call cc-option, -mpreferred-stack-boundary=4),) > + cc_stack_align := -mpreferred-stack-boundary=4 > +else ifneq ($(call cc-option, -mstack-alignment=16),) > + cc_stack_align := -mstack-alignment=16 > +endif > + > +CFLAGS_$(AMDDALPATH)/dc/dcn21/dcn21_resource.o := -mhard-float -msse $(cc_stack_align) > + > +ifdef CONFIG_CC_IS_CLANG > +CFLAGS_$(AMDDALPATH)/dc/dcn21/dcn21_resource.o += -msse2 > +endif > > AMD_DAL_DCN21 = $(addprefix $(AMDDALPATH)/dc/dcn21/,$(DCN21)) > > -- > 2.20.0 > > -- > You received this message because you are subscribed to the Google Groups "Clang Built Linux" group. > To unsubscribe from this group and stop receiving emails from it, send an email to clang-built-linux+unsubscribe@googlegroups.com. > To view this discussion on the web visit https://groups.google.com/d/msgid/clang-built-linux/20191002120136.1777161-5-arnd%40arndb.de. -- Thanks, ~Nick Desaulniers
On Wed, Oct 2, 2019 at 5:19 PM Nick Desaulniers <ndesaulniers@google.com> wrote: > > On Wed, Oct 2, 2019 at 5:03 AM Arnd Bergmann <arnd@arndb.de> wrote: > > > > Just like all the other variants, this one passes invalid > > compile-time options with clang after the new code got > > merged: > > > > clang: error: unknown argument: '-mpreferred-stack-boundary=4' > > scripts/Makefile.build:265: recipe for target 'drivers/gpu/drm/amd/amdgpu/../display/dc/dcn21/dcn21_resource.o' failed > > > > Use the same variant that we have for dcn20 to fix compilation. > > > > Fixes: eced51f9babb ("drm/amd/display: Add hubp block for Renoir (v2)") > > Signed-off-by: Arnd Bergmann <arnd@arndb.de> > > Thanks for the patch! > Reviewed-by: Nick Desaulniers <ndesaulniers@google.com> > Tested-by: Nick Desaulniers <ndesaulniers@google.com> > (Though I think it's already been merged) > > Alex, do you know why the AMDGPU driver uses a different stack > alignment (16B) than the rest of the x86 kernel? (see > arch/x86/Makefile which uses 8B stack alignment). Not sure. Maybe Harry can comment. I think it was added for the floating point stuff. Not sure if it's strictly required or not. Alex > > > --- > > drivers/gpu/drm/amd/display/dc/dcn21/Makefile | 12 +++++++++++- > > 1 file changed, 11 insertions(+), 1 deletion(-) > > > > diff --git a/drivers/gpu/drm/amd/display/dc/dcn21/Makefile b/drivers/gpu/drm/amd/display/dc/dcn21/Makefile > > index 8cd9de8b1a7a..ef673bffc241 100644 > > --- a/drivers/gpu/drm/amd/display/dc/dcn21/Makefile > > +++ b/drivers/gpu/drm/amd/display/dc/dcn21/Makefile > > @@ -3,7 +3,17 @@ > > > > DCN21 = dcn21_hubp.o dcn21_hubbub.o dcn21_resource.o > > > > -CFLAGS_$(AMDDALPATH)/dc/dcn21/dcn21_resource.o := -mhard-float -msse -mpreferred-stack-boundary=4 > > +ifneq ($(call cc-option, -mpreferred-stack-boundary=4),) > > + cc_stack_align := -mpreferred-stack-boundary=4 > > +else ifneq ($(call cc-option, -mstack-alignment=16),) > > + cc_stack_align := -mstack-alignment=16 > > +endif > > + > > +CFLAGS_$(AMDDALPATH)/dc/dcn21/dcn21_resource.o := -mhard-float -msse $(cc_stack_align) > > + > > +ifdef CONFIG_CC_IS_CLANG > > +CFLAGS_$(AMDDALPATH)/dc/dcn21/dcn21_resource.o += -msse2 > > +endif > > > > AMD_DAL_DCN21 = $(addprefix $(AMDDALPATH)/dc/dcn21/,$(DCN21)) > > > > -- > > 2.20.0 > > > > -- > > You received this message because you are subscribed to the Google Groups "Clang Built Linux" group. > > To unsubscribe from this group and stop receiving emails from it, send an email to clang-built-linux+unsubscribe@googlegroups.com. > > To view this discussion on the web visit https://groups.google.com/d/msgid/clang-built-linux/20191002120136.1777161-5-arnd%40arndb.de. > > > > -- > Thanks, > ~Nick Desaulniers > _______________________________________________ > amd-gfx mailing list > amd-gfx@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/amd-gfx
On Wed, Oct 2, 2019 at 2:24 PM Alex Deucher <alexdeucher@gmail.com> wrote: > > On Wed, Oct 2, 2019 at 5:19 PM Nick Desaulniers <ndesaulniers@google.com> wrote: > > > > Alex, do you know why the AMDGPU driver uses a different stack > > alignment (16B) than the rest of the x86 kernel? (see > > arch/x86/Makefile which uses 8B stack alignment). > > Not sure. Maybe Harry can comment. I think it was added for the > floating point stuff. Not sure if it's strictly required or not. Can you find out for me please who knows more about this and setup a chat with all of us? (I don't want to deride this patch's review thread, so let's start a new thread once we know more) We're facing some interesting runtime issues when built with Clang. -- Thanks, ~Nick Desaulniers