pgtable.h 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. /*
  2. * Port on Texas Instruments TMS320C6x architecture
  3. *
  4. * Copyright (C) 2004, 2009, 2010 Texas Instruments Incorporated
  5. * Author: Aurelien Jacquiot (aurelien.jacquiot@jaluna.com)
  6. *
  7. * This program is free software; you can redistribute it and/or modify
  8. * it under the terms of the GNU General Public License version 2 as
  9. * published by the Free Software Foundation.
  10. */
  11. #ifndef _ASM_C6X_PGTABLE_H
  12. #define _ASM_C6X_PGTABLE_H
  13. #include <asm-generic/4level-fixup.h>
  14. #include <asm/setup.h>
  15. #include <asm/page.h>
  16. /*
  17. * All 32bit addresses are effectively valid for vmalloc...
  18. * Sort of meaningless for non-VM targets.
  19. */
  20. #define VMALLOC_START 0
  21. #define VMALLOC_END 0xffffffff
  22. #define pgd_present(pgd) (1)
  23. #define pgd_none(pgd) (0)
  24. #define pgd_bad(pgd) (0)
  25. #define pgd_clear(pgdp)
  26. #define kern_addr_valid(addr) (1)
  27. #define pmd_offset(a, b) ((void *)0)
  28. #define pmd_none(x) (!pmd_val(x))
  29. #define pmd_present(x) (pmd_val(x))
  30. #define pmd_clear(xp) do { set_pmd(xp, __pmd(0)); } while (0)
  31. #define pmd_bad(x) (pmd_val(x) & ~PAGE_MASK)
  32. #define PAGE_NONE __pgprot(0) /* these mean nothing to NO_MM */
  33. #define PAGE_SHARED __pgprot(0) /* these mean nothing to NO_MM */
  34. #define PAGE_COPY __pgprot(0) /* these mean nothing to NO_MM */
  35. #define PAGE_READONLY __pgprot(0) /* these mean nothing to NO_MM */
  36. #define PAGE_KERNEL __pgprot(0) /* these mean nothing to NO_MM */
  37. #define pgprot_noncached(prot) (prot)
  38. extern void paging_init(void);
  39. #define __swp_type(x) (0)
  40. #define __swp_offset(x) (0)
  41. #define __swp_entry(typ, off) ((swp_entry_t) { ((typ) | ((off) << 7)) })
  42. #define __pte_to_swp_entry(pte) ((swp_entry_t) { pte_val(pte) })
  43. #define __swp_entry_to_pte(x) ((pte_t) { (x).val })
  44. static inline int pte_file(pte_t pte)
  45. {
  46. return 0;
  47. }
  48. #define set_pte(pteptr, pteval) (*(pteptr) = pteval)
  49. #define set_pte_at(mm, addr, ptep, pteval) set_pte(ptep, pteval)
  50. /*
  51. * ZERO_PAGE is a global shared page that is always zero: used
  52. * for zero-mapped memory areas etc..
  53. */
  54. #define ZERO_PAGE(vaddr) virt_to_page(empty_zero_page)
  55. extern unsigned long empty_zero_page;
  56. #define swapper_pg_dir ((pgd_t *) 0)
  57. /*
  58. * No page table caches to initialise
  59. */
  60. #define pgtable_cache_init() do { } while (0)
  61. #define io_remap_pfn_range remap_pfn_range
  62. #include <asm-generic/pgtable.h>
  63. #endif /* _ASM_C6X_PGTABLE_H */