Skip to content

Commit 9981b4f

Browse files
committed
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()
2 parents 0723090 + bc88ad2 commit 9981b4f

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

arch/mips/ath79/common.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ EXPORT_SYMBOL_GPL(ath79_ddr_ctrl_init);
5858

5959
void ath79_ddr_wb_flush(u32 reg)
6060
{
61-
void __iomem *flush_reg = ath79_ddr_wb_flush_base + reg;
61+
void __iomem *flush_reg = ath79_ddr_wb_flush_base + (reg * 4);
6262

6363
/* Flush the DDR write buffer. */
6464
__raw_writel(0x1, flush_reg);

arch/mips/pci/pci.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,5 +54,5 @@ void pci_resource_to_user(const struct pci_dev *dev, int bar,
5454
phys_addr_t size = resource_size(rsrc);
5555

5656
*start = fixup_bigphys_addr(rsrc->start, size);
57-
*end = rsrc->start + size;
57+
*end = rsrc->start + size - 1;
5858
}

0 commit comments

Comments
 (0)