Re: clear_cache on Alpha architecture not implemented?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 05/04/12 06:39, Camm Maguire wrote:
> I'm wondering if there is a simple configure time test to detect when
> this has been fixed.  If I just aborted using __builtin___clear_cache if
> it is in fact a noop on alpha, ppc, ppc64, and ia64, would this suffice?

I can't think of any simple, portable test.

The only reliable test would be to actually attempt to flush a cache,
with some detectable way to see this didn't happen.  This tends to get 
highly target specific quickly...

A pattern that would at least apply to 32-bit insn word risc might be

  int test_routine[2] = {
     "mov 1, v0"
     "ret"
  };
  #define call_test ((int (*)(void))test_routine)
  int main()
  {
    call_test();  // make sure the routine is in icache
    test_routine[0] = "mov 0, v0";
    __builtin__clear_cache(test_routine, test_routine+2);
    return call_test();
  }

for target-dependent values of those instructions.


r~
--
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


[Index of Archives]     [Netdev]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux