Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 3249
b: refs/heads/master
c: 8f9bdf1
h: refs/heads/master
i:
  3247: db1ed53
v: v3
  • Loading branch information
Pavel Machek authored and Linus Torvalds committed Jun 25, 2005
1 parent 215098d commit 84a26dc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 18 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: 620b03276488c3cf103caf1e326bd21f00d3df84
refs/heads/master: 8f9bdf15c059c5d84db9c395705bf79b30762420
19 changes: 2 additions & 17 deletions trunk/kernel/power/swsusp.c
Original file line number Diff line number Diff line change
Expand Up @@ -929,21 +929,6 @@ int swsusp_resume(void)
return error;
}

/* More restore stuff */

/*
* Returns true if given address/order collides with any orig_address
*/
static int does_collide_order(unsigned long addr, int order)
{
int i;

for (i=0; i < (1<<order); i++)
if (!PageNosaveFree(virt_to_page(addr + i * PAGE_SIZE)))
return 1;
return 0;
}

/**
* On resume, for storing the PBE list and the image,
* we can only use memory pages that do not conflict with the pages
Expand Down Expand Up @@ -973,7 +958,7 @@ static unsigned long get_usable_page(unsigned gfp_mask)
unsigned long m;

m = get_zeroed_page(gfp_mask);
while (does_collide_order(m, 0)) {
while (!PageNosaveFree(virt_to_page(m))) {
eat_page((void *)m);
m = get_zeroed_page(gfp_mask);
if (!m)
Expand Down Expand Up @@ -1061,7 +1046,7 @@ static struct pbe * swsusp_pagedir_relocate(struct pbe *pblist)
/* Relocate colliding pages */

for_each_pb_page (pbpage, pblist) {
if (does_collide_order((unsigned long)pbpage, 0)) {
if (!PageNosaveFree(virt_to_page((unsigned long)pbpage))) {
m = (void *)get_usable_page(GFP_ATOMIC | __GFP_COLD);
if (!m) {
error = -ENOMEM;
Expand Down

0 comments on commit 84a26dc

Please sign in to comment.