Commit 321927db authored by Du, Changbin's avatar Du, Changbin Committed by Zhenyu Wang

drm/i915/gvt: fix sparse warnings on different address spaces

Add proper __iomem annotation for pointers obtained via ioremap().
Signed-off-by: default avatarDu, Changbin <changbin.du@intel.com>
Signed-off-by: default avatarZhenyu Wang <zhenyuw@linux.intel.com>
parent 0fac21e7
......@@ -51,7 +51,7 @@ struct gvt_firmware_header {
#define RD(offset) (readl(mmio + offset.reg))
#define WR(v, offset) (writel(v, mmio + offset.reg))
static void bdw_forcewake_get(void *mmio)
static void bdw_forcewake_get(void __iomem *mmio)
{
WR(_MASKED_BIT_DISABLE(0xffff), FORCEWAKE_MT);
......@@ -91,7 +91,8 @@ static struct bin_attribute firmware_attr = {
.mmap = NULL,
};
static int expose_firmware_sysfs(struct intel_gvt *gvt, void *mmio)
static int expose_firmware_sysfs(struct intel_gvt *gvt,
void __iomem *mmio)
{
struct intel_gvt_device_info *info = &gvt->device_info;
struct pci_dev *pdev = gvt->dev_priv->drm.pdev;
......@@ -234,7 +235,8 @@ int intel_gvt_load_firmware(struct intel_gvt *gvt)
struct gvt_firmware_header *h;
const struct firmware *fw;
char *path;
void *mmio, *mem;
void __iomem *mmio;
void *mem;
int ret;
path = kmalloc(PATH_MAX, GFP_KERNEL);
......
......@@ -269,7 +269,7 @@ static inline int get_pse_type(int type)
static u64 read_pte64(struct drm_i915_private *dev_priv, unsigned long index)
{
void *addr = (u64 *)dev_priv->ggtt.gsm + index;
void __iomem *addr = (gen8_pte_t __iomem *)dev_priv->ggtt.gsm + index;
u64 pte;
#ifdef readq
......@@ -284,7 +284,7 @@ static u64 read_pte64(struct drm_i915_private *dev_priv, unsigned long index)
static void write_pte64(struct drm_i915_private *dev_priv,
unsigned long index, u64 pte)
{
void *addr = (u64 *)dev_priv->ggtt.gsm + index;
void __iomem *addr = (gen8_pte_t __iomem *)dev_priv->ggtt.gsm + index;
#ifdef writeq
writeq(pte, addr);
......
......@@ -186,7 +186,7 @@ struct intel_gvt_firmware {
};
struct intel_gvt_opregion {
void *opregion_va;
void __iomem *opregion_va;
u32 opregion_pa;
};
......
......@@ -27,7 +27,7 @@
static int init_vgpu_opregion(struct intel_vgpu *vgpu, u32 gpa)
{
void *host_va = vgpu->gvt->opregion.opregion_va;
void __iomem *host_va = vgpu->gvt->opregion.opregion_va;
u8 *buf;
int i;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment