Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 80531
b: refs/heads/master
c: 3c1df68
h: refs/heads/master
i:
  80529: c4e8064
  80527: 6d71f35
v: v3
  • Loading branch information
Arjan van de Ven authored and Ingo Molnar committed Jan 30, 2008
1 parent 51978a9 commit 122f862
Show file tree
Hide file tree
Showing 3 changed files with 9 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: 488fd99588bf23da951b524a806e44feaa1aa366
refs/heads/master: 3c1df68b848b39270752ff8d4b956cc4a4dce0f6
7 changes: 7 additions & 0 deletions trunk/arch/x86/mm/init_32.c
Original file line number Diff line number Diff line change
Expand Up @@ -780,6 +780,13 @@ void free_init_pages(char *what, unsigned long begin, unsigned long end)
{
unsigned long addr;

/*
* We just marked the kernel text read only above, now that
* we are going to free part of that, we need to make that
* writeable first.
*/
set_memory_rw(begin, (end - begin) >> PAGE_SHIFT);

for (addr = begin; addr < end; addr += PAGE_SIZE) {
ClearPageReserved(virt_to_page(addr));
init_page_count(virt_to_page(addr));
Expand Down
1 change: 1 addition & 0 deletions trunk/arch/x86/mm/init_64.c
Original file line number Diff line number Diff line change
Expand Up @@ -570,6 +570,7 @@ void free_init_pages(char *what, unsigned long begin, unsigned long end)
* 2Mb kernel mapping just for this debug feature.
*/
if (begin >= __START_KERNEL_map) {
set_memory_rw(begin, (end - begin)/PAGE_SIZE);
set_memory_np(begin, (end - begin)/PAGE_SIZE);
set_memory_nx(begin, (end - begin)/PAGE_SIZE);
}
Expand Down

0 comments on commit 122f862

Please sign in to comment.