Received: by 10.223.164.202 with SMTP id h10csp672263wrb; Thu, 9 Nov 2017 01:17:52 -0800 (PST) X-Google-Smtp-Source: ABhQp+S1PzGpmNbusTbnfz1q0NfZ1Z4/fMTZdu/RZS8Tb64P3Kb2xSIW82iv1jZuiZc3D0yGAe6v X-Received: by 10.98.66.139 with SMTP id h11mr3486172pfd.174.1510219071977; Thu, 09 Nov 2017 01:17:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1510219071; cv=none; d=google.com; s=arc-20160816; b=Q+C8s4n6A1XJMR+7GL1JvdDWIeahjhMeFxRJixQahvq1c61Y95sU7ssu4pLk3+Enuf Wbo76Pc45TXOMjwMfaKDogytbUISm1ph5UGdK+iquiuMaEKsUYGYFKm+Z3ndBWLK3+vl RlznSXcGI2hnic42ld+SneYZ4qdmBJGqfmKzrnDFFkEiuHoWLizgTWhv2aZ7eRrBIdsG uGL331+OsWsjFGHaL2feOEha1jcQOksPQdGUPyKSSWyLVXQ6Q1YIGdAuO95mlW0BzFoN YHE5GBHviICYTcelaYZjPGVudU2n3zwMm9/DTQLyt07NdIgYc7GV6peGULZlRplVt3db 8Nww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-language :content-transfer-encoding:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:arc-authentication-results; bh=nL92MmEbEVnmOpnDauvsK5tOZlpn18DxnSUAk+wiINQ=; b=p46EUeVX74yhXatHWqJkIJKbc96x/e4iWd4TI/AuzzHcBGS8G8nu3nB7w6QSMnT3cW yA/abrH0aJBJIG3zf0OgfG8GNI6/+IxWDINpytmBZSmhESRcCSQtOtzLK7lVyHo2wkJ4 GuOG47Bpkxb8aN4aOvaZfKRWHkS1dI/JQW2QeNtNJGKy0dUiF8SeSivfo33sJlYDAkD5 h/1kP2c32VR9SymNcUcX5hS/gguN/uZHB/Q525PORiC88/vmPT6+qRDyudHCLZ68QSVN 6sRaQ/Q2ISS7LS5Wn4pcFz3/xnHY6JQmH4YHTChRYYJ1X6wpzhoUuRzqAy9JO536/yf8 D2ZQ== 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 g59si5932912plb.320.2017.11.09.01.17.40; Thu, 09 Nov 2017 01:17:51 -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; 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 S1754081AbdKIJRG (ORCPT + 82 others); Thu, 9 Nov 2017 04:17:06 -0500 Received: from 19pmail.ess.barracuda.com ([64.235.154.231]:44460 "EHLO 19pmail.ess.barracuda.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754041AbdKIJRC (ORCPT ); Thu, 9 Nov 2017 04:17:02 -0500 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); Thu, 09 Nov 2017 09:16:47 +0000 Received: from [10.150.130.83] (10.150.130.83) by MIPSMAIL01.mipstec.com (10.20.43.31) with Microsoft SMTP Server (TLS) id 14.3.361.1; Thu, 9 Nov 2017 01:16:46 -0800 Subject: Re: [PATCH AUTOSEL for-4.4 39/39] MIPS: Use Makefile.postlink to insert relocations into vmlinux To: "Levin, Alexander (Sasha Levin)" , "linux-kernel@vger.kernel.org" , "stable@vger.kernel.org" CC: Matt Redfearn , "linux-mips@linux-mips.org" , Ralf Baechle References: <20171108205027.27525-1-alexander.levin@verizon.com> <20171108205027.27525-39-alexander.levin@verizon.com> From: Matt Redfearn Message-ID: Date: Thu, 9 Nov 2017 09:16:44 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: <20171108205027.27525-39-alexander.levin@verizon.com> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US X-Originating-IP: [10.150.130.83] X-BESS-ID: 1510219006-321457-5685-46572-1 X-BESS-VER: 2017.12-r1710252241 X-BESS-Apparent-Source-IP: 12.201.5.28 X-BESS-Outbound-Spam-Score: 0.50 X-BESS-Outbound-Spam-Report: Code version 3.2, rules version 3.2.2.186748 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------- 0.50 BSF_RULE7568M META: Custom Rule 7568M 0.00 BSF_BESS_OUTBOUND META: BESS Outbound X-BESS-Outbound-Spam-Status: SCORE=0.50 using account:ESS59374 scores of KILL_LEVEL=7.0 tests=BSF_RULE7568M, BSF_BESS_OUTBOUND X-BESS-BRTS-Status: 1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 08/11/17 20:50, Levin, Alexander (Sasha Levin) wrote: > From: Matt Redfearn > > [ Upstream commit 44079d3509aee89c58f3e4fd929fa53ab2299019 ] > > When relocatable support for MIPS was merged, there was no support for > an architecture to add a postlink step for vmlinux. This meant that only > invoking a target within the boot directory, such as uImage, caused the > relocations to be inserted into vmlinux. Building just the vmlinux > target would result in a relocatable kernel with no relocation > information present. > > Commit fbe6e37dab97 ("kbuild: add arch specific post-link Makefile") Hi, This patch depends on upstream commit fbe6e37dab97 ("kbuild: add arch specific post-link Makefile") which was introduced in v4.9. This patch is an improvement to the build flow and I would not consider it for backporting - certainly not to v4.8 or earlier which is missing the dependency. Applying it will not break anything, however, it will perform no function either without the supporting dependency. Thanks, Matt > recified this situation, so MIPS can now define a postlink step to add > relocation information into vmlinux, and remove the additional steps > tacked onto boot targets. > > Signed-off-by: Matt Redfearn > Tested-by: Steven J. Hill > Cc: linux-mips@linux-mips.org > Cc: linux-kernel@vger.kernel.org > Patchwork: https://patchwork.linux-mips.org/patch/14554/ > Signed-off-by: Ralf Baechle > Signed-off-by: Sasha Levin > --- > arch/mips/Makefile.postlink | 35 +++++++++++++++++++++++++++++++++++ > 1 file changed, 35 insertions(+) > create mode 100644 arch/mips/Makefile.postlink > > diff --git a/arch/mips/Makefile.postlink b/arch/mips/Makefile.postlink > new file mode 100644 > index 000000000000..b0ddf0701a31 > --- /dev/null > +++ b/arch/mips/Makefile.postlink > @@ -0,0 +1,35 @@ > +# =========================================================================== > +# Post-link MIPS pass > +# =========================================================================== > +# > +# 1. Insert relocations into vmlinux > + > +PHONY := __archpost > +__archpost: > + > +include include/config/auto.conf > +include scripts/Kbuild.include > + > +CMD_RELOCS = arch/mips/boot/tools/relocs > +quiet_cmd_relocs = RELOCS $@ > + cmd_relocs = $(CMD_RELOCS) $@ > + > +# `@true` prevents complaint when there is nothing to be done > + > +vmlinux: FORCE > + @true > +ifeq ($(CONFIG_RELOCATABLE),y) > + $(call if_changed,relocs) > +endif > + > +%.ko: FORCE > + @true > + > +clean: > + @true > + > +PHONY += FORCE clean > + > +FORCE: > + > +.PHONY: $(PHONY) From 1583533408038695661@xxx Wed Nov 08 21:05:40 +0000 2017 X-GM-THRID: 1583532905087687334 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread