diff options
Diffstat (limited to 'arch/arm/mm')
-rw-r--r-- | arch/arm/mm/copypage-feroceon.c | 4 | ||||
-rw-r--r-- | arch/arm/mm/copypage-v4wb.c | 4 | ||||
-rw-r--r-- | arch/arm/mm/copypage-v4wt.c | 4 | ||||
-rw-r--r-- | arch/arm/mm/copypage-xsc3.c | 4 | ||||
-rw-r--r-- | arch/arm/mm/fault.c | 3 | ||||
-rw-r--r-- | arch/arm/mm/highmem.c | 11 | ||||
-rw-r--r-- | arch/arm/mm/init.c | 6 |
7 files changed, 24 insertions, 12 deletions
diff --git a/arch/arm/mm/copypage-feroceon.c b/arch/arm/mm/copypage-feroceon.c index 5eb4fd93893d..ac163de7dc01 100644 --- a/arch/arm/mm/copypage-feroceon.c +++ b/arch/arm/mm/copypage-feroceon.c | |||
@@ -18,7 +18,7 @@ feroceon_copy_user_page(void *kto, const void *kfrom) | |||
18 | { | 18 | { |
19 | asm("\ | 19 | asm("\ |
20 | stmfd sp!, {r4-r9, lr} \n\ | 20 | stmfd sp!, {r4-r9, lr} \n\ |
21 | mov ip, %0 \n\ | 21 | mov ip, %2 \n\ |
22 | 1: mov lr, r1 \n\ | 22 | 1: mov lr, r1 \n\ |
23 | ldmia r1!, {r2 - r9} \n\ | 23 | ldmia r1!, {r2 - r9} \n\ |
24 | pld [lr, #32] \n\ | 24 | pld [lr, #32] \n\ |
@@ -64,7 +64,7 @@ feroceon_copy_user_page(void *kto, const void *kfrom) | |||
64 | mcr p15, 0, ip, c7, c10, 4 @ drain WB\n\ | 64 | mcr p15, 0, ip, c7, c10, 4 @ drain WB\n\ |
65 | ldmfd sp!, {r4-r9, pc}" | 65 | ldmfd sp!, {r4-r9, pc}" |
66 | : | 66 | : |
67 | : "I" (PAGE_SIZE)); | 67 | : "r" (kto), "r" (kfrom), "I" (PAGE_SIZE)); |
68 | } | 68 | } |
69 | 69 | ||
70 | void feroceon_copy_user_highpage(struct page *to, struct page *from, | 70 | void feroceon_copy_user_highpage(struct page *to, struct page *from, |
diff --git a/arch/arm/mm/copypage-v4wb.c b/arch/arm/mm/copypage-v4wb.c index 7c2eb55cd4a9..cb589cbb2b6c 100644 --- a/arch/arm/mm/copypage-v4wb.c +++ b/arch/arm/mm/copypage-v4wb.c | |||
@@ -27,7 +27,7 @@ v4wb_copy_user_page(void *kto, const void *kfrom) | |||
27 | { | 27 | { |
28 | asm("\ | 28 | asm("\ |
29 | stmfd sp!, {r4, lr} @ 2\n\ | 29 | stmfd sp!, {r4, lr} @ 2\n\ |
30 | mov r2, %0 @ 1\n\ | 30 | mov r2, %2 @ 1\n\ |
31 | ldmia r1!, {r3, r4, ip, lr} @ 4\n\ | 31 | ldmia r1!, {r3, r4, ip, lr} @ 4\n\ |
32 | 1: mcr p15, 0, r0, c7, c6, 1 @ 1 invalidate D line\n\ | 32 | 1: mcr p15, 0, r0, c7, c6, 1 @ 1 invalidate D line\n\ |
33 | stmia r0!, {r3, r4, ip, lr} @ 4\n\ | 33 | stmia r0!, {r3, r4, ip, lr} @ 4\n\ |
@@ -44,7 +44,7 @@ v4wb_copy_user_page(void *kto, const void *kfrom) | |||
44 | mcr p15, 0, r1, c7, c10, 4 @ 1 drain WB\n\ | 44 | mcr p15, 0, r1, c7, c10, 4 @ 1 drain WB\n\ |
45 | ldmfd sp!, {r4, pc} @ 3" | 45 | ldmfd sp!, {r4, pc} @ 3" |
46 | : | 46 | : |
47 | : "I" (PAGE_SIZE / 64)); | 47 | : "r" (kto), "r" (kfrom), "I" (PAGE_SIZE / 64)); |
48 | } | 48 | } |
49 | 49 | ||
50 | void v4wb_copy_user_highpage(struct page *to, struct page *from, | 50 | void v4wb_copy_user_highpage(struct page *to, struct page *from, |
diff --git a/arch/arm/mm/copypage-v4wt.c b/arch/arm/mm/copypage-v4wt.c index 172e6a55458e..30c7d048a324 100644 --- a/arch/arm/mm/copypage-v4wt.c +++ b/arch/arm/mm/copypage-v4wt.c | |||
@@ -25,7 +25,7 @@ v4wt_copy_user_page(void *kto, const void *kfrom) | |||
25 | { | 25 | { |
26 | asm("\ | 26 | asm("\ |
27 | stmfd sp!, {r4, lr} @ 2\n\ | 27 | stmfd sp!, {r4, lr} @ 2\n\ |
28 | mov r2, %0 @ 1\n\ | 28 | mov r2, %2 @ 1\n\ |
29 | ldmia r1!, {r3, r4, ip, lr} @ 4\n\ | 29 | ldmia r1!, {r3, r4, ip, lr} @ 4\n\ |
30 | 1: stmia r0!, {r3, r4, ip, lr} @ 4\n\ | 30 | 1: stmia r0!, {r3, r4, ip, lr} @ 4\n\ |
31 | ldmia r1!, {r3, r4, ip, lr} @ 4+1\n\ | 31 | ldmia r1!, {r3, r4, ip, lr} @ 4+1\n\ |
@@ -40,7 +40,7 @@ v4wt_copy_user_page(void *kto, const void *kfrom) | |||
40 | mcr p15, 0, r2, c7, c7, 0 @ flush ID cache\n\ | 40 | mcr p15, 0, r2, c7, c7, 0 @ flush ID cache\n\ |
41 | ldmfd sp!, {r4, pc} @ 3" | 41 | ldmfd sp!, {r4, pc} @ 3" |
42 | : | 42 | : |
43 | : "I" (PAGE_SIZE / 64)); | 43 | : "r" (kto), "r" (kfrom), "I" (PAGE_SIZE / 64)); |
44 | } | 44 | } |
45 | 45 | ||
46 | void v4wt_copy_user_highpage(struct page *to, struct page *from, | 46 | void v4wt_copy_user_highpage(struct page *to, struct page *from, |
diff --git a/arch/arm/mm/copypage-xsc3.c b/arch/arm/mm/copypage-xsc3.c index 747ad4140fc7..f9cde0702f1e 100644 --- a/arch/arm/mm/copypage-xsc3.c +++ b/arch/arm/mm/copypage-xsc3.c | |||
@@ -34,7 +34,7 @@ xsc3_mc_copy_user_page(void *kto, const void *kfrom) | |||
34 | { | 34 | { |
35 | asm("\ | 35 | asm("\ |
36 | stmfd sp!, {r4, r5, lr} \n\ | 36 | stmfd sp!, {r4, r5, lr} \n\ |
37 | mov lr, %0 \n\ | 37 | mov lr, %2 \n\ |
38 | \n\ | 38 | \n\ |
39 | pld [r1, #0] \n\ | 39 | pld [r1, #0] \n\ |
40 | pld [r1, #32] \n\ | 40 | pld [r1, #32] \n\ |
@@ -67,7 +67,7 @@ xsc3_mc_copy_user_page(void *kto, const void *kfrom) | |||
67 | \n\ | 67 | \n\ |
68 | ldmfd sp!, {r4, r5, pc}" | 68 | ldmfd sp!, {r4, r5, pc}" |
69 | : | 69 | : |
70 | : "I" (PAGE_SIZE / 64 - 1)); | 70 | : "r" (kto), "r" (kfrom), "I" (PAGE_SIZE / 64 - 1)); |
71 | } | 71 | } |
72 | 72 | ||
73 | void xsc3_mc_copy_user_highpage(struct page *to, struct page *from, | 73 | void xsc3_mc_copy_user_highpage(struct page *to, struct page *from, |
diff --git a/arch/arm/mm/fault.c b/arch/arm/mm/fault.c index 92f5801f99c1..cbfb2edcf7d1 100644 --- a/arch/arm/mm/fault.c +++ b/arch/arm/mm/fault.c | |||
@@ -393,6 +393,9 @@ do_translation_fault(unsigned long addr, unsigned int fsr, | |||
393 | if (addr < TASK_SIZE) | 393 | if (addr < TASK_SIZE) |
394 | return do_page_fault(addr, fsr, regs); | 394 | return do_page_fault(addr, fsr, regs); |
395 | 395 | ||
396 | if (user_mode(regs)) | ||
397 | goto bad_area; | ||
398 | |||
396 | index = pgd_index(addr); | 399 | index = pgd_index(addr); |
397 | 400 | ||
398 | /* | 401 | /* |
diff --git a/arch/arm/mm/highmem.c b/arch/arm/mm/highmem.c index 77b030f5ec09..086816b205b8 100644 --- a/arch/arm/mm/highmem.c +++ b/arch/arm/mm/highmem.c | |||
@@ -48,7 +48,16 @@ void *kmap_atomic(struct page *page, enum km_type type) | |||
48 | 48 | ||
49 | debug_kmap_atomic(type); | 49 | debug_kmap_atomic(type); |
50 | 50 | ||
51 | kmap = kmap_high_get(page); | 51 | #ifdef CONFIG_DEBUG_HIGHMEM |
52 | /* | ||
53 | * There is no cache coherency issue when non VIVT, so force the | ||
54 | * dedicated kmap usage for better debugging purposes in that case. | ||
55 | */ | ||
56 | if (!cache_is_vivt()) | ||
57 | kmap = NULL; | ||
58 | else | ||
59 | #endif | ||
60 | kmap = kmap_high_get(page); | ||
52 | if (kmap) | 61 | if (kmap) |
53 | return kmap; | 62 | return kmap; |
54 | 63 | ||
diff --git a/arch/arm/mm/init.c b/arch/arm/mm/init.c index 1ba6cf5a2c02..f6a999465323 100644 --- a/arch/arm/mm/init.c +++ b/arch/arm/mm/init.c | |||
@@ -678,10 +678,10 @@ void __init mem_init(void) | |||
678 | void free_initmem(void) | 678 | void free_initmem(void) |
679 | { | 679 | { |
680 | #ifdef CONFIG_HAVE_TCM | 680 | #ifdef CONFIG_HAVE_TCM |
681 | extern char *__tcm_start, *__tcm_end; | 681 | extern char __tcm_start, __tcm_end; |
682 | 682 | ||
683 | totalram_pages += free_area(__phys_to_pfn(__pa(__tcm_start)), | 683 | totalram_pages += free_area(__phys_to_pfn(__pa(&__tcm_start)), |
684 | __phys_to_pfn(__pa(__tcm_end)), | 684 | __phys_to_pfn(__pa(&__tcm_end)), |
685 | "TCM link"); | 685 | "TCM link"); |
686 | #endif | 686 | #endif |
687 | 687 | ||