aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/plat-s3c/pm-check.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/plat-s3c/pm-check.c')
-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;