* Where is the definition of i_j macro ?
@ 2010-10-16 12:59 wilbur.chan
2010-10-16 15:55 ` Adam Jiang
0 siblings, 1 reply; 4+ messages in thread
From: wilbur.chan @ 2010-10-16 12:59 UTC (permalink / raw)
To: Linux MIPS Mailing List
Hi all
I'm reading build_r4000_tlb_refill_handler , but found some macro
like i_j , i_beq undefined in tlbex.c ( grep linux source code )
Can anyone tell me where they come from? Thank you
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Where is the definition of i_j macro ?
2010-10-16 12:59 Where is the definition of i_j macro ? wilbur.chan
@ 2010-10-16 15:55 ` Adam Jiang
2010-10-17 8:43 ` wilbur.chan
0 siblings, 1 reply; 4+ messages in thread
From: Adam Jiang @ 2010-10-16 15:55 UTC (permalink / raw)
To: wilbur.chan; +Cc: Linux MIPS Mailing List
On Sat, Oct 16, 2010 at 08:59:37PM +0800, wilbur.chan wrote:
> Hi all
>
> I'm reading build_r4000_tlb_refill_handler , but found some macro
> like i_j , i_beq undefined in tlbex.c ( grep linux source code )
>
Please dig into
arch/mips/include/asm/uasm.h
You'd better try "make cscope" and use emacs with the cscope
database. It allows you to surfing the source code very fast.
Best regards,
/Adam
>
> Can anyone tell me where they come from? Thank you
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Where is the definition of i_j macro ?
2010-10-16 15:55 ` Adam Jiang
@ 2010-10-17 8:43 ` wilbur.chan
2010-10-17 18:56 ` Maciej W. Rozycki
0 siblings, 1 reply; 4+ messages in thread
From: wilbur.chan @ 2010-10-17 8:43 UTC (permalink / raw)
To: Adam Jiang; +Cc: Linux MIPS Mailing List, chelly wilbur
2010/10/16 Adam Jiang <jiang.adam@gmail.com>:
> Please dig into
>
> arch/mips/include/asm/uasm.h
>
> You'd better try "make cscope" and use emacs with the cscope
> database. It allows you to surfing the source code very fast.
>
> Best regards,
> /Adam
well, I didn't find uasm.h in 2.6.24.7. However , I found i_j macro to
be defined just in tlbex.c, which hands over to
I_u1(_j); They just make up pieces of asm opt code into a string
and copy them to ebase:
memcpy((void *)ebase, final_handler, 0x100);
Why they did like this seemed strange to me, maybe in the
consideration of portability.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Where is the definition of i_j macro ?
2010-10-17 8:43 ` wilbur.chan
@ 2010-10-17 18:56 ` Maciej W. Rozycki
0 siblings, 0 replies; 4+ messages in thread
From: Maciej W. Rozycki @ 2010-10-17 18:56 UTC (permalink / raw)
To: wilbur.chan; +Cc: Adam Jiang, Linux MIPS Mailing List
On Sun, 17 Oct 2010, wilbur.chan wrote:
> I_u1(_j); They just make up pieces of asm opt code into a string
> and copy them to ebase:
>
> memcpy((void *)ebase, final_handler, 0x100);
>
>
> Why they did like this seemed strange to me, maybe in the
> consideration of portability.
This is a performance-critical piece of code that varies vastly across
processors supported. As we started losing control of the original
preprocessor-based approach and had no way to keep performance optimal
this way anyway, late Thiemo Seufer came up with this brilliant solution
of generating this code at the run time, early during bootstrap. This
solution enabled us with tailoring code used specifically for each
processor supported, up to including certain processor errata workarounds
on the as-needed basis.
Maciej
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2010-10-17 18:57 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-10-16 12:59 Where is the definition of i_j macro ? wilbur.chan
2010-10-16 15:55 ` Adam Jiang
2010-10-17 8:43 ` wilbur.chan
2010-10-17 18:56 ` Maciej W. Rozycki
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.