clear_cache on Alpha architecture not implemented?
On 05-03 09:19, Camm Maguire wrote:
> Greetings! The build succeeded, which, alas, means the failure at
> 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 firstname.lastname@example.org
> "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
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?