linux/Documentation/devicetree/bindings
Geert Uytterhoeven eeedcea69e ARM: 8395/1: l2c: Add support for the "arm,shared-override" property
"CoreLink Level 2 Cache Controller L2C-310", p. 2-15, section 2.3.2
Shareable attribute" states:

    "The default behavior of the cache controller with respect to the
     shareable attribute is to transform Normal Memory Non-cacheable
     transactions into:
        - cacheable no allocate for reads
        - write through no write allocate for writes."

Depending on the system architecture, this may cause memory corruption
in the presence of bus mastering devices (e.g. OHCI). To avoid such
corruption, the default behavior can be disabled by setting the Shared
Override bit in the Auxiliary Control register.

Currently the Shared Override bit can be set only using C code:
  - by calling l2x0_init() directly, which is deprecated,
  - by setting/clearing the bit in the machine_desc.l2c_aux_val/mask
    fields, but using values differing from 0/~0 is also deprecated.

Hence add support for an "arm,shared-override" device tree property for
the l2c device node. By specifying this property, affected systems can
indicate that non-cacheable transactions must not be transformed.
Then, it's up to the OS to decide. The current behavior is to set the
"shared attribute override enable" bit, as there may exist kernel linear
mappings and cacheable aliases for the DMA buffers, even if CMA is
enabled.

See also commit 1a8e41cd67 ("ARM: 6395/1: VExpress: Set bit 22 in
the PL310 (cache controller) AuxCtlr register"):

    "Clearing bit 22 in the PL310 Auxiliary Control register (shared
     attribute override enable) has the side effect of transforming
     Normal Shared Non-cacheable reads into Cacheable no-allocate reads.

     Coherent DMA buffers in Linux always have a Cacheable alias via the
     kernel linear mapping and the processor can speculatively load
     cache lines into the PL310 controller. With bit 22 cleared,
     Non-cacheable reads would unexpectedly hit such cache lines leading
     to buffer corruption."

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2015-07-10 11:07:31 +01:00
..
arc ARCv2: [axs103] Support ARC SDP FPGA platform for HS38x cores 2015-06-25 06:00:20 +05:30
arm ARM: 8395/1: l2c: Add support for the "arm,shared-override" property 2015-07-10 11:07:31 +01:00
ata
bus
c6x
clock The changes to the common clock framework for 4.2 are dominated by new 2015-07-01 19:22:00 -07:00
cpufreq
cris
crypto crypto: marvell/cesa - add DT bindings documentation 2015-06-19 22:18:06 +08:00
devfreq/event
dma dmaengine updates for 4.2-rc1 2015-06-29 09:44:45 -07:00
drm
edac
extcon
fb
fpga
fuse
gpio Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus 2015-06-27 12:44:34 -07:00
gpu
h8300 h8300: kernel startup 2015-06-23 13:35:51 +09:00
hid
hsi
hwlock DT: hwspinlock: add the CSR atlas7 hwspinlock bindings document 2015-06-12 10:48:51 +03:00
hwmon
hwrng
i2c Merge branch 'i2c/for-4.2' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux 2015-06-25 18:42:39 -07:00
iio
input Staging driver patches for 4.2-rc1 2015-06-26 15:46:08 -07:00
interrupt-controller Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus 2015-06-27 12:44:34 -07:00
iommu
leds DT: aat1290: Document handling external strobe sources 2015-06-22 13:55:28 -07:00
lpddr2
mailbox
media
memory-controllers Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus 2015-06-27 12:44:34 -07:00
metag
mfd Devicetree changes for v4.2 2015-07-01 19:40:18 -07:00
mipi
mips DEVICETREE: Add bindings for the SoC of the ATH79 family 2015-06-21 21:54:01 +02:00
misc
mmc mmc: dt-bindings: add Mediatek MMC bindings 2015-06-16 09:48:53 +02:00
mtd
net net: mvneta: introduce compatible string "marvell, armada-xp-neta" 2015-06-30 09:37:09 -07:00
nios2
nvec
panel drm/panel: simple: Add display timing for HannStar HSD100PXN1 2015-06-12 16:40:35 +02:00
pci ARM: SoC: DT updates for v4.2 2015-06-26 11:43:59 -07:00
phy Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus 2015-06-27 12:44:34 -07:00
pinctrl Devicetree changes for v4.2 2015-07-01 19:40:18 -07:00
power USB patches for 4.2-rc1 2015-06-26 15:59:26 -07:00
power_supply
powerpc
pps
pwm
regmap
regulator Merge remote-tracking branches 'regulator/topic/of', 'regulator/topic/pwm', 'regulator/topic/qcom' and 'regulator/topic/soft-start' into regulator-next 2015-06-22 11:19:56 +01:00
remoteproc Documentation: dt: add bindings for TI Wakeup M3 processor 2015-06-17 09:57:46 +03:00
reserved-memory
reset
rng
rtc ARM: SoC: DT updates for v4.2 2015-06-26 11:43:59 -07:00
security/tpm
serial Omap driver changes for v4.2 to switch drivers over to Linux generic 2015-07-01 12:25:13 -07:00
serio
soc ARM: SoC: driver updates for v4.2 2015-06-26 11:54:29 -07:00
sound Merge remote-tracking branch 'asoc/topic/tas2552' into asoc-next 2015-06-22 10:24:35 +01:00
spi ARM: SoC: DT updates for v4.2 2015-06-26 11:43:59 -07:00
spmi
staging/iio/adc
thermal
timer ARM: SoC: DT updates for v4.2 2015-06-26 11:43:59 -07:00
ufs
usb ARM: SoC: late fixes and dependencies 2015-07-02 14:40:49 -07:00
video Merge branch 'drm-next' of git://people.freedesktop.org/~airlied/linux 2015-06-26 13:18:51 -07:00
virtio
w1
watchdog watchdog: omap: use watchdog_init_timeout instead of open coding it 2015-06-22 15:54:04 +02:00
x86
xillybus
ABI.txt
btmrvl.txt
chosen.txt
common-properties.txt
eeprom.txt
graph.txt
marvell.txt
open-pic.txt
resource-names.txt
submitting-patches.txt
unittest.txt
vendor-prefixes.txt Devicetree changes for v4.2 2015-07-01 19:40:18 -07:00
xilinx.txt