From: bill4carson@gmail.com (bill4carson at gmail.com)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 5/7] Using do_page_fault for section fault handling
Date: Mon, 30 Jan 2012 15:57:16 +0800 [thread overview]
Message-ID: <1327910238-18704-6-git-send-email-bill4carson@gmail.com> (raw)
In-Reply-To: <1327910238-18704-1-git-send-email-bill4carson@gmail.com>
From: Bill Carson <bill4carson@gmail.com>
Signed-off-by: Bill Carson <bill4carson@gmail.com>
---
arch/arm/mm/fault.c | 15 +++++++++++++++
1 files changed, 15 insertions(+), 0 deletions(-)
diff --git a/arch/arm/mm/fault.c b/arch/arm/mm/fault.c
index bb7eac3..af6703d 100644
--- a/arch/arm/mm/fault.c
+++ b/arch/arm/mm/fault.c
@@ -19,6 +19,7 @@
#include <linux/sched.h>
#include <linux/highmem.h>
#include <linux/perf_event.h>
+#include <linux/hugetlb.h>
#include <asm/exception.h>
#include <asm/system.h>
@@ -485,6 +486,7 @@ do_translation_fault(unsigned long addr, unsigned int fsr,
}
#endif /* CONFIG_MMU */
+#ifndef CONFIG_ARM_HUGETLB_SUPPORT
/*
* Some section permission faults need to be handled gracefully.
* They can happen due to a __{get,put}_user during an oops.
@@ -496,6 +498,19 @@ do_sect_fault(unsigned long addr, unsigned int fsr, struct pt_regs *regs)
return 0;
}
+#else
+
+/* Since normal 4K page based vma will never fault into section traps,
+ * This will enable us to use do_page_fault for section permission fault.
+ */
+static int
+do_sect_fault(unsigned long addr, unsigned int fsr, struct pt_regs *regs)
+{
+ do_page_fault(addr, fsr, regs);
+ return 0;
+}
+#endif
+
/*
* This abort handler always returns "fault".
*/
--
1.7.1
next prev parent reply other threads:[~2012-01-30 7:57 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-30 7:57 [RFC] ARM hugetlb support bill4carson at gmail.com
2012-01-30 7:57 ` [PATCH 1/7] Add various hugetlb arm high level hooks bill4carson at gmail.com
2012-02-06 17:07 ` Catalin Marinas
2012-02-07 2:00 ` bill4carson
2012-02-07 11:54 ` Catalin Marinas
2012-02-07 12:15 ` Catalin Marinas
2012-02-07 12:57 ` carson bill
2012-01-30 7:57 ` [PATCH 2/7] Add various hugetlb page table fix bill4carson at gmail.com
2012-01-31 9:57 ` Catalin Marinas
2012-01-31 9:58 ` Russell King - ARM Linux
2012-01-31 12:25 ` Catalin Marinas
2012-02-01 3:10 ` bill4carson
2012-02-06 16:26 ` Catalin Marinas
2012-02-07 1:42 ` bill4carson
2012-02-07 11:50 ` Catalin Marinas
2012-02-07 13:24 ` carson bill
2012-02-07 14:11 ` Catalin Marinas
2012-02-07 14:46 ` carson bill
2012-02-07 15:09 ` Catalin Marinas
2012-02-07 15:41 ` carson bill
2012-01-30 7:57 ` [PATCH 3/7] Introduce set_hugepte_ext api for huge page hardware page table setup bill4carson at gmail.com
2012-01-30 7:57 ` [PATCH 4/7] Store huge page linux pte in mm_struct bill4carson at gmail.com
2012-01-31 9:37 ` Catalin Marinas
2012-01-31 10:01 ` Russell King - ARM Linux
2012-02-01 5:45 ` bill4carson
2012-02-06 2:04 ` bill4carson
2012-02-06 10:29 ` Catalin Marinas
2012-02-06 14:40 ` carson bill
2012-01-30 7:57 ` bill4carson at gmail.com [this message]
2012-01-30 7:57 ` [PATCH 6/7] Add hugetlb Kconfig option bill4carson at gmail.com
2012-01-30 7:57 ` [PATCH 7/7] Minor compiling fix bill4carson at gmail.com
2012-01-31 9:29 ` [RFC] ARM hugetlb support Catalin Marinas
2012-02-01 1:56 ` bill4carson
2012-02-02 14:38 ` Catalin Marinas
2012-02-03 1:41 ` bill4carson
2012-02-06 16:29 ` Catalin Marinas
-- strict thread matches above, loose matches on Subject: below --
2012-02-13 9:44 [RFC-PATCH V2] " Bill Carson
2012-02-13 9:44 ` [PATCH 5/7] Using do_page_fault for section fault handling Bill Carson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1327910238-18704-6-git-send-email-bill4carson@gmail.com \
--to=bill4carson@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).