Pastebin launched a little side project called VERYVIRAL.com, check it out ;-) Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Oct 24th, 2012  |  syntax: C  |  size: 0.52 KB  |  views: 47  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. void commit_discard_idcache(void)
  2. {
  3.     DEVID &= ~(1<<31);
  4.     /* invalidate cache way 0 */
  5.     cache_invalidate_way(0);
  6.  
  7.     /* invalidate cache way 1 */
  8.     cache_invalidate_way(1);
  9.     DEVID |= 1<<31;
  10. }
  11.  
  12. void commit_discard_idcache(void)
  13. {
  14.     asm volatile ("nop \n nop \n");
  15.     asm volatile ("nop \n nop \n");
  16.     /* invalidate cache way 0 */
  17.     cache_invalidate_way(0);
  18.  
  19.     /* invalidate cache way 1 */
  20.     cache_invalidate_way(1);
  21.     asm volatile ("nop \n nop \n");
  22.     asm volatile ("nop \n nop \n");
  23. }
clone this paste RAW Paste Data