* [PATCH] arch: define weak abort
@ 2017-12-11 21:26 Sudip Mukherjee
2017-12-12 15:57 ` Alexey Brodkin
2017-12-12 18:02 ` Vineet Gupta
0 siblings, 2 replies; 3+ messages in thread
From: Sudip Mukherjee @ 2017-12-11 21:26 UTC (permalink / raw)
To: Andrew Morton; +Cc: linux-kernel, Vineet Gupta, Sudip Mukherjee, Alexey Brodkin
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.
Cc: Alexey Brodkin <Alexey.Brodkin@synopsys.com>
Signed-off-by: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
---
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");
+}
--
1.9.1
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH] arch: define weak abort
2017-12-11 21:26 [PATCH] arch: define weak abort Sudip Mukherjee
@ 2017-12-12 15:57 ` Alexey Brodkin
2017-12-12 18:02 ` Vineet Gupta
1 sibling, 0 replies; 3+ messages in thread
From: Alexey Brodkin @ 2017-12-12 15:57 UTC (permalink / raw)
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
Hi Sudip,
On Mon, 2017-12-11 at 21:26 +0000, 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").
Why don't we revert mentioned d22e3d69ee1a ("m32r: fix build failure")
if not in the same patch but in the series together with this one?
-Alexey
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH] arch: define weak abort
2017-12-11 21:26 [PATCH] arch: define weak abort Sudip Mukherjee
2017-12-12 15:57 ` Alexey Brodkin
@ 2017-12-12 18:02 ` Vineet Gupta
1 sibling, 0 replies; 3+ messages in thread
From: Vineet Gupta @ 2017-12-12 18:02 UTC (permalink / raw)
To: Sudip Mukherjee, Andrew Morton
Cc: linux-kernel@vger.kernel.org, Vineet Gupta, Alexey Brodkin
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 <Alexey.Brodkin@synopsys.com>
> Signed-off-by: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
> ---
> 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");
> +}
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-12-12 18:03 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-12-11 21:26 [PATCH] arch: define weak abort Sudip Mukherjee
2017-12-12 15:57 ` Alexey Brodkin
2017-12-12 18:02 ` Vineet Gupta
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox