kernel-entry-init.h 738 B

12345678910111213141516171819202122232425262728
  1. /* SPDX-License-Identifier: GPL-2.0-only */
  2. /*
  3. * Atheros AR71XX/AR724X/AR913X specific kernel entry setup
  4. *
  5. * Copyright (C) 2009 Gabor Juhos <[email protected]>
  6. */
  7. #ifndef __ASM_MACH_ATH79_KERNEL_ENTRY_H
  8. #define __ASM_MACH_ATH79_KERNEL_ENTRY_H
  9. /*
  10. * Some bootloaders set the 'Kseg0 coherency algorithm' to
  11. * 'Cacheable, noncoherent, write-through, no write allocate'
  12. * and this cause performance issues. Let's go and change it to
  13. * 'Cacheable, noncoherent, write-back, write allocate'
  14. */
  15. .macro kernel_entry_setup
  16. mfc0 t0, CP0_CONFIG
  17. li t1, ~CONF_CM_CMASK
  18. and t0, t1
  19. ori t0, CONF_CM_CACHABLE_NONCOHERENT
  20. mtc0 t0, CP0_CONFIG
  21. nop
  22. .endm
  23. .macro smp_slave_setup
  24. .endm
  25. #endif /* __ASM_MACH_ATH79_KERNEL_ENTRY_H */