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: Isaac J. Manjarres <isaacm@codeaurora.org>
Signed-off-by: Blagovest Kolenichev <bkolenichev@codeaurora.org>
tirimbino
Perry Randise 6 years ago committed by Blagovest Kolenichev
parent 64ed090408
commit 7a61bf797d
  1. 4
      drivers/platform/msm/gsi/gsi.h
  2. 4
      drivers/platform/msm/gsi/gsi_emulation.h
  3. 3
      drivers/platform/msm/gsi/gsi_emulation_stubs.h
  4. 2
      drivers/platform/msm/ipa/ipa_v3/dump/ipa_reg_dump.h

@ -1,4 +1,4 @@
/* 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...) \

@ -1,4 +1,4 @@
/* 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,4 +1,4 @@
/* 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_) */

@ -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))

Loading…
Cancel
Save