summaryrefslogtreecommitdiffstats
path: root/sys/arm/include
diff options
context:
space:
mode:
authorzbb <zbb@FreeBSD.org>2017-06-20 11:11:42 +0000
committerLuiz Souza <luiz@netgate.com>2017-09-06 13:45:06 -0500
commit4720534d16dec2312520ee2f2430aff2ac2bc3d7 (patch)
tree02e53a414670fa7194d483d9376fe4eb81d0b1a6 /sys/arm/include
parent4dfd2a820d8dac06559f5417c744fbe6f7710c79 (diff)
downloadFreeBSD-src-4720534d16dec2312520ee2f2430aff2ac2bc3d7.zip
FreeBSD-src-4720534d16dec2312520ee2f2430aff2ac2bc3d7.tar.gz
Disable PL310 outer cache sync for IO coherent platforms
When a PL310 cache is used on a system that provides hardware coherency, the outer cache sync operation is useless, and can be skipped. Moreover, on some systems, it is harmful as it causes deadlocks between the Marvell coherency mechanism, the Marvell PCIe or Crypto controllers and the Cortex-A9. To avoid this, this commit introduces a new Device Tree property 'arm,io-coherent' for the L2 cache controller node, valid only for the PL310 cache. It identifies the usage of the PL310 cache in an I/O coherent configuration. Internally, it makes the driver disable the outer cache sync operation. Note, that other outer-cache operations are not removed, as they may be needed for certain situations, such as booting secondary CPUs. Moreover, in order to enable IO coherent operation, the decision whether to use L2 cache maintenance callbacks is done in busdma layer, which was enabled in one of the previous commits. Submitted by: Michal Mazur <mkm@semihalf.com> Marcin Wojtas <mw@semihalf.com> Reviewed by: mmel Obtained from: Semihalf Differential revision: https://reviews.freebsd.org/D11245 (cherry picked from commit d4d94445f1fd0de66e64fd589865b027eab17726)
Diffstat (limited to 'sys/arm/include')
-rw-r--r--sys/arm/include/pl310.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/arm/include/pl310.h b/sys/arm/include/pl310.h
index 5fcb7af..6160135 100644
--- a/sys/arm/include/pl310.h
+++ b/sys/arm/include/pl310.h
@@ -148,6 +148,7 @@ struct pl310_softc {
struct mtx sc_mtx;
u_int sc_rtl_revision;
struct intr_config_hook *sc_ich;
+ boolean_t sc_io_coherent;
};
/**
OpenPOWER on IntegriCloud