[#3957] bootmem code shadows global max_pfn
Submitted By: Mike Frysinger
Open Date
2008-03-05 14:25:23 Close Date
2008-03-17 18:47:35
Priority:
Medium Assignee:
Yi Li
Status:
Closed Fixed In Release:
N/A
Found In Release:
N/A Release:
Category:
N/A Board:
N/A
Processor:
N/A Silicon Revision:
Is this bug repeatable?:
Yes Resolution:
Fixed
Uboot version or rev.:
Toolchain version or rev.:
App binary format:
N/A
Summary: bootmem code shadows global max_pfn
Details:
we have a local variable "max_pfn":
arch/blackfin/kernel/setup.c: unsigned long min_pfn, max_pfn;
but common linux code has:
include/linux/bootmem.h:extern unsigned long max_pfn;
something is out of sync ...
Follow-ups
--- Yi Li 2008-03-06 02:51:21
Yes. We need to find a place to initialize these globals.
Searched linux-2.6.24.3 source tree, found that there a few places in common
code uses the global max_pfn:
drivers/base/platform.c
block/ll_rw_blk.c
drivers/lguest/lguest_devices.c
As the notes in arch/arm/mm/init.c: bootmem_init() mentions:
""This doesn't seem to be used by the Linux memory manager anymore,
but is used by ll_rw_block".
--- Yi Li 2008-03-13 03:05:42
There are a number of MM related globals:
initialized in arch/blackfin/kernel/setup.c:
linux/bootmem.h: max_pfn, min_low_pfn, max_low_pfn
initialized in arch/blackfin/mm/init.c:
linux/mm.h: max_mapnr, num_physpages, high_memory
linux/swap.h: totalram_pages
It is rather confusing to understand what they exactly mean.
Files
Changes
Commits
Dependencies
Duplicates
Associations
Tags
File Name File Type File Size Posted By
No Files Were Found