Skip to content

Commit

Permalink
Merge branch 'upstream' of git://git.kernel.org/pub/scm/linux/kernel/…
Browse files Browse the repository at this point in the history
…git/ralf/linux

Pull MIPS fixes from Ralf Baechle:
 "MIPS fixes for 4.1 all across the tree"

* 'upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/ralf/linux:
  MIPS: strnlen_user.S: Fix a CPU_DADDI_WORKAROUNDS regression
  MIPS: BMIPS: Fix bmips_wr_vec()
  MIPS: ath79: fix build problem if CONFIG_BLK_DEV_INITRD is not set
  MIPS: Fuloong 2E: Replace CONFIG_USB_ISP1760_HCD by CONFIG_USB_ISP1760
  MIPS: irq: Use DECLARE_BITMAP
  ttyFDC: Fix to use native endian MMIO reads
  MIPS: Fix CDMM to use native endian MMIO reads
  • Loading branch information
Linus Torvalds committed May 31, 2015
2 parents 50f5a1e + c4fca4f commit e4ca714
Show file tree
Hide file tree
Showing 7 changed files with 30 additions and 15 deletions.
3 changes: 3 additions & 0 deletions arch/mips/ath79/prom.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/*
* Atheros AR71XX/AR724X/AR913X specific prom routines
*
* Copyright (C) 2015 Laurent Fasnacht <l@libres.ch>
* Copyright (C) 2008-2010 Gabor Juhos <juhosg@openwrt.org>
* Copyright (C) 2008 Imre Kaloz <kaloz@openwrt.org>
*
Expand All @@ -25,12 +26,14 @@ void __init prom_init(void)
{
fw_init_cmdline();

#ifdef CONFIG_BLK_DEV_INITRD
/* Read the initrd address from the firmware environment */
initrd_start = fw_getenvl("initrd_start");
if (initrd_start) {
initrd_start = KSEG0ADDR(initrd_start);
initrd_end = initrd_start + fw_getenvl("initrd_size");
}
#endif
}

void __init prom_free_prom_memory(void)
Expand Down
2 changes: 1 addition & 1 deletion arch/mips/configs/fuloong2e_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ CONFIG_USB_WUSB_CBAF=m
CONFIG_USB_C67X00_HCD=m
CONFIG_USB_EHCI_HCD=y
CONFIG_USB_EHCI_ROOT_HUB_TT=y
CONFIG_USB_ISP1760_HCD=m
CONFIG_USB_ISP1760=m
CONFIG_USB_OHCI_HCD=y
CONFIG_USB_UHCI_HCD=m
CONFIG_USB_R8A66597_HCD=m
Expand Down
2 changes: 1 addition & 1 deletion arch/mips/kernel/irq.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
int kgdb_early_setup;
#endif

static unsigned long irq_map[NR_IRQS / BITS_PER_LONG];
static DECLARE_BITMAP(irq_map, NR_IRQS);

