From patchwork Sun Sep 29 13:53:38 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 174667 Delivered-To: patch@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp5987745ill; Sun, 29 Sep 2019 06:57:17 -0700 (PDT) X-Google-Smtp-Source: APXvYqwy5F7mgSnmlHWEpYGWZ5Afr+iYa1cJ+nm5MTi7sJLM2hCUi1rfq+fgvkC7vuC+p7wfzTb9 X-Received: by 2002:a50:91b1:: with SMTP id g46mr14401135eda.255.1569765437875; Sun, 29 Sep 2019 06:57:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569765437; cv=none; d=google.com; s=arc-20160816; b=l09yDLKzcs4WPpU8IjahNZXEJQYT4GqDIC7n5m+2xjmU3L1DYv3qiZBVlExRmtGodZ bDA+nBukyoWk2d8BX04KIs7N0o7eGdQw0Z2MIXUTMK3bMHNucHcQoceCdoINNt3KWe9z CvgnzuUGYCjLF9P+l9J0kCCgKhrhpvSS9l+2JfmX1T05IsSb3sb3VhMGjqoTutjyAl8+ 8HRyyI8I3gOozMEIsGRPxH7W8wkgsHTtkvts9PXKmGggtWdFL5Q++/UC3o6TGiwxCHI0 Pm6NejcWORiy14g5DHOm7M6YegArZREAGX0XmKIvYIkIPE5X6K4HT1Q4LI1zhSPtvc9H kwrg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=GcNbE54qUMVvN36GH3oXOQMDyID8omKDQYkV6DQ+3lk=; b=hy4hXiP7+Dw1uWulJF9fqn78kG483nBvpBu1CEPHLvw4AC/FjkrQ3QyttYpKN3BQI5 lVh1fxiHm15F6wQSdcG4td9cwO1zTUDXZz2I3htTAbHRGx8n4S5mdADSz5Gfxf+m06xh 8PKD31IgoRCAg1PbihgHTLEZoYEKe3baaDpLxPhg284tzjGyFrRVubwGqzWLeiuYoPIX h9NPby18larNZiF/cN1uTahAmyEx70GmejssuCrB4KPikMFOHbjbLhItrNhB3YFoCkx/ VM4i/etogCjJcEcqVs5CWEVIUFsYbh8AztuNofTrD7hfNkFuZVCzyWaTzcUmzJPA6WYY xm/Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=EHx7bcUz; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n14si4861421edv.377.2019.09.29.06.57.17; Sun, 29 Sep 2019 06:57:17 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of stable-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=@kernel.org header.s=default header.b=EHx7bcUz; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729175AbfI2N5O (ORCPT + 14 others); Sun, 29 Sep 2019 09:57:14 -0400 Received: from mail.kernel.org ([198.145.29.99]:37432 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729171AbfI2N5N (ORCPT ); Sun, 29 Sep 2019 09:57:13 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 8277E21835; Sun, 29 Sep 2019 13:57:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1569765431; bh=g4EIyYRYGSUWt9y0XJmLdDFQ6tAcVEVuhUhDrId1rQk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=EHx7bcUzCX9WVS6L5VttP3mu+uFcbOKh/fHWl5hl5pIPeP9OTiO07+xWUnFx2lYTt p6Z22xbC2fW3gYPBD7i34KjVOwM4Mm6L4r6vK/IwZ+rUGG2uKpwfRmw4zr/j3cB2nG ggy4QU7DKl2k22rZPM77Af9Zrk5PU4K56sNJMpqY= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Sedat Dilek , Sami Tolvanen , Nick Desaulniers , Alex Deucher , Sasha Levin Subject: [PATCH 4.19 05/63] drm/amd/display: readd -msse2 to prevent Clang from emitting libcalls to undefined SW FP routines Date: Sun, 29 Sep 2019 15:53:38 +0200 Message-Id: <20190929135032.251344843@linuxfoundation.org> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20190929135031.382429403@linuxfoundation.org> References: <20190929135031.382429403@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Nick Desaulniers [ Upstream commit 0f0727d971f6fdf8f1077180d495ddb9928f0c8b ] arch/x86/Makefile disables SSE and SSE2 for the whole kernel. The AMDGPU drivers modified in this patch re-enable SSE but not SSE2. Turn on SSE2 to support emitting double precision floating point instructions rather than calls to non-existent (usually available from gcc_s or compiler_rt) floating point helper routines for Clang. This was originally landed in: commit 10117450735c ("drm/amd/display: add -msse2 to prevent Clang from emitting libcalls to undefined SW FP routines") but reverted in: commit 193392ed9f69 ("Revert "drm/amd/display: add -msse2 to prevent Clang from emitting libcalls to undefined SW FP routines"") due to bugreports from GCC builds. Add guards to only do so for Clang. Link: https://bugs.freedesktop.org/show_bug.cgi?id=109487 Link: https://github.com/ClangBuiltLinux/linux/issues/327 Suggested-by: Sedat Dilek Suggested-by: Sami Tolvanen Signed-off-by: Nick Desaulniers Signed-off-by: Alex Deucher Signed-off-by: Sasha Levin --- drivers/gpu/drm/amd/display/dc/calcs/Makefile | 4 ++++ drivers/gpu/drm/amd/display/dc/dml/Makefile | 4 ++++ 2 files changed, 8 insertions(+) -- 2.20.1 diff --git a/drivers/gpu/drm/amd/display/dc/calcs/Makefile b/drivers/gpu/drm/amd/display/dc/calcs/Makefile index 95f332ee3e7e6..16614d73a5fcf 100644 --- a/drivers/gpu/drm/amd/display/dc/calcs/Makefile +++ b/drivers/gpu/drm/amd/display/dc/calcs/Makefile @@ -32,6 +32,10 @@ endif calcs_ccflags := -mhard-float -msse $(cc_stack_align) +ifdef CONFIG_CC_IS_CLANG +calcs_ccflags += -msse2 +endif + CFLAGS_dcn_calcs.o := $(calcs_ccflags) CFLAGS_dcn_calc_auto.o := $(calcs_ccflags) CFLAGS_dcn_calc_math.o := $(calcs_ccflags) -Wno-tautological-compare diff --git a/drivers/gpu/drm/amd/display/dc/dml/Makefile b/drivers/gpu/drm/amd/display/dc/dml/Makefile index d97ca6528f9d9..934ffe1b4b00e 100644 --- a/drivers/gpu/drm/amd/display/dc/dml/Makefile +++ b/drivers/gpu/drm/amd/display/dc/dml/Makefile @@ -32,6 +32,10 @@ endif dml_ccflags := -mhard-float -msse $(cc_stack_align) +ifdef CONFIG_CC_IS_CLANG +dml_ccflags += -msse2 +endif + CFLAGS_display_mode_lib.o := $(dml_ccflags) CFLAGS_display_pipe_clocks.o := $(dml_ccflags) CFLAGS_dml1_display_rq_dlg_calc.o := $(dml_ccflags)