linux-mips
[Top] [All Lists]

Re: Breakage in arch/mips/kernel/traps.c for 64bit

To: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Subject: Re: Breakage in arch/mips/kernel/traps.c for 64bit
From: "Maciej W. Rozycki" <macro@linux-mips.org>
Date: Thu, 1 May 2008 22:01:13 +0100 (BST)
Cc: linux-mips@linux-mips.org
In-reply-to: <20080501163314.GA9955@alpha.franken.de>
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <20080501163314.GA9955@alpha.franken.de>
Sender: linux-mips-bounce@linux-mips.org
On Thu, 1 May 2008, Thomas Bogendoerfer wrote:

> it would be nice, if people started thinking before supplying such
> crappy^Winteresting code:
> 
> arch/mips/kernel/traps.c:
> 
> #define IS_KVA01(a) ((((unsigned int)a) & 0xc0000000) == 0x80000000)
> 
> Kills every 64bit kernel build...

 Not everybody tests 64-bit stuff as some people limit themselves to
32-bit systems only.  It looks like a step backwards, but there you go.

> Why is this needed at all ?

 It looks like an attempt to avoid TLB exceptions for the stack dump -- if
that is the case, then obviously a piece of code like one in
arch/mips/lib/uncached.c should be used to check for CKSEG0/1 and XKPHYS.  
If there are two uses of this code, then it should be wrapped in an inline
function and put in a header; <asm/addrspace.h>, perhaps.

  Maciej

<Prev in Thread] Current Thread [Next in Thread>