diff options
author | 2018-07-24 18:11:15 -0700 | |
---|---|---|
committer | 2018-07-24 18:11:15 -0700 | |
commit | 9981b4fb8684883dcc0daf088891ff32260b9794 (patch) | |
tree | 2bdb23a3ba410c43096f7e0ea5ecfad12d2b6127 | |
parent | Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net (diff) | |
parent | MIPS: ath79: fix register address in ath79_ddr_wb_flush() (diff) | |
download | linux-9981b4fb8684883dcc0daf088891ff32260b9794.tar.gz linux-9981b4fb8684883dcc0daf088891ff32260b9794.tar.bz2 linux-9981b4fb8684883dcc0daf088891ff32260b9794.zip |
Merge tag 'mips_fixes_4.18_4' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux
Pull MIPS fixes from Paul Burton:
"A couple more MIPS fixes for 4.18:
- Fix an off-by-one in reporting PCI resource sizes to userland which
regressed in v3.12.
- Fix writes to DDR controller registers used to flush write buffers,
which regressed with some refactoring in v4.2"
* tag 'mips_fixes_4.18_4' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux:
MIPS: ath79: fix register address in ath79_ddr_wb_flush()
MIPS: Fix off-by-one in pci_resource_to_user()
-rw-r--r-- | arch/mips/ath79/common.c | 2 | ||||
-rw-r--r-- | arch/mips/pci/pci.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/arch/mips/ath79/common.c b/arch/mips/ath79/common.c index 10a405d593df..c782b10ddf50 100644 --- a/arch/mips/ath79/common.c +++ b/arch/mips/ath79/common.c @@ -58,7 +58,7 @@ EXPORT_SYMBOL_GPL(ath79_ddr_ctrl_init); void ath79_ddr_wb_flush(u32 reg) { - void __iomem *flush_reg = ath79_ddr_wb_flush_base + reg; + void __iomem *flush_reg = ath79_ddr_wb_flush_base + (reg * 4); /* Flush the DDR write buffer. */ __raw_writel(0x1, flush_reg); diff --git a/arch/mips/pci/pci.c b/arch/mips/pci/pci.c index 9632436d74d7..c2e94cf5ecda 100644 --- a/arch/mips/pci/pci.c +++ b/arch/mips/pci/pci.c @@ -54,5 +54,5 @@ void pci_resource_to_user(const struct pci_dev *dev, int bar, phys_addr_t size = resource_size(rsrc); *start = fixup_bigphys_addr(rsrc->start, size); - *end = rsrc->start + size; + *end = rsrc->start + size - 1; } |