fixmap.h 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. /*
  2. * fixmap.h: compile-time virtual memory allocation
  3. *
  4. * This file is subject to the terms and conditions of the GNU General Public
  5. * License. See the file "COPYING" in the main directory of this archive
  6. * for more details.
  7. *
  8. * Copyright (C) 1998 Ingo Molnar
  9. *
  10. * Support of BIGMEM added by Gerhard Wichert, Siemens AG, July 1999
  11. */
  12. #ifndef _ASM_FIXMAP_H
  13. #define _ASM_FIXMAP_H
  14. #ifdef CONFIG_HIGHMEM
  15. #include <linux/threads.h>
  16. #include <linux/pgtable.h>
  17. #include <asm/kmap_size.h>
  18. /* The map slots for temporary mappings via kmap_atomic/local(). */
  19. enum fixed_addresses {
  20. FIX_KMAP_BEGIN,
  21. FIX_KMAP_END = FIX_KMAP_BEGIN +
  22. (KM_MAX_IDX * NR_CPUS * DCACHE_N_COLORS) - 1,
  23. __end_of_fixed_addresses
  24. };
  25. #define FIXADDR_END (XCHAL_KSEG_CACHED_VADDR - PAGE_SIZE)
  26. #define FIXADDR_SIZE (__end_of_fixed_addresses << PAGE_SHIFT)
  27. /* Enforce that FIXADDR_START is PMD aligned to handle cache aliasing */
  28. #define FIXADDR_START ((FIXADDR_END - FIXADDR_SIZE) & PMD_MASK)
  29. #define FIXADDR_TOP (FIXADDR_START + FIXADDR_SIZE - PAGE_SIZE)
  30. #include <asm-generic/fixmap.h>
  31. #endif /* CONFIG_HIGHMEM */
  32. #endif