Skip to content

Commit

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

* 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus: (32 commits)
  MIPS: Wire up accept4 syscall.
  MIPS: VPE: Delete unused function get_tc_unused().
  MIPS: VPE: Fix bogus indentation.
  MIPS: VPE: Make various functions static.
  MIPS: VPE: Free relocation chain on error.
  MIPS: VPE: Fix compiler warning.
  MIPS: Module: Make error messages unique.
  MIPS: Octeon: Run IPI code with interrupts disabled.
  MIPS: Jazz: Fix read buffer overflow
  MIPS: Use DIV_ROUND_CLOSEST
  MIPS: MTX-1: Request button GPIO before setting its direction
  MIPS: AR7: Override CFLAGS with -Werror
  MIPS: AR7: Remove unused tnetd7200_get_clock function
  MIPS: AR7: Use DMA_BIT_MASK(nn) instead of deprecated DMA_nnBIT_MASK
  MIPS: AR7: Fix build failures when CONFIG_SERIAL_8250 is not enabled
  MIPS: Fix read buffer overflow
  MIPS: AR7: Fix build warning on memory.c
  MIPS: Octeon PCIe: Make hardware and software bus numbers match.
  MIPS: RBTX4939: Fix IOC pin-enable register updating
  MIPS: Simplify and correct interrupt handling for MSP4200
  ...
  • Loading branch information
Linus Torvalds committed Aug 4, 2009
2 parents 6ce90c4 + 54822de commit 90bc1a6
Show file tree
Hide file tree
Showing 66 changed files with 121 additions and 191 deletions.
14 changes: 12 additions & 2 deletions arch/mips/alchemy/mtx-1/platform.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* MTX-1 platform devices registration
*
* Copyright (C) 2007, Florian Fainelli <florian@openwrt.org>
* Copyright (C) 2007-2009, Florian Fainelli <florian@openwrt.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
Expand Down Expand Up @@ -142,7 +142,17 @@ static struct __initdata platform_device * mtx1_devs[] = {

static int __init mtx1_register_devices(void)
{
gpio_direction_input(207);
int rc;

rc = gpio_request(mtx1_gpio_button[0].gpio,
mtx1_gpio_button[0].desc);
if (rc < 0) {
printk(KERN_INFO "mtx1: failed to request %d\n",
mtx1_gpio_button[0].gpio);
goto out;
}
gpio_direction_input(mtx1_gpio_button[0].gpio);
out:
return platform_add_devices(mtx1_devs, ARRAY_SIZE(mtx1_devs));
}

Expand Down
1 change: 1 addition & 0 deletions arch/mips/ar7/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@ obj-y := \
platform.o \
gpio.o \
clock.o
EXTRA_CFLAGS += -Werror
13 changes: 0 additions & 13 deletions arch/mips/ar7/clock.c
Original file line number Diff line number Diff line change
Expand Up @@ -264,19 +264,6 @@ static void __init tnetd7300_init_clocks(void)
iounmap(bootcr);
}

static int tnetd7200_get_clock(int base, struct tnetd7200_clock *clock,
u32 *bootcr, u32 bus_clock)
{
int divisor = ((readl(&clock->prediv) & 0x1f) + 1) *
((readl(&clock->postdiv) & 0x1f) + 1);

if (*bootcr & BOOT_PLL_BYPASS)
return base / divisor;

return base * ((readl(&clock->mul) & 0xf) + 1) / divisor;
}


static void tnetd7200_set_clock(int base, struct tnetd7200_clock *clock,
int prediv, int postdiv, int postdiv2, int mul, u32 frequency)
{
Expand Down
2 changes: 1 addition & 1 deletion arch/mips/ar7/memory.c
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ static int __init memsize(void)
size <<= 1;
} while (size < (64 << 20));

writel(tmpaddr, &addr);
writel((u32)tmpaddr, &addr);

