diff options
author | Mika Westerberg <mika.westerberg@iki.fi> | 2010-04-13 02:01:46 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2010-04-14 06:11:31 -0400 |
commit | 3f2d4f561fab4588344cc519fd323382ab950928 (patch) | |
tree | 8998ed2d054db2e446532507d9c742cfbc289502 /arch | |
parent | 82c6f5a5b3e91ef4d2fb8725de4b8cf7affd4d61 (diff) |
ARM: 6052/1: kdump: make kexec work in interrupt context
When crash happens in interrupt context there is no userspace context.
We always use current->active_mm in those cases.
Signed-off-by: Mika Westerberg <ext-mika.1.westerberg@nokia.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/mm/mmu.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/arch/arm/mm/mmu.c b/arch/arm/mm/mmu.c index 4223d086aa17..241c24a1c18f 100644 --- a/arch/arm/mm/mmu.c +++ b/arch/arm/mm/mmu.c | |||
@@ -1054,10 +1054,12 @@ void setup_mm_for_reboot(char mode) | |||
1054 | pgd_t *pgd; | 1054 | pgd_t *pgd; |
1055 | int i; | 1055 | int i; |
1056 | 1056 | ||
1057 | if (current->mm && current->mm->pgd) | 1057 | /* |
1058 | pgd = current->mm->pgd; | 1058 | * We need to access to user-mode page tables here. For kernel threads |
1059 | else | 1059 | * we don't have any user-mode mappings so we use the context that we |
1060 | pgd = init_mm.pgd; | 1060 | * "borrowed". |
1061 | */ | ||
1062 | pgd = current->active_mm->pgd; | ||
1061 | 1063 | ||
1062 | base_pmdval = PMD_SECT_AP_WRITE | PMD_SECT_AP_READ | PMD_TYPE_SECT; | 1064 | base_pmdval = PMD_SECT_AP_WRITE | PMD_SECT_AP_READ | PMD_TYPE_SECT; |
1063 | if (cpu_architecture() <= CPU_ARCH_ARMv5TEJ && !cpu_is_xscale()) | 1065 | if (cpu_architecture() <= CPU_ARCH_ARMv5TEJ && !cpu_is_xscale()) |