From: Igor Mammedov <imammedo@redhat.com>
To: linux-kernel@vger.kernel.org
Subject: [PATCH 3/3] xen: Fix misleading WARN message at xen_release_chunk
Date: Tue, 2 Aug 2011 11:45:25 +0200 [thread overview]
Message-ID: <1312278325-4246-4-git-send-email-imammedo@redhat.com> (raw)
In-Reply-To: <1312278325-4246-1-git-send-email-imammedo@redhat.com>
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>
---
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 d9eef1e..1ec79b7 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,
if (end <= start)
return 0;
- printk(KERN_INFO "xen_release_chunk: looking at area pfn %lx-%lx: ",
- start, end);
for(pfn = start; pfn < end; pfn++) {
unsigned long mfn = pfn_to_mfn(pfn);
@@ -106,14 +104,14 @@ static unsigned long __init xen_release_chunk(phys_addr_t start_addr,
ret = HYPERVISOR_memory_op(XENMEM_decrease_reservation,
&reservation);
- WARN(ret != 1, "Failed to release memory %lx-%lx err=%d\n",
- start, end, ret);
+ WARN(ret != 1, "Failed to release pfn %lx err=%d\n", pfn, ret);
if (ret == 1) {
__set_phys_to_machine(pfn, INVALID_P2M_ENTRY);
len++;
}
}
- printk(KERN_CONT "%lu pages freed\n", len);
+ printk(KERN_INFO "Freeing %lx-%lx pfn range: %lu pages freed\n",
+ start, end, len);
return len;
}
--
1.7.5
prev parent reply other threads:[~2011-08-02 9:45 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-02 9:45 [PATCH 0/3] xen: small fixes and cleanups at arch/x86/xen/setup.c Igor Mammedov
2011-08-02 9:45 ` [PATCH 1/3] xen: off by one error in xen/setup.c Igor Mammedov
2011-08-02 17:07 ` Konrad Rzeszutek Wilk
2011-08-03 5:33 ` Igor Mammedov
2011-08-03 6:23 ` Jesper Juhl
2011-08-03 6:31 ` Igor Mammedov
2011-08-09 16:55 ` Konrad Rzeszutek Wilk
2011-08-02 9:45 ` [PATCH 2/3] xen: Fix printk() format " Igor Mammedov
2011-08-02 9:45 ` Igor Mammedov [this message]
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=1312278325-4246-4-git-send-email-imammedo@redhat.com \
--to=imammedo@redhat.com \
--cc=linux-kernel@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®