login
Login
/
Register
Search
Search this site:
Forums
News
Blogs
Features
Site
Home
»
Mailing list archives
»
linux-kernel
»
2008
»
February
»
20
Re: [PATCH] [LMB]: Fix lmb_add_region if region should be added at the head
view
thread
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
[view in full thread]
From: Kumar Gala
Subject:
Re: [PATCH] [LMB]: Fix lmb_add_region if region should be added at the head
Date: Tuesday, February 19, 2008 - 10:16 pm
On Feb 19, 2008, at 10:45 PM, David Miller wrote:
quoted text
> From: Kumar Gala <galak@kernel.crashing.org> > Date: Tue, 19 Feb 2008 22:27:48 -0600 (CST) > >> 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> > ... >> @@ -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; > > Are you sure this is sufficient? > > It seems to me, to handle this properly, you'll need to handle > the case where the lower addressed entry you are inserting is > not contiguous with the existing entry 0. > > Therefore, you need to move all existing entries up a slot, > then you can set the 0 entry to 'base' and 'size'.
The for loop above the code I added will move all the existing slots up one. Its just the tail cleanup we are missing. - k --
unsubscribe notice
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to
majordomo@vger.kernel.org
More majordomo info at
http://vger.kernel.org/majordomo-info.html
Please read the FAQ at
http://www.tux.org/lkml/
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
Messages in current thread:
[PATCH] [LMB]: Fix lmb_add_region if region should be adde ...
, Kumar Gala
, (Tue Feb 19, 9:27 pm)
Re: [PATCH] [LMB]: Fix lmb_add_region if region should be ...
, David Miller
, (Tue Feb 19, 9:45 pm)
Re: [PATCH] [LMB]: Fix lmb_add_region if region should be ...
, Kumar Gala
, (Tue Feb 19, 10:16 pm)
Re: [PATCH] [LMB]: Fix lmb_add_region if region should be ...
, David Miller
, (Tue Feb 19, 10:26 pm)
Re: [PATCH] [LMB]: Fix lmb_add_region if region should be ...
, Kumar Gala
, (Tue Feb 19, 10:29 pm)
Navigation
Create content
Mailing list archives
Recent posts
Popular discussions
linux-kernel
:
Ingo Molnar
Re: [patch 00/13] Syslets, "Threadlets", generic AIO support, v3
Vivek Goyal
[PATCH] x86_64: Display more intutive error message if kernel is not 2MB aligned
Andi Kleen
[PATCH] [0/35] Some x86 2.6.22 candidate patches for review
Andrew Morton
Re: [PATCH] lazy freeing of memory through MADV_FREE 2/2
Peter Zijlstra
Re: [RFC PATCH 1/2] Marker probes in futex.c
git
:
Felipe Contreras
Re: [kernel.org users] [RFD] On deprecating "git-foo" for builtins
Johannes Schindelin
[PATCH] fetch: refuse to fetch into the current branch in a non-bare repository
Johannes Schindelin
Re: [PATCH] Fix install-doc-quick target
Nicolas Pitre
Re: About git and the use of SHA-1
Alex Riesen
Re: git exclude patterns for directory
git-commits-head
:
Linux Kernel Mailing List
sh: Fix compile error by operands(mov.l) in sh3/entry.S
Linux Kernel Mailing List
New device ID for sc92031 [1088:2031]
Linux Kernel Mailing List
powerpc/kexec: Add support for FSL-BookE
Linux Kernel Mailing List
[ARM] 5388/1: Add hwcap bits for VFPv3 and VFPv3D16
Linux Kernel Mailing List
drivers/acpi: use kasprintf
linux-netdev
:
David Dillow
Re: [PATCH 2.6.30-rc4] r8169: avoid losing MSI interrupts
Andi Kleen
Re: RFC: Nagle latency tuning
Paul E. McKenney
Re: [PATCH 1/3] rcu: Introduce hlist_nulls variant of hlist
Russell King
Re: [BUG] New Kernel Bugs
David Miller
Re: [PATCH 2/3] [TCP]: Comment fastpath_cnt_hint off-by-one trap
openbsd-misc
:
Andres Salazar
About priorities in /etc/resolv.conf
Rob Shepherd
x86 hardware for router system
Henning Brauer
Re: Sun Blade 1000?
Mitja Muženič
Re: isakmpd -- NCP IPsec client: peer proposed invalid phase 2 IDs
Damien Miller
Re: Patching a SSH 'Weakness'
Colocation donated by:
Syndicate