Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp1362453ybp; Thu, 17 Oct 2019 11:38:19 -0700 (PDT) X-Google-Smtp-Source: APXvYqyg/frLOGd9hYBpnKobgqjVpA9NBA84HWAiU5C07cFkKuWsLwpJ6bKU3v9dIif9W9KoxnKv X-Received: by 2002:a17:906:218a:: with SMTP id 10mr4999577eju.38.1571337499274; Thu, 17 Oct 2019 11:38:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571337499; cv=none; d=google.com; s=arc-20160816; b=ZOMbpQLwGcmVRxkeCqXTVZjNTUTna13H3gas3QF39ZBIyvjN8xsP+BPVC2u00jJMZV cEokdSofo7iYGckzGcnEATq59Q4dXSpRenK8ljhSyRpwBolMDrwjANh15UZ4v8fGMcUP 06TDpI4zlXs80LOIN6G0vL57CNOyEhd/ICUx2upozlQnSN4lDuWQ8TXnhDYU4E9AKpJ3 xStBSWBPql9XI5F217bej2/zVfvcjgu8FDwWCOU1opjp/niEdmbvzvKy+Nqhmr8BP833 gbnkAUuU55KLi9YUtVL9+Yz5HvSdrSYNw6VfgF7UyM5eJZx4w0OSFiOxuuG3MZaowcyM 36vQ== 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=kUZtB8Pe1kjJs+O600hohXSfYdWXOCTcGTCFAOKiV+I=; b=WPZAhx/GXwTJHR4EjeQE3SR/RrpHZMKLwBqvtYfOfusZtlC6FGLkdSSvfjxWYdcX+D GqIYKSPPopRssGnVDcJmTfGmExc9NXzOJUyfY4nSGHlZpdgIUDsiaLrloDLBtDYcqsYi nNh7er22/8gj5lKHsgsLT6E5GneOSY9haSOvbYmPUBA6CCZqniSnUudLePxhtDcjUmC/ WFxAipu13sqoW0+lFuOGopRYQ9vQY/RoR1SR0lTDvkIV6Q9a3OtvroK8Y0UUvvir55u5 05Ce5pE0N1ZBngGSg0jAmWOruEtnEIVjCMAwdvUzxvJbbHSTNiTPfjGiWMP82h0/vJQO MTrQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=w5Yq27LJ; 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 d35si1999434ede.440.2019.10.17.11.37.56; Thu, 17 Oct 2019 11:38:19 -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=w5Yq27LJ; 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 S2439092AbfJPWIc (ORCPT + 99 others); Wed, 16 Oct 2019 18:08:32 -0400 Received: from mail.kernel.org ([198.145.29.99]:50690 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2438044AbfJPV5q (ORCPT ); Wed, 16 Oct 2019 17:57:46 -0400 Received: from localhost (unknown [192.55.54.58]) (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 76AD421928; Wed, 16 Oct 2019 21:57:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1571263065; bh=Wr/xZxIqAJ6Qdy60YBuEq9FdlnUPXajz3zyOMIkcgK4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=w5Yq27LJGcNelmH8U2Gq5iD9ZbtvBAhvBLZy7j4BFiw1CiQuRK1ISQnqboLfzAFI1 eca6zvzbYUCOx6dyyXJ77awKXoIgKs6JMtcYio+wVfku2t+EbMKnMt3smEhEBFIwJh kRbIFfCGMx0q/32Ma0ceBdtHGq0+IDhXaskDciIc= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Paul Burton , Huacai Chen , Jiaxun Yang , linux-mips@vger.kernel.org Subject: [PATCH 4.19 66/81] MIPS: Disable Loongson MMI instructions for kernel build Date: Wed, 16 Oct 2019 14:51:17 -0700 Message-Id: <20191016214845.344235056@linuxfoundation.org> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191016214805.727399379@linuxfoundation.org> References: <20191016214805.727399379@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Paul Burton commit 2f2b4fd674cadd8c6b40eb629e140a14db4068fd upstream. GCC 9.x automatically enables support for Loongson MMI instructions when using some -march= flags, and then errors out when -msoft-float is specified with: cc1: error: ‘-mloongson-mmi’ must be used with ‘-mhard-float’ The kernel shouldn't be using these MMI instructions anyway, just as it doesn't use floating point instructions. Explicitly disable them in order to fix the build with GCC 9.x. Signed-off-by: Paul Burton Fixes: 3702bba5eb4f ("MIPS: Loongson: Add GCC 4.4 support for Loongson2E") Fixes: 6f7a251a259e ("MIPS: Loongson: Add basic Loongson 2F support") Fixes: 5188129b8c9f ("MIPS: Loongson-3: Improve -march option and move it to Platform") Cc: Huacai Chen Cc: Jiaxun Yang Cc: stable@vger.kernel.org # v2.6.32+ Cc: linux-mips@vger.kernel.org Signed-off-by: Greg Kroah-Hartman --- arch/mips/loongson64/Platform | 4 ++++ arch/mips/vdso/Makefile | 1 + 2 files changed, 5 insertions(+) --- a/arch/mips/loongson64/Platform +++ b/arch/mips/loongson64/Platform @@ -43,6 +43,10 @@ else $(call cc-option,-march=mips64r2,-mips64r2 -U_MIPS_ISA -D_MIPS_ISA=_MIPS_ISA_MIPS64) endif +# Some -march= flags enable MMI instructions, and GCC complains about that +# support being enabled alongside -msoft-float. Thus explicitly disable MMI. +cflags-y += $(call cc-option,-mno-loongson-mmi) + # # Loongson Machines' Support # --- a/arch/mips/vdso/Makefile +++ b/arch/mips/vdso/Makefile @@ -9,6 +9,7 @@ ccflags-vdso := \ $(filter -mmicromips,$(KBUILD_CFLAGS)) \ $(filter -march=%,$(KBUILD_CFLAGS)) \ $(filter -m%-float,$(KBUILD_CFLAGS)) \ + $(filter -mno-loongson-%,$(KBUILD_CFLAGS)) \ -D__VDSO__ ifeq ($(cc-name),clang)