public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Matthias Kaehlcke <mka@chromium.org>
To: Guenter Roeck <groeck@google.com>
Cc: "Alex Deucher" <alexander.deucher@amd.com>,
	"Christian König" <christian.koenig@amd.com>,
	"David Zhou" <David1.Zhou@amd.com>,
	"David Airlie" <airlied@linux.ie>,
	"Harry Wentland" <harry.wentland@amd.com>,
	"Felix Kuehling" <Felix.Kuehling@amd.com>,
	"Dmytro Laktyushkin" <Dmytro.Laktyushkin@amd.com>,
	"amd-gfx list" <amd-gfx@lists.freedesktop.org>,
	"Maling list - DRI developers" <dri-devel@lists.freedesktop.org>,
	linux-kernel <linux-kernel@vger.kernel.org>,
	"Guenter Roeck" <groeck@chromium.org>,
	"Justin TerAvest" <teravest@chromium.org>,
	"Craig Bergstrom" <craigb@chromium.org>
Subject: Re: [PATCH 2/2] amdgpu/dc/dml: Support clang option for stack alignment
Date: Wed, 7 Feb 2018 17:37:30 -0800	[thread overview]
Message-ID: <20180208013730.GC116483@google.com> (raw)
In-Reply-To: <CABXOdTeOvFkRp=Z6P47o3ky0HNWkeQ5b_Ff2DVKb8g5tdo3G_Q@mail.gmail.com>

El Wed, Feb 07, 2018 at 05:34:44PM -0800 Guenter Roeck ha dit:

> On Wed, Feb 7, 2018 at 5:21 PM, Matthias Kaehlcke <mka@chromium.org> wrote:
> > DML uses the compiler option -mpreferred-stack-boundary=4 to configure
> > a stack alignment of 16 bytes. Clang uses the option -mstack-alignment
> > instead, which expects as parameter the alignment in bytes, and not a
> > power of two like -mpreferred-stack-boundary.
> >
> > Probe for both compiler options and use the correct one, similar to
> > what is done in arch/x86/Makefile.
> >
> > Reported-by: Guenter Roeck <groeck@chromium.org>
> > Signed-off-by: Matthias Kaehlcke <mka@chromium.org>
> > ---
> >  drivers/gpu/drm/amd/display/dc/dml/Makefile | 8 +++++++-
> >  1 file changed, 7 insertions(+), 1 deletion(-)
> >
> > diff --git a/drivers/gpu/drm/amd/display/dc/dml/Makefile b/drivers/gpu/drm/amd/display/dc/dml/Makefile
> > index b8cadf833e71..740975931d21 100644
> > --- a/drivers/gpu/drm/amd/display/dc/dml/Makefile
> > +++ b/drivers/gpu/drm/amd/display/dc/dml/Makefile
> > @@ -24,7 +24,13 @@
> >  # It provides the general basic services required by other DAL
> >  # subcomponents.
> >
> > -subdir-ccflags-y += -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
> > +
> Any reason for using both = and := ?

Not really, will fix.

Thanks!

  reply	other threads:[~2018-02-08  1:37 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-08  1:21 [PATCH 1/2] amdgpu/dc/dml: Consolidate redundant CFLAGS Matthias Kaehlcke
2018-02-08  1:21 ` [PATCH 2/2] amdgpu/dc/dml: Support clang option for stack alignment Matthias Kaehlcke
2018-02-08  1:34   ` Guenter Roeck
2018-02-08  1:37     ` Matthias Kaehlcke [this message]
2018-02-08  1:32 ` [PATCH 1/2] amdgpu/dc/dml: Consolidate redundant CFLAGS Guenter Roeck

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=20180208013730.GC116483@google.com \
    --to=mka@chromium.org \
    --cc=David1.Zhou@amd.com \
    --cc=Dmytro.Laktyushkin@amd.com \
    --cc=Felix.Kuehling@amd.com \
    --cc=airlied@linux.ie \
    --cc=alexander.deucher@amd.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=christian.koenig@amd.com \
    --cc=craigb@chromium.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=groeck@chromium.org \
    --cc=groeck@google.com \
    --cc=harry.wentland@amd.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=teravest@chromium.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox