Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 338785
b: refs/heads/master
c: 81df9bf
h: refs/heads/master
i:
  338783: aa1f13c
v: v3
  • Loading branch information
Joonsoo Kim authored and Linus Torvalds committed Dec 12, 2012
1 parent 52d68a9 commit 2b1803b
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 17 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: e9b2e78c6a4247b1bb3e89c61e7d73636d2e48d1
refs/heads/master: 81df9bff2609f07cef4690ac2ebda1611b55b05a
4 changes: 2 additions & 2 deletions trunk/arch/powerpc/platforms/cell/celleb_pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -401,11 +401,11 @@ static int __init celleb_setup_fake_pci_device(struct device_node *node,
} else {
if (config && *config) {
size = 256;
free_bootmem((unsigned long)(*config), size);
free_bootmem(__pa(*config), size);
}
if (res && *res) {
size = sizeof(struct celleb_pci_resource);
free_bootmem((unsigned long)(*res), size);
free_bootmem(__pa(*res), size);
}
}

Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/macintosh/smu.c
Original file line number Diff line number Diff line change
Expand Up @@ -565,7 +565,7 @@ int __init smu_init (void)
fail_db_node:
of_node_put(smu->db_node);
fail_bootmem:
free_bootmem((unsigned long)smu, sizeof(struct smu_device));
free_bootmem(__pa(smu), sizeof(struct smu_device));
smu = NULL;
fail_np:
of_node_put(np);
Expand Down
4 changes: 2 additions & 2 deletions trunk/include/linux/bootmem.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ extern unsigned long free_all_bootmem(void);
extern void free_bootmem_node(pg_data_t *pgdat,
unsigned long addr,
unsigned long size);
extern void free_bootmem(unsigned long addr, unsigned long size);
extern void free_bootmem_late(unsigned long addr, unsigned long size);
extern void free_bootmem(unsigned long physaddr, unsigned long size);
extern void free_bootmem_late(unsigned long physaddr, unsigned long size);

/*
* Flags for reserve_bootmem (also if CONFIG_HAVE_ARCH_BOOTMEM_NODE,
Expand Down
2 changes: 1 addition & 1 deletion trunk/lib/cpumask.c
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,6 @@ EXPORT_SYMBOL(free_cpumask_var);
*/
void __init free_bootmem_cpumask_var(cpumask_var_t mask)
{
free_bootmem((unsigned long)mask, cpumask_size());
free_bootmem(__pa(mask), cpumask_size());
}
#endif
20 changes: 10 additions & 10 deletions trunk/mm/bootmem.c
Original file line number Diff line number Diff line change
Expand Up @@ -147,21 +147,21 @@ unsigned long __init init_bootmem(unsigned long start, unsigned long pages)

/*
* free_bootmem_late - free bootmem pages directly to page allocator
* @addr: starting address of the range
* @addr: starting physical address of the range
* @size: size of the range in bytes
*
* This is only useful when the bootmem allocator has already been torn
* down, but we are still initializing the system. Pages are given directly
* to the page allocator, no bootmem metadata is updated because it is gone.
*/
void __init free_bootmem_late(unsigned long addr, unsigned long size)
void __init free_bootmem_late(unsigned long physaddr, unsigned long size)
{
unsigned long cursor, end;

kmemleak_free_part(__va(addr), size);
kmemleak_free_part(__va(physaddr), size);

cursor = PFN_UP(addr);
end = PFN_DOWN(addr + size);
cursor = PFN_UP(physaddr);
end = PFN_DOWN(physaddr + size);

for (; cursor < end; cursor++) {
__free_pages_bootmem(pfn_to_page(cursor), 0);
Expand Down Expand Up @@ -377,21 +377,21 @@ void __init free_bootmem_node(pg_data_t *pgdat, unsigned long physaddr,

/**
* free_bootmem - mark a page range as usable
* @addr: starting address of the range
* @addr: starting physical address of the range
* @size: size of the range in bytes
*
* Partial pages will be considered reserved and left as they are.
*
* The range must be contiguous but may span node boundaries.
*/
void __init free_bootmem(unsigned long addr, unsigned long size)
void __init free_bootmem(unsigned long physaddr, unsigned long size)
{
unsigned long start, end;

kmemleak_free_part(__va(addr), size);
kmemleak_free_part(__va(physaddr), size);

start = PFN_UP(addr);
end = PFN_DOWN(addr + size);
start = PFN_UP(physaddr);
end = PFN_DOWN(physaddr + size);

mark_bootmem(start, end, 0, 0);
}
Expand Down

0 comments on commit 2b1803b

Please sign in to comment.