From: Tejun Heo <tj@kernel.org> To: Nick Piggin <npiggin@suse.de>, Tony Luck <tony.luck@intel.com>, Fenghua Yu <fenghua.yu@intel.com>, linux-ia64 <linux-ia64@vger.kernel.org>, Ingo Molnar <mingo@redhat.com>, Rusty Russell <rusty@rustcorp.com.au>, Christoph Lameter <cl@linux-foundation.org>, linux-kernel@vger.kernel.org Cc: Tejun Heo <tj@kernel.org>, Nick Piggin <npiggin@suse.de>, Tony Luck <tony.luck@intel.com>, Fenghua Yu <fenghua.yu@intel.com>, linux-ia64 <linux-ia64@vger.kernel.org> Subject: [PATCH 1/4] vmalloc: rename local variables vmalloc_start and vmalloc_end Date: Tue, 22 Sep 2009 16:40:11 +0900 [thread overview] Message-ID: <1253605214-23210-2-git-send-email-tj@kernel.org> (raw) In-Reply-To: <1253605214-23210-1-git-send-email-tj@kernel.org> ia64 defines global vmalloc_end and VMALLOC_END as an alias to it, so using local variable named vmalloc_end and initializing it from VMALLOC_END makes it a bogus initialization like the following. const unsigned long vmalloc_end = vmalloc_end & ~(align - 1); Rename local variables vmalloc_start and vmalloc_end to vm_start and vm_end to avoid the collision. Signed-off-by: Tejun Heo <tj@kernel.org> Cc: Nick Piggin <npiggin@suse.de> Cc: Tony Luck <tony.luck@intel.com> Cc: Fenghua Yu <fenghua.yu@intel.com> Cc: linux-ia64 <linux-ia64@vger.kernel.org> --- mm/vmalloc.c | 16 ++++++++-------- 1 files changed, 8 insertions(+), 8 deletions(-) diff --git a/mm/vmalloc.c b/mm/vmalloc.c index 204b824..416e7fe 100644 --- a/mm/vmalloc.c +++ b/mm/vmalloc.c @@ -1901,13 +1901,13 @@ static unsigned long pvm_determine_end(struct vmap_area **pnext, struct vmap_area **pprev, unsigned long align) { - const unsigned long vmalloc_end = VMALLOC_END & ~(align - 1); + const unsigned long vm_end = VMALLOC_END & ~(align - 1); unsigned long addr; if (*pnext) - addr = min((*pnext)->va_start & ~(align - 1), vmalloc_end); + addr = min((*pnext)->va_start & ~(align - 1), vm_end); else - addr = vmalloc_end; + addr = vm_end; while (*pprev && (*pprev)->va_end > addr) { *pnext = *pprev; @@ -1946,8 +1946,8 @@ struct vm_struct **pcpu_get_vm_areas(const unsigned long *offsets, const size_t *sizes, int nr_vms, size_t align, gfp_t gfp_mask) { - const unsigned long vmalloc_start = ALIGN(VMALLOC_START, align); - const unsigned long vmalloc_end = VMALLOC_END & ~(align - 1); + const unsigned long vm_start = ALIGN(VMALLOC_START, align); + const unsigned long vm_end = VMALLOC_END & ~(align - 1); struct vmap_area **vas, *prev, *next; struct vm_struct **vms; int area, area2, last_area, term_area; @@ -1983,7 +1983,7 @@ struct vm_struct **pcpu_get_vm_areas(const unsigned long *offsets, } last_end = offsets[last_area] + sizes[last_area]; - if (vmalloc_end - vmalloc_start < last_end) { + if (vm_end - vm_start < last_end) { WARN_ON(true); return NULL; } @@ -2008,7 +2008,7 @@ retry: end = start + sizes[area]; if (!pvm_find_next_prev(vmap_area_pcpu_hole, &next, &prev)) { - base = vmalloc_end - last_end; + base = vm_end - last_end; goto found; } base = pvm_determine_end(&next, &prev, align) - end; @@ -2021,7 +2021,7 @@ retry: * base might have underflowed, add last_end before * comparing. */ - if (base + last_end < vmalloc_start + last_end) { + if (base + last_end < vm_start + last_end) { spin_unlock(&vmap_area_lock); if (!purged) { purge_vmap_area_lazy(); -- 1.6.4.2
WARNING: multiple messages have this Message-ID (diff)
From: Tejun Heo <tj@kernel.org> To: Nick Piggin <npiggin@suse.de>, Tony Luck <tony.luck@intel.com>, Fenghua Yu <fenghua.yu@intel.com>, linux-ia64 <linux-ia64@vger.kernel.org>, Ingo Molnar <mingo@redhat.com>, Rusty Russell <rusty@rustcorp.com.au>, Christoph Lameter <cl@linux-foundation.org>, linux-kernel@vger.kernel.org Cc: Tejun Heo <tj@kernel.org>, Nick Piggin <npiggin@suse.de>, Tony Luck <tony.luck@intel.com>, Fenghua Yu <fenghua.yu@intel.com>, linux-ia64 <linux-ia64@vger.kernel.org> Subject: [PATCH 1/4] vmalloc: rename local variables vmalloc_start and vmalloc_end Date: Tue, 22 Sep 2009 07:40:11 +0000 [thread overview] Message-ID: <1253605214-23210-2-git-send-email-tj@kernel.org> (raw) In-Reply-To: <1253605214-23210-1-git-send-email-tj@kernel.org> ia64 defines global vmalloc_end and VMALLOC_END as an alias to it, so using local variable named vmalloc_end and initializing it from VMALLOC_END makes it a bogus initialization like the following. const unsigned long vmalloc_end = vmalloc_end & ~(align - 1); Rename local variables vmalloc_start and vmalloc_end to vm_start and vm_end to avoid the collision. Signed-off-by: Tejun Heo <tj@kernel.org> Cc: Nick Piggin <npiggin@suse.de> Cc: Tony Luck <tony.luck@intel.com> Cc: Fenghua Yu <fenghua.yu@intel.com> Cc: linux-ia64 <linux-ia64@vger.kernel.org> --- mm/vmalloc.c | 16 ++++++++-------- 1 files changed, 8 insertions(+), 8 deletions(-) diff --git a/mm/vmalloc.c b/mm/vmalloc.c index 204b824..416e7fe 100644 --- a/mm/vmalloc.c +++ b/mm/vmalloc.c @@ -1901,13 +1901,13 @@ static unsigned long pvm_determine_end(struct vmap_area **pnext, struct vmap_area **pprev, unsigned long align) { - const unsigned long vmalloc_end = VMALLOC_END & ~(align - 1); + const unsigned long vm_end = VMALLOC_END & ~(align - 1); unsigned long addr; if (*pnext) - addr = min((*pnext)->va_start & ~(align - 1), vmalloc_end); + addr = min((*pnext)->va_start & ~(align - 1), vm_end); else - addr = vmalloc_end; + addr = vm_end; while (*pprev && (*pprev)->va_end > addr) { *pnext = *pprev; @@ -1946,8 +1946,8 @@ struct vm_struct **pcpu_get_vm_areas(const unsigned long *offsets, const size_t *sizes, int nr_vms, size_t align, gfp_t gfp_mask) { - const unsigned long vmalloc_start = ALIGN(VMALLOC_START, align); - const unsigned long vmalloc_end = VMALLOC_END & ~(align - 1); + const unsigned long vm_start = ALIGN(VMALLOC_START, align); + const unsigned long vm_end = VMALLOC_END & ~(align - 1); struct vmap_area **vas, *prev, *next; struct vm_struct **vms; int area, area2, last_area, term_area; @@ -1983,7 +1983,7 @@ struct vm_struct **pcpu_get_vm_areas(const unsigned long *offsets, } last_end = offsets[last_area] + sizes[last_area]; - if (vmalloc_end - vmalloc_start < last_end) { + if (vm_end - vm_start < last_end) { WARN_ON(true); return NULL; } @@ -2008,7 +2008,7 @@ retry: end = start + sizes[area]; if (!pvm_find_next_prev(vmap_area_pcpu_hole, &next, &prev)) { - base = vmalloc_end - last_end; + base = vm_end - last_end; goto found; } base = pvm_determine_end(&next, &prev, align) - end; @@ -2021,7 +2021,7 @@ retry: * base might have underflowed, add last_end before * comparing. */ - if (base + last_end < vmalloc_start + last_end) { + if (base + last_end < vm_start + last_end) { spin_unlock(&vmap_area_lock); if (!purged) { purge_vmap_area_lazy(); -- 1.6.4.2
next prev parent reply other threads:[~2009-09-22 7:41 UTC|newest] Thread overview: 72+ messages / expand[flat|nested] mbox.gz Atom feed top 2009-09-22 7:40 [PATCHSET percpu#for-next] percpu: convert ia64 to dynamic percpu and drop the old one Tejun Heo 2009-09-22 7:40 ` Tejun Heo 2009-09-22 7:40 ` Tejun Heo [this message] 2009-09-22 7:40 ` [PATCH 1/4] vmalloc: rename local variables vmalloc_start and vmalloc_end Tejun Heo 2009-09-22 22:52 ` Christoph Lameter 2009-09-22 22:52 ` [PATCH 1/4] vmalloc: rename local variables vmalloc_start and Christoph Lameter 2009-09-23 2:08 ` [PATCH 1/4] vmalloc: rename local variables vmalloc_start and vmalloc_end Tejun Heo 2009-09-23 2:08 ` [PATCH 1/4] vmalloc: rename local variables vmalloc_start and Tejun Heo 2009-09-22 7:40 ` [PATCH 2/4] ia64: allocate percpu area for cpu0 like percpu areas for other cpus Tejun Heo 2009-09-22 7:40 ` Tejun Heo 2009-09-22 22:59 ` Christoph Lameter 2009-09-22 22:59 ` [PATCH 2/4] ia64: allocate percpu area for cpu0 like percpu Christoph Lameter 2009-09-23 2:11 ` [PATCH 2/4] ia64: allocate percpu area for cpu0 like percpu areas for other cpus Tejun Heo 2009-09-23 2:11 ` [PATCH 2/4] ia64: allocate percpu area for cpu0 like percpu areas Tejun Heo 2009-09-23 13:44 ` [PATCH 2/4] ia64: allocate percpu area for cpu0 like percpu areas for other cpus Christoph Lameter 2009-09-23 13:44 ` [PATCH 2/4] ia64: allocate percpu area for cpu0 like percpu Christoph Lameter 2009-09-23 14:01 ` [PATCH 2/4] ia64: allocate percpu area for cpu0 like percpu areas for other cpus Tejun Heo 2009-09-23 14:01 ` [PATCH 2/4] ia64: allocate percpu area for cpu0 like percpu areas Tejun Heo 2009-09-23 17:17 ` [PATCH 2/4] ia64: allocate percpu area for cpu0 like percpu areas for other cpus Christoph Lameter 2009-09-23 17:17 ` [PATCH 2/4] ia64: allocate percpu area for cpu0 like percpu Christoph Lameter 2009-09-23 22:03 ` [PATCH 2/4] ia64: allocate percpu area for cpu0 like percpu areas for other cpus Tejun Heo 2009-09-23 22:03 ` [PATCH 2/4] ia64: allocate percpu area for cpu0 like percpu areas Tejun Heo 2009-09-24 7:36 ` [PATCH 2/4] ia64: allocate percpu area for cpu0 like percpu areas for other cpus Christoph Lameter 2009-09-24 7:36 ` [PATCH 2/4] ia64: allocate percpu area for cpu0 like percpu Christoph Lameter 2009-09-24 8:37 ` [PATCH 2/4] ia64: allocate percpu area for cpu0 like percpu areas for other cpus Tejun Heo 2009-09-24 8:37 ` [PATCH 2/4] ia64: allocate percpu area for cpu0 like percpu areas Tejun Heo 2009-09-28 15:12 ` [PATCH 2/4] ia64: allocate percpu area for cpu0 like percpu areas for other cpus Christoph Lameter 2009-09-28 15:12 ` [PATCH 2/4] ia64: allocate percpu area for cpu0 like percpu Christoph Lameter 2009-09-22 7:40 ` [PATCH 3/4] ia64: convert to dynamic percpu allocator Tejun Heo 2009-09-22 7:40 ` Tejun Heo 2009-09-22 7:40 ` [PATCH 4/4] percpu: kill legacy " Tejun Heo 2009-09-22 7:40 ` Tejun Heo 2009-09-22 8:16 ` [PATCHSET percpu#for-next] percpu: convert ia64 to dynamic percpu and drop the old one Ingo Molnar 2009-09-22 8:16 ` [PATCHSET percpu#for-next] percpu: convert ia64 to dynamic Ingo Molnar 2009-09-22 20:49 ` [PATCHSET percpu#for-next] percpu: convert ia64 to dynamic percpu and drop the old one Luck, Tony 2009-09-22 20:49 ` [PATCHSET percpu#for-next] percpu: convert ia64 to dynamic Luck, Tony 2009-09-22 21:10 ` [PATCHSET percpu#for-next] percpu: convert ia64 to dynamic percpu and drop the old one Luck, Tony 2009-09-22 21:10 ` [PATCHSET percpu#for-next] percpu: convert ia64 to dynamic Luck, Tony 2009-09-22 21:24 ` [PATCHSET percpu#for-next] percpu: convert ia64 to dynamic percpu and drop the old one Luck, Tony 2009-09-22 21:24 ` [PATCHSET percpu#for-next] percpu: convert ia64 to dynamic Luck, Tony 2009-09-22 21:50 ` [PATCHSET percpu#for-next] percpu: convert ia64 to dynamic percpu and drop the old one Tejun Heo 2009-09-22 21:50 ` [PATCHSET percpu#for-next] percpu: convert ia64 to dynamic percpu Tejun Heo 2009-09-23 5:06 [PATCHSET percpu#for-next] percpu: convert ia64 to dynamic percpu and drop the old one, take#2 Tejun Heo 2009-09-23 5:06 ` Tejun Heo 2009-09-23 5:06 ` [PATCH 1/5] ia64: don't alias VMALLOC_END to vmalloc_end Tejun Heo 2009-09-23 5:06 ` Tejun Heo 2009-09-23 5:06 ` [PATCH 2/5] ia64: initialize cpu maps early Tejun Heo 2009-09-23 5:06 ` Tejun Heo 2009-09-23 5:06 ` [PATCH 3/5] ia64: allocate percpu area for cpu0 like percpu areas for other cpus Tejun Heo 2009-09-23 5:06 ` Tejun Heo 2009-09-23 5:06 ` [PATCH 4/5] ia64: convert to dynamic percpu allocator Tejun Heo 2009-09-23 5:06 ` Tejun Heo 2009-09-23 5:06 ` [PATCH 5/5] percpu: kill legacy " Tejun Heo 2009-09-23 5:06 ` Tejun Heo 2009-09-23 11:10 ` Rusty Russell 2009-09-23 11:22 ` Rusty Russell 2009-09-29 0:25 ` [PATCHSET percpu#for-next] percpu: convert ia64 to dynamic percpu and drop the old one, take#2 Tejun Heo 2009-09-29 0:25 ` [PATCHSET percpu#for-next] percpu: convert ia64 to dynamic percpu Tejun Heo 2009-09-30 20:32 ` [PATCHSET percpu#for-next] percpu: convert ia64 to dynamic percpu and drop the old one, take#2 Luck, Tony 2009-09-30 20:32 ` [PATCHSET percpu#for-next] percpu: convert ia64 to dynamic Luck, Tony 2009-09-30 20:47 ` [PATCHSET percpu#for-next] percpu: convert ia64 to dynamic percpu and drop the old one, take#2 Christoph Lameter 2009-09-30 20:47 ` [PATCHSET percpu#for-next] percpu: convert ia64 to dynamic percpu Christoph Lameter 2009-09-30 22:05 ` [PATCHSET percpu#for-next] percpu: convert ia64 to dynamic percpu and drop the old one, take#2 Luck, Tony 2009-09-30 22:05 ` [PATCHSET percpu#for-next] percpu: convert ia64 to dynamic Luck, Tony 2009-09-30 23:06 ` [PATCHSET percpu#for-next] percpu: convert ia64 to dynamic percpu and drop the old one, take#2 Peter Chubb 2009-09-30 23:06 ` Peter Chubb 2009-09-30 23:49 ` Christoph Lameter 2009-09-30 23:49 ` [PATCHSET percpu#for-next] percpu: convert ia64 to dynamic percpu Christoph Lameter 2009-09-30 1:24 ` [PATCH REPOST 3/5] ia64: allocate percpu area for cpu0 like percpu areas for other cpus Tejun Heo 2009-09-30 1:24 ` [PATCH REPOST 3/5] ia64: allocate percpu area for cpu0 like percpu Tejun Heo 2009-10-02 5:11 ` [PATCHSET percpu#for-next] percpu: convert ia64 to dynamic percpu and drop the old one, take#2 Tejun Heo 2009-10-02 5:11 ` [PATCHSET percpu#for-next] percpu: convert ia64 to dynamic percpu Tejun Heo
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=1253605214-23210-2-git-send-email-tj@kernel.org \ --to=tj@kernel.org \ --cc=cl@linux-foundation.org \ --cc=fenghua.yu@intel.com \ --cc=linux-ia64@vger.kernel.org \ --cc=linux-kernel@vger.kernel.org \ --cc=mingo@redhat.com \ --cc=npiggin@suse.de \ --cc=rusty@rustcorp.com.au \ --cc=tony.luck@intel.com \ /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: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.