return size;
}
Expand Down
10 changes: 5 additions & 5 deletions arch/mips/ar7/platform.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
#include <linux/serial_8250.h>
#include <linux/ioport.h>
#include <linux/io.h>
#include <linux/version.h>
#include <linux/vlynq.h>
#include <linux/leds.h>
#include <linux/string.h>
Expand Down Expand Up @@ -243,13 +242,13 @@ static struct platform_device physmap_flash = {
.num_resources = 1,
};

static u64 cpmac_dma_mask = DMA_32BIT_MASK;
static u64 cpmac_dma_mask = DMA_BIT_MASK(32);
static struct platform_device cpmac_low = {
.id = 0,
.name = "cpmac",
.dev = {
.dma_mask = &cpmac_dma_mask,
.coherent_dma_mask = DMA_32BIT_MASK,
.coherent_dma_mask = DMA_BIT_MASK(32),
.platform_data = &cpmac_low_data,
},
.resource = cpmac_low_res,
Expand All @@ -261,7 +260,7 @@ static struct platform_device cpmac_high = {
.name = "cpmac",
.dev = {
.dma_mask = &cpmac_dma_mask,
.coherent_dma_mask = DMA_32BIT_MASK,
.coherent_dma_mask = DMA_BIT_MASK(32),
.platform_data = &cpmac_high_data,
},
.resource = cpmac_high_res,
Expand Down Expand Up @@ -481,6 +480,7 @@ static void __init detect_leds(void)
static int __init ar7_register_devices(void)
{
int res;
#ifdef CONFIG_SERIAL_8250
static struct uart_port uart_port[2];

memset(uart_port, 0, sizeof(struct uart_port) * 2);
Expand Down Expand Up @@ -512,7 +512,7 @@ static int __init ar7_register_devices(void)
if (res)
return res;
}

#endif /* CONFIG_SERIAL_8250 */
res = platform_device_register(&physmap_flash);
if (res)
return res;
Expand Down
2 changes: 1 addition & 1 deletion arch/mips/ar7/prom.c
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ static char * __init lookup_psp_var_map(u8 num)
{
int i;

for (i = 0; i < sizeof(psp_var_map); i++)
for (i = 0; i < ARRAY_SIZE(psp_var_map); i++)
if (psp_var_map[i].num == num)
return psp_var_map[i].value;

Expand Down
1 change: 0 additions & 1 deletion arch/mips/ar7/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
* with this program; if not, write to the Free Software Foundation, Inc.,
* 59 Temple Place - Suite 330, Boston MA 02111-1307, USA.
*/
#include <linux/version.h>
#include <linux/init.h>
#include <linux/ioport.h>
#include <linux/pm.h>
Expand Down
4 changes: 2 additions & 2 deletions arch/mips/cavium-octeon/smp.c
Original file line number Diff line number Diff line change
Expand Up @@ -194,11 +194,11 @@ static void octeon_init_secondary(void)
void octeon_prepare_cpus(unsigned int max_cpus)
{
cvmx_write_csr(CVMX_CIU_MBOX_CLRX(cvmx_get_core_num()), 0xffffffff);
if (request_irq(OCTEON_IRQ_MBOX0, mailbox_interrupt, IRQF_SHARED,
if (request_irq(OCTEON_IRQ_MBOX0, mailbox_interrupt, IRQF_DISABLED,
"mailbox0", mailbox_interrupt)) {
panic("Cannot request_irq(OCTEON_IRQ_MBOX0)\n");
}
if (request_irq(OCTEON_IRQ_MBOX1, mailbox_interrupt, IRQF_SHARED,
if (request_irq(OCTEON_IRQ_MBOX1, mailbox_interrupt, IRQF_DISABLED,
"mailbox1", mailbox_interrupt)) {
panic("Cannot request_irq(OCTEON_IRQ_MBOX1)\n");
}
Expand Down
2 changes: 0 additions & 2 deletions arch/mips/dec/ecc-berr.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
/*
* linux/arch/mips/dec/ecc-berr.c
*
* Bus error event handling code for systems equipped with ECC
* handling logic, i.e. DECstation/DECsystem 5000/200 (KN02),
* 5000/240 (KN03), 5000/260 (KN05) and DECsystem 5900 (KN03),
Expand Down
2 changes: 0 additions & 2 deletions arch/mips/dec/int-handler.S
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
/*
* arch/mips/dec/int-handler.S
*
* Copyright (C) 1995, 1996, 1997 Paul M. Antoine and Harald Koerfgen
* Copyright (C) 2000, 2001, 2002, 2003, 2005 Maciej W. Rozycki
*
Expand Down
2 changes: 0 additions & 2 deletions arch/mips/dec/ioasic-irq.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
/*
* linux/arch/mips/dec/ioasic-irq.c
*
* DEC I/O ASIC interrupts.
*
* Copyright (c) 2002, 2003 Maciej W. Rozycki
Expand Down
2 changes: 0 additions & 2 deletions arch/mips/dec/kn01-berr.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
/*
* linux/arch/mips/dec/kn01-berr.c
*
* Bus error event handling code for DECstation/DECsystem 3100
* and 2100 (KN01) systems equipped with parity error detection
* logic.
Expand Down
2 changes: 0 additions & 2 deletions arch/mips/dec/kn02-irq.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
/*
* linux/arch/mips/dec/kn02-irq.c
*
* DECstation 5000/200 (KN02) Control and Status Register
* interrupts.
*
Expand Down
2 changes: 0 additions & 2 deletions arch/mips/dec/kn02xa-berr.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
/*
* linux/arch/mips/dec/kn02xa-berr.c
*
* Bus error event handling code for 5000-series systems equipped
* with parity error detection logic, i.e. DECstation/DECsystem
* 5000/120, /125, /133 (KN02-BA), 5000/150 (KN04-BA) and Personal
Expand Down
2 changes: 0 additions & 2 deletions arch/mips/dec/prom/call_o32.S
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
/*
* arch/mips/dec/prom/call_o32.S
*
* O32 interface for the 64 (or N32) ABI.
*
* Copyright (C) 2002 Maciej W. Rozycki
Expand Down
2 changes: 0 additions & 2 deletions arch/mips/dec/prom/console.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
/*
* arch/mips/dec/prom/console.c
*
* DECstation PROM-based early console support.
*
* Copyright (C) 2004, 2007 Maciej W. Rozycki
Expand Down
2 changes: 0 additions & 2 deletions arch/mips/dec/time.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
/*
* linux/arch/mips/dec/time.c
*
* Copyright (C) 1991, 1992, 1995 Linus Torvalds
* Copyright (C) 2000, 2003 Maciej W. Rozycki
*
Expand Down
3 changes: 0 additions & 3 deletions arch/mips/emma/common/Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
#
# arch/mips/emma2rh/common/Makefile
# Makefile for the common code of NEC EMMA2RH based board.
#
# Copyright (C) NEC Electronics Corporation 2005-2006
#
# This program is free software; you can redistribute it and/or modify
Expand Down
3 changes: 0 additions & 3 deletions arch/mips/emma/common/prom.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
/*
* arch/mips/emma2rh/common/prom.c
* This file is prom file.
*
* Copyright (C) NEC Electronics Corporation 2004-2006
*
* This file is based on the arch/mips/ddb5xxx/common/prom.c
Expand Down
3 changes: 0 additions & 3 deletions arch/mips/emma/markeins/Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
#
# arch/mips/emma2rh/markeins/Makefile
# Makefile for the common code of NEC EMMA2RH based board.
#
# Copyright (C) NEC Electronics Corporation 2005-2006
#
# This program is free software; you can redistribute it and/or modify
Expand Down
3 changes: 0 additions & 3 deletions arch/mips/emma/markeins/irq.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
/*
* arch/mips/emma2rh/markeins/irq.c
* This file defines the irq handler for EMMA2RH.
*
* Copyright (C) NEC Electronics Corporation 2004-2006
*
* This file is based on the arch/mips/ddb5xxx/ddb5477/irq.c
Expand Down
3 changes: 0 additions & 3 deletions arch/mips/emma/markeins/led.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
/*
* arch/mips/emma2rh/markeins/led.c
* This file defines the led display for Mark-eins.
*
* Copyright (C) NEC Electronics Corporation 2004-2006
*
* This program is free software; you can redistribute it and/or modify
Expand Down
3 changes: 0 additions & 3 deletions arch/mips/emma/markeins/platform.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
/*
* arch/mips/emma2rh/markeins/platofrm.c
* This file sets up platform devices for EMMA2RH Mark-eins.
*
* Copyright(C) MontaVista Software Inc, 2006
*
* Author: dmitry pervushin <dpervushin@ru.mvista.com>
Expand Down
3 changes: 0 additions & 3 deletions arch/mips/emma/markeins/setup.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
/*
* arch/mips/emma2rh/markeins/setup.c
* This file is setup for EMMA2RH Mark-eins.
*
* Copyright (C) NEC Electronics Corporation 2004-2006
*
* This file is based on the arch/mips/ddb5xxx/ddb5477/setup.c.
Expand Down
2 changes: 0 additions & 2 deletions arch/mips/fw/lib/call_o32.S
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
/*
* arch/mips/dec/prom/call_o32.S
*
* O32 interface for the 64 (or N32) ABI.
*
* Copyright (C) 2002 Maciej W. Rozycki
Expand Down
3 changes: 0 additions & 3 deletions arch/mips/include/asm/emma/emma2rh.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
/*
* arch/mips/include/asm/emma/emma2rh.h
* This file is EMMA2RH common header.
*
* Copyright (C) NEC Electronics Corporation 2005-2006
*
* This file based on include/asm-mips/ddb5xxx/ddb5xxx.h
Expand Down
3 changes: 0 additions & 3 deletions arch/mips/include/asm/emma/markeins.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
/*
* include/asm-mips/emma2rh/markeins.h
* This file is EMMA2RH board depended header.
*
* Copyright (C) NEC Electronics Corporation 2005-2006
*
* This file based on include/asm-mips/ddb5xxx/ddb5xxx.h
Expand Down
2 changes: 1 addition & 1 deletion arch/mips/include/asm/gic.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
#define GIC_TRIG_EDGE 1
#define GIC_TRIG_LEVEL 0

#if CONFIG_SMP
#ifdef CONFIG_SMP
#define GIC_NUM_INTRS (24 + NR_CPUS * 2)
#else
#define GIC_NUM_INTRS 32
Expand Down
2 changes: 2 additions & 0 deletions arch/mips/include/asm/pmc-sierra/msp71xx/war.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@
#if defined(CONFIG_PMC_MSP7120_EVAL) || defined(CONFIG_PMC_MSP7120_GW) || \
defined(CONFIG_PMC_MSP7120_FPGA)
#define MIPS34K_MISSED_ITLB_WAR 1
#else
#define MIPS34K_MISSED_ITLB_WAR 0
#endif

#endif /* __ASM_MIPS_PMC_SIERRA_WAR_H */
5 changes: 3 additions & 2 deletions arch/mips/include/asm/processor.h
Original file line number Diff line number Diff line change
Expand Up @@ -311,8 +311,9 @@ extern void start_thread(struct pt_regs * regs, unsigned long pc, unsigned long

unsigned long get_wchan(struct task_struct *p);

#define __KSTK_TOS(tsk) ((unsigned long)task_stack_page(tsk) + THREAD_SIZE - 32)
#define task_pt_regs(tsk) ((struct pt_regs *)__KSTK_TOS(tsk) - 1)
#define __KSTK_TOS(tsk) ((unsigned long)task_stack_page(tsk) + \
THREAD_SIZE - 32 - sizeof(struct pt_regs))
#define task_pt_regs(tsk) ((struct pt_regs *)__KSTK_TOS(tsk))
#define KSTK_EIP(tsk) (task_pt_regs(tsk)->cp0_epc)
#define KSTK_ESP(tsk) (task_pt_regs(tsk)->regs[29])
#define KSTK_STATUS(tsk) (task_pt_regs(tsk)->cp0_status)
Expand Down
15 changes: 9 additions & 6 deletions arch/mips/include/asm/unistd.h
Original file line number Diff line number Diff line change
Expand Up @@ -354,16 +354,17 @@
#define __NR_pwritev (__NR_Linux + 331)
#define __NR_rt_tgsigqueueinfo (__NR_Linux + 332)
#define __NR_perf_counter_open (__NR_Linux + 333)
#define __NR_accept4 (__NR_Linux + 334)

/*
* Offset of the last Linux o32 flavoured syscall
*/
#define __NR_Linux_syscalls 333
#define __NR_Linux_syscalls 334

#endif /* _MIPS_SIM == _MIPS_SIM_ABI32 */

#define __NR_O32_Linux 4000
#define __NR_O32_Linux_syscalls 333
#define __NR_O32_Linux_syscalls 334

#if _MIPS_SIM == _MIPS_SIM_ABI64

Expand Down Expand Up @@ -664,16 +665,17 @@
#define __NR_pwritev (__NR_Linux + 290)
#define __NR_rt_tgsigqueueinfo (__NR_Linux + 291)
#define __NR_perf_counter_open (__NR_Linux + 292)
#define __NR_accept4 (__NR_Linux + 293)

/*
* Offset of the last Linux 64-bit flavoured syscall
*/
#define __NR_Linux_syscalls 292
#define __NR_Linux_syscalls 293

#endif /* _MIPS_SIM == _MIPS_SIM_ABI64 */

#define __NR_64_Linux 5000
#define __NR_64_Linux_syscalls 292
#define __NR_64_Linux_syscalls 293

#if _MIPS_SIM == _MIPS_SIM_NABI32

Expand Down Expand Up @@ -978,16 +980,17 @@
#define __NR_pwritev (__NR_Linux + 294)
#define __NR_rt_tgsigqueueinfo (__NR_Linux + 295)
#define __NR_perf_counter_open (__NR_Linux + 296)
#define __NR_accept4 (__NR_Linux + 297)

/*
* Offset of the last N32 flavoured syscall
*/
#define __NR_Linux_syscalls 296
#define __NR_Linux_syscalls 297

#endif /* _MIPS_SIM == _MIPS_SIM_NABI32 */

#define __NR_N32_Linux 6000
#define __NR_N32_Linux_syscalls 296
#define __NR_N32_Linux_syscalls 297

#ifdef __KERNEL__

Expand Down
2 changes: 1 addition & 1 deletion arch/mips/jazz/jazzdma.c
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ int vdma_free(unsigned long laddr)
return -1;
}

while (pgtbl[i].owner == laddr && i < VDMA_PGTBL_ENTRIES) {
while (i < VDMA_PGTBL_ENTRIES && pgtbl[i].owner == laddr) {
pgtbl[i].owner = VDMA_PAGE_EMPTY;
i++;
}
Expand Down
3 changes: 2 additions & 1 deletion arch/mips/kernel/head.S
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,8 @@ NESTED(kernel_entry, 16, sp) # kernel entry point

MTC0 zero, CP0_CONTEXT # clear context register
PTR_LA $28, init_thread_union
PTR_LI sp, _THREAD_SIZE - 32
/* Set the SP after an empty pt_regs. */
PTR_LI sp, _THREAD_SIZE - 32 - PT_SIZE
PTR_ADDU sp, $28
set_saved_sp sp, t0, t1
PTR_SUBU sp, 4 * SZREG # init stack pointer
Expand Down
Loading

0 comments on commit 90bc1a6

Please sign in to comment.