mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-09-18 22:14:16 +00:00
s390/extmem: improve reporting of -ERANGE error
Interface segment_warning() reports maximum mappable physical address for -ERANGE error. Currently that address is the value of VMEM_MAX_PHYS macro, but that well might change. A better way to obtain that address is calling arch_get_mappable_range() callback - one that is used by vmem_add_mapping() and generates -ERANGE error in the first place. Reviewed-by: Heiko Carstens <hca@linux.ibm.com> Signed-off-by: Alexander Gordeev <agordeev@linux.ibm.com> Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
This commit is contained in:
parent
94fd522069
commit
9916bf4eda
1 changed files with 6 additions and 3 deletions
|
@ -640,10 +640,13 @@ void segment_warning(int rc, char *seg_name)
|
|||
pr_err("There is not enough memory to load or query "
|
||||
"DCSS %s\n", seg_name);
|
||||
break;
|
||||
case -ERANGE:
|
||||
pr_err("DCSS %s exceeds the kernel mapping range (%lu) "
|
||||
"and cannot be loaded\n", seg_name, VMEM_MAX_PHYS);
|
||||
case -ERANGE: {
|
||||
struct range mhp_range = arch_get_mappable_range();
|
||||
|
||||
pr_err("DCSS %s exceeds the kernel mapping range (%llu) "
|
||||
"and cannot be loaded\n", seg_name, mhp_range.end + 1);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue