diff options
author | Igor Mammedov <imammedo@redhat.com> | 2011-08-02 05:45:25 -0400 |
---|---|---|
committer | Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> | 2011-08-04 15:31:29 -0400 |
commit | 98f531da8479eec3d828adc7f0865baaab99a543 (patch) | |
tree | 6aae6f2d2b966f36848d485c4fa495366aaad7eb /arch/x86/xen/setup.c | |
parent | 8f3c5883d840d079a5d2db20893b5ac8ba453b40 (diff) |
xen: Fix misleading WARN message at xen_release_chunk
WARN message should not complain
"Failed to release memory %lx-%lx err=%d\n"
^^^^^^^
about range when it fails to release just one page,
instead it should say what pfn is not freed.
In addition line:
printk(KERN_INFO "xen_release_chunk: looking at area pfn %lx-%lx: "
...
printk(KERN_CONT "%lu pages freed\n", len);
will be broken if WARN in between this line is fired. So fix it
by using a single printk for this.
Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Diffstat (limited to 'arch/x86/xen/setup.c')
-rw-r--r-- | arch/x86/xen/setup.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/arch/x86/xen/setup.c b/arch/x86/xen/setup.c index e4056321b243..02ffd9e48c9f 100644 --- a/arch/x86/xen/setup.c +++ b/arch/x86/xen/setup.c | |||
@@ -92,8 +92,6 @@ static unsigned long __init xen_release_chunk(phys_addr_t start_addr, | |||
92 | if (end <= start) | 92 | if (end <= start) |
93 | return 0; | 93 | return 0; |
94 | 94 | ||
95 | printk(KERN_INFO "xen_release_chunk: looking at area pfn %lx-%lx: ", | ||
96 | start, end); | ||
97 | for(pfn = start; pfn < end; pfn++) { | 95 | for(pfn = start; pfn < end; pfn++) { |
98 | unsigned long mfn = pfn_to_mfn(pfn); | 96 | unsigned long mfn = pfn_to_mfn(pfn); |
99 | 97 | ||
@@ -106,14 +104,14 @@ static unsigned long __init xen_release_chunk(phys_addr_t start_addr, | |||
106 | 104 | ||
107 | ret = HYPERVISOR_memory_op(XENMEM_decrease_reservation, | 105 | ret = HYPERVISOR_memory_op(XENMEM_decrease_reservation, |
108 | &reservation); | 106 | &reservation); |
109 | WARN(ret != 1, "Failed to release memory %lx-%lx err=%d\n", | 107 | WARN(ret != 1, "Failed to release pfn %lx err=%d\n", pfn, ret); |
110 | start, end, ret); | ||
111 | if (ret == 1) { | 108 | if (ret == 1) { |
112 | __set_phys_to_machine(pfn, INVALID_P2M_ENTRY); | 109 | __set_phys_to_machine(pfn, INVALID_P2M_ENTRY); |
113 | len++; | 110 | len++; |
114 | } | 111 | } |
115 | } | 112 | } |
116 | printk(KERN_CONT "%lu pages freed\n", len); | 113 | printk(KERN_INFO "Freeing %lx-%lx pfn range: %lu pages freed\n", |
114 | start, end, len); | ||
117 | 115 | ||
118 | return len; | 116 | return len; |
119 | } | 117 | } |