mem.c 629 B

1234567891011121314151617181920212223242526
  1. /*
  2. * Copyright (C) 2002 Jeff Dike (jdike@karaya.com)
  3. * Licensed under the GPL
  4. */
  5. #include "linux/mm.h"
  6. #include "asm/pgtable.h"
  7. #include "mem_user.h"
  8. #include "skas.h"
  9. unsigned long set_task_sizes_skas(unsigned long *task_size_out)
  10. {
  11. /* Round up to the nearest 4M */
  12. unsigned long host_task_size = ROUND_4M((unsigned long)
  13. &host_task_size);
  14. #ifdef CONFIG_HOST_TASK_SIZE
  15. *host_size_out = ROUND_4M(CONFIG_HOST_TASK_SIZE);
  16. *task_size_out = CONFIG_HOST_TASK_SIZE;
  17. #else
  18. if (!skas_needs_stub)
  19. *task_size_out = host_task_size;
  20. else *task_size_out = CONFIG_STUB_START & PGDIR_MASK;
  21. #endif
  22. return host_task_size;
  23. }