提交 e4ca714b 编写于 作者: L Linus Torvalds

Merge branch 'upstream' of git://git.kernel.org/pub/scm/linux/kernel/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
/* /*
* Atheros AR71XX/AR724X/AR913X specific prom routines * 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-2010 Gabor Juhos <juhosg@openwrt.org>
* Copyright (C) 2008 Imre Kaloz <kaloz@openwrt.org> * Copyright (C) 2008 Imre Kaloz <kaloz@openwrt.org>
* *
...@@ -25,12 +26,14 @@ void __init prom_init(void) ...@@ -25,12 +26,14 @@ void __init prom_init(void)
{ {
fw_init_cmdline(); fw_init_cmdline();
#ifdef CONFIG_BLK_DEV_INITRD
/* Read the initrd address from the firmware environment */ /* Read the initrd address from the firmware environment */
initrd_start = fw_getenvl("initrd_start"); initrd_start = fw_getenvl("initrd_start");
if (initrd_start) { if (initrd_start) {
initrd_start = KSEG0ADDR(initrd_start); initrd_start = KSEG0ADDR(initrd_start);
initrd_end = initrd_start + fw_getenvl("initrd_size"); initrd_end = initrd_start + fw_getenvl("initrd_size");
} }
#endif
} }
void __init prom_free_prom_memory(void) void __init prom_free_prom_memory(void)
......
...@@ -194,7 +194,7 @@ CONFIG_USB_WUSB_CBAF=m ...@@ -194,7 +194,7 @@ CONFIG_USB_WUSB_CBAF=m
CONFIG_USB_C67X00_HCD=m CONFIG_USB_C67X00_HCD=m
CONFIG_USB_EHCI_HCD=y CONFIG_USB_EHCI_HCD=y
CONFIG_USB_EHCI_ROOT_HUB_TT=y CONFIG_USB_EHCI_ROOT_HUB_TT=y
CONFIG_USB_ISP1760_HCD=m CONFIG_USB_ISP1760=m
CONFIG_USB_OHCI_HCD=y CONFIG_USB_OHCI_HCD=y
CONFIG_USB_UHCI_HCD=m CONFIG_USB_UHCI_HCD=m
CONFIG_USB_R8A66597_HCD=m CONFIG_USB_R8A66597_HCD=m
......
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
int kgdb_early_setup; int kgdb_early_setup;
#endif #endif
static unsigned long irq_map[NR_IRQS / BITS_PER_LONG]; static DECLARE_BITMAP(irq_map, NR_IRQS);
int allocate_irqno(void) int allocate_irqno(void)
{ {
......
...@@ -444,7 +444,7 @@ struct plat_smp_ops bmips5000_smp_ops = { ...@@ -444,7 +444,7 @@ struct plat_smp_ops bmips5000_smp_ops = {
static void bmips_wr_vec(unsigned long dst, char *start, char *end) static void bmips_wr_vec(unsigned long dst, char *start, char *end)
{ {
memcpy((void *)dst, start, end - start); 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)); local_flush_icache_range(dst, dst + (end - start));
instruction_hazard(); instruction_hazard();
} }
......
...@@ -34,7 +34,12 @@ LEAF(__strnlen_\func\()_asm) ...@@ -34,7 +34,12 @@ LEAF(__strnlen_\func\()_asm)
FEXPORT(__strnlen_\func\()_nocheck_asm) FEXPORT(__strnlen_\func\()_nocheck_asm)
move v0, a0 move v0, a0
PTR_ADDU a1, a0 # stop pointer 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" .ifeqs "\func", "kernel"
EX(lb, t0, (v0), .Lfault\@) EX(lb, t0, (v0), .Lfault\@)
.else .else
...@@ -42,7 +47,13 @@ FEXPORT(__strnlen_\func\()_nocheck_asm) ...@@ -42,7 +47,13 @@ FEXPORT(__strnlen_\func\()_nocheck_asm)
.endif .endif
.set noreorder .set noreorder
bnez t0, 1b 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 .set reorder
PTR_SUBU v0, a0 PTR_SUBU v0, a0
jr ra jr ra
......
...@@ -453,7 +453,7 @@ void __iomem *mips_cdmm_early_probe(unsigned int dev_type) ...@@ -453,7 +453,7 @@ void __iomem *mips_cdmm_early_probe(unsigned int dev_type)
/* Look for a specific device type */ /* Look for a specific device type */
for (; drb < bus->drbs; drb += size + 1) { 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; type = (acsr & CDMM_ACSR_DEVTYPE) >> CDMM_ACSR_DEVTYPE_SHIFT;
if (type == dev_type) if (type == dev_type)
return cdmm + drb * CDMM_DRB_SIZE; return cdmm + drb * CDMM_DRB_SIZE;
...@@ -500,7 +500,7 @@ static void mips_cdmm_bus_discover(struct mips_cdmm_bus *bus) ...@@ -500,7 +500,7 @@ static void mips_cdmm_bus_discover(struct mips_cdmm_bus *bus)
bus->discovered = true; bus->discovered = true;
pr_info("cdmm%u discovery (%u blocks)\n", cpu, bus->drbs); pr_info("cdmm%u discovery (%u blocks)\n", cpu, bus->drbs);
for (; drb < bus->drbs; drb += size + 1) { 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; type = (acsr & CDMM_ACSR_DEVTYPE) >> CDMM_ACSR_DEVTYPE_SHIFT;
size = (acsr & CDMM_ACSR_DEVSIZE) >> CDMM_ACSR_DEVSIZE_SHIFT; size = (acsr & CDMM_ACSR_DEVSIZE) >> CDMM_ACSR_DEVSIZE_SHIFT;
rev = (acsr & CDMM_ACSR_DEVREV) >> CDMM_ACSR_DEVREV_SHIFT; rev = (acsr & CDMM_ACSR_DEVREV) >> CDMM_ACSR_DEVREV_SHIFT;
......
...@@ -174,13 +174,13 @@ struct mips_ejtag_fdc_tty { ...@@ -174,13 +174,13 @@ struct mips_ejtag_fdc_tty {
static inline void mips_ejtag_fdc_write(struct mips_ejtag_fdc_tty *priv, static inline void mips_ejtag_fdc_write(struct mips_ejtag_fdc_tty *priv,
unsigned int offs, unsigned int data) 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, static inline unsigned int mips_ejtag_fdc_read(struct mips_ejtag_fdc_tty *priv,
unsigned int offs) unsigned int offs)
{ {
return ioread32(priv->reg + offs); return __raw_readl(priv->reg + offs);
} }
/* Encoding of byte stream in FDC words */ /* Encoding of byte stream in FDC words */
...@@ -347,9 +347,9 @@ static void mips_ejtag_fdc_console_write(struct console *c, const char *s, ...@@ -347,9 +347,9 @@ static void mips_ejtag_fdc_console_write(struct console *c, const char *s,
s += inc[word.bytes - 1]; s += inc[word.bytes - 1];
/* Busy wait until there's space in fifo */ /* 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: out:
local_irq_restore(flags); local_irq_restore(flags);
...@@ -1227,7 +1227,7 @@ static int kgdbfdc_read_char(void) ...@@ -1227,7 +1227,7 @@ static int kgdbfdc_read_char(void)
/* Read next word from KGDB channel */ /* Read next word from KGDB channel */
do { do {
stat = ioread32(regs + REG_FDSTAT); stat = __raw_readl(regs + REG_FDSTAT);
/* No data waiting? */ /* No data waiting? */
if (stat & REG_FDSTAT_RXE) if (stat & REG_FDSTAT_RXE)
...@@ -1236,7 +1236,7 @@ static int kgdbfdc_read_char(void) ...@@ -1236,7 +1236,7 @@ static int kgdbfdc_read_char(void)
/* Read next word */ /* Read next word */
channel = (stat & REG_FDSTAT_RXCHAN) >> channel = (stat & REG_FDSTAT_RXCHAN) >>
REG_FDSTAT_RXCHAN_SHIFT; REG_FDSTAT_RXCHAN_SHIFT;
data = ioread32(regs + REG_FDRX); data = __raw_readl(regs + REG_FDRX);
} while (channel != CONFIG_MIPS_EJTAG_FDC_KGDB_CHAN); } while (channel != CONFIG_MIPS_EJTAG_FDC_KGDB_CHAN);
/* Decode into rbuf */ /* Decode into rbuf */
...@@ -1266,9 +1266,10 @@ static void kgdbfdc_push_one(void) ...@@ -1266,9 +1266,10 @@ static void kgdbfdc_push_one(void)
return; return;
/* Busy wait until there's space in fifo */ /* 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 */ /* flush the whole write buffer to the TX FIFO */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册