Skip to content
Commit 3843384a authored by Oskar Schirmer's avatar Oskar Schirmer Committed by Dmitry Torokhov
Browse files

Input: ad7877 - keep dma rx buffers in seperate cache lines



With dma based spi transmission, data corruption is observed
occasionally. With dma buffers located right next to msg and
xfer fields, cache lines correctly flushed in preparation for
dma usage may be polluted again when writing to fields in the
same cache line.

Make sure cache fields used with dma do not share cache lines
with fields changed during dma handling. As both fields are part
of a struct that is allocated via kzalloc, thus cache aligned,
moving the fields to the 1st position and insert padding for
alignment does the job.

Signed-off-by: default avatarOskar Schirmer <os@emlix.com>
Signed-off-by: default avatarDaniel Glöckner <dg@emlix.com>
Signed-off-by: default avatarOliver Schneidewind <osw@emlix.com>
Signed-off-by: default avatarJohannes Weiner <jw@emlix.com>
Acked-by: default avatarMike Frysinger <vapier@gentoo.org>
[dtor@mail.ru - changed to use ___cacheline_aligned as suggested
 by akpm]
Signed-off-by: default avatarDmitry Torokhov <dtor@mail.ru>
parent ef110b24
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment