]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commitdiff
i2c: rcar: optimize cacheline to minimize HW race condition
authorWolfram Sang <wsa+renesas@sang-engineering.com>
Wed, 23 Dec 2020 17:21:52 +0000 (18:21 +0100)
committerSeth Forshee <seth.forshee@canonical.com>
Wed, 17 Mar 2021 18:39:50 +0000 (13:39 -0500)
BugLink: https://bugs.launchpad.net/bugs/1919492
[ Upstream commit 25c2e0fb5fefb8d7847214cf114d94c7aad8e9ce ]

'flags' and 'io' are needed first, so they should be at the beginning of
the private struct.

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Signed-off-by: Wolfram Sang <wsa@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
drivers/i2c/busses/i2c-rcar.c

index 824586d7ee565e934b97c26270ac8e188d267b38..ad6630e3cc7790d17204c3b529653789c67fccfa 100644 (file)
@@ -119,6 +119,7 @@ enum rcar_i2c_type {
 };
 
 struct rcar_i2c_priv {
+       u32 flags;
        void __iomem *io;
        struct i2c_adapter adap;
        struct i2c_msg *msg;
@@ -129,7 +130,6 @@ struct rcar_i2c_priv {
 
        int pos;
        u32 icccr;
-       u32 flags;
        u8 recovery_icmcr;      /* protected by adapter lock */
        enum rcar_i2c_type devtype;
        struct i2c_client *slave;