samsung: snow: bitfix: Don't bail if we can't recover unused memory
authorDoug Anderson <dianders@chromium.org>
Mon, 18 Mar 2013 23:12:42 +0000 (16:12 -0700)
committerChromeBot <chrome-bot@google.com>
Wed, 20 Mar 2013 21:17:46 +0000 (14:17 -0700)
commiteacd8eecaf64f4a04feecda2bc988094be2d0eaf
treebb263a5f10f6257594dfb75561b3eb1f8dd867a6
parentf9967ea7df494ed04f2ac5c3cceffa5e0033690d
samsung: snow: bitfix: Don't bail if we can't recover unused memory

The bitfix code has the requirement that you can only recover an
entire 8K chunk of memory at a time, even though memory can be
"skipped" (not processed by bitfix) in 4K chunks.  If we ever detect
corruption in a 8K chunk that contained skipped pages then we'd bail
and reboot.

The original concept of "skipping" pages was there for sacred areas of
memory: the stack, console buffer, MMU structures, etc.  For these
areas of memory the above logic makes a lot of sense.  Dealing with a
page at a time meant that we could still _detect_ corruption on that
page.  ...and we could even fix it!  ...but since evidence suggested
that if one half of a chunk was corrupted that there's a good chance
of corruption in the other half, we chose to bail and reboot.

The above logic didn't take into account that we added another reason
for skipping a page: if it was unused.  For part of a chunk is unused
then we should just recover the half of the chunk that we care about
and not worry about corruption in the other half.

BUG=chromium-os:39522
TEST=suspend_stress_test

Change-Id: I57ad2fe24755e8867fdd4a5b729521b0ddb1d5fc
Signed-off-by: Doug Anderson <dianders@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/45807
Reviewed-by: Olof Johansson <olofj@chromium.org>
arch/arm/mach-exynos/bitfix-snow.c
arch/arm/plat-samsung/pm-check.c