Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7a61bf79 authored by Perry Randise's avatar Perry Randise Committed by Blagovest Kolenichev
Browse files

msm: ipa: Remove explicit usage of __iormb()



Explicit usage of the __iormb() is not advisable, as the
implementation of this function is architecture specific,
which will result in build failures if the signature of
__iormb() changes on a particular architecture.

Thus, replace explicit usages of readl_relaxed(), followed by
__iormb() with the readl() wrappers, as this achieves the
same effect, while abstracting the internal implementation
of __iormb().

Change-Id: I3adb188578a8ced24752ab7773b4b900a73020c5
Signed-off-by: default avatarIsaac J. Manjarres <isaacm@codeaurora.org>
Signed-off-by: default avatarBlagovest Kolenichev <bkolenichev@codeaurora.org>
parent 64ed0904
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
/* Copyright (c) 2015-2018, The Linux Foundation. All rights reserved.
/* Copyright (c) 2015-2019, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -32,7 +32,7 @@
#define GSI_EVT_RING_MAX  24
#define GSI_NO_EVT_ERINDEX 31

#define gsi_readl(c)	({ u32 __v = readl_relaxed(c); __iormb(); __v; })
#define gsi_readl(c)	(readl(c))
#define gsi_writel(v, c)	({ __iowmb(); writel_relaxed((v), (c)); })

#define GSI_IPC_LOGGING(buf, fmt, args...) \
+2 −2
Original line number Diff line number Diff line
/* Copyright (c) 2018, The Linux Foundation. All rights reserved.
/* Copyright (c) 2018-2019, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -18,7 +18,7 @@
# include "gsi_reg.h"
# include "gsi_emulation_stubs.h"

# define gsi_emu_readl(c)     ({ u32 __v = readl_relaxed(c); __iormb(); __v; })
# define gsi_emu_readl(c)     (readl(c))
# define gsi_emu_writel(v, c) ({ __iowmb(); writel_relaxed((v), (c)); })

# define CNTRLR_BASE 0
+1 −2
Original line number Diff line number Diff line
/* Copyright (c) 2018, The Linux Foundation. All rights reserved.
/* Copyright (c) 2018-2019, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -14,7 +14,6 @@
# define _GSI_EMULATION_STUBS_H_

# include <asm/barrier.h>
# define __iormb()       rmb() /* used in gsi.h */
# define __iowmb()       wmb() /* used in gsi.h */

#endif /* #if !defined(_GSI_EMULATION_STUBS_H_) */
+1 −1
Original line number Diff line number Diff line
@@ -25,7 +25,7 @@
 * are required by some of the macros and include files that follow...
 */
#define my_in_dword(addr) \
	({ u32 __v = readl_relaxed((addr)); __iormb(); __v; })
	(readl(addr))
#define in_dword(addr) \
	my_in_dword((u8 *) ipa3_ctx->reg_collection_base + \
		    (u32)(addr))