binutils bug workaround

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

 



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.
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)
 {

[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux