From: Tejun Heo <teheo@novell.com>
To: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Jan Beulich <JBeulich@novell.com>,
linux-kernel@vger.kernel.org, tony.luck@intel.com,
linux-mm@kvack.org, linux-ia64@vger.kernel.org
Subject: [PATCH] m68k: rename global variable vmalloc_end to m68k_vmalloc_end
Date: Wed, 09 Dec 2009 17:47:47 +0900 [thread overview]
Message-ID: <4B1F6433.3090006@novell.com> (raw)
In-Reply-To: <4B1E1B68.5050503@kernel.org>
On SUN3, m68k defines macro VMALLOC_END as unsigned long variable
vmalloc_end which is adjusted from mmu_emu_init(). This becomes
problematic if a local variables vmalloc_end is defined in some
function (not very unlikely) and VMALLOC_END is used in the function -
the function thinks its referencing the global VMALLOC_END value but
would be referencing its own local vmalloc_end variable.
Rename the global variable to m68k_vmlloc_end which is much less
likely to be used as local variable name.
Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Roman Zippel <zippel@linux-m68k.org>
---
This patch has been queued to percpu#for-linus. Thanks.
arch/m68k/include/asm/pgtable_mm.h | 4 ++--
arch/m68k/sun3/mmu_emu.c | 8 ++++----
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/arch/m68k/include/asm/pgtable_mm.h b/arch/m68k/include/asm/pgtable_mm.h
index fe60e1a..aca0e28 100644
--- a/arch/m68k/include/asm/pgtable_mm.h
+++ b/arch/m68k/include/asm/pgtable_mm.h
@@ -83,9 +83,9 @@
#define VMALLOC_START (((unsigned long) high_memory + VMALLOC_OFFSET) & ~(VMALLOC_OFFSET-1))
#define VMALLOC_END KMAP_START
#else
-extern unsigned long vmalloc_end;
+extern unsigned long m68k_vmalloc_end;
#define VMALLOC_START 0x0f800000
-#define VMALLOC_END vmalloc_end
+#define VMALLOC_END m68k_vmalloc_end
#endif /* CONFIG_SUN3 */
/* zero page used for uninitialized stuff */
diff --git a/arch/m68k/sun3/mmu_emu.c b/arch/m68k/sun3/mmu_emu.c
index 3cd1939..94f81ec 100644
--- a/arch/m68k/sun3/mmu_emu.c
+++ b/arch/m68k/sun3/mmu_emu.c
@@ -45,8 +45,8 @@
** Globals
*/
-unsigned long vmalloc_end;
-EXPORT_SYMBOL(vmalloc_end);
+unsigned long m68k_vmalloc_end;
+EXPORT_SYMBOL(m68k_vmalloc_end);
unsigned long pmeg_vaddr[PMEGS_NUM];
unsigned char pmeg_alloc[PMEGS_NUM];
@@ -172,8 +172,8 @@ void mmu_emu_init(unsigned long bootmem_end)
#endif
// the lowest mapping here is the end of our
// vmalloc region
- if(!vmalloc_end)
- vmalloc_end = seg;
+ if (!m68k_vmalloc_end)
+ m68k_vmalloc_end = seg;
// mark the segmap alloc'd, and reserve any
// of the first 0xbff pages the hardware is
--
1.6.4.2
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
prev parent reply other threads:[~2009-12-09 8:46 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-07 16:24 [PATCH] mm/vmalloc: don't use vmalloc_end Jan Beulich
2009-12-07 23:35 ` Andrew Morton
2009-12-08 0:33 ` Tejun Heo
2009-12-08 0:40 ` Tejun Heo
2009-12-08 6:57 ` [PATCH] m68k: don't alias VMALLOC_END to vmalloc_end Tejun Heo
2009-12-08 9:08 ` Geert Uytterhoeven
2009-12-08 0:50 ` [PATCH] mm/vmalloc: don't use vmalloc_end Matthew Wilcox
2009-12-08 1:03 ` Andrew Morton
2009-12-08 8:23 ` Jan Beulich
2009-12-08 8:29 ` Tejun Heo
2009-12-08 8:39 ` Jan Beulich
2009-12-08 8:57 ` Tejun Heo
2009-12-09 23:43 ` [PATCH -stable] vmalloc: conditionalize build of pcpu_get_vm_areas() Tejun Heo
2009-12-16 23:12 ` [stable] " Greg KH
2009-12-17 0:01 ` Tejun Heo
2009-12-17 0:02 ` Greg KH
2009-12-09 17:31 ` [PATCH] mm/vmalloc: don't use vmalloc_end Christoph Lameter
2009-12-09 17:48 ` Luck, Tony
2009-12-09 18:10 ` Mike Travis
2009-12-09 18:23 ` Christoph Lameter
2009-12-09 18:24 ` Christoph Lameter
2009-12-09 18:37 ` Mike Travis
2009-12-09 18:46 ` Christoph Lameter
2009-12-08 9:11 ` Geert Uytterhoeven
2009-12-08 9:24 ` Tejun Heo
2009-12-09 8:47 ` Tejun Heo [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=4B1F6433.3090006@novell.com \
--to=teheo@novell.com \
--cc=JBeulich@novell.com \
--cc=akpm@linux-foundation.org \
--cc=geert@linux-m68k.org \
--cc=linux-ia64@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--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: 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