memory.h 657 B

12345678910111213141516171819202122232425
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. #ifndef __ASM_CSKY_MEMORY_H
  3. #define __ASM_CSKY_MEMORY_H
  4. #include <linux/compiler.h>
  5. #include <linux/const.h>
  6. #include <linux/types.h>
  7. #include <linux/sizes.h>
  8. #define FIXADDR_TOP _AC(0xffffc000, UL)
  9. #define PKMAP_BASE _AC(0xff800000, UL)
  10. #define VMALLOC_START (PAGE_OFFSET + LOWMEM_LIMIT + (PAGE_SIZE * 8))
  11. #define VMALLOC_END (PKMAP_BASE - (PAGE_SIZE * 2))
  12. #ifdef CONFIG_HAVE_TCM
  13. #ifdef CONFIG_HAVE_DTCM
  14. #define TCM_NR_PAGES (CONFIG_ITCM_NR_PAGES + CONFIG_DTCM_NR_PAGES)
  15. #else
  16. #define TCM_NR_PAGES (CONFIG_ITCM_NR_PAGES)
  17. #endif
  18. #define FIXADDR_TCM _AC(FIXADDR_TOP - (TCM_NR_PAGES * PAGE_SIZE), UL)
  19. #endif
  20. #endif