All of lore.kernel.org
 help / color / mirror / Atom feed
From: ext-mika.1.westerberg@nokia.com (Mika Westerberg)
To: linux-arm-kernel@lists.infradead.org
Subject: [RFC 05/10] arm: kdump: make kexec work in interrupt context
Date: Mon, 29 Mar 2010 12:26:31 +0300	[thread overview]
Message-ID: <f05417b66eedd3c1fe32b433dcdae71a2a151da5.1269854500.git.ext-mika.1.westerberg@nokia.com> (raw)
In-Reply-To: <5d4c557a427346c129c8f6cc43c5819177c05ff5.1269854500.git.ext-mika.1.westerberg@nokia.com>

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>
---
 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 9d4da6a..7bf192e 100644
--- a/arch/arm/mm/mmu.c
+++ b/arch/arm/mm/mmu.c
@@ -1050,10 +1050,12 @@ void setup_mm_for_reboot(char mode)
 	pgd_t *pgd;
 	int i;
 
-	if (current->mm && current->mm->pgd)
-		pgd = current->mm->pgd;
-	else
-		pgd = init_mm.pgd;
+	/*
+	 * We need to access to user-mode page tables here. For kernel threads
+	 * we don't have any user-mode mappings so we use the context that we
+	 * "borrowed".
+	 */
+	pgd = current->active_mm->pgd;
 
 	base_pmdval = PMD_SECT_AP_WRITE | PMD_SECT_AP_READ | PMD_TYPE_SECT;
 	if (cpu_architecture() <= CPU_ARCH_ARMv5TEJ && !cpu_is_xscale())
-- 
1.5.6.5

  reply	other threads:[~2010-03-29  9:26 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-29  9:26 [RFC 00/10] Initial implementation of kdump for ARM Mika Westerberg
2010-03-29  9:26 ` [RFC 01/10] arm: kdump: reserve memory for crashkernel Mika Westerberg
2010-03-29  9:26   ` [RFC 02/10] arm: kdump: implement crash_setup_regs() Mika Westerberg
2010-03-29  9:26     ` [RFC 03/10] arm: kdump: implement machine_crash_shutdown() Mika Westerberg
2010-03-29  9:26       ` [RFC 04/10] arm: kdump: skip indirection page when crashing Mika Westerberg
2010-03-29  9:26         ` Mika Westerberg [this message]
2010-03-29  9:26           ` [RFC 06/10] arm: kdump: implement copy_oldmem_page() Mika Westerberg
2010-03-29  9:26             ` [RFC 07/10] arm: allow passing an ELF64 header to elf_check_arch() Mika Westerberg
2010-03-29  9:26               ` [RFC 08/10] arm: kdump: add support for elfcorehdr= parameter Mika Westerberg
2010-03-29  9:26                 ` [RFC 09/10] arm: implement reserve memory early parameter Mika Westerberg
2010-03-29  9:26                   ` [RFC 10/10] arm: kdump: add CONFIG_CRASH_DUMP Kconfig option Mika Westerberg
2010-04-12 21:05                   ` [RFC 09/10] arm: implement reserve memory early parameter Russell King - ARM Linux
2010-04-13  6:37                     ` Mika Westerberg
2010-04-15 12:40                     ` Mika Westerberg
2010-03-29 21:12               ` [RFC 07/10] arm: allow passing an ELF64 header to elf_check_arch() Russell King - ARM Linux
2010-03-30  7:11                 ` Mika Westerberg
2010-03-29 23:41               ` Jamie Lokier
2010-03-30  7:26                 ` Mika Westerberg
2010-03-30 11:41                   ` Jamie Lokier
2010-04-12 20:03           ` [RFC 05/10] arm: kdump: make kexec work in interrupt context Russell King - ARM Linux
2010-04-12 20:01     ` [RFC 02/10] arm: kdump: implement crash_setup_regs() Russell King - ARM Linux
2010-04-13  5:53       ` Mika Westerberg

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=f05417b66eedd3c1fe32b433dcdae71a2a151da5.1269854500.git.ext-mika.1.westerberg@nokia.com \
    --to=ext-mika.1.westerberg@nokia.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.