From patchwork Sun Sep 29 13:55: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: 174670 Delivered-To: patch@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp5996105ill; Sun, 29 Sep 2019 07:05:08 -0700 (PDT) X-Google-Smtp-Source: APXvYqzT158L4QQ5HRXxwFERRMVphvwtYqW6tDAsDXN4RdjeaNi7a5/+RHVub7X2VRlvOgOkqPsM X-Received: by 2002:a50:ab49:: with SMTP id t9mr14570426edc.301.1569765908361; Sun, 29 Sep 2019 07:05:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569765908; cv=none; d=google.com; s=arc-20160816; b=WR2dzIawPK7vrGt5eT+DJHfQxqo4nzqgIagoLDyDyf8EnQ5hjd8LBkhgVe3hYNrp/b Id3Sz9uCwBpQJO7WRi0qxYugWSEsEpq8iv/0zsu7DrYLfCc6gfiPUE8mO6yU51MmWP5J MgdEcutvk5gaUiYgU7ea88lT0zXmUBwc8n8Revh2sV6Qpix23mCVNDWaRgrRjam1rxgd ExdNXVzmQWzjQerb8R5vWMGw63cKXvccGBmprPczl3rFim+3GHkJeeqTKwGv2L6jOoXP VJVjg/CHcdBfi5LflpE0l+qEQIxNa8SIHTR9Kz/a/+Y/8XdHLRTe0n8VL79ud/Hl9neh RE7g== 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=bwN1hkM54cehnlxycGpAqISLahNbtJ18uiOP3NEO8/zJX+AizlZZQX/ZCIpZisLaCq qW+IdCCZMuLveMtm2H2oHgpkLaovyxL1jgWSwu7/AMfgbSk/oJQyfVxqHmqP+hIXN6pR 8VtJ9nXBv8G4H/nU9mdfKRFvAoVF3AYVe9O1UvFM/CMMnpECfJy0JaPOTfXP4yu6h3bf Vp4kEfH2HWVAc25X93FP0vlXQwbAyniOoHu32jB+2pNbbbOQf3nO8DyxI6IO13NvObu5 q+IV0BeW5MzGjJboIo8MRh0099DaGwhGUqyrJO7/6SKzmeIwCVNSTqizufIe0dV43+jW JC6w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=zngbyiuI; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x25si5127747edd.350.2019.09.29.07.05.08; Sun, 29 Sep 2019 07:05:08 -0700 (PDT) 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=@kernel.org header.s=default header.b=zngbyiuI; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729987AbfI2OBM (ORCPT + 26 others); Sun, 29 Sep 2019 10:01:12 -0400 Received: from mail.kernel.org ([198.145.29.99]:43224 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729279AbfI2OBI (ORCPT ); Sun, 29 Sep 2019 10:01:08 -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 762132082F; Sun, 29 Sep 2019 14:01:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1569765667; bh=g4EIyYRYGSUWt9y0XJmLdDFQ6tAcVEVuhUhDrId1rQk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=zngbyiuIndT7LLDJuFbT9vgyoqbNG1IigN3GOQ6v4/wDgvd/xV1tmY2gWmuzn+F9Z cIrPEMpakccNrh5ukl+wNGeAneISlCYOk/fIeo2RX71HlBa9FpfCevS2TYKzi6mn8O y/bia2Pv794CIpwoNECedUjLIeoVqd15yQTmEI/Q= 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 5.2 10/45] drm/amd/display: readd -msse2 to prevent Clang from emitting libcalls to undefined SW FP routines Date: Sun, 29 Sep 2019 15:55:38 +0200 Message-Id: <20190929135027.732791582@linuxfoundation.org> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20190929135024.387033930@linuxfoundation.org> References: <20190929135024.387033930@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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)