kernel-entry-init.h 890 B

123456789101112131415161718192021222324252627282930313233
  1. /*
  2. * Atheros AR71XX/AR724X/AR913X specific kernel entry setup
  3. *
  4. * Copyright (C) 2009 Gabor Juhos <juhosg@openwrt.org>
  5. *
  6. * This program is free software; you can redistribute it and/or modify it
  7. * under the terms of the GNU General Public License version 2 as published
  8. * by the Free Software Foundation.
  9. *
  10. */
  11. #ifndef __ASM_MACH_ATH79_KERNEL_ENTRY_H
  12. #define __ASM_MACH_ATH79_KERNEL_ENTRY_H
  13. /*
  14. * Some bootloaders set the 'Kseg0 coherency algorithm' to
  15. * 'Cacheable, noncoherent, write-through, no write allocate'
  16. * and this cause performance issues. Let's go and change it to
  17. * 'Cacheable, noncoherent, write-back, write allocate'
  18. */
  19. .macro kernel_entry_setup
  20. mfc0 t0, CP0_CONFIG
  21. li t1, ~CONF_CM_CMASK
  22. and t0, t1
  23. ori t0, CONF_CM_CACHABLE_NONCOHERENT
  24. mtc0 t0, CP0_CONFIG
  25. nop
  26. .endm
  27. .macro smp_slave_setup
  28. .endm
  29. #endif /* __ASM_MACH_ATH79_KERNEL_ENTRY_H */