diff options
author | Qiuxu Zhuo <qiuxu.zhuo@intel.com> | 2017-08-14 11:48:13 -0400 |
---|---|---|
committer | Borislav Petkov <bp@suse.de> | 2017-08-19 04:33:30 -0400 |
commit | d84676a9e12817c8435e836911800bdcc67928a0 (patch) | |
tree | eb0bcc349837dcac5486c54d9b749af6de6a162c | |
parent | 3eaef0fa39f7badb0bf25bb28ab96cf06b29d45c (diff) |
EDAC, pnd2: Mask off the lower four bits of a BAR
Bit[0] of BAR is always zero. Bit[2:1] and bit[3] of BAR contain the
information of 'type' and the 'prefetchable' accordingly. Therefore,
mask the lower four bits to retrieve the actual base address of a BAR.
Signed-off-by: Qiuxu Zhuo <qiuxu.zhuo@intel.com>
Cc: Tony Luck <tony.luck@intel.com>
Cc: linux-edac <linux-edac@vger.kernel.org>
Link: http://lkml.kernel.org/r/20170814154813.21619-1-qiuxu.zhuo@intel.com
Signed-off-by: Borislav Petkov <bp@suse.de>
-rw-r--r-- | drivers/edac/pnd2_edac.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/edac/pnd2_edac.c b/drivers/edac/pnd2_edac.c index a3180a87ff96..2b16b95201eb 100644 --- a/drivers/edac/pnd2_edac.c +++ b/drivers/edac/pnd2_edac.c | |||
@@ -241,6 +241,7 @@ static u64 get_sideband_reg_base_addr(void) | |||
241 | if (pdev) { | 241 | if (pdev) { |
242 | pci_read_config_dword(pdev, 0x10, &lo); | 242 | pci_read_config_dword(pdev, 0x10, &lo); |
243 | pci_read_config_dword(pdev, 0x14, &hi); | 243 | pci_read_config_dword(pdev, 0x14, &hi); |
244 | lo &= 0xfffffff0; | ||
244 | pci_dev_put(pdev); | 245 | pci_dev_put(pdev); |
245 | return (U64_LSHIFT(hi, 32) | U64_LSHIFT(lo, 0)); | 246 | return (U64_LSHIFT(hi, 32) | U64_LSHIFT(lo, 0)); |
246 | } else { | 247 | } else { |