081-mcfv4e_vmalloc_fix.patch 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. From db94c8c3ec831b5fab828487ba05041bc048fccf Mon Sep 17 00:00:00 2001
  2. From: Kurt Mahan <[email protected]>
  3. Date: Tue, 15 Jul 2008 17:48:11 -0600
  4. Subject: [PATCH] Move VMALLOC region to a valid area.
  5. LTIBName: mcfv4e-vmalloc-fix
  6. Signed-off-by: Kurt Mahan <[email protected]>
  7. ---
  8. arch/m68k/mm/cf-mmu.c | 7 +------
  9. include/asm-m68k/pgtable.h | 6 +++++-
  10. 2 files changed, 6 insertions(+), 7 deletions(-)
  11. --- a/arch/m68k/mm/cf-mmu.c
  12. +++ b/arch/m68k/mm/cf-mmu.c
  13. @@ -35,7 +35,7 @@
  14. #include <asm/coldfire.h>
  15. #include <asm/tlbflush.h>
  16. -#define KMAPAREA(x) ((x >= KMAP_START) && ( x < KMAP_END))
  17. +#define KMAPAREA(x) ((x >= VMALLOC_START) && ( x < KMAP_END))
  18. #undef DEBUG
  19. @@ -62,11 +62,6 @@ void free_initmem(void)
  20. unsigned long start = (unsigned long)&__init_begin;
  21. unsigned long end = (unsigned long)&__init_end;
  22. -/*
  23. - * JKM -- revisit -- the latest round of vmlinux.lds changes has caused
  24. - * a little grief with how init areas are handled. With the new toolchain
  25. - * release I'll fix this.
  26. - */
  27. printk(KERN_INFO "free_initmem: __init_begin = 0x%lx __init_end = 0x%lx\n", start, end);
  28. addr = (unsigned long)&__init_begin;
  29. --- a/include/asm-m68k/pgtable.h
  30. +++ b/include/asm-m68k/pgtable.h
  31. @@ -73,7 +73,9 @@
  32. #define KMAP_START 0x0DC00000
  33. #define KMAP_END 0x0E000000
  34. #elif defined(CONFIG_COLDFIRE)
  35. -#define KMAP_START 0xd0000000
  36. +#define VMALLOC_START 0xc0000000
  37. +#define VMALLOC_END 0xcfffffff
  38. +#define KMAP_START (VMALLOC_END + 1)
  39. #define KMAP_END 0xe0000000
  40. #else
  41. #define KMAP_START 0xd0000000
  42. @@ -88,9 +90,11 @@
  43. * The vmalloc() routines leaves a hole of 4kB between each vmalloced
  44. * area for the same reason. ;)
  45. */
  46. +#if !defined(CONFIG_COLDFIRE)
  47. #define VMALLOC_OFFSET (8*1024*1024)
  48. #define VMALLOC_START (((unsigned long) high_memory + VMALLOC_OFFSET) & ~(VMALLOC_OFFSET-1))
  49. #define VMALLOC_END KMAP_START
  50. +#endif
  51. #else
  52. extern unsigned long vmalloc_end;
  53. #define VMALLOC_START 0x0f800000