cache-dbg-inv.S 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. /* MN10300 CPU cache invalidation routines
  2. *
  3. * Copyright (C) 2011 Red Hat, Inc. All Rights Reserved.
  4. * Written by David Howells (dhowells@redhat.com)
  5. *
  6. * This program is free software; you can redistribute it and/or
  7. * modify it under the terms of the GNU General Public Licence
  8. * as published by the Free Software Foundation; either version
  9. * 2 of the Licence, or (at your option) any later version.
  10. */
  11. #include <linux/sys.h>
  12. #include <linux/linkage.h>
  13. #include <asm/smp.h>
  14. #include <asm/page.h>
  15. #include <asm/cache.h>
  16. #include <asm/irqflags.h>
  17. #include <asm/cacheflush.h>
  18. #include "cache.inc"
  19. .am33_2
  20. .globl debugger_local_cache_flushinv
  21. ###############################################################################
  22. #
  23. # void debugger_local_cache_flushinv(void)
  24. #
  25. # Invalidate the entire icache
  26. #
  27. ###############################################################################
  28. ALIGN
  29. .globl debugger_local_cache_flushinv
  30. .type debugger_local_cache_flushinv,@function
  31. debugger_local_cache_flushinv:
  32. #
  33. # we only need to invalidate the icache in this cache mode
  34. #
  35. mov CHCTR,a0
  36. movhu (a0),d0
  37. btst CHCTR_ICEN,d0
  38. beq debugger_local_cache_flushinv_end
  39. invalidate_icache 1
  40. debugger_local_cache_flushinv_end:
  41. ret [],0
  42. .size debugger_local_cache_flushinv,.-debugger_local_cache_flushinv