nommu.c 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  1. /*
  2. * arch/sh/mm/nommu.c
  3. *
  4. * Various helper routines and stubs for MMUless SH.
  5. *
  6. * Copyright (C) 2002 - 2009 Paul Mundt
  7. *
  8. * Released under the terms of the GNU GPL v2.0.
  9. */
  10. #include <linux/kernel.h>
  11. #include <linux/init.h>
  12. #include <linux/string.h>
  13. #include <linux/mm.h>
  14. #include <asm/pgtable.h>
  15. #include <asm/tlbflush.h>
  16. #include <asm/page.h>
  17. #include <asm/uaccess.h>
  18. /*
  19. * Nothing too terribly exciting here ..
  20. */
  21. void copy_page(void *to, void *from)
  22. {
  23. memcpy(to, from, PAGE_SIZE);
  24. }
  25. __kernel_size_t __copy_user(void *to, const void *from, __kernel_size_t n)
  26. {
  27. memcpy(to, from, n);
  28. return 0;
  29. }
  30. __kernel_size_t __clear_user(void *to, __kernel_size_t n)
  31. {
  32. memset(to, 0, n);
  33. return 0;
  34. }
  35. void local_flush_tlb_all(void)
  36. {
  37. BUG();
  38. }
  39. void local_flush_tlb_mm(struct mm_struct *mm)
  40. {
  41. BUG();
  42. }
  43. void local_flush_tlb_range(struct vm_area_struct *vma, unsigned long start,
  44. unsigned long end)
  45. {
  46. BUG();
  47. }
  48. void local_flush_tlb_page(struct vm_area_struct *vma, unsigned long page)
  49. {
  50. BUG();
  51. }
  52. void local_flush_tlb_one(unsigned long asid, unsigned long page)
  53. {
  54. BUG();
  55. }
  56. void local_flush_tlb_kernel_range(unsigned long start, unsigned long end)
  57. {
  58. BUG();
  59. }
  60. void __flush_tlb_global(void)
  61. {
  62. }
  63. void __update_tlb(struct vm_area_struct *vma, unsigned long address, pte_t pte)
  64. {
  65. }
  66. void __init kmap_coherent_init(void)
  67. {
  68. }
  69. void *kmap_coherent(struct page *page, unsigned long addr)
  70. {
  71. BUG();
  72. return NULL;
  73. }
  74. void kunmap_coherent(void *kvaddr)
  75. {
  76. BUG();
  77. }
  78. void __init page_table_range_init(unsigned long start, unsigned long end,
  79. pgd_t *pgd_base)
  80. {
  81. }
  82. void __set_fixmap(enum fixed_addresses idx, unsigned long phys, pgprot_t prot)
  83. {
  84. }
  85. void pgtable_cache_init(void)
  86. {
  87. }