aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBen Dooks <ben-linux@fluff.org>2008-12-11 19:24:36 -0500
committerBen Dooks <ben-linux@fluff.org>2009-03-08 08:38:06 -0400
commit663a83048c602d5176c23489b4e29598d753e42b (patch)
treee4c169121989ac343dfca035a467483a99565d3c
parent67c2addcb08df4827fbb7af88b57cce2ba71e34b (diff)
[ARM] S3C: Avoid checking the task stackpage in pm-check
When doing the CRC check of the memory, avoid checking the page that our stack is residing in as this changes during the execution of the suspend and resume. Signed-off-by: Ben Dooks <ben-linux@fluff.org>
-rw-r--r--arch/arm/plat-s3c/pm-check.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/arch/arm/plat-s3c/pm-check.c b/arch/arm/plat-s3c/pm-check.c
index b221470e3bfc..183f1304bf58 100644
--- a/arch/arm/plat-s3c/pm-check.c
+++ b/arch/arm/plat-s3c/pm-check.c
@@ -152,7 +152,7 @@ static inline int in_region(void *ptr, int size, void *what, size_t whatsz)
152} 152}
153 153
154/** 154/**
155 * s3c_pm_runcheck*() - helper to check a resource on restore. 155 * s3c_pm_runcheck() - helper to check a resource on restore.
156 * @res: The resource to check 156 * @res: The resource to check
157 * @vak: Pointer to list of CRC32 values to check. 157 * @vak: Pointer to list of CRC32 values to check.
158 * 158 *
@@ -166,9 +166,12 @@ static u32 *s3c_pm_runcheck(struct resource *res, u32 *val)
166 void *save_at = phys_to_virt(s3c_sleep_save_phys); 166 void *save_at = phys_to_virt(s3c_sleep_save_phys);
167 unsigned long addr; 167 unsigned long addr;
168 unsigned long left; 168 unsigned long left;
169 void *stkpage;
169 void *ptr; 170 void *ptr;
170 u32 calc; 171 u32 calc;
171 172
173 stkpage = (void *)((u32)&calc & ~PAGE_MASK);
174
172 for (addr = res->start; addr < res->end; 175 for (addr = res->start; addr < res->end;
173 addr += CHECK_CHUNKSIZE) { 176 addr += CHECK_CHUNKSIZE) {
174 left = res->end - addr; 177 left = res->end - addr;
@@ -178,6 +181,11 @@ static u32 *s3c_pm_runcheck(struct resource *res, u32 *val)
178 181
179 ptr = phys_to_virt(addr); 182 ptr = phys_to_virt(addr);
180 183
184 if (in_region(ptr, left, stkpage, 4096)) {
185 S3C_PMDBG("skipping %08lx, has stack in\n", addr);
186 goto skip_check;
187 }
188
181 if (in_region(ptr, left, crcs, crc_size)) { 189 if (in_region(ptr, left, crcs, crc_size)) {
182 S3C_PMDBG("skipping %08lx, has crc block in\n", addr); 190 S3C_PMDBG("skipping %08lx, has crc block in\n", addr);
183 goto skip_check; 191 goto skip_check;