Commit 6adc32f5 authored by Andy Shevchenko's avatar Andy Shevchenko Committed by Lee Jones

EDAC, pnd2: Use proper I/O accessors and address space annotation

The driver uses rather voodoo kind of castings and I/O accessors.
Replace it with proper __iomem annotation and readl()/readq() calls.
Signed-off-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Tested-by: default avatarHenning Schild <henning.schild@siemens.com>
Reviewed-by: default avatarTony Luck <tony.luck@intel.com>
Signed-off-by: default avatarLee Jones <lee@kernel.org>
parent 5c7b9167
...@@ -265,7 +265,7 @@ static u64 get_sideband_reg_base_addr(void) ...@@ -265,7 +265,7 @@ static u64 get_sideband_reg_base_addr(void)
static int dnv_rd_reg(int port, int off, int op, void *data, size_t sz, char *name) static int dnv_rd_reg(int port, int off, int op, void *data, size_t sz, char *name)
{ {
struct pci_dev *pdev; struct pci_dev *pdev;
char *base; void __iomem *base;
u64 addr; u64 addr;
unsigned long size; unsigned long size;
...@@ -297,8 +297,9 @@ static int dnv_rd_reg(int port, int off, int op, void *data, size_t sz, char *na ...@@ -297,8 +297,9 @@ static int dnv_rd_reg(int port, int off, int op, void *data, size_t sz, char *na
return -ENODEV; return -ENODEV;
if (sz == 8) if (sz == 8)
*(u32 *)(data + 4) = *(u32 *)(base + off + 4); *(u64 *)data = readq(base + off);
*(u32 *)data = *(u32 *)(base + off); else
*(u32 *)data = readl(base + off);
iounmap(base); iounmap(base);
} }
......
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