Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 137518
b: refs/heads/master
c: 663a830
h: refs/heads/master
v: v3
  • Loading branch information
Ben Dooks committed Mar 8, 2009
1 parent 33c60ec commit 052b0cf
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 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: 67c2addcb08df4827fbb7af88b57cce2ba71e34b
refs/heads/master: 663a83048c602d5176c23489b4e29598d753e42b
10 changes: 9 additions & 1 deletion trunk/arch/arm/plat-s3c/pm-check.c
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ static inline int in_region(void *ptr, int size, void *what, size_t whatsz)
}

/**
* s3c_pm_runcheck*() - helper to check a resource on restore.
* s3c_pm_runcheck() - helper to check a resource on restore.
* @res: The resource to check
* @vak: Pointer to list of CRC32 values to check.
*
Expand All @@ -166,9 +166,12 @@ static u32 *s3c_pm_runcheck(struct resource *res, u32 *val)
void *save_at = phys_to_virt(s3c_sleep_save_phys);
unsigned long addr;
unsigned long left;
void *stkpage;
void *ptr;
u32 calc;

stkpage = (void *)((u32)&calc & ~PAGE_MASK);

for (addr = res->start; addr < res->end;
addr += CHECK_CHUNKSIZE) {
left = res->end - addr;
Expand All @@ -178,6 +181,11 @@ static u32 *s3c_pm_runcheck(struct resource *res, u32 *val)

ptr = phys_to_virt(addr);

if (in_region(ptr, left, stkpage, 4096)) {
S3C_PMDBG("skipping %08lx, has stack in\n", addr);
goto skip_check;
}

if (in_region(ptr, left, crcs, crc_size)) {
S3C_PMDBG("skipping %08lx, has crc block in\n", addr);
goto skip_check;
Expand Down

0 comments on commit 052b0cf

Please sign in to comment.