power4 compiling

Segher Boessenkool segher at kernel.crashing.org
Wed Nov 5 02:00:55 EST 2003


Hollis Blanchard wrote:
> Oh. That's too bad. What we have is code like this (from
> pSeries_htab.c):
>
> if ((cur_cpu_spec->cpu_features & CPU_FTR_TLBIEL) && !large && local) {
> 	_tlbiel(va);
> } else {
> 	... _tlbie(va); ...
> }
>
> Without CONFIG_POWER4_ONLY (i.e. without -mcpu=power4), the assembler
> will refuse 'tlbiel'. Any suggestions?

Use something like


static inline void _tlbiel(unsigned long va)
{
	__asm__ __volatile__(
		".long 0x7c000224 | (%0 << 11)" : : "r"(va)
	);
}


(I hope this compiles :-) )


Segher


** Sent via the linuxppc64-dev mail list. See http://lists.linuxppc.org/





More information about the Linuxppc64-dev mailing list