Received: by 10.192.165.156 with SMTP id m28csp415560imm; Wed, 11 Apr 2018 00:56:33 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/VruUxl45hGsAPD36YhkClX+YqJi/++BJ2jrRcx0R2ZK80G9nPhxUvFlIFsX7iijhzbwxV X-Received: by 2002:a17:902:6e4:: with SMTP id 91-v6mr3892500plh.196.1523433393932; Wed, 11 Apr 2018 00:56:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523433393; cv=none; d=google.com; s=arc-20160816; b=L7cbc4K8TlGIONdUlkr5FRKjiGa3O0MYuKDF3ovamRCr2145OJQiWRq+5jwnGsfe45 1v+X0WbjUgNlHkF7A8aqBxThhjJhwhUwabXKL2j7Pd+jaEBS0R0Q8daP0EYAilQAFove OU9qJkmoBVZvHFeEU/nzI2MuNvzU53Iy2r1bLhnizXCf1yko0VW+eEcdkdxcnS4l+ZZv uTW87qGj2GhHXkdYIxPGII11DvrnQI9c63B0hvGciZZuV6fljG3pbIoOqAj1yxTqBOE8 HD6uUYMmx/CA0rxiLy2/1GP+RbjYdrjEeqOo970ltafd/TKPFh2E3wKlvSOrFWGDTQ+D u90w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:arc-authentication-results; bh=+c7eEltku/z7BVN5+bhmog8Zw08qPLjQQ8Gv3R/M1iQ=; b=ggcFL4dBFvDey9PjKbK7tk5J45rTLOXtqJG4Ajr4/jq9GsnQE+SKSeFUpaPb/nJrI8 upVySn1pUe09rgHVrF/nwZlZvN/YB1Z3cPaDBoMSrG7C0lCmiOPjFawfVrpUadPlnEUz aSuCsfJnvhCPZwAkdfzuDdY1Mz0uSGgDG1HCUP2h3YJ8xHEMKNdL1l0CfUZoSaN8Vpw7 9925OhgMjbUGXLG4DesJ2VJIpr0XxTI6a/HYef5O5u5yO0UZZwSd6+7WSTMkIceJn8vY kxnFYDetddUI18/LfTNa3rt6qqlo976pJKqqPfE39rp242jm4ExSPdS5MG27vL7pSsHf 4ixw== ARC-Authentication-Results: i=1; mx.google.com; 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 b91-v6si629268plb.90.2018.04.11.00.55.57; Wed, 11 Apr 2018 00:56:33 -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; 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 S1752400AbeDKHw3 (ORCPT + 99 others); Wed, 11 Apr 2018 03:52:29 -0400 Received: from 9pmail.ess.barracuda.com ([64.235.154.211]:50793 "EHLO 9pmail.ess.barracuda.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750743AbeDKHw2 (ORCPT ); Wed, 11 Apr 2018 03:52:28 -0400 Received: from MIPSMAIL01.mipstec.com (mailrelay.mips.com [12.201.5.28]) by mx1401.ess.rzc.cudaops.com (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NO); Wed, 11 Apr 2018 07:52:22 +0000 Received: from mredfearn-linux.mipstec.com (192.168.155.41) by MIPSMAIL01.mipstec.com (10.20.43.31) with Microsoft SMTP Server (TLS) id 14.3.361.1; Wed, 11 Apr 2018 00:51:27 -0700 From: Matt Redfearn To: Palmer Dabbelt , Antony Pavlov , James Hogan , Ralf Baechle CC: , Matt Redfearn , Subject: [PATCH v6 3/4] MIPS: vmlinuz: Use generic ashldi3 Date: Wed, 11 Apr 2018 08:50:18 +0100 Message-ID: <1523433019-17419-3-git-send-email-matt.redfearn@mips.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1523433019-17419-1-git-send-email-matt.redfearn@mips.com> References: <1523433019-17419-1-git-send-email-matt.redfearn@mips.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [192.168.155.41] X-BESS-ID: 1523433038-321457-11089-33080-2 X-BESS-VER: 2018.4-r1804052328 X-BESS-Apparent-Source-IP: 12.201.5.28 X-BESS-Outbound-Spam-Score: 0.60 X-BESS-Outbound-Spam-Report: Code version 3.2, rules version 3.2.2.191870 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------- 0.00 BSF_BESS_OUTBOUND META: BESS Outbound 0.60 MARKETING_SUBJECT HEADER: Subject contains popular marketing words X-BESS-Outbound-Spam-Status: SCORE=0.60 using account:ESS59374 scores of KILL_LEVEL=7.0 tests=BSF_BESS_OUTBOUND, MARKETING_SUBJECT X-BESS-BRTS-Status: 1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org In preparation for removing some of the MIPS compiler intrinsics from arch/mips/lib, first update the build of vmlinuz to use the generic ashldi3 from lib. Both ashldi3 and bswapsi objects need to be built with different CFLAGS for inclusion to vmlinuz rather than simply including the object built for the main kernel image. The objects cannot be built directly from source, since CONFIG_MODVERSIONS changes cmd_cc_o_c to prevent this. Split the rule to ship ashldi3 and bswapsi from the relevant source locations. These files make no reference to other files in their directory, so the additional CFLAGS are apparently unnecessary - remove them as well. Signed-off-by: Matt Redfearn --- Changes in v6: New patch to fix vmlinuz which requires ashldi3 so must be switched to come from $(srctree)/lib before the arch/mips/ version is deleted. This version has been build tested with every upstream defconfig since previous versions caused problems with ci20_defconfig and loongson1b_defconfig. Changes in v5: None Changes in v4: None Changes in v3: None Changes in v2: None arch/mips/boot/compressed/Makefile | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/arch/mips/boot/compressed/Makefile b/arch/mips/boot/compressed/Makefile index adce180f3ee4..e03f522c33ac 100644 --- a/arch/mips/boot/compressed/Makefile +++ b/arch/mips/boot/compressed/Makefile @@ -46,9 +46,12 @@ $(obj)/uart-ath79.c: $(srctree)/arch/mips/ath79/early_printk.c vmlinuzobjs-$(CONFIG_KERNEL_XZ) += $(obj)/ashldi3.o $(obj)/bswapsi.o -extra-y += ashldi3.c bswapsi.c -$(obj)/ashldi3.o $(obj)/bswapsi.o: KBUILD_CFLAGS += -I$(srctree)/arch/mips/lib -$(obj)/ashldi3.c $(obj)/bswapsi.c: $(obj)/%.c: $(srctree)/arch/mips/lib/%.c +extra-y += ashldi3.c +$(obj)/ashldi3.c: $(obj)/%.c: $(srctree)/lib/%.c + $(call cmd,shipped) + +extra-y += bswapsi.c +$(obj)/bswapsi.c: $(obj)/%.c: $(srctree)/arch/mips/lib/%.c $(call cmd,shipped) targets := $(notdir $(vmlinuzobjs-y)) -- 2.7.4