leon: R.I.P.
[openwrt.git] / target / linux / coldfire / patches / 043-workaround-for-zero-page-used-on-ColdFire-platform.patch
1 From fa27f3e27863e3f4376864b144dc7506de124cf6 Mon Sep 17 00:00:00 2001
2 From: Jason Jin <Jason.jin@freescale.com>
3 Date: Thu, 4 Aug 2011 09:59:54 +0800
4 Subject: [PATCH 43/52] workaround for zero page used on ColdFire platform.
5
6 There is some issue for Coldfire platform to use the
7 zero page for read when there is memory fault. This is
8 a workaround for this, try to make kernel to use normal
9 memory instead.
10
11 Signed-off-by: Jason Jin <Jason.jin@freescale.com>
12 ---
13  mm/memory.c |    2 ++
14  1 files changed, 2 insertions(+), 0 deletions(-)
15
16 --- a/mm/memory.c
17 +++ b/mm/memory.c
18 @@ -2937,6 +2937,7 @@ static int do_anonymous_page(struct mm_s
19         if (check_stack_guard_page(vma, address) < 0)
20                 return VM_FAULT_SIGBUS;
21  
22 +#ifndef CONFIG_COLDFIRE
23         /* Use the zero-page for reads */
24         if (!(flags & FAULT_FLAG_WRITE)) {
25                 entry = pte_mkspecial(pfn_pte(my_zero_pfn(address),
26 @@ -2946,6 +2947,7 @@ static int do_anonymous_page(struct mm_s
27                         goto unlock;
28                 goto setpte;
29         }
30 +#endif
31  
32         /* Allocate our own private page. */
33         if (unlikely(anon_vma_prepare(vma)))