clear_cache on Alpha architecture not implemented?
|[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]|
On 05-03 09:19, Camm Maguire wrote: > Greetings! The build succeeded, which, alas, means the failure at > > http://buildd.debian-ports.org/status/fetch.php?pkg=axiom&arch=alpha&ver=20120301-3&stamp=1335722507 > > is again unreproducible, like the kfree_amd64 and ppc examples. Sigh. > Are there known differences in the cpu cache clearing instructions > between imago and your machine? > > In any case, can one upload by hand builds to debian-ports like one can > into the official repository? > > Take care, > -- > Camm Maguire camm@xxxxxxxxxxxxxxxxx > ========================================================================== > "The earth is but one country, and mankind its citizens." -- Baha'u'llah After lots of investigation, it looks that imb (I-cache memory barrier, used for flushing instruction cache on single cpu), is not emited or called when doing __builtin___clear_cache! It shouldn't be hard to add, for example using (define_expand "clear_cache" ... in gcc/config/alpha/alpha.md in gcc, or in libgcc/config/alpha/linux.h as #define CLEAR_INSN_CACHE(beg, end) ... Either of them should just emit, "call_pal 0x86". It is better than "imb" because imb is not implemented in Tru64 assembler, and better than "call_pal pal_imb", because pal_imb (which is equal 134), requires include <pal.h>. Beyond that it would be naccassary to update kernel, to detect that user code called imb, by checking if proper flag in HWPCB structure is set, and call smp_imb() if naccassary on multi-processor system (probably when rescheduling this process on different cpu) and clear hwpcb flag, becuause imb invalidated Icache only on running cpu. Build of axiom package successed on my machine probably by luck, and by the fact it is single CPU machine with smaller cache than imago (and older subarchitecture, thus probably less agressive caching). What alpha maintainers thinks? Regards, Witek -- Witold Baryluk -- To unsubscribe from this list: send the line "unsubscribe linux-alpha" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html