svn commit: r259313 - stable/10/sys/arm/arm
Ian Lepore
ian at FreeBSD.org
Fri Dec 13 17:02:09 UTC 2013
Author: ian
Date: Fri Dec 13 17:02:09 2013
New Revision: 259313
URL: http://svnweb.freebsd.org/changeset/base/259313
Log:
MFC r256647:
Invalidate the entire L2 cache before enabling it. Say whether it
has been enabled or disabled.
Modified:
stable/10/sys/arm/arm/pl310.c
Directory Properties:
stable/10/ (props changed)
Modified: stable/10/sys/arm/arm/pl310.c
==============================================================================
--- stable/10/sys/arm/arm/pl310.c Fri Dec 13 17:00:25 2013 (r259312)
+++ stable/10/sys/arm/arm/pl310.c Fri Dec 13 17:02:09 2013 (r259313)
@@ -341,8 +341,13 @@ pl310_attach(device_t dev)
ctrl_value = pl310_read4(sc, PL310_CTRL);
if (sc->sc_enabled && !(ctrl_value & CTRL_ENABLED)) {
+ /* invalidate current content */
+ pl310_write4(pl310_softc, PL310_INV_WAY, 0xffff);
+ pl310_wait_background_op(PL310_INV_WAY, 0xffff);
+
/* Enable the L2 cache if disabled */
platform_pl310_write_ctrl(sc, CTRL_ENABLED);
+ device_printf(dev, "L2 Cache enabled\n");
}
if (!sc->sc_enabled && (ctrl_value & CTRL_ENABLED)) {
@@ -375,6 +380,7 @@ pl310_attach(device_t dev)
EVENT_COUNTER_CTRL_C0_RESET |
EVENT_COUNTER_CTRL_C1_RESET);
+ device_printf(dev, "L2 Cache disabled\n");
}
if (sc->sc_enabled)
More information about the svn-src-stable-10
mailing list