* 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
* Re: binutils bug workaround
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
0 siblings, 1 reply; 3+ messages in thread
From: H . J . Lu @ 2002-01-03 21:53 UTC (permalink / raw)
To: Vivien Chappelier; +Cc: Ralf Baechle, linux-mips
On Thu, Jan 03, 2002 at 10:44:30PM +0100, Vivien Chappelier wrote:
> 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.
>
Shouldn't you fix the assmbler instead?
H.J.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: binutils bug workaround
2002-01-03 21:53 ` H . J . Lu
@ 2002-01-03 21:56 ` Ralf Baechle
0 siblings, 0 replies; 3+ messages in thread
From: Ralf Baechle @ 2002-01-03 21:56 UTC (permalink / raw)
To: H . J . Lu; +Cc: Vivien Chappelier, linux-mips
On Thu, Jan 03, 2002 at 01:53:34PM -0800, H . J . Lu wrote:
> > This patch move the declaration of kswapd_wait as a workaround to
> > this compiler bug. This probably affects all mips64 kernels.
>
> Shouldn't you fix the assmbler instead?
I absolutely agree. The only thing I'd like to add is a some code that makes
the kernel panic if built with broken binutils.
Ralf
^ 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