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

Commit fa14ea66 authored by Ghanim Fodi's avatar Ghanim Fodi Committed by Ivaylo Georgiev
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: Ic19aeb4955e5e8f1bc828e75902acf981a8ce68b
Signed-off-by: default avatarIvaylo Georgiev <irgeorgiev@codeaurora.org>
Signed-off-by: default avatarGhanim Fodi <gfodi@codeaurora.org>
parent 0e8d8e60
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -29,7 +29,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
/* SPDX-License-Identifier: GPL-2.0 */
/*
 * Copyright (c) 2018, The Linux Foundation. All rights reserved.
 * Copyright (c) 2018-2019, The Linux Foundation. All rights reserved.
 */

#if !defined(_GSI_EMULATION_H_)
@@ -12,7 +12,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
/* SPDX-License-Identifier: GPL-2.0 */
/*
 * Copyright (c) 2018, The Linux Foundation. All rights reserved.
 * Copyright (c) 2018-2019, The Linux Foundation. All rights reserved.
 */

#if !defined(_GSI_EMULATION_STUBS_H_)
# 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
@@ -18,7 +18,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 my_out_dword(addr, val) \
	({ __iowmb(); writel_relaxed((val), (addr)); })