samsung: snow: bitfix: Set interleaving based on corruption unit
authorDoug Anderson <dianders@chromium.org>
Fri, 9 Nov 2012 17:57:54 +0000 (09:57 -0800)
committerGerrit <chrome-bot@google.com>
Sat, 10 Nov 2012 02:10:39 +0000 (18:10 -0800)
We'd like to process all pages with the same destination one after
another.  Tell pm-check about this.

BUG=chrome-os-partner:15655
TEST=Timed before and after and saw 500-600ms speedup.
Before:
 [   24.709808] s3c_pm_check: Suspend memory scan took 3947182 usecs
 [   24.709808] s3c_pm_check: Resume memory scan took 1098695 usecs
 [   37.209790] s3c_pm_check: Suspend memory scan took 4020150 usecs
 [   37.209790] s3c_pm_check: Resume memory scan took 1099690 usecs
 [   51.569801] s3c_pm_check: Suspend memory scan took 4017198 usecs
 [   51.569801] s3c_pm_check: Resume memory scan took 1099794 usecs
After:
 [   33.923909] s3c_pm_check: Suspend memory scan took 3493848 usecs
 [   33.923909] s3c_pm_check: Resume memory scan took 1104389 usecs
 [   44.273912] s3c_pm_check: Suspend memory scan took 3444726 usecs
 [   44.273912] s3c_pm_check: Resume memory scan took 1104217 usecs
 [   57.753915] s3c_pm_check: Suspend memory scan took 3429833 usecs
 [   57.753915] s3c_pm_check: Resume memory scan took 1104522 usecs

Change-Id: Id57e5c76788ec1cfb4d09d1a99e6b2e10a56f184
Signed-off-by: Doug Anderson <dianders@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/37725
Reviewed-by: Jon Kliegman <kliegs@chromium.org>
arch/arm/mach-exynos/bitfix-snow.c

index 9d2fbea..1b2422d 100644 (file)
@@ -521,6 +521,12 @@ void bitfix_prepare(void)
         */
        s3c_pm_check_set_chunksize(CHUNK_SIZE);
 
+       /*
+        * We'd like pm-check to give us chunks in an order that such that we
+        * process all chunks with the same destination one right after another.
+        */
+       s3c_pm_check_set_interleave_bytes(1 << CU_OFFSET);
+
        /* Zero out the xor superchunk. */
        for (i = 0; i < UPPER_LOOPS; i++) {
                phys_addr_t base_addr = SDRAM_BASE + (i << UPPER_OFFSET);