Remove unused /dev/oldmem interface
Subsystems (8)
v2 cover Remove unused /dev/oldmem interface
/dev/oldmem provides the interface for us to access the "old memory" in the dump-capture kernel. Unfortunately, no one actually uses this interface.
And this interface could actually cause some real problems if used on ia64 where the cached/uncached accesses are mixed. See the discussion from the link: https://lkml.org/lkml/2013/4/12/386.
So Eric suggested that we should remove /dev/oldmem as an unused piece of code.
Besides, we used a global variable saved_max_pfn to let the capture kernel know the amount of memory that the previous kernel used. And for almost all architectures (except x86. In x86, saved_max_pfn is used by detect_calgary()), the only user of this variable is the read_oldmem interface of /dev/oldmem, so also remove the setting for saved_max_pfn in those architectures.
-v2:
Keep /dev/oldmem and its number 12 in case this number will get reused in the future. And mark it obsolete since /dev/oldmem will be removed from kernel.
Zhang Yanfei (7):
/dev/oldmem: Remove this interface Documentation/devices.txt: Mark /dev/oldmem obsolete Documentation/kdump/kdump.txt: Remove /dev/oldmem description
mips: Remove savemaxmem parameter setup
powerpc: Remove savemaxmem parameter setup
ia64: Remove setting for saved_max_pfn
s390: Remove setting for saved_max_pfn
Documentation/devices.txt | 3 +- Documentation/kdump/kdump.txt | 31 +++++-------------------- arch/ia64/kernel/efi.c | 5 ---- arch/mips/kernel/crash_dump.c | 10 -------- arch/powerpc/kernel/crash_dump.c | 10 -------- arch/s390/kernel/setup.c | 4 --- drivers/char/mem.c | 47 -------------------------------------- 7 files changed, 7 insertions(+), 103 deletions(-)
PATCH v2 1/7 /dev/oldmem: Remove the interface
From: Zhang Yanfei <[email protected]>
/dev/oldmem provides the interface for us to access the "old memory" in the dump-capture kernel. Unfortunately, no one actually uses this interface.
And this interface could actually cause some real problems if used on ia64 where the cached/uncached accesses are mixed. See the discussion from the link: https://lkml.org/lkml/2013/4/12/386.
So Eric suggested that we should remove /dev/oldmem as an unused piece of code.
--- drivers/char/mem.c | 47 ----------------------------------------------- 1 files changed, 0 insertions(+), 47 deletions(-)
drivers/char/mem.c +0 -47
@@ -21,7 +21,6 @@#include <linux/ptrace.h> #include <linux/device.h> #include <linux/highmem.h> -#include <linux/crash_dump.h> #include <linux/backing-dev.h> #include <linux/bootmem.h> #include <linux/splice.h>
@@ -357,40 +356,6 @@ static int mmap_kmem(struct file *file, struct vm_area_struct *vma) }#endif -#ifdef CONFIG_CRASH_DUMP -/* -* Read memory corresponding to the old kernel. -*/ -static ssize_t read_oldmem (struct file *file,char __user *buf, -size_t count,loff_t *ppos) -{ -unsigned long pfn, offset; -size_t read =0 , csize; -int rc =0 ; - -while (count) { - pfn = *ppos /PAGE_SIZE ; -if (pfn > saved_max_pfn) -return read; - - offset = (unsigned long )(*ppos %PAGE_SIZE ); -if (count >PAGE_SIZE - offset) - csize =PAGE_SIZE - offset; -else - csize = count; - - rc =copy_oldmem_page (pfn, buf, csize, offset,1 ); -if (rc <0 ) -return rc; - buf += csize; - *ppos += csize; - read += csize; - count -= csize; - } -return read; -} -#endif -#ifdef CONFIG_DEVKMEM /* * This function reads the *virtual* memory as seen by the kernel.
@@ -772,7 +737,6 @@ static int open_port(struct inode *inode, struct file *filp)#define aio_write_zero aio_write_null#define open_mem open_port#define open_kmem open_mem -#define open_oldmem open_memstatic const struct file_operations mem_fops = { .llseek = memory_lseek,
@@ -837,14 +801,6 @@ static const struct file_operations full_fops = { .write = write_full, }; -#ifdef CONFIG_CRASH_DUMP -static const struct file_operations oldmem_fops = { - .read = read_oldmem, - .open = open_oldmem, - .llseek = default_llseek, -}; -#endif - static const struct memdev { const char *name; umode_t mode;
@@ -866,9 +822,6 @@ static const struct memdev { #ifdef CONFIG_PRINTK [11] = { "kmsg", 0644, &kmsg_fops, NULL }, #endif -#ifdef CONFIG_CRASH_DUMP - [12] = { "oldmem", 0, &oldmem_fops, NULL }, -#endif };static int memory_open (struct inode *inode,struct file *filp)
Signature · 1 line
1.7.1
PATCH v2 2/7 Documentation/devices.txt: Mark /dev/oldmem obsolete
In reply to Zhang YanfeiFrom: Zhang Yanfei <[email protected]>
--- Documentation/devices.txt | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-)
Documentation/devices.txt +1 -2
@@ -100,8 +100,7 @@ Your cooperation is appreciated. 10 = /dev/aio Asynchronous I/O notification interface 11 = /dev/kmsg Writes to this come out as printk's, reads export the buffered printk records. - 12 = /dev/oldmem Used by crashdump kernels to access - the memory of the kernel that crashed. + 12 = /dev/oldmem OBSOLETE 1 block RAM disk 0 = /dev/ram0 First RAM disk
Signature · 1 line
1.7.1
Re: [PATCH v2 2/7] Documentation/devices.txt: Mark /dev/oldmem obsolete
Quoted 14 lines · Zhang Yanfei
From: Zhang Yanfei <[email protected]>
Signed-off-by Zhang Yanfei <[email protected]>Cc Dave Jones <[email protected]>--- Documentation/devices.txt | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-)Documentation/devices.txt +0
-0
Documentation/devices.txt Your cooperation is appreciated. · line 106
Quoted 9 lines
Documentation/devices.txt +1
-2@@ -100,8 +100,7 @@ Your cooperation is appreciated. 10 = /dev/aio Asynchronous I/O notification interface 11 = /dev/kmsg Writes to this come out as printk's, reads export the buffered printk records. - 12 = /dev/oldmem Used by crashdump kernels to access - the memory of the kernel that crashed. + 12 = /dev/oldmem OBSOLETE 1 block RAM disk 0 = /dev/ram0 First RAM disk
This is the new patch. Looking at other parts of devices.txt, obsolete is sometimes used together with unused. I guess obsolete means this is old interface so don't use it as much as possible and unused means this is not used at all now. You remove old memory interface completely in this patch set, so is it better to add unused, too?
Signature · 2 lines
Thanks. HATAYAMA, Daisuke
Re: [PATCH v2 2/7] Documentation/devices.txt: Mark /dev/oldmem obsolete
Quoted 21 lines · HATAYAMA Daisuke
Quoted 20 lines · Zhang Yanfei
From: Zhang Yanfei <[email protected]>
Signed-off-by Zhang Yanfei <[email protected]>Cc Dave Jones <[email protected]>--- Documentation/devices.txt | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-)Documentation/devices.txt +1
-2@@ -100,8 +100,7 @@ Your cooperation is appreciated. 10 = /dev/aio Asynchronous I/O notification interface 11 = /dev/kmsg Writes to this come out as printk's, reads export the buffered printk records. - 12 = /dev/oldmem Used by crashdump kernels to access - the memory of the kernel that crashed. + 12 = /dev/oldmem OBSOLETE
Quoted 10 lines
Documentation/devices.txt Your cooperation is appreciated. · line 106
Quoted 3 lines
Documentation/devices.txt +0
-01 block RAM disk 0 = /dev/ram0 First RAM diskThis is the new patch. Looking at other parts of devices.txt, obsolete is sometimes used together with unused. I guess obsolete means this is old interface so don't use it as much as possible and unused means this is not used at all now. You remove old memory interface completely in this patch set, so is it better to add unused, too?
Does obsolete also mean "not used anymore"? I don't know. I think we can wait for some native English speakers to comment on this.
Thanks
Zhang
Re: [PATCH v2 2/7] Documentation/devices.txt: Mark /dev/oldmem obsolete
Quoted 33 lines · Zhang Yanfei
Quoted 21 lines · HATAYAMA Daisuke
Quoted 20 lines · Zhang Yanfei
From: Zhang Yanfei <[email protected]>
Signed-off-by Zhang Yanfei <[email protected]>Cc Dave Jones <[email protected]>--- Documentation/devices.txt | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-)Documentation/devices.txt +1
-2@@ -100,8 +100,7 @@ Your cooperation is appreciated. 10 = /dev/aio Asynchronous I/O notification interface 11 = /dev/kmsg Writes to this come out as printk's, reads export the buffered printk records. - 12 = /dev/oldmem Used by crashdump kernels to access - the memory of the kernel that crashed. + 12 = /dev/oldmem OBSOLETEQuoted 10 lines
Documentation/devices.txt Your cooperation is appreciated. · line 106
Quoted 3 lines
Documentation/devices.txt +0
-01 block RAM disk 0 = /dev/ram0 First RAM diskThis is the new patch. Looking at other parts of devices.txt, obsolete is sometimes used together with unused. I guess obsolete means this is old interface so don't use it as much as possible and unused means this is not used at all now. You remove old memory interface completely in this patch set, so is it better to add unused, too?
Quoted 3 lines
Does obsolete also mean "not used anymore"? I don't know. I think we can wait for some native English speakers to comment on this.
Yes. To be honest, I'm still suspecting "unused" doesn't include meaning of "removed"...
Signature · 2 lines
Thanks. HATAYAMA, Daisuke
Re: [PATCH v2 2/7] Documentation/devices.txt: Mark /dev/oldmem obsolete
In reply to Zhang YanfeiQuoted 33 lines · Zhang Yanfei
Quoted 9 lines · HATAYAMA Daisuke
Quoted 8 lines · Zhang Yanfei
From: Zhang Yanfei <[email protected]>
Signed-off-by Zhang Yanfei <[email protected]>Cc Dave Jones <[email protected]>--- Documentation/devices.txt | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-)Quoted 6 lines
Documentation/devices.txt Your cooperation is appreciated. · line 100
Quoted 6 lines
Documentation/devices.txt +0
-0@@ -100,8 +100,7 @@ Your cooperation is appreciated. 10 = /dev/aio Asynchronous I/O notificationinterface
Quoted 1 line
Documentation/devices.txt Your cooperation is appreciated. · line 101
Quoted 1 line
Documentation/devices.txt +0
-011 = /dev/kmsg Writes to this come out asprintk's, reads
Quoted 10 lines
Documentation/devices.txt Your cooperation is appreciated. · line 106
Quoted 8 lines
Documentation/devices.txt +1
-2export the buffered printk records. - 12 = /dev/oldmem Used by crashdump kernels to access - the memory of the kernel that crashed. + 12 = /dev/oldmem OBSOLETE 1 block RAM disk 0 = /dev/ram0 First RAM diskThis is the new patch. Looking at other parts of devices.txt,
obsolete is
Quoted 1 line
sometimes used together with unused. I guess obsolete means this is
old interface so
Quoted 1 line
don't use it as much as possible and unused means this is not used
Quoted 8 lines
at all now.
Quoted 1 line
You remove old memory interface completely in this patch set, so is
it better to add
Quoted 2 lines
unused, too?
Does obsolete also mean "not used anymore"? I don't know. I think we can wait for some native English speakers to comment on this.
Obsolete implies that it shouldn't be used anymore. There are exceptions to everything, of course...
(Unused means nothing is using it. If there's still code using it, it's not unused. So yeah unused would imply removed.)
Rob
Re: [PATCH v2 2/7] Documentation/devices.txt: Mark /dev/oldmem obsolete
Quoted 34 lines · Rob Landley
Quoted 33 lines · Zhang Yanfei
Quoted 31 lines · HATAYAMA Daisuke
Quoted 14 lines · Zhang Yanfei
From: Zhang Yanfei <[email protected]>
Signed-off-by Zhang Yanfei <[email protected]>Cc Dave Jones <[email protected]>--- Documentation/devices.txt | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-)Documentation/devices.txt +0
-0Documentation/devices.txt Your cooperation is appreciated. · line 106
Quoted 9 lines
Documentation/devices.txt +1
-2@@ -100,8 +100,7 @@ Your cooperation is appreciated. 10 = /dev/aio Asynchronous I/O notification interface 11 = /dev/kmsg Writes to this come out as printk's, reads export the buffered printk records. - 12 = /dev/oldmem Used by crashdump kernels to access - the memory of the kernel that crashed. + 12 = /dev/oldmem OBSOLETE 1 block RAM disk 0 = /dev/ram0 First RAM diskThis is the new patch. Looking at other parts of devices.txt, obsolete is sometimes used together with unused. I guess obsolete means this is old interface so don't use it as much as possible and unused means this is not used at all now. You remove old memory interface completely in this patch set, so is it better to add unused, too?
Quoted 7 lines
Quoted 2 lines
Does obsolete also mean "not used anymore"? I don't know. I think we can wait for some native English speakers to comment on this.
Obsolete implies that it shouldn't be used anymore. There are exceptions to everything, of course...
(Unused means nothing is using it. If there's still code using it, it's not unused. So yeah unused would imply removed.)
So, could I just use UNSED to replace OBSOLETE here? Or use "OBSOLETE/UNUSED"?
Signature · 2 lines
Thanks. Zhang Yanfei
Re: [PATCH v2 2/7] Documentation/devices.txt: Mark /dev/oldmem obsolete
Quoted 47 lines · Zhang Yanfei
Quoted 5 lines · Rob Landley
Quoted 4 lines · Zhang Yanfei
Quoted 3 lines · HATAYAMA Daisuke
Quoted 2 lines · Zhang Yanfei
From: Zhang Yanfei <[email protected]>
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Review
Quoted 7 lines
Signed-off-by Zhang Yanfei <[email protected]>Cc Dave Jones <[email protected]>--- Documentation/devices.txt | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-)(quoted diff) +0
-0
b/Documentation/devices.txtQuoted 5 lines
Quoted 5 lines
Quoted 5 lines
Documentation/devices.txt Your cooperation is appreciated. · line 100
Quoted 5 lines
index 08f01e7..c8e4002 100644
Documentation/devices.txt +0
-0@@ -100,8 +100,7 @@ Your cooperation is appreciated. 10 = /dev/aio Asynchronous I/O notificationinterface
Quoted 1 line
Quoted 1 line
Quoted 1 line
Documentation/devices.txt Your cooperation is appreciated. · line 101
Quoted 1 line
Documentation/devices.txt +0
-011 = /dev/kmsg Writes to this come out asprintk's, reads
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Documentation/devices.txt Your cooperation is appreciated. · line 103
Quoted 2 lines
Documentation/devices.txt +0
-1export the buffered printk records. - 12 = /dev/oldmem Used by crashdump kernels toaccess
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Documentation/devices.txt Your cooperation is appreciated. · line 106
Quoted 6 lines
Documentation/devices.txt +1
-1- the memory of the kernel that crashed. + 12 = /dev/oldmem OBSOLETE 1 block RAM disk 0 = /dev/ram0 First RAM diskThis is the new patch. Looking at other parts of devices.txt,
obsolete is
Quoted 1 line
Quoted 1 line
Quoted 1 line
sometimes used together with unused. I guess obsolete means this
is old interface so
Quoted 1 line
Quoted 1 line
Quoted 1 line
don't use it as much as possible and unused means this is not
used at all now.
Quoted 1 line
Quoted 1 line
Quoted 1 line
You remove old memory interface completely in this patch set, so
is it better to add
Quoted 4 lines
Quoted 4 lines
Quoted 2 lines
unused, too?
Does obsolete also mean "not used anymore"? I don't know. I think
we can wait for some native
Quoted 2 lines
Quoted 1 line
English speakers to comment on this.
Quoted 8 lines
Quoted 1 line
Obsolete implies that it shouldn't be used anymore. There are
exceptions to everything, of course...
Quoted 2 lines
(Unused means nothing is using it. If there's still code using it,
it's not unused. So yeah unused would imply removed.)
Quoted 1 line
So, could I just use UNSED to replace OBSOLETE here? Or use "OBSOLETE/UNUSED"?
Obsolete is fine.
Obsolete means it was used at some point, and thus reusing it might confuse or conflcit with legacy software. Unused could just mean that we left a gap for some reason, it doesn't imply it ever was used.
Explicitly documenting "unused" is kind of silly: all the ones we _don't_ document are presumably unused. Obsolete carries with it a very mild warning about legacy software, which is presumably why we still bother to mention it at all instead of just removing the entry.
(Then again the point was that nothing ever used this interface in the first place. Personally I'd just have removed the entry...)
Rob
Re: [PATCH v2 2/7] Documentation/devices.txt: Mark /dev/oldmem obsolete
Quoted 10 lines · Rob Landley
Quoted 3 lines
So, could I just use UNSED to replace OBSOLETE here? Or use "OBSOLETE/UNUSED"?
Obsolete is fine.
Obsolete means it was used at some point, and thus reusing it might confuse or conflcit with legacy software. Unused could just mean that we left a gap for some reason, it doesn't imply it ever was used.
Quoted 8 lines
Explicitly documenting "unused" is kind of silly: all the ones we _don't_ document are presumably unused. Obsolete carries with it a very mild warning about legacy software, which is presumably why we still bother to mention it at all instead of just removing the entry.
(Then again the point was that nothing ever used this interface in the first place. Personally I'd just have removed the entry...)
"Obsolete" in this specific context means that the reservation is obsolete, but was used in kernels past, therefore the name and number should not be reused to prevent old software from misbehaving.
-hpa
_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec
Re: [PATCH v2 2/7] Documentation/devices.txt: Mark /dev/oldmem obsolete
In reply to Zhang YanfeiQuoted 13 lines · Zhang Yanfei
From: Zhang Yanfei <[email protected]>
Signed-off-by Zhang Yanfei <[email protected]>Cc Dave Jones <[email protected]>--- Documentation/devices.txt | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-)Documentation/devices.txt +0
-0
Documentation/devices.txt Your cooperation is appreciated. · line 103
Quoted 6 lines
Documentation/devices.txt +1
-2@@ -100,8 +100,7 @@ Your cooperation is appreciated. 10 = /dev/aio Asynchronous I/O notification interface 11 = /dev/kmsg Writes to this come out as printk's, reads export the buffered printk records. - 12 = /dev/oldmem Used by crashdump kernels to access - the memory of the kernel that crashed. + 12 = /dev/oldmem OBSOLETE
Let me suggest the slightly better.
+ 12 = /dev/oldmem OBSOLETE - replaced by /proc/vmcore
Pointing to people to /proc/vmcore should help anyone who is trying to understand what is going on.
Quoted 2 lines
Documentation/devices.txt +0
-01 block RAM disk 0 = /dev/ram0 First RAM disk
Re: [PATCH v2 2/7] Documentation/devices.txt: Mark /dev/oldmem obsolete
Quoted 24 lines · Eric W. Biederman
Quoted 13 lines · Zhang Yanfei
From: Zhang Yanfei <[email protected]>
Signed-off-by Zhang Yanfei <[email protected]>Cc Dave Jones <[email protected]>--- Documentation/devices.txt | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-)Documentation/devices.txt +0
-0Documentation/devices.txt Your cooperation is appreciated. · line 103
Quoted 6 lines
Documentation/devices.txt +1
-2@@ -100,8 +100,7 @@ Your cooperation is appreciated. 10 = /dev/aio Asynchronous I/O notification interface 11 = /dev/kmsg Writes to this come out as printk's, reads export the buffered printk records. - 12 = /dev/oldmem Used by crashdump kernels to access - the memory of the kernel that crashed. + 12 = /dev/oldmem OBSOLETELet me suggest the slightly better.
Quoted 4 lines
+ 12 =
/dev/oldmemOBSOLETE - replaced by/proc/vmcorePointing to people to
/proc/vmcoreshould help anyone who is trying to understand what is going on.
Makes sense to me. Updated patch below:
-----------------------------------
Quoted 1 line
From
d2f7baf2aba86069f941f32669a22dbd99082614Mon Sep 17 00:00:00 2001
From: Zhang Yanfei <[email protected]>
Date: Wed, 29 May 2013 15:44:09 +0800
Subject: [PATCH] Documentation/devices.txt: Mark /dev/oldmem obsolete
--- Documentation/devices.txt | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-)
Documentation/devices.txt +1 -2
@@ -100,8 +100,7 @@ Your cooperation is appreciated. 10 = /dev/aio Asynchronous I/O notification interface 11 = /dev/kmsg Writes to this come out as printk's, reads export the buffered printk records. - 12 = /dev/oldmem Used by crashdump kernels to access - the memory of the kernel that crashed. + 12 = /dev/oldmem OBSOLETE - replaced by /proc/vmcore 1 block RAM disk 0 = /dev/ram0 First RAM disk
Signature · 1 line
1.7.1
PATCH v2 3/7 Documentation/kdump/kdump.txt: Remove /dev/oldmem description
In reply to Zhang YanfeiFrom: Zhang Yanfei <[email protected]>
--- Documentation/kdump/kdump.txt | 31 ++++++------------------------- 1 files changed, 6 insertions(+), 25 deletions(-)
Documentation/kdump/kdump.txt +6 -25
@@ -47,19 +47,12 @@ parameter. Optionally the size of the ELF header can also be passed when using the elfcorehdr=[size[KMG]@]offset[KMG] syntax. -With the dump-capture kernel, you can access the memory image, or "old -memory," in two ways: - -- Through a /dev/oldmem device interface. A capture utility can read the - device file and write out the memory in raw format. This is a raw dump - of memory. Analysis and capture tools must be intelligent enough to - determine where to look for the right information. - -- Through /proc/vmcore. This exports the dump as an ELF-format file that - you can write out using file copy commands such as cp or scp. Further, - you can use analysis tools such as the GNU Debugger (GDB) and the Crash - tool to debug the dump file. This method ensures that the dump pages are - correctly ordered. +With the dump-capture kernel, you can access the memory image through +/proc/vmcore. This exports the dump as an ELF-format file that you can +write out using file copy commands such as cp or scp. Further, you can +use analysis tools such as the GNU Debugger (GDB) and the Crash tool to +debug the dump file. This method ensures that the dump pages are correctly +ordered. Setup and Installation
@@ -423,18 +416,6 @@ the following command: cp /proc/vmcore <dump-file> -You can also access dumped memory as a /dev/oldmem device for a linear -and raw view. To create the device, use the following command: - - mknod /dev/oldmem c 1 12 - -Use the dd command with suitable options for count, bs, and skip to -access specific portions of the dump. - -To see the entire memory, use the following command: - - dd if=/dev/oldmem of=oldmem.001 - Analysis ========
Signature · 1 line
1.7.1
PATCH v2 4/7 mips: Remove savemaxmem parameter setup
In reply to Zhang YanfeiFrom: Zhang Yanfei <[email protected]>
saved_max_pfn is used to know the amount of memory that the previous kernel used. And for powerpc, we set saved_max_pfn by passing the kernel commandline parameter "savemaxmem=".
The only user of saved_max_pfn in mips is read_oldmem interface. Since we have removed read_oldmem, so we don't need this parameter anymore.
--- arch/mips/kernel/crash_dump.c | 10 ---------- 1 files changed, 0 insertions(+), 10 deletions(-)
arch/mips/kernel/crash_dump.c +0 -10
@@ -4,16 +4,6 @@#include <asm/uaccess.h> #include <linux/slab.h> -static int __init parse_savemaxmem (char *p) -{ -if (p) - saved_max_pfn = (memparse (p, &p) >>PAGE_SHIFT ) -1 ; - -return 1 ; -} -__setup ("savemaxmem=" , parse_savemaxmem); - -static void *kdump_buf_page;/**
Signature · 1 line
1.7.1
PATCH v2 5/7 powerpc: Remove savemaxmem parameter setup
In reply to Zhang YanfeiFrom: Zhang Yanfei <[email protected]>
saved_max_pfn is used to know the amount of memory that the previous kernel used. And for powerpc, we set saved_max_pfn by passing the kernel commandline parameter "savemaxmem=".
The only user of saved_max_pfn in powerpc is read_oldmem interface. Since we have removed read_oldmem, we don't need this parameter anymore.
--- arch/powerpc/kernel/crash_dump.c | 10 ---------- 1 files changed, 0 insertions(+), 10 deletions(-)
arch/powerpc/kernel/crash_dump.c +0 -10
@@ -69,16 +69,6 @@ void __init setup_kdump_trampoline(void) }#endif /* CONFIG_NONSTATIC_KERNEL */ -static int __init parse_savemaxmem (char *p) -{ -if (p) - saved_max_pfn = (memparse (p, &p) >>PAGE_SHIFT ) -1 ; - -return 1 ; -} -__setup ("savemaxmem=" , parse_savemaxmem); - -static size_t copy_oldmem_vaddr (void *vaddr,char *buf,size_t csize,unsigned long offset,int userbuf) {
Signature · 1 line
1.7.1
PATCH v2 6/7 ia64: Remove setting for saved_max_pfn
In reply to Zhang YanfeiFrom: Zhang Yanfei <[email protected]>
The only user of saved_max_pfn in ia64 is read_oldmem interface but we have removed that interface, so saved_max_pfn is now unneeded in ia64, and we needn't set it anymore.
--- arch/ia64/kernel/efi.c | 5 ----- 1 files changed, 0 insertions(+), 5 deletions(-)
arch/ia64/kernel/efi.c +0 -5
@@ -1116,11 +1116,6 @@ efi_memmap_init(u64 *s, u64 *e)if (!is_memory_available (md))continue ; -#ifdef CONFIG_CRASH_DUMP -/* saved_max_pfn should ignore max_addr= command line arg */ -if (saved_max_pfn < (efi_md_end (md) >>PAGE_SHIFT )) - saved_max_pfn = (efi_md_end (md) >>PAGE_SHIFT ); -#endif /* * Round ends inward to granule boundaries * Give trimmings to uncached allocator
Signature · 1 line
1.7.1
PATCH v2 7/7 s390: Remove setting for saved_max_pfn
In reply to Zhang YanfeiFrom: Zhang Yanfei <[email protected]>
The only user of saved_max_pfn in s390 is read_oldmem interface but we have removed that interface, so saved_max_pfn is now unneeded in s390, and we needn't set it anymore.
--- arch/s390/kernel/setup.c | 4 ---- 1 files changed, 0 insertions(+), 4 deletions(-)
arch/s390/kernel/setup.c +0 -4
@@ -719,10 +719,6 @@ static void reserve_oldmem(void) }create_mem_hole (memory_chunk,OLDMEM_BASE ,OLDMEM_SIZE );create_mem_hole (memory_chunk,OLDMEM_SIZE , real_size -OLDMEM_SIZE ); -if (OLDMEM_BASE +OLDMEM_SIZE == real_size) - saved_max_pfn =PFN_DOWN (OLDMEM_BASE ) -1 ; -else - saved_max_pfn =PFN_DOWN (real_size) -1 ;#endif }
Signature · 1 line
1.7.1