Skip to contentSkip to conversation

+ s390-vmcore-implement-remap_oldmem_pfn_range-for-s390.patch added to -mm tree

PATCH [email protected] 1 participant 1 message Jul 26, 2013 s390

lore
Share & tools
lore
#0 lore raw

Subject: + s390-vmcore-implement-remap_oldmem_pfn_range-for-s390.patch added to -mm tree
To: [email protected],[email protected],[email protected],[email protected]
From: [email protected]
Date: Fri, 26 Jul 2013 13:20:56 -0700

The patch titled
Subject: s390/vmcore: implement remap_oldmem_pfn_range for s390
has been added to the -mm tree. Its filename is

     s390-vmcore-implement-remap_oldmem_pfn_range-for-s390.patch

This patch should soon appear at
http://ozlabs.org/~akpm/mmots/broken-out/s390-vmcore-implement-remap_oldmem_pfn_range-for-s390.patch
and later at
http://ozlabs.org/~akpm/mmotm/broken-out/s390-vmcore-implement-remap_oldmem_pfn_range-for-s390.patch

Before you just go and hit "reply", please:
a) Consider who else should be cc'ed
b) Prefer to cc a suitable mailing list as well
c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/SubmitChecklist when testing your code ***

The -mm tree is included into linux-next and is updated there every 3-4 working days

------------------------------------------------------
From: Jan Willeke <[email protected]>
Subject: s390/vmcore: implement remap_oldmem_pfn_range for s390

Introduce the s390 specific way to map pages from oldmem. The memory area below OLDMEM_SIZE is mapped with offset OLDMEM_BASE. The other old memory is mapped directly.

---

 arch/s390/kernel/crash_dump.c |   26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)
arch/s390/kernel/crash_dump.c renamed from arch/s390/kernel/crash_dump.c~s390-vmcore-implement-remap_oldmem_pfn_range-for-s390 +26 -0
diff -puN arch/s390/kernel/crash_dump.c~s390-vmcore-implement-remap_oldmem_pfn_range-for-s390 arch/s390/kernel/crash_dump.c
@@ -99,6 +99,32 @@ ssize_t copy_oldmem_page(unsigned long p
 }
 
 /*
+ * Remap "oldmem"
+ *
+ * For the kdump reserved memory this functions performs a swap operation:
+ * [0 - OLDMEM_SIZE] is mapped to [OLDMEM_BASE - OLDMEM_BASE + OLDMEM_SIZE]
+ */
+int remap_oldmem_pfn_range(struct vm_area_struct *vma, unsigned long from,
+			   unsigned long pfn, unsigned long size, pgprot_t prot)
+{
+	unsigned long size_old;
+	int rc;
+
+	if (pfn < OLDMEM_SIZE >> PAGE_SHIFT) {
+		size_old = min(size, OLDMEM_SIZE - (pfn << PAGE_SHIFT));
+		rc = remap_pfn_range(vma, from,
+				     pfn + (OLDMEM_BASE >> PAGE_SHIFT),
+				     size_old, prot);
+		if (rc || size == size_old)
+			return rc;
+		size -= size_old;
+		from += size_old;
+		pfn += size_old >> PAGE_SHIFT;
+	}
+	return remap_pfn_range(vma, from, pfn, size, prot);
+}
+
+/*
  * Copy memory from old kernel
  */
 int copy_from_oldmem(void *dest, void *src, size_t count)

_

Patches currently in -mm which might be from [email protected] are

vmcore-introduce-elf-header-in-new-memory-feature.patch s390-vmcore-use-elf-header-in-new-memory-feature.patch vmcore-introduce-remap_oldmem_pfn_range.patch s390-vmcore-implement-remap_oldmem_pfn_range-for-s390.patch vmcore-enable-proc-vmcore-mmap-for-s390.patch s390-vmcore-use-vmcore-for-zfcpdump.patch