Received: by 10.223.176.5 with SMTP id f5csp2434605wra; Thu, 8 Feb 2018 14:08:31 -0800 (PST) X-Google-Smtp-Source: AH8x224nNEre0hXmFuaRKemze1OiLh5kluPunWw4UFXGXqtFm/riDT2a8Knb3vTz1PDopQh45e3G X-Received: by 10.98.153.197 with SMTP id t66mr521973pfk.142.1518127711578; Thu, 08 Feb 2018 14:08:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518127711; cv=none; d=google.com; s=arc-20160816; b=vp2UD4MttLZgxqp3C+++NfhTx918zcSmNOC5emTSUVUYjvCHvgs6UNwb/c9jezClhG eSOcYjxO//b5wv+xUn32F2B+Aj4CzTVQnTGQqCz3OLTuvoA8YAbqyLocwkbmiQdfTD+j heGubfsu98aaA+n5jUOp0ogoszTBcZikhEC/bcV7B29TDAJD0ti7a87Hc9hAfEfnvWYL yp3pwVwdJp21iomkH6D1zZ5EpiFZLCODVS++q5mcVVIANvgMZ3MaC/1qMzjFGtScbSe/ KYn6SSo/Miwb6vxeFM2J7M2Qxkl2cBfCBb4Unnr3jPCUGIyadiL5DbC+dZ2t9PtqGi6t Ualw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=YxX8n7vE+o93INh0ElUqrPiDkSJRBhgSdCT+e42bLE8=; b=BTxn22L1G0d5fTV4wqFcZLBd+UHrVmHFICKb50sbMzS+IU+9LtANeI6tljhmNEro3M 8SC63rJ8sNBTCWNGNVdFz3BEyBXky5jRNg7nfwW25G0pfAhjU9CLedi2CCr3Fy+u6qXI JbRtcewhw5nQhMUh89M4Ycy+dCiyhUB+9zh4MWBKydOpg8p8npavOoRgES+5dQHaxBZj X8HlkyzXeweCIOgGjOFPhW8x3YGO2bkYFHmJTIUZWQ57k8G13CcLiX9986SaMdZ3ZOmL LArDA9ixm8OgWkrov64uR6/7DaqLVmWtcSUQ1R4OQ7TwJuRFy50H1kpZuR5koUgUl+j9 ZJxA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=YvuvEUYv; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o15si467639pgc.48.2018.02.08.14.08.10; Thu, 08 Feb 2018 14:08:31 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=YvuvEUYv; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752218AbeBHWH0 (ORCPT + 99 others); Thu, 8 Feb 2018 17:07:26 -0500 Received: from mail-pl0-f66.google.com ([209.85.160.66]:38692 "EHLO mail-pl0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751756AbeBHWHZ (ORCPT ); Thu, 8 Feb 2018 17:07:25 -0500 Received: by mail-pl0-f66.google.com with SMTP id 13so535730plb.5 for ; Thu, 08 Feb 2018 14:07:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=YxX8n7vE+o93INh0ElUqrPiDkSJRBhgSdCT+e42bLE8=; b=YvuvEUYv9Ph477nH0EkScghTOnwDYZwQtaay4Yj2XtQymDrJdtIi4x9NjgEddom2td euj38G9gbm333j5fo0aHCk/1CVLWH0qRHWc5TmAbyctwoDa+53vmWmXzBqPyYNL4ih3D CDmdrnnggHqiS1WzeEymM73Z8YmryHHqiAcXM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=YxX8n7vE+o93INh0ElUqrPiDkSJRBhgSdCT+e42bLE8=; b=NUuapmRZRUjYCI95hS4VjI6fKO++irRrGGxu8jvahx6p6AFgiLSqD3s4kt/ICxNFHU TIviebtO9uW4hrvwmIqFKncrZVqiiu366hY5Ggl8Epxl32OOL99KkJth8VGrMu/wgrrI hS643T7jlYfHzSEuBEUZ76CFLBAHbgXXJeJDdTZuagSxfXpCi4qB3rqN0aDAyo6YSu1D TPHzbPPpHAH3IOyHW93hbKOXt0Tss2gprQBvvvqmuqbaXmqh15AZbGLrfRvFhDtxLQgp Xvj+Jv8yyjLPWqnHgnSFkLmswHGzdAuEOEZaQZAeqhBVjI8WMknpnDTOnixdmXWlQxSD rVdA== X-Gm-Message-State: APf1xPDV2HdzfJ6IU1Uv0QvCliUsdBpavdpOp0GdR3bIC4Zn2AywDHEt UcHVGH8jviV7FYES/YHpHvpNjQ== X-Received: by 2002:a17:902:6c41:: with SMTP id h1-v6mr430395pln.25.1518127645051; Thu, 08 Feb 2018 14:07:25 -0800 (PST) Received: from localhost ([2620:0:1000:1600:5ff4:666d:2881:a60]) by smtp.gmail.com with ESMTPSA id b68sm1604785pfg.159.2018.02.08.14.07.24 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 08 Feb 2018 14:07:24 -0800 (PST) Date: Thu, 8 Feb 2018 14:07:23 -0800 From: Matthias Kaehlcke To: Harry Wentland Cc: Alex Deucher , Christian =?utf-8?B?S8O2bmln?= , David Zhou , David Airlie , Felix Kuehling , Dmytro Laktyushkin , Craig Bergstrom , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Justin TerAvest , amd-gfx@lists.freedesktop.org, Guenter Roeck Subject: Re: [PATCH v3 4/4] amdgpu/dc/calcs: Support clang option for stack alignment Message-ID: <20180208220723.GE116483@google.com> References: <20180208205316.93330-1-mka@chromium.org> <20180208205316.93330-4-mka@chromium.org> <953daf8c-b195-e983-ecc4-4b369515e9ac@amd.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.2 (2017-12-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org El Thu, Feb 08, 2018 at 04:44:21PM -0500 Harry Wentland ha dit: > On 2018-02-08 04:03 PM, Harry Wentland wrote: > > On 2018-02-08 03:53 PM, Matthias Kaehlcke wrote: > >> calcs 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. > >> > >> Signed-off-by: Matthias Kaehlcke > > > > Series is > > Reviewed-by: Harry Wentland > > ... and merged to amd-staging-drm-next. Thanks! > I had to resolve a small conflict with patches 1 & 2. Not a big deal but curious what development branch you use. We normally use this for amd-gfx development: https://cgit.freedesktop.org/~agd5f/linux/log/?h=amd-staging-drm-next (although it might be a bit behind our internal dev tree). I typically use Linus' tree as base, will try to remember to check future patches against amd-staging-drm-next. > >> --- > >> Changes in v3: > >> - patch added > >> > >> Note to self: if this patterns proliferates further we probably want to > >> put the evaluation of the correct compiler flag in some common place. > >> > >> drivers/gpu/drm/amd/display/dc/calcs/Makefile | 8 +++++++- > >> 1 file changed, 7 insertions(+), 1 deletion(-) > >> > >> diff --git a/drivers/gpu/drm/amd/display/dc/calcs/Makefile b/drivers/gpu/drm/amd/display/dc/calcs/Makefile > >> index af0f452f3c9f..95f332ee3e7e 100644 > >> --- a/drivers/gpu/drm/amd/display/dc/calcs/Makefile > >> +++ b/drivers/gpu/drm/amd/display/dc/calcs/Makefile > >> @@ -24,7 +24,13 @@ > >> # It calculates Bandwidth and Watermarks values for HW programming > >> # > >> > >> -calcs_ccflags := -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 > >> + > >> +calcs_ccflags := -mhard-float -msse $(cc_stack_align) > >> > >> CFLAGS_dcn_calcs.o := $(calcs_ccflags) > >> CFLAGS_dcn_calc_auto.o := $(calcs_ccflags) > >> > > _______________________________________________ > > dri-devel mailing list > > dri-devel@lists.freedesktop.org > > https://lists.freedesktop.org/mailman/listinfo/dri-devel > >