Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752570AbdLLSDO (ORCPT ); Tue, 12 Dec 2017 13:03:14 -0500 Received: from smtprelay.synopsys.com ([198.182.60.111]:43707 "EHLO smtprelay.synopsys.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752456AbdLLSDL (ORCPT ); Tue, 12 Dec 2017 13:03:11 -0500 Subject: Re: [PATCH] arch: define weak abort To: Sudip Mukherjee , Andrew Morton CC: "linux-kernel@vger.kernel.org" , "Vineet Gupta" , Alexey Brodkin References: <1513027568-4800-1-git-send-email-sudipm.mukherjee@gmail.com> From: Vineet Gupta Message-ID: <2afd7ac7-126d-06a8-802c-9b5bd7d6259a@synopsys.com> Date: Tue, 12 Dec 2017 10:02:51 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 MIME-Version: 1.0 In-Reply-To: <1513027568-4800-1-git-send-email-sudipm.mukherjee@gmail.com> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US X-Originating-IP: [10.10.161.67] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1271 Lines: 41 On 12/11/2017 01:26 PM, Sudip Mukherjee wrote: > gcc was generating abort due to 'divide by zero' and if it is not > defined in the toolchain the build fails. > > 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. Can you add some more details about the rootcause - see the corresponding ARC patch which I added before you add this generic one http://lists.infradead.org/pipermail/linux-snps-arc/2017-December/003074.html -Vineet > > Cc: Alexey Brodkin > Signed-off-by: Sudip Mukherjee > --- > kernel/exit.c | 8 ++++++++ > 1 file changed, 8 insertions(+) > > diff --git a/kernel/exit.c b/kernel/exit.c > index af6c245..90c6869 100644 > --- a/kernel/exit.c > +++ b/kernel/exit.c > @@ -1759,3 +1759,11 @@ long kernel_wait4(pid_t upid, int __user *stat_addr, int options, > return -EFAULT; > } > #endif > + > +__weak void abort(void) > +{ > + BUG(); > + > + /* if that doesn't kill us, halt */ > + panic("Oops failed to kill thread"); > +}