From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751521AbdKXFFZ (ORCPT ); Fri, 24 Nov 2017 00:05:25 -0500 Received: from smtprelay.synopsys.com ([198.182.47.9]:48835 "EHLO smtprelay.synopsys.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750715AbdKXFFX (ORCPT ); Fri, 24 Nov 2017 00:05:23 -0500 From: Alexey Brodkin To: "sudipm.mukherjee@gmail.com" CC: "linux-kernel@vger.kernel.org" , "Vineet.Gupta1@synopsys.com" , "akpm@linux-foundation.org" , "linux-snps-arc@lists.infradead.org" Subject: Re: [PATCH] frv: fix build failure Thread-Topic: [PATCH] frv: fix build failure Thread-Index: AQHTZH7qSkWlbJG3G0W2kS2A996VG6MihEaAgABk0YA= Date: Fri, 24 Nov 2017 05:02:28 +0000 Message-ID: <1511499747.3843.9.camel@synopsys.com> References: <1511302233-5008-1-git-send-email-sudipm.mukherjee@gmail.com> <1511457437.32422.6.camel@synopsys.com> <20171123230137.GA4525@sudip-laptop> In-Reply-To: <20171123230137.GA4525@sudip-laptop> Accept-Language: en-US, ru-RU Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.121.8.86] Content-Type: text/plain; charset="utf-8" Content-ID: MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from base64 to 8bit by nfs id vAO55T5g030923 Hi Sudip, On Thu, 2017-11-23 at 23:01 +0000, Sudip Mukherjee wrote: > Hi Alexey, > > On Thu, Nov 23, 2017 at 05:17:19PM +0000, Alexey Brodkin wrote: > > > > Hi Sudip, > > > > On Tue, 2017-11-21 at 22:10 +0000, Sudip Mukherjee wrote: > > > > > > The frv defconfig build is failing with the error: > > > lib/mpi/mpih-div.o: In function `mpihelp_divrem': > > > mpih-div.c:(.text+0x30c): undefined reference to `abort' > > > > > > The function 'abort' was never defined for the frv architecture. > > > Create 'abort' as is done in other arch like 'arm' and 'unicore32'. > > > > > > Signed-off-by: Sudip Mukherjee > > > --- > > > > I'm seeing the same issue building for ARC from today's Linus' tree. > > Maybe it worth implementing abort() as a weak function for every arch/platform > > that doesn't have it explicitly defined? Otherwise we'll end-up with > > useless code duplication. > > Do you mean define it for every arch or define it in a common place so > that all arch can use it? Essentially I'd prefer to have just 1 instance of this function. In fact I'd even remove existing implementations in ARM, Unicore32 and M32R and have a generic implementation as this function obviously has nothing arch-specific. > I did a quick try with the attached patch on two different arch, one of > them (m32r) has the 'abort' defined and the other (frv) was failing due > to lack of abort, and they both built without any warnings or errors. Well maybe add  call to panic() there as well as it is done for ARM, unicore32 and M32R? > But I am not sure if 'kernel/exit.c' is the right place for it. > Any suggestion? I guess it should be indeed something in "kernel/" and maybe your existing choice of "kernel/exit.c" is not bad. Just send a patch to LKML and you'll get much better guidance on that I guess :) Anyways thanks for looking at this one. -Alexey