[PATCH] EDAC, pnd2: Fix ioremap() size in dnv_rd_reg() from 64K -> 32K

From: Stephen Douthit
Date: Thu Aug 08 2019 - 16:52:14 EST


BIOS has marked the 32K MCHBAR window as reserved, so when dnv_rd_reg()
tries to ioremap() a 64KB region you get warnings like:

resource sanity check: requesting [mem 0xfed10000-0xfed1ffff], which spans more than reserved [mem 0xfed10000-0xfed17fff]
caller dnv_rd_reg+0xc8/0x240 [pnd2_edac] mapping multiple BARs

ioremap() the correct size on Denverton platforms to get rid of those
warnings.

Signed-off-by: Stephen Douthit <stephend@xxxxxxxxxxxxxxx>
---
drivers/edac/pnd2_edac.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/edac/pnd2_edac.c b/drivers/edac/pnd2_edac.c
index 903a4f1fadcc..1d16f2ac776e 100644
--- a/drivers/edac/pnd2_edac.c
+++ b/drivers/edac/pnd2_edac.c
@@ -295,7 +295,7 @@ static int dnv_rd_reg(int port, int off, int op, void *data, size_t sz, char *na
addr += (port << 16);
}

- base = ioremap((resource_size_t)addr, 0x10000);
+ base = ioremap((resource_size_t)addr, 0x8000);
if (!base)
return -ENODEV;

--
2.21.0