linux-mips-fnet
[Top] [All Lists]

Re: get_mmu_context()

To: ralf@uni-koblenz.de
Subject: Re: get_mmu_context()
From: Rik van Riel <H.H.vanRiel@phys.uu.nl>
Date: Wed, 14 Oct 1998 14:45:45 +0000 (/etc/localtime)
Cc: Vladimir Roganov <roganov@niisi.msk.ru>, linux-mips@fnet.fr, linux@engr.sgi.com, linux-mips@vger.rutgers.edu, linux-kernel@vger.rutgers.edu
In-reply-to: <19981013215927.A2692@uni-koblenz.de>
Reply-to: Rik van Riel <H.H.vanRiel@phys.uu.nl>
On Tue, 13 Oct 1998 ralf@uni-koblenz.de wrote:

> Ok, here is a draft version of an agressively optimized version of
> get_mmu_context().  I just didn't like the idea of referencing
> global variables in get_mmu_context() if avoidable.  The code below
> will work on both R3000 and R4000 with no performance penalty for
> being generic.  The trick is to patch the operands of two machine
> instructions at runtime, shoot me.

ROFL! No offense to the code, I'm sure it works, but
this just _has_ to be the funniest piece of source
code to appear on the lists this month...

Self-modifying code -- this is so much fun :)

> extern inline void r3000_asid_setup(void)
> 
> extern inline void r4xx0_asid_setup(void)

Very nice Ralf... My compliments on this piece
of code -- I can only imagine the amount of
phantasy and inspiration that was needed to
create it...

tschuess,

Rik.
+-------------------------------------------------------------------+
| Linux memory management tour guide.        H.H.vanRiel@phys.uu.nl |
| Scouting Vries cubscout leader.      http://www.phys.uu.nl/~riel/ |
+-------------------------------------------------------------------+

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