Linux MIPS Architecture development
 help / color / mirror / Atom feed
* binutils bug workaround
@ 2002-01-03 21:44 Vivien Chappelier
  2002-01-03 21:53 ` H . J . Lu
  0 siblings, 1 reply; 3+ messages in thread
From: Vivien Chappelier @ 2002-01-03 21:44 UTC (permalink / raw)
  To: Ralf Baechle; +Cc: linux-mips

[-- Attachment #1: Type: TEXT/PLAIN, Size: 489 bytes --]

Hi,

	There is a binutils bug (as) which produces bad addresses when
getting the address of a struct member for initializing the same struct,
and when there is data or static functions declared before:
int test = 0xdeadbeef;

struct {
        int dummy;
        void *ptr;
} bug =
{
  ptr:  &bug.ptr
};

will produce bad value for bug.ptr.

	This patch move the declaration of kswapd_wait as a workaround to
this compiler bug. This probably affects all mips64 kernels.

Vivien Chappelier.

[-- Attachment #2: Type: TEXT/plain, Size: 554 bytes --]

diff -Naur linux/mm/vmscan.c linux.patch/mm/vmscan.c
--- linux/mm/vmscan.c	Sun Dec  9 15:53:15 2001
+++ linux.patch/mm/vmscan.c	Wed Jan  2 23:16:22 2002
@@ -24,6 +24,8 @@
 
 #include <asm/pgalloc.h>
 
+DECLARE_WAIT_QUEUE_HEAD(kswapd_wait);
+
 /*
  * The "priority" of VM scanning is how much of the queues we
  * will scan in one go. A value of 6 for DEF_PRIORITY implies
@@ -601,8 +603,6 @@
 	out_of_memory();
 	return 0;
 }
-
-DECLARE_WAIT_QUEUE_HEAD(kswapd_wait);
 
 static int check_classzone_need_balance(zone_t * classzone)
 {

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2002-01-03 22:57 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-01-03 21:44 binutils bug workaround Vivien Chappelier
2002-01-03 21:53 ` H . J . Lu
2002-01-03 21:56   ` Ralf Baechle

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox