From: Kumar Gala <galak@kernel.crashing.org>
To: davem@davemloft.net
Cc: sparclinux@vger.kernel.org, linuxppc-dev@ozlabs.org,
linux-kernel@vger.kernel.org
Subject: [PATCH] [LMB]: Fix lmb_add_region if region should be added at the head
Date: Tue, 19 Feb 2008 22:27:48 -0600 (CST) [thread overview]
Message-ID: <Pine.LNX.4.64.0802192227170.2215@blarg.am.freescale.net> (raw)
We introduced a bug in fixing lmb_add_region to handle an initial
region being non-zero. Before that fix it was impossible to insert
a region at the head of the list since the first region always started
at zero.
Now that its possible for the first region to be non-zero we need to
check to see if the new region should be added at the head and if so
actually add it.
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
---
lib/lmb.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/lib/lmb.c b/lib/lmb.c
index e3c8dcb..3c43b95 100644
--- a/lib/lmb.c
+++ b/lib/lmb.c
@@ -184,6 +184,11 @@ static long __init lmb_add_region(struct lmb_region *rgn, u64 base, u64 size)
break;
}
}
+
+ if (base < rgn->region[0].base) {
+ rgn->region[0].base = base;
+ rgn->region[0].size = size;
+ }
rgn->cnt++;
return 0;
--
1.5.3.8
next reply other threads:[~2008-02-20 4:30 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-02-20 4:27 Kumar Gala [this message]
2008-02-20 4:45 ` [PATCH] [LMB]: Fix lmb_add_region if region should be added at the head David Miller
2008-02-20 5:16 ` Kumar Gala
2008-02-20 5:26 ` David Miller
2008-02-20 5:29 ` Kumar Gala
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=Pine.LNX.4.64.0802192227170.2215@blarg.am.freescale.net \
--to=galak@kernel.crashing.org \
--cc=davem@davemloft.net \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@ozlabs.org \
--cc=sparclinux@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