mmap.c 663 B

12345678910111213141516171819202122232425262728293031
  1. /*
  2. * arch/sh/mm/mmap.c
  3. *
  4. * Copyright (C) 2008 Paul Mundt
  5. *
  6. * This file is subject to the terms and conditions of the GNU General Public
  7. * License. See the file "COPYING" in the main directory of this archive
  8. * for more details.
  9. */
  10. #include <linux/io.h>
  11. #include <linux/mm.h>
  12. #include <asm/page.h>
  13. /*
  14. * You really shouldn't be using read() or write() on /dev/mem. This
  15. * might go away in the future.
  16. */
  17. int valid_phys_addr_range(unsigned long addr, size_t count)
  18. {
  19. if (addr < __MEMORY_START)
  20. return 0;
  21. if (addr + count > __pa(high_memory))
  22. return 0;
  23. return 1;
  24. }
  25. int valid_mmap_phys_addr_range(unsigned long pfn, size_t size)
  26. {
  27. return 1;
  28. }