diff options
Diffstat (limited to 'arch/arm/mm')
-rw-r--r-- | arch/arm/mm/context.c | 7 | ||||
-rw-r--r-- | arch/arm/mm/dma-mapping.c | 2 | ||||
-rw-r--r-- | arch/arm/mm/mmu.c | 4 |
3 files changed, 7 insertions, 6 deletions
diff --git a/arch/arm/mm/context.c b/arch/arm/mm/context.c index 119bc52ab93e..4e07eec1270d 100644 --- a/arch/arm/mm/context.c +++ b/arch/arm/mm/context.c | |||
@@ -63,10 +63,11 @@ static int contextidr_notifier(struct notifier_block *unused, unsigned long cmd, | |||
63 | pid = task_pid_nr(thread->task) << ASID_BITS; | 63 | pid = task_pid_nr(thread->task) << ASID_BITS; |
64 | asm volatile( | 64 | asm volatile( |
65 | " mrc p15, 0, %0, c13, c0, 1\n" | 65 | " mrc p15, 0, %0, c13, c0, 1\n" |
66 | " bfi %1, %0, #0, %2\n" | 66 | " and %0, %0, %2\n" |
67 | " mcr p15, 0, %1, c13, c0, 1\n" | 67 | " orr %0, %0, %1\n" |
68 | " mcr p15, 0, %0, c13, c0, 1\n" | ||
68 | : "=r" (contextidr), "+r" (pid) | 69 | : "=r" (contextidr), "+r" (pid) |
69 | : "I" (ASID_BITS)); | 70 | : "I" (~ASID_MASK)); |
70 | isb(); | 71 | isb(); |
71 | 72 | ||
72 | return NOTIFY_OK; | 73 | return NOTIFY_OK; |
diff --git a/arch/arm/mm/dma-mapping.c b/arch/arm/mm/dma-mapping.c index 051204fc4617..e59c4ab71bcb 100644 --- a/arch/arm/mm/dma-mapping.c +++ b/arch/arm/mm/dma-mapping.c | |||
@@ -489,7 +489,7 @@ static bool __in_atomic_pool(void *start, size_t size) | |||
489 | void *pool_start = pool->vaddr; | 489 | void *pool_start = pool->vaddr; |
490 | void *pool_end = pool->vaddr + pool->size; | 490 | void *pool_end = pool->vaddr + pool->size; |
491 | 491 | ||
492 | if (start < pool_start || start > pool_end) | 492 | if (start < pool_start || start >= pool_end) |
493 | return false; | 493 | return false; |
494 | 494 | ||
495 | if (end <= pool_end) | 495 | if (end <= pool_end) |
diff --git a/arch/arm/mm/mmu.c b/arch/arm/mm/mmu.c index a7a9e41fa2c2..18144e6a3115 100644 --- a/arch/arm/mm/mmu.c +++ b/arch/arm/mm/mmu.c | |||
@@ -990,8 +990,8 @@ void __init sanity_check_meminfo(void) | |||
990 | * Check whether this memory bank would partially overlap | 990 | * Check whether this memory bank would partially overlap |
991 | * the vmalloc area. | 991 | * the vmalloc area. |
992 | */ | 992 | */ |
993 | if (__va(bank->start + bank->size) > vmalloc_min || | 993 | if (__va(bank->start + bank->size - 1) >= vmalloc_min || |
994 | __va(bank->start + bank->size) < __va(bank->start)) { | 994 | __va(bank->start + bank->size - 1) <= __va(bank->start)) { |
995 | unsigned long newsize = vmalloc_min - __va(bank->start); | 995 | unsigned long newsize = vmalloc_min - __va(bank->start); |
996 | printk(KERN_NOTICE "Truncating RAM at %.8llx-%.8llx " | 996 | printk(KERN_NOTICE "Truncating RAM at %.8llx-%.8llx " |
997 | "to -%.8llx (vmalloc region overlap).\n", | 997 | "to -%.8llx (vmalloc region overlap).\n", |