Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 80490
b: refs/heads/master
c: ace63e3
h: refs/heads/master
v: v3
  • Loading branch information
Ingo Molnar committed Jan 30, 2008
1 parent 63869b3 commit 59153e3
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: f5a50ce1bf53a07cb7d0bab1a87e62cc4f34f0ab
refs/heads/master: ace63e3743ae59fc0cce48450bd2e410776b4148
30 changes: 30 additions & 0 deletions trunk/arch/x86/mm/pageattr_64.c
Original file line number Diff line number Diff line change
Expand Up @@ -260,3 +260,33 @@ void global_flush_tlb(void)
on_each_cpu(flush_kernel_map, NULL, 1, 1);
}
EXPORT_SYMBOL(global_flush_tlb);

#ifdef CONFIG_DEBUG_PAGEALLOC
void kernel_map_pages(struct page *page, int numpages, int enable)
{
if (PageHighMem(page))
return;
if (!enable) {
debug_check_no_locks_freed(page_address(page),
numpages * PAGE_SIZE);
}

/*
* If page allocator is not up yet then do not call c_p_a():
*/
if (!debug_pagealloc_enabled)
return;

/*
* the return value is ignored - the calls cannot fail,
* large pages are disabled at boot time.
*/
change_page_attr(page, numpages, enable ? PAGE_KERNEL : __pgprot(0));

/*
* we should perform an IPI and flush all tlbs,
* but that can deadlock->flush only current cpu.
*/
__flush_tlb_all();
}
#endif

0 comments on commit 59153e3

Please sign in to comment.