Skip to contentSkip to conversation

arch: define weak abort

PATCH Superseded Sudip Mukherjee 3 participants 3 messages Dec 11, 2017 – Dec 12, 2017 Synopsys ARC architecture

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 arch: define weak abort

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.

---
 kernel/exit.c | 8 ++++++++
 1 file changed, 8 insertions(+)
kernel/exit.c +8 -0
index af6c245..90c6869 100644
@@ -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");
+}
Signature · 1 line
1.9.1
#1 lore raw

Hi Sudip,

Quoted 5 lines · Sudip Mukherjee

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

#2 lore raw
In reply to Sudip Mukherjee
Quoted 9 lines · Sudip Mukherjee

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

Quoted 23 lines
---
  kernel/exit.c | 8 ++++++++
  1 file changed, 8 insertions(+)
kernel/exit.c +8 -0
index af6c245..90c6869 100644
@@ -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");
+}