int allocate_irqno(void)
{
Expand Down
2 changes: 1 addition & 1 deletion arch/mips/kernel/smp-bmips.c
Original file line number Diff line number Diff line change
Expand Up @@ -444,7 +444,7 @@ struct plat_smp_ops bmips5000_smp_ops = {
static void bmips_wr_vec(unsigned long dst, char *start, char *end)
{
memcpy((void *)dst, start, end - start);
dma_cache_wback((unsigned long)start, end - start);
dma_cache_wback(dst, end - start);
local_flush_icache_range(dst, dst + (end - start));
instruction_hazard();
}
Expand Down
15 changes: 13 additions & 2 deletions arch/mips/lib/strnlen_user.S
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,26 @@ LEAF(__strnlen_\func\()_asm)
FEXPORT(__strnlen_\func\()_nocheck_asm)
move v0, a0
PTR_ADDU a1, a0 # stop pointer
1: beq v0, a1, 1f # limit reached?
1:
#ifdef CONFIG_CPU_DADDI_WORKAROUNDS
.set noat
li AT, 1
#endif
beq v0, a1, 1f # limit reached?
.ifeqs "\func", "kernel"
EX(lb, t0, (v0), .Lfault\@)
.else
EX(lbe, t0, (v0), .Lfault\@)
.endif
.set noreorder
bnez t0, 1b
1: PTR_ADDIU v0, 1
1:
#ifndef CONFIG_CPU_DADDI_WORKAROUNDS
PTR_ADDIU v0, 1
#else
PTR_ADDU v0, AT
.set at
#endif
.set reorder
PTR_SUBU v0, a0
jr ra
Expand Down
4 changes: 2 additions & 2 deletions drivers/bus/mips_cdmm.c
Original file line number Diff line number Diff line change
Expand Up @@ -453,7 +453,7 @@ void __iomem *mips_cdmm_early_probe(unsigned int dev_type)

/* Look for a specific device type */
for (; drb < bus->drbs; drb += size + 1) {
acsr = readl(cdmm + drb * CDMM_DRB_SIZE);
acsr = __raw_readl(cdmm + drb * CDMM_DRB_SIZE);
type = (acsr & CDMM_ACSR_DEVTYPE) >> CDMM_ACSR_DEVTYPE_SHIFT;
if (type == dev_type)
return cdmm + drb * CDMM_DRB_SIZE;
Expand Down Expand Up @@ -500,7 +500,7 @@ static void mips_cdmm_bus_discover(struct mips_cdmm_bus *bus)
bus->discovered = true;
pr_info("cdmm%u discovery (%u blocks)\n", cpu, bus->drbs);
for (; drb < bus->drbs; drb += size + 1) {
acsr = readl(cdmm + drb * CDMM_DRB_SIZE);
acsr = __raw_readl(cdmm + drb * CDMM_DRB_SIZE);
type = (acsr & CDMM_ACSR_DEVTYPE) >> CDMM_ACSR_DEVTYPE_SHIFT;
size = (acsr & CDMM_ACSR_DEVSIZE) >> CDMM_ACSR_DEVSIZE_SHIFT;
rev = (acsr & CDMM_ACSR_DEVREV) >> CDMM_ACSR_DEVREV_SHIFT;
Expand Down
17 changes: 9 additions & 8 deletions drivers/tty/mips_ejtag_fdc.c
Original file line number Diff line number Diff line change
Expand Up @@ -174,13 +174,13 @@ struct mips_ejtag_fdc_tty {
static inline void mips_ejtag_fdc_write(struct mips_ejtag_fdc_tty *priv,
unsigned int offs, unsigned int data)
{
iowrite32(data, priv->reg + offs);
__raw_writel(data, priv->reg + offs);
}

static inline unsigned int mips_ejtag_fdc_read(struct mips_ejtag_fdc_tty *priv,
unsigned int offs)
{
return ioread32(priv->reg + offs);
return __raw_readl(priv->reg + offs);
}

/* Encoding of byte stream in FDC words */
Expand Down Expand Up @@ -347,9 +347,9 @@ static void mips_ejtag_fdc_console_write(struct console *c, const char *s,
s += inc[word.bytes - 1];

/* Busy wait until there's space in fifo */
while (ioread32(regs + REG_FDSTAT) & REG_FDSTAT_TXF)
while (__raw_readl(regs + REG_FDSTAT) & REG_FDSTAT_TXF)
;
iowrite32(word.word, regs + REG_FDTX(c->index));
__raw_writel(word.word, regs + REG_FDTX(c->index));
}
out:
local_irq_restore(flags);
Expand Down Expand Up @@ -1227,7 +1227,7 @@ static int kgdbfdc_read_char(void)

/* Read next word from KGDB channel */
do {
stat = ioread32(regs + REG_FDSTAT);
stat = __raw_readl(regs + REG_FDSTAT);

/* No data waiting? */
if (stat & REG_FDSTAT_RXE)
Expand All @@ -1236,7 +1236,7 @@ static int kgdbfdc_read_char(void)
/* Read next word */
channel = (stat & REG_FDSTAT_RXCHAN) >>
REG_FDSTAT_RXCHAN_SHIFT;
data = ioread32(regs + REG_FDRX);
data = __raw_readl(regs + REG_FDRX);
} while (channel != CONFIG_MIPS_EJTAG_FDC_KGDB_CHAN);

/* Decode into rbuf */
Expand Down Expand Up @@ -1266,9 +1266,10 @@ static void kgdbfdc_push_one(void)
return;

/* Busy wait until there's space in fifo */
while (ioread32(regs + REG_FDSTAT) & REG_FDSTAT_TXF)
while (__raw_readl(regs + REG_FDSTAT) & REG_FDSTAT_TXF)
;
iowrite32(word.word, regs + REG_FDTX(CONFIG_MIPS_EJTAG_FDC_KGDB_CHAN));
__raw_writel(word.word,
regs + REG_FDTX(CONFIG_MIPS_EJTAG_FDC_KGDB_CHAN));
}

/* flush the whole write buffer to the TX FIFO */
Expand Down

0 comments on commit e4ca714

Please sign in to comment.