Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753831AbdLMVrU (ORCPT ); Wed, 13 Dec 2017 16:47:20 -0500 Received: from smtprelay4.synopsys.com ([198.182.47.9]:51181 "EHLO smtprelay.synopsys.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752530AbdLMVrT (ORCPT ); Wed, 13 Dec 2017 16:47:19 -0500 From: Alexey Brodkin To: "sudipm.mukherjee@gmail.com" , "akpm@linux-foundation.org" CC: "linux-kernel@vger.kernel.org" , "Vineet.Gupta1@synopsys.com" , "linux-snps-arc@lists.infradead.org" Subject: Re: [PATCH v2] arch: define weak abort Thread-Topic: [PATCH v2] arch: define weak abort Thread-Index: AQHTc5t/f8rgPFWhc0+juTwfKwt95aNBv6qA Date: Wed, 13 Dec 2017 21:46:26 +0000 Message-ID: <1513201585.9373.21.camel@synopsys.com> References: <1513118956-8718-1-git-send-email-sudipm.mukherjee@gmail.com> In-Reply-To: <1513118956-8718-1-git-send-email-sudipm.mukherjee@gmail.com> Accept-Language: en-US, ru-RU Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.225.15.87] 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 vBDLlOPL032556 Content-Length: 1205 Lines: 35 Hi Sudip, On Tue, 2017-12-12 at 22:49 +0000, Sudip Mukherjee wrote: > gcc toggle -fisolate-erroneous-paths-dereference (default at -O2 > onwards) isolates faulty code paths such as null pointer access, divide > by zero etc. If gcc port doesnt implement __builtin_trap, an abort() is > generated which causes kernel link error. > > In this case, gcc is generating abort due to 'divide by zero' in > lib/mpi/mpih-div.c. > > Currently 'frv' and 'arc' are failing. Previously other arch was also > broken like m32r was fixed by d22e3d69ee1a ("m32r: fix build failure"). > > Lets define this weak function which is common for all arch and fix the > problem permanently. We can even remove the arch specific 'abort' after > this is done. > > Cc: Alexey Brodkin > Signed-off-by: Sudip Mukherjee > --- > > Hi Alexey, > I was thinking of sending the m32r revert patch in few days. My m32r > builds are having a little problem and should be fixed by this weekend. > I can not test m32r before that. Understood, that's fine by me. > We can also send a patch to remove the > same code in arm and unicore32. Sure that would be really great! -Alexey