Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 85856
b: refs/heads/master
c: 0f78e75
h: refs/heads/master
v: v3
  • Loading branch information
David S. Miller committed Feb 13, 2008
1 parent 4078436 commit 7cdf406
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 48 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: b83ebf566b64d3702c6b50dbee2052623cd55ce5
refs/heads/master: 0f78e7542e94e8f64ed393289d7bfac032634620
4 changes: 0 additions & 4 deletions trunk/arch/sparc64/Kconfig.debug
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,6 @@ config STACK_DEBUG
depends on DEBUG_KERNEL
bool "Stack Overflow Detection Support"

config DEBUG_BOOTMEM
depends on DEBUG_KERNEL
bool "Debug BOOTMEM initialization"

config DEBUG_PAGEALLOC
bool "Debug page memory allocations"
depends on DEBUG_KERNEL && !HIBERNATION
Expand Down
1 change: 0 additions & 1 deletion trunk/arch/sparc64/defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -1396,7 +1396,6 @@ CONFIG_FORCED_INLINING=y
# CONFIG_DEBUG_STACK_USAGE is not set
# CONFIG_DEBUG_DCFLUSH is not set
# CONFIG_STACK_DEBUG is not set
# CONFIG_DEBUG_BOOTMEM is not set
# CONFIG_DEBUG_PAGEALLOC is not set

#
Expand Down
43 changes: 1 addition & 42 deletions trunk/arch/sparc64/mm/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -739,11 +739,6 @@ static unsigned long __init choose_bootmap_pfn(unsigned long start_pfn,
avoid_end = PAGE_ALIGN(initrd_end);
#endif

#ifdef CONFIG_DEBUG_BOOTMEM
prom_printf("choose_bootmap_pfn: kern[%lx:%lx] avoid[%lx:%lx]\n",
kern_base, PAGE_ALIGN(kern_base + kern_size),
avoid_start, avoid_end);
#endif
for (i = 0; i < pavail_ents; i++) {
unsigned long start, end;

Expand Down Expand Up @@ -777,10 +772,6 @@ static unsigned long __init choose_bootmap_pfn(unsigned long start_pfn,
}

/* OK, it doesn't overlap anything, use it. */
#ifdef CONFIG_DEBUG_BOOTMEM
prom_printf("choose_bootmap_pfn: Using %lx [%lx]\n",
start >> PAGE_SHIFT, start);
#endif
return start >> PAGE_SHIFT;
}
}
Expand Down Expand Up @@ -920,10 +911,6 @@ static unsigned long __init bootmem_init(unsigned long *pages_avail,
unsigned long bootmap_pfn, bytes_avail, size;
int i;

#ifdef CONFIG_DEBUG_BOOTMEM
prom_printf("bootmem_init: Scan pavail, ");
#endif

bytes_avail = 0UL;
for (i = 0; i < pavail_ents; i++) {
end_of_phys_memory = pavail[i].phys_addr +
Expand Down Expand Up @@ -970,43 +957,27 @@ static unsigned long __init bootmem_init(unsigned long *pages_avail,

bootmap_pfn = choose_bootmap_pfn(min_low_pfn, end_pfn);

#ifdef CONFIG_DEBUG_BOOTMEM
prom_printf("init_bootmem(min[%lx], bootmap[%lx], max[%lx])\n",
min_low_pfn, bootmap_pfn, max_low_pfn);
#endif
bootmap_size = init_bootmem_node(NODE_DATA(0), bootmap_pfn,
min_low_pfn, end_pfn);

/* Now register the available physical memory with the
* allocator.
*/
for (i = 0; i < pavail_ents; i++) {
#ifdef CONFIG_DEBUG_BOOTMEM
prom_printf("free_bootmem(pavail:%d): base[%lx] size[%lx]\n",
i, pavail[i].phys_addr, pavail[i].reg_size);
#endif
for (i = 0; i < pavail_ents; i++)
free_bootmem(pavail[i].phys_addr, pavail[i].reg_size);
}

#ifdef CONFIG_BLK_DEV_INITRD
if (initrd_start) {
size = initrd_end - initrd_start;

/* Reserve the initrd image area. */
#ifdef CONFIG_DEBUG_BOOTMEM
prom_printf("reserve_bootmem(initrd): base[%llx] size[%lx]\n",
initrd_start, initrd_end);
#endif
reserve_bootmem(initrd_start, size, BOOTMEM_DEFAULT);

initrd_start += PAGE_OFFSET;
initrd_end += PAGE_OFFSET;
}
#endif
/* Reserve the kernel text/data/bss. */
#ifdef CONFIG_DEBUG_BOOTMEM
prom_printf("reserve_bootmem(kernel): base[%lx] size[%lx]\n", kern_base, kern_size);
#endif
reserve_bootmem(kern_base, kern_size, BOOTMEM_DEFAULT);
*pages_avail -= PAGE_ALIGN(kern_size) >> PAGE_SHIFT;

Expand All @@ -1020,21 +991,13 @@ static unsigned long __init bootmem_init(unsigned long *pages_avail,
* in free_all_bootmem.
*/
size = bootmap_size;
#ifdef CONFIG_DEBUG_BOOTMEM
prom_printf("reserve_bootmem(bootmap): base[%lx] size[%lx]\n",
(bootmap_pfn << PAGE_SHIFT), size);
#endif
reserve_bootmem((bootmap_pfn << PAGE_SHIFT), size, BOOTMEM_DEFAULT);

for (i = 0; i < pavail_ents; i++) {
unsigned long start_pfn, end_pfn;

start_pfn = pavail[i].phys_addr >> PAGE_SHIFT;
end_pfn = (start_pfn + (pavail[i].reg_size >> PAGE_SHIFT));
#ifdef CONFIG_DEBUG_BOOTMEM
prom_printf("memory_present(0, %lx, %lx)\n",
start_pfn, end_pfn);
#endif
memory_present(0, start_pfn, end_pfn);
}

Expand Down Expand Up @@ -1549,10 +1512,6 @@ void __init mem_init(void)

high_memory = __va(last_valid_pfn << PAGE_SHIFT);

#ifdef CONFIG_DEBUG_BOOTMEM
prom_printf("mem_init: Calling free_all_bootmem().\n");
#endif

/* We subtract one to account for the mem_map_zero page
* allocated below.
*/
Expand Down

0 comments on commit 7cdf406

Please sign in to comment.