Google
  Web www.spinics.net

Re: building kernel with gcc-4.3.x

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


Seems my problem is the call to prefetch(next) in rcu_do_batch in
linux-2.6.24/kernel/rcupdate.c

calling prefetch with a null pointer argument seems to result in a
crash when compiled with gcc-4.3.x

This patch seems to fix the problem.

 --- linux-2.6.24-clean/include/asm-arm/processor.h	2008-01-24
22:58:37.000000000 +0000
+++ linux-2.6.24/include/asm-arm/processor.h	2008-07-02 22:44:26.052525328 +0100
@@ -105,11 +105,14 @@
 #define ARCH_HAS_PREFETCH
 static inline void prefetch(const void *ptr)
 {
-	__asm__ __volatile__(
-		"pld\t%0"
-		:
-		: "o" (*(char *)ptr)
-		: "cc");
+	if (ptr)
+	{
+		__asm__ __volatile__(
+			"pld\t%0"
+			:
+			: "o" (*(char *)ptr)
+			: "cc");
+	}
 }

 #define ARCH_HAS_PREFETCHW

-------------------------------------------------------------------
List admin: http://lists.arm.linux.org.uk/mailman/listinfo/linux-arm
FAQ:        http://www.arm.linux.org.uk/mailinglists/faq.php
Etiquette:  http://www.arm.linux.org.uk/mailinglists/etiquette.php

[Site Home]     [Linux ARM Kernel]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Tools]     [DDR & Rambus]     [Monitors]

Powered by Linux

Google PageRank Checking tool