ARM: l2c: print a warning with L2C-310 caches if the cache size is modified
authorRussell King <rmk+kernel@arm.linux.org.uk>
Wed, 19 Mar 2014 14:07:12 +0000 (14:07 +0000)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Thu, 29 May 2014 23:50:37 +0000 (00:50 +0100)
As we have now removed all instances of the L2C-310 having its cache
size "modified" via platform/SoC code, discourage new cases showing
up by printing a warning.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
arch/arm/mm/cache-l2x0.c

index ae6e71b3295cb791d7c4fb763851e376fd1694ca..415efc3bee0d496814ad2677649821dea57de16c 100644 (file)
@@ -765,6 +765,8 @@ static void __init __l2c_init(const struct l2c_init_data *data,
        /* Determine the number of ways */
        switch (cache_id & L2X0_CACHE_ID_PART_MASK) {
        case L2X0_CACHE_ID_PART_L310:
+               if ((aux_val | ~aux_mask) & (L2C_AUX_CTRL_WAY_SIZE_MASK | L310_AUX_CTRL_ASSOCIATIVITY_16))
+                       pr_warn("L2C: DT/platform tries to modify or specify cache size\n");
                if (aux & (1 << 16))
                        ways = 16;
                else
This page took 0.027416 seconds and 5 git commands to generate.