diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-08-04 18:49:11 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-08-04 18:49:11 -0400 |
commit | 90bc1a658a53f8832ee799685703977a450e5af9 (patch) | |
tree | 98c5ceb22d634508614e42330ed1e27e6930a983 /arch | |
parent | 6ce90c430baef6e411dcf32e872913888bb3ef54 (diff) | |
parent | 54822de7793bf9aa56d79cc173281cdb23b37f9f (diff) |
Merge branch 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-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
...
Diffstat (limited to 'arch')
66 files changed, 121 insertions, 191 deletions
diff --git a/arch/mips/alchemy/mtx-1/platform.c b/arch/mips/alchemy/mtx-1/platform.c index 8b5914d1241f..e30e42add697 100644 --- a/arch/mips/alchemy/mtx-1/platform.c +++ b/arch/mips/alchemy/mtx-1/platform.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * MTX-1 platform devices registration | 2 | * MTX-1 platform devices registration |
3 | * | 3 | * |
4 | * Copyright (C) 2007, Florian Fainelli <florian@openwrt.org> | 4 | * Copyright (C) 2007-2009, Florian Fainelli <florian@openwrt.org> |
5 | * | 5 | * |
6 | * This program is free software; you can redistribute it and/or modify | 6 | * This program is free software; you can redistribute it and/or modify |
7 | * it under the terms of the GNU General Public License as published by | 7 | * it under the terms of the GNU General Public License as published by |
@@ -142,7 +142,17 @@ static struct __initdata platform_device * mtx1_devs[] = { | |||
142 | 142 | ||
143 | static int __init mtx1_register_devices(void) | 143 | static int __init mtx1_register_devices(void) |
144 | { | 144 | { |
145 | gpio_direction_input(207); | 145 | int rc; |
146 | |||
147 | rc = gpio_request(mtx1_gpio_button[0].gpio, | ||
148 | mtx1_gpio_button[0].desc); | ||
149 | if (rc < 0) { | ||
150 | printk(KERN_INFO "mtx1: failed to request %d\n", | ||
151 | mtx1_gpio_button[0].gpio); | ||
152 | goto out; | ||
153 | } | ||
154 | gpio_direction_input(mtx1_gpio_button[0].gpio); | ||
155 | out: | ||
146 | return platform_add_devices(mtx1_devs, ARRAY_SIZE(mtx1_devs)); | 156 | return platform_add_devices(mtx1_devs, ARRAY_SIZE(mtx1_devs)); |
147 | } | 157 | } |
148 | 158 | ||
diff --git a/arch/mips/ar7/Makefile b/arch/mips/ar7/Makefile index 7435e44b3964..26bc5da18997 100644 --- a/arch/mips/ar7/Makefile +++ b/arch/mips/ar7/Makefile | |||
@@ -8,3 +8,4 @@ obj-y := \ | |||
8 | platform.o \ | 8 | platform.o \ |
9 | gpio.o \ | 9 | gpio.o \ |
10 | clock.o | 10 | clock.o |
11 | EXTRA_CFLAGS += -Werror | ||
diff --git a/arch/mips/ar7/clock.c b/arch/mips/ar7/clock.c index 27dc6663f2fa..cc65c8eb391b 100644 --- a/arch/mips/ar7/clock.c +++ b/arch/mips/ar7/clock.c | |||
@@ -264,19 +264,6 @@ static void __init tnetd7300_init_clocks(void) | |||
264 | iounmap(bootcr); | 264 | iounmap(bootcr); |
265 | } | 265 | } |
266 | 266 | ||
267 | static int tnetd7200_get_clock(int base, struct tnetd7200_clock *clock, | ||
268 | u32 *bootcr, u32 bus_clock) | ||
269 | { | ||
270 | int divisor = ((readl(&clock->prediv) & 0x1f) + 1) * | ||
271 | ((readl(&clock->postdiv) & 0x1f) + 1); | ||
272 | |||
273 | if (*bootcr & BOOT_PLL_BYPASS) | ||
274 | return base / divisor; | ||
275 | |||
276 | return base * ((readl(&clock->mul) & 0xf) + 1) / divisor; | ||
277 | } | ||
278 | |||
279 | |||
280 | static void tnetd7200_set_clock(int base, struct tnetd7200_clock *clock, | 267 | static void tnetd7200_set_clock(int base, struct tnetd7200_clock *clock, |
281 | int prediv, int postdiv, int postdiv2, int mul, u32 frequency) | 268 | int prediv, int postdiv, int postdiv2, int mul, u32 frequency) |
282 | { | 269 | { |
diff --git a/arch/mips/ar7/memory.c b/arch/mips/ar7/memory.c index 46fed44825a6..696c723dc6d4 100644 --- a/arch/mips/ar7/memory.c +++ b/arch/mips/ar7/memory.c | |||
@@ -52,7 +52,7 @@ static int __init memsize(void) | |||
52 | size <<= 1; | 52 | size <<= 1; |
53 | } while (size < (64 << 20)); | 53 | } while (size < (64 << 20)); |
54 | 54 | ||
55 | writel(tmpaddr, &addr); | 55 | writel((u32)tmpaddr, &addr); |
56 | 56 | ||
57 | return size; | 57 | return size; |
58 | } | 58 | } |
diff --git a/arch/mips/ar7/platform.c b/arch/mips/ar7/platform.c index 542244961780..2ecab6155932 100644 --- a/arch/mips/ar7/platform.c +++ b/arch/mips/ar7/platform.c | |||
@@ -28,7 +28,6 @@ | |||
28 | #include <linux/serial_8250.h> | 28 | #include <linux/serial_8250.h> |
29 | #include <linux/ioport.h> | 29 | #include <linux/ioport.h> |
30 | #include <linux/io.h> | 30 | #include <linux/io.h> |
31 | #include <linux/version.h> | ||
32 | #include <linux/vlynq.h> | 31 | #include <linux/vlynq.h> |
33 | #include <linux/leds.h> | 32 | #include <linux/leds.h> |
34 | #include <linux/string.h> | 33 | #include <linux/string.h> |
@@ -243,13 +242,13 @@ static struct platform_device physmap_flash = { | |||
243 | .num_resources = 1, | 242 | .num_resources = 1, |
244 | }; | 243 | }; |
245 | 244 | ||
246 | static u64 cpmac_dma_mask = DMA_32BIT_MASK; | 245 | static u64 cpmac_dma_mask = DMA_BIT_MASK(32); |
247 | static struct platform_device cpmac_low = { | 246 | static struct platform_device cpmac_low = { |
248 | .id = 0, | 247 | .id = 0, |
249 | .name = "cpmac", | 248 | .name = "cpmac", |
250 | .dev = { | 249 | .dev = { |
251 | .dma_mask = &cpmac_dma_mask, | 250 | .dma_mask = &cpmac_dma_mask, |
252 | .coherent_dma_mask = DMA_32BIT_MASK, | 251 | .coherent_dma_mask = DMA_BIT_MASK(32), |
253 | .platform_data = &cpmac_low_data, | 252 | .platform_data = &cpmac_low_data, |
254 | }, | 253 | }, |
255 | .resource = cpmac_low_res, | 254 | .resource = cpmac_low_res, |
@@ -261,7 +260,7 @@ static struct platform_device cpmac_high = { | |||
261 | .name = "cpmac", | 260 | .name = "cpmac", |
262 | .dev = { | 261 | .dev = { |
263 | .dma_mask = &cpmac_dma_mask, | 262 | .dma_mask = &cpmac_dma_mask, |
264 | .coherent_dma_mask = DMA_32BIT_MASK, | 263 | .coherent_dma_mask = DMA_BIT_MASK(32), |
265 | .platform_data = &cpmac_high_data, | 264 | .platform_data = &cpmac_high_data, |
266 | }, | 265 | }, |
267 | .resource = cpmac_high_res, | 266 | .resource = cpmac_high_res, |
@@ -481,6 +480,7 @@ static void __init detect_leds(void) | |||
481 | static int __init ar7_register_devices(void) | 480 | static int __init ar7_register_devices(void) |
482 | { | 481 | { |
483 | int res; | 482 | int res; |
483 | #ifdef CONFIG_SERIAL_8250 | ||
484 | static struct uart_port uart_port[2]; | 484 | static struct uart_port uart_port[2]; |
485 | 485 | ||
486 | memset(uart_port, 0, sizeof(struct uart_port) * 2); | 486 | memset(uart_port, 0, sizeof(struct uart_port) * 2); |
@@ -512,7 +512,7 @@ static int __init ar7_register_devices(void) | |||
512 | if (res) | 512 | if (res) |
513 | return res; | 513 | return res; |
514 | } | 514 | } |
515 | 515 | #endif /* CONFIG_SERIAL_8250 */ | |
516 | res = platform_device_register(&physmap_flash); | 516 | res = platform_device_register(&physmap_flash); |
517 | if (res) | 517 | if (res) |
518 | return res; | 518 | return res; |
diff --git a/arch/mips/ar7/prom.c b/arch/mips/ar7/prom.c index a320bceb2f9d..5ad6f1db6567 100644 --- a/arch/mips/ar7/prom.c +++ b/arch/mips/ar7/prom.c | |||
@@ -144,7 +144,7 @@ static char * __init lookup_psp_var_map(u8 num) | |||
144 | { | 144 | { |
145 | int i; | 145 | int i; |
146 | 146 | ||
147 | for (i = 0; i < sizeof(psp_var_map); i++) | 147 | for (i = 0; i < ARRAY_SIZE(psp_var_map); i++) |
148 | if (psp_var_map[i].num == num) | 148 | if (psp_var_map[i].num == num) |
149 | return psp_var_map[i].value; | 149 | return psp_var_map[i].value; |
150 | 150 | ||
diff --git a/arch/mips/ar7/setup.c b/arch/mips/ar7/setup.c index 6ebb5f16d967..39f6b5b96463 100644 --- a/arch/mips/ar7/setup.c +++ b/arch/mips/ar7/setup.c | |||
@@ -15,7 +15,6 @@ | |||
15 | * with this program; if not, write to the Free Software Foundation, Inc., | 15 | * with this program; if not, write to the Free Software Foundation, Inc., |
16 | * 59 Temple Place - Suite 330, Boston MA 02111-1307, USA. | 16 | * 59 Temple Place - Suite 330, Boston MA 02111-1307, USA. |
17 | */ | 17 | */ |
18 | #include <linux/version.h> | ||
19 | #include <linux/init.h> | 18 | #include <linux/init.h> |
20 | #include <linux/ioport.h> | 19 | #include <linux/ioport.h> |
21 | #include <linux/pm.h> | 20 | #include <linux/pm.h> |
diff --git a/arch/mips/cavium-octeon/smp.c b/arch/mips/cavium-octeon/smp.c index 0b891a9c6253..32d51a31dc48 100644 --- a/arch/mips/cavium-octeon/smp.c +++ b/arch/mips/cavium-octeon/smp.c | |||
@@ -194,11 +194,11 @@ static void octeon_init_secondary(void) | |||
194 | void octeon_prepare_cpus(unsigned int max_cpus) | 194 | void octeon_prepare_cpus(unsigned int max_cpus) |
195 | { | 195 | { |
196 | cvmx_write_csr(CVMX_CIU_MBOX_CLRX(cvmx_get_core_num()), 0xffffffff); | 196 | cvmx_write_csr(CVMX_CIU_MBOX_CLRX(cvmx_get_core_num()), 0xffffffff); |
197 | if (request_irq(OCTEON_IRQ_MBOX0, mailbox_interrupt, IRQF_SHARED, | 197 | if (request_irq(OCTEON_IRQ_MBOX0, mailbox_interrupt, IRQF_DISABLED, |
198 | "mailbox0", mailbox_interrupt)) { | 198 | "mailbox0", mailbox_interrupt)) { |
199 | panic("Cannot request_irq(OCTEON_IRQ_MBOX0)\n"); | 199 | panic("Cannot request_irq(OCTEON_IRQ_MBOX0)\n"); |
200 | } | 200 | } |
201 | if (request_irq(OCTEON_IRQ_MBOX1, mailbox_interrupt, IRQF_SHARED, | 201 | if (request_irq(OCTEON_IRQ_MBOX1, mailbox_interrupt, IRQF_DISABLED, |
202 | "mailbox1", mailbox_interrupt)) { | 202 | "mailbox1", mailbox_interrupt)) { |
203 | panic("Cannot request_irq(OCTEON_IRQ_MBOX1)\n"); | 203 | panic("Cannot request_irq(OCTEON_IRQ_MBOX1)\n"); |
204 | } | 204 | } |
diff --git a/arch/mips/dec/ecc-berr.c b/arch/mips/dec/ecc-berr.c index 6a17c9b508ea..7abce661b90f 100644 --- a/arch/mips/dec/ecc-berr.c +++ b/arch/mips/dec/ecc-berr.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * linux/arch/mips/dec/ecc-berr.c | ||
3 | * | ||
4 | * Bus error event handling code for systems equipped with ECC | 2 | * Bus error event handling code for systems equipped with ECC |
5 | * handling logic, i.e. DECstation/DECsystem 5000/200 (KN02), | 3 | * handling logic, i.e. DECstation/DECsystem 5000/200 (KN02), |
6 | * 5000/240 (KN03), 5000/260 (KN05) and DECsystem 5900 (KN03), | 4 | * 5000/240 (KN03), 5000/260 (KN05) and DECsystem 5900 (KN03), |
diff --git a/arch/mips/dec/int-handler.S b/arch/mips/dec/int-handler.S index 00cecdcc75f2..82c852818781 100644 --- a/arch/mips/dec/int-handler.S +++ b/arch/mips/dec/int-handler.S | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/mips/dec/int-handler.S | ||
3 | * | ||
4 | * Copyright (C) 1995, 1996, 1997 Paul M. Antoine and Harald Koerfgen | 2 | * Copyright (C) 1995, 1996, 1997 Paul M. Antoine and Harald Koerfgen |
5 | * Copyright (C) 2000, 2001, 2002, 2003, 2005 Maciej W. Rozycki | 3 | * Copyright (C) 2000, 2001, 2002, 2003, 2005 Maciej W. Rozycki |
6 | * | 4 | * |
diff --git a/arch/mips/dec/ioasic-irq.c b/arch/mips/dec/ioasic-irq.c index 3acb133668dc..cb41954fc321 100644 --- a/arch/mips/dec/ioasic-irq.c +++ b/arch/mips/dec/ioasic-irq.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * linux/arch/mips/dec/ioasic-irq.c | ||
3 | * | ||
4 | * DEC I/O ASIC interrupts. | 2 | * DEC I/O ASIC interrupts. |
5 | * | 3 | * |
6 | * Copyright (c) 2002, 2003 Maciej W. Rozycki | 4 | * Copyright (c) 2002, 2003 Maciej W. Rozycki |
diff --git a/arch/mips/dec/kn01-berr.c b/arch/mips/dec/kn01-berr.c index d3b8002bf1e7..b0dc6d53edd6 100644 --- a/arch/mips/dec/kn01-berr.c +++ b/arch/mips/dec/kn01-berr.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * linux/arch/mips/dec/kn01-berr.c | ||
3 | * | ||
4 | * Bus error event handling code for DECstation/DECsystem 3100 | 2 | * Bus error event handling code for DECstation/DECsystem 3100 |
5 | * and 2100 (KN01) systems equipped with parity error detection | 3 | * and 2100 (KN01) systems equipped with parity error detection |
6 | * logic. | 4 | * logic. |
diff --git a/arch/mips/dec/kn02-irq.c b/arch/mips/dec/kn02-irq.c index 02439dc0ba83..ed90a8deabcc 100644 --- a/arch/mips/dec/kn02-irq.c +++ b/arch/mips/dec/kn02-irq.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * linux/arch/mips/dec/kn02-irq.c | ||
3 | * | ||
4 | * DECstation 5000/200 (KN02) Control and Status Register | 2 | * DECstation 5000/200 (KN02) Control and Status Register |
5 | * interrupts. | 3 | * interrupts. |
6 | * | 4 | * |
diff --git a/arch/mips/dec/kn02xa-berr.c b/arch/mips/dec/kn02xa-berr.c index 5f04545c3606..07ca5405d48d 100644 --- a/arch/mips/dec/kn02xa-berr.c +++ b/arch/mips/dec/kn02xa-berr.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * linux/arch/mips/dec/kn02xa-berr.c | ||
3 | * | ||
4 | * Bus error event handling code for 5000-series systems equipped | 2 | * Bus error event handling code for 5000-series systems equipped |
5 | * with parity error detection logic, i.e. DECstation/DECsystem | 3 | * with parity error detection logic, i.e. DECstation/DECsystem |
6 | * 5000/120, /125, /133 (KN02-BA), 5000/150 (KN04-BA) and Personal | 4 | * 5000/120, /125, /133 (KN02-BA), 5000/150 (KN04-BA) and Personal |
diff --git a/arch/mips/dec/prom/call_o32.S b/arch/mips/dec/prom/call_o32.S index e523454bda3a..8c8498159e43 100644 --- a/arch/mips/dec/prom/call_o32.S +++ b/arch/mips/dec/prom/call_o32.S | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/mips/dec/prom/call_o32.S | ||
3 | * | ||
4 | * O32 interface for the 64 (or N32) ABI. | 2 | * O32 interface for the 64 (or N32) ABI. |
5 | * | 3 | * |
6 | * Copyright (C) 2002 Maciej W. Rozycki | 4 | * Copyright (C) 2002 Maciej W. Rozycki |
diff --git a/arch/mips/dec/prom/console.c b/arch/mips/dec/prom/console.c index 078e1a12421d..caa6e047caf1 100644 --- a/arch/mips/dec/prom/console.c +++ b/arch/mips/dec/prom/console.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/mips/dec/prom/console.c | ||
3 | * | ||
4 | * DECstation PROM-based early console support. | 2 | * DECstation PROM-based early console support. |
5 | * | 3 | * |
6 | * Copyright (C) 2004, 2007 Maciej W. Rozycki | 4 | * Copyright (C) 2004, 2007 Maciej W. Rozycki |
diff --git a/arch/mips/dec/time.c b/arch/mips/dec/time.c index 1359c03ded51..463136e6685a 100644 --- a/arch/mips/dec/time.c +++ b/arch/mips/dec/time.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * linux/arch/mips/dec/time.c | ||
3 | * | ||
4 | * Copyright (C) 1991, 1992, 1995 Linus Torvalds | 2 | * Copyright (C) 1991, 1992, 1995 Linus Torvalds |
5 | * Copyright (C) 2000, 2003 Maciej W. Rozycki | 3 | * Copyright (C) 2000, 2003 Maciej W. Rozycki |
6 | * | 4 | * |
diff --git a/arch/mips/emma/common/Makefile b/arch/mips/emma/common/Makefile index c392d28c1ef1..f27d84d1904f 100644 --- a/arch/mips/emma/common/Makefile +++ b/arch/mips/emma/common/Makefile | |||
@@ -1,7 +1,4 @@ | |||
1 | # | 1 | # |
2 | # arch/mips/emma2rh/common/Makefile | ||
3 | # Makefile for the common code of NEC EMMA2RH based board. | ||
4 | # | ||
5 | # Copyright (C) NEC Electronics Corporation 2005-2006 | 2 | # Copyright (C) NEC Electronics Corporation 2005-2006 |
6 | # | 3 | # |
7 | # This program is free software; you can redistribute it and/or modify | 4 | # This program is free software; you can redistribute it and/or modify |
diff --git a/arch/mips/emma/common/prom.c b/arch/mips/emma/common/prom.c index 120f53fbdb45..708f08761406 100644 --- a/arch/mips/emma/common/prom.c +++ b/arch/mips/emma/common/prom.c | |||
@@ -1,7 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/mips/emma2rh/common/prom.c | ||
3 | * This file is prom file. | ||
4 | * | ||
5 | * Copyright (C) NEC Electronics Corporation 2004-2006 | 2 | * Copyright (C) NEC Electronics Corporation 2004-2006 |
6 | * | 3 | * |
7 | * This file is based on the arch/mips/ddb5xxx/common/prom.c | 4 | * This file is based on the arch/mips/ddb5xxx/common/prom.c |
diff --git a/arch/mips/emma/markeins/Makefile b/arch/mips/emma/markeins/Makefile index 16e0017ba919..f8ba2508fa2b 100644 --- a/arch/mips/emma/markeins/Makefile +++ b/arch/mips/emma/markeins/Makefile | |||
@@ -1,7 +1,4 @@ | |||
1 | # | 1 | # |
2 | # arch/mips/emma2rh/markeins/Makefile | ||
3 | # Makefile for the common code of NEC EMMA2RH based board. | ||
4 | # | ||
5 | # Copyright (C) NEC Electronics Corporation 2005-2006 | 2 | # Copyright (C) NEC Electronics Corporation 2005-2006 |
6 | # | 3 | # |
7 | # This program is free software; you can redistribute it and/or modify | 4 | # This program is free software; you can redistribute it and/or modify |
diff --git a/arch/mips/emma/markeins/irq.c b/arch/mips/emma/markeins/irq.c index 43828ae796ec..9504b7ee0b7c 100644 --- a/arch/mips/emma/markeins/irq.c +++ b/arch/mips/emma/markeins/irq.c | |||
@@ -1,7 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/mips/emma2rh/markeins/irq.c | ||
3 | * This file defines the irq handler for EMMA2RH. | ||
4 | * | ||
5 | * Copyright (C) NEC Electronics Corporation 2004-2006 | 2 | * Copyright (C) NEC Electronics Corporation 2004-2006 |
6 | * | 3 | * |
7 | * This file is based on the arch/mips/ddb5xxx/ddb5477/irq.c | 4 | * This file is based on the arch/mips/ddb5xxx/ddb5477/irq.c |
diff --git a/arch/mips/emma/markeins/led.c b/arch/mips/emma/markeins/led.c index 377a181b6561..49755896857f 100644 --- a/arch/mips/emma/markeins/led.c +++ b/arch/mips/emma/markeins/led.c | |||
@@ -1,7 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/mips/emma2rh/markeins/led.c | ||
3 | * This file defines the led display for Mark-eins. | ||
4 | * | ||
5 | * Copyright (C) NEC Electronics Corporation 2004-2006 | 2 | * Copyright (C) NEC Electronics Corporation 2004-2006 |
6 | * | 3 | * |
7 | * This program is free software; you can redistribute it and/or modify | 4 | * This program is free software; you can redistribute it and/or modify |
diff --git a/arch/mips/emma/markeins/platform.c b/arch/mips/emma/markeins/platform.c index 80ae12ef87db..b05b08b92a34 100644 --- a/arch/mips/emma/markeins/platform.c +++ b/arch/mips/emma/markeins/platform.c | |||
@@ -1,7 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/mips/emma2rh/markeins/platofrm.c | ||
3 | * This file sets up platform devices for EMMA2RH Mark-eins. | ||
4 | * | ||
5 | * Copyright(C) MontaVista Software Inc, 2006 | 2 | * Copyright(C) MontaVista Software Inc, 2006 |
6 | * | 3 | * |
7 | * Author: dmitry pervushin <dpervushin@ru.mvista.com> | 4 | * Author: dmitry pervushin <dpervushin@ru.mvista.com> |
diff --git a/arch/mips/emma/markeins/setup.c b/arch/mips/emma/markeins/setup.c index 67f456500084..335dc8c1a1bb 100644 --- a/arch/mips/emma/markeins/setup.c +++ b/arch/mips/emma/markeins/setup.c | |||
@@ -1,7 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/mips/emma2rh/markeins/setup.c | ||
3 | * This file is setup for EMMA2RH Mark-eins. | ||
4 | * | ||
5 | * Copyright (C) NEC Electronics Corporation 2004-2006 | 2 | * Copyright (C) NEC Electronics Corporation 2004-2006 |
6 | * | 3 | * |
7 | * This file is based on the arch/mips/ddb5xxx/ddb5477/setup.c. | 4 | * This file is based on the arch/mips/ddb5xxx/ddb5477/setup.c. |
diff --git a/arch/mips/fw/lib/call_o32.S b/arch/mips/fw/lib/call_o32.S index bdf7d1d4081a..e0a68713b3c3 100644 --- a/arch/mips/fw/lib/call_o32.S +++ b/arch/mips/fw/lib/call_o32.S | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/mips/dec/prom/call_o32.S | ||
3 | * | ||
4 | * O32 interface for the 64 (or N32) ABI. | 2 | * O32 interface for the 64 (or N32) ABI. |
5 | * | 3 | * |
6 | * Copyright (C) 2002 Maciej W. Rozycki | 4 | * Copyright (C) 2002 Maciej W. Rozycki |
diff --git a/arch/mips/include/asm/emma/emma2rh.h b/arch/mips/include/asm/emma/emma2rh.h index 30aea91de626..2afb2fe11b30 100644 --- a/arch/mips/include/asm/emma/emma2rh.h +++ b/arch/mips/include/asm/emma/emma2rh.h | |||
@@ -1,7 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/mips/include/asm/emma/emma2rh.h | ||
3 | * This file is EMMA2RH common header. | ||
4 | * | ||
5 | * Copyright (C) NEC Electronics Corporation 2005-2006 | 2 | * Copyright (C) NEC Electronics Corporation 2005-2006 |
6 | * | 3 | * |
7 | * This file based on include/asm-mips/ddb5xxx/ddb5xxx.h | 4 | * This file based on include/asm-mips/ddb5xxx/ddb5xxx.h |
diff --git a/arch/mips/include/asm/emma/markeins.h b/arch/mips/include/asm/emma/markeins.h index 973b0628490d..2618bf230248 100644 --- a/arch/mips/include/asm/emma/markeins.h +++ b/arch/mips/include/asm/emma/markeins.h | |||
@@ -1,7 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * include/asm-mips/emma2rh/markeins.h | ||
3 | * This file is EMMA2RH board depended header. | ||
4 | * | ||
5 | * Copyright (C) NEC Electronics Corporation 2005-2006 | 2 | * Copyright (C) NEC Electronics Corporation 2005-2006 |
6 | * | 3 | * |
7 | * This file based on include/asm-mips/ddb5xxx/ddb5xxx.h | 4 | * This file based on include/asm-mips/ddb5xxx/ddb5xxx.h |
diff --git a/arch/mips/include/asm/gic.h b/arch/mips/include/asm/gic.h index 10292e37c1f7..a8f57341f123 100644 --- a/arch/mips/include/asm/gic.h +++ b/arch/mips/include/asm/gic.h | |||
@@ -20,7 +20,7 @@ | |||
20 | #define GIC_TRIG_EDGE 1 | 20 | #define GIC_TRIG_EDGE 1 |
21 | #define GIC_TRIG_LEVEL 0 | 21 | #define GIC_TRIG_LEVEL 0 |
22 | 22 | ||
23 | #if CONFIG_SMP | 23 | #ifdef CONFIG_SMP |
24 | #define GIC_NUM_INTRS (24 + NR_CPUS * 2) | 24 | #define GIC_NUM_INTRS (24 + NR_CPUS * 2) |
25 | #else | 25 | #else |
26 | #define GIC_NUM_INTRS 32 | 26 | #define GIC_NUM_INTRS 32 |
diff --git a/arch/mips/include/asm/pmc-sierra/msp71xx/war.h b/arch/mips/include/asm/pmc-sierra/msp71xx/war.h index 0bf48fc1892b..9e2ee429c529 100644 --- a/arch/mips/include/asm/pmc-sierra/msp71xx/war.h +++ b/arch/mips/include/asm/pmc-sierra/msp71xx/war.h | |||
@@ -23,6 +23,8 @@ | |||
23 | #if defined(CONFIG_PMC_MSP7120_EVAL) || defined(CONFIG_PMC_MSP7120_GW) || \ | 23 | #if defined(CONFIG_PMC_MSP7120_EVAL) || defined(CONFIG_PMC_MSP7120_GW) || \ |
24 | defined(CONFIG_PMC_MSP7120_FPGA) | 24 | defined(CONFIG_PMC_MSP7120_FPGA) |
25 | #define MIPS34K_MISSED_ITLB_WAR 1 | 25 | #define MIPS34K_MISSED_ITLB_WAR 1 |
26 | #else | ||
27 | #define MIPS34K_MISSED_ITLB_WAR 0 | ||
26 | #endif | 28 | #endif |
27 | 29 | ||
28 | #endif /* __ASM_MIPS_PMC_SIERRA_WAR_H */ | 30 | #endif /* __ASM_MIPS_PMC_SIERRA_WAR_H */ |
diff --git a/arch/mips/include/asm/processor.h b/arch/mips/include/asm/processor.h index 0f926aa0cb47..087a8884ef06 100644 --- a/arch/mips/include/asm/processor.h +++ b/arch/mips/include/asm/processor.h | |||
@@ -311,8 +311,9 @@ extern void start_thread(struct pt_regs * regs, unsigned long pc, unsigned long | |||
311 | 311 | ||
312 | unsigned long get_wchan(struct task_struct *p); | 312 | unsigned long get_wchan(struct task_struct *p); |
313 | 313 | ||
314 | #define __KSTK_TOS(tsk) ((unsigned long)task_stack_page(tsk) + THREAD_SIZE - 32) | 314 | #define __KSTK_TOS(tsk) ((unsigned long)task_stack_page(tsk) + \ |
315 | #define task_pt_regs(tsk) ((struct pt_regs *)__KSTK_TOS(tsk) - 1) | 315 | THREAD_SIZE - 32 - sizeof(struct pt_regs)) |
316 | #define task_pt_regs(tsk) ((struct pt_regs *)__KSTK_TOS(tsk)) | ||
316 | #define KSTK_EIP(tsk) (task_pt_regs(tsk)->cp0_epc) | 317 | #define KSTK_EIP(tsk) (task_pt_regs(tsk)->cp0_epc) |
317 | #define KSTK_ESP(tsk) (task_pt_regs(tsk)->regs[29]) | 318 | #define KSTK_ESP(tsk) (task_pt_regs(tsk)->regs[29]) |
318 | #define KSTK_STATUS(tsk) (task_pt_regs(tsk)->cp0_status) | 319 | #define KSTK_STATUS(tsk) (task_pt_regs(tsk)->cp0_status) |
diff --git a/arch/mips/include/asm/unistd.h b/arch/mips/include/asm/unistd.h index b70c49fdda26..e753a777949b 100644 --- a/arch/mips/include/asm/unistd.h +++ b/arch/mips/include/asm/unistd.h | |||
@@ -354,16 +354,17 @@ | |||
354 | #define __NR_pwritev (__NR_Linux + 331) | 354 | #define __NR_pwritev (__NR_Linux + 331) |
355 | #define __NR_rt_tgsigqueueinfo (__NR_Linux + 332) | 355 | #define __NR_rt_tgsigqueueinfo (__NR_Linux + 332) |
356 | #define __NR_perf_counter_open (__NR_Linux + 333) | 356 | #define __NR_perf_counter_open (__NR_Linux + 333) |
357 | #define __NR_accept4 (__NR_Linux + 334) | ||
357 | 358 | ||
358 | /* | 359 | /* |
359 | * Offset of the last Linux o32 flavoured syscall | 360 | * Offset of the last Linux o32 flavoured syscall |
360 | */ | 361 | */ |
361 | #define __NR_Linux_syscalls 333 | 362 | #define __NR_Linux_syscalls 334 |
362 | 363 | ||
363 | #endif /* _MIPS_SIM == _MIPS_SIM_ABI32 */ | 364 | #endif /* _MIPS_SIM == _MIPS_SIM_ABI32 */ |
364 | 365 | ||
365 | #define __NR_O32_Linux 4000 | 366 | #define __NR_O32_Linux 4000 |
366 | #define __NR_O32_Linux_syscalls 333 | 367 | #define __NR_O32_Linux_syscalls 334 |
367 | 368 | ||
368 | #if _MIPS_SIM == _MIPS_SIM_ABI64 | 369 | #if _MIPS_SIM == _MIPS_SIM_ABI64 |
369 | 370 | ||
@@ -664,16 +665,17 @@ | |||
664 | #define __NR_pwritev (__NR_Linux + 290) | 665 | #define __NR_pwritev (__NR_Linux + 290) |
665 | #define __NR_rt_tgsigqueueinfo (__NR_Linux + 291) | 666 | #define __NR_rt_tgsigqueueinfo (__NR_Linux + 291) |
666 | #define __NR_perf_counter_open (__NR_Linux + 292) | 667 | #define __NR_perf_counter_open (__NR_Linux + 292) |
668 | #define __NR_accept4 (__NR_Linux + 293) | ||
667 | 669 | ||
668 | /* | 670 | /* |
669 | * Offset of the last Linux 64-bit flavoured syscall | 671 | * Offset of the last Linux 64-bit flavoured syscall |
670 | */ | 672 | */ |
671 | #define __NR_Linux_syscalls 292 | 673 | #define __NR_Linux_syscalls 293 |
672 | 674 | ||
673 | #endif /* _MIPS_SIM == _MIPS_SIM_ABI64 */ | 675 | #endif /* _MIPS_SIM == _MIPS_SIM_ABI64 */ |
674 | 676 | ||
675 | #define __NR_64_Linux 5000 | 677 | #define __NR_64_Linux 5000 |
676 | #define __NR_64_Linux_syscalls 292 | 678 | #define __NR_64_Linux_syscalls 293 |
677 | 679 | ||
678 | #if _MIPS_SIM == _MIPS_SIM_NABI32 | 680 | #if _MIPS_SIM == _MIPS_SIM_NABI32 |
679 | 681 | ||
@@ -978,16 +980,17 @@ | |||
978 | #define __NR_pwritev (__NR_Linux + 294) | 980 | #define __NR_pwritev (__NR_Linux + 294) |
979 | #define __NR_rt_tgsigqueueinfo (__NR_Linux + 295) | 981 | #define __NR_rt_tgsigqueueinfo (__NR_Linux + 295) |
980 | #define __NR_perf_counter_open (__NR_Linux + 296) | 982 | #define __NR_perf_counter_open (__NR_Linux + 296) |
983 | #define __NR_accept4 (__NR_Linux + 297) | ||
981 | 984 | ||
982 | /* | 985 | /* |
983 | * Offset of the last N32 flavoured syscall | 986 | * Offset of the last N32 flavoured syscall |
984 | */ | 987 | */ |
985 | #define __NR_Linux_syscalls 296 | 988 | #define __NR_Linux_syscalls 297 |
986 | 989 | ||
987 | #endif /* _MIPS_SIM == _MIPS_SIM_NABI32 */ | 990 | #endif /* _MIPS_SIM == _MIPS_SIM_NABI32 */ |
988 | 991 | ||
989 | #define __NR_N32_Linux 6000 | 992 | #define __NR_N32_Linux 6000 |
990 | #define __NR_N32_Linux_syscalls 296 | 993 | #define __NR_N32_Linux_syscalls 297 |
991 | 994 | ||
992 | #ifdef __KERNEL__ | 995 | #ifdef __KERNEL__ |
993 | 996 | ||
diff --git a/arch/mips/jazz/jazzdma.c b/arch/mips/jazz/jazzdma.c index f0fd636723be..0d64d0f46418 100644 --- a/arch/mips/jazz/jazzdma.c +++ b/arch/mips/jazz/jazzdma.c | |||
@@ -190,7 +190,7 @@ int vdma_free(unsigned long laddr) | |||
190 | return -1; | 190 | return -1; |
191 | } | 191 | } |
192 | 192 | ||
193 | while (pgtbl[i].owner == laddr && i < VDMA_PGTBL_ENTRIES) { | 193 | while (i < VDMA_PGTBL_ENTRIES && pgtbl[i].owner == laddr) { |
194 | pgtbl[i].owner = VDMA_PAGE_EMPTY; | 194 | pgtbl[i].owner = VDMA_PAGE_EMPTY; |
195 | i++; | 195 | i++; |
196 | } | 196 | } |
diff --git a/arch/mips/kernel/head.S b/arch/mips/kernel/head.S index 492a0a8d70fb..531ce7b16124 100644 --- a/arch/mips/kernel/head.S +++ b/arch/mips/kernel/head.S | |||
@@ -188,7 +188,8 @@ NESTED(kernel_entry, 16, sp) # kernel entry point | |||
188 | 188 | ||
189 | MTC0 zero, CP0_CONTEXT # clear context register | 189 | MTC0 zero, CP0_CONTEXT # clear context register |
190 | PTR_LA $28, init_thread_union | 190 | PTR_LA $28, init_thread_union |
191 | PTR_LI sp, _THREAD_SIZE - 32 | 191 | /* Set the SP after an empty pt_regs. */ |
192 | PTR_LI sp, _THREAD_SIZE - 32 - PT_SIZE | ||
192 | PTR_ADDU sp, $28 | 193 | PTR_ADDU sp, $28 |
193 | set_saved_sp sp, t0, t1 | 194 | set_saved_sp sp, t0, t1 |
194 | PTR_SUBU sp, 4 * SZREG # init stack pointer | 195 | PTR_SUBU sp, 4 * SZREG # init stack pointer |
diff --git a/arch/mips/kernel/irq_txx9.c b/arch/mips/kernel/irq_txx9.c index a4d1462c27f7..9b78029bea70 100644 --- a/arch/mips/kernel/irq_txx9.c +++ b/arch/mips/kernel/irq_txx9.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * linux/arch/mips/kernel/irq_txx9.c | ||
3 | * | ||
4 | * Based on linux/arch/mips/jmr3927/rbhma3100/irq.c, | 2 | * Based on linux/arch/mips/jmr3927/rbhma3100/irq.c, |
5 | * linux/arch/mips/tx4927/common/tx4927_irq.c, | 3 | * linux/arch/mips/tx4927/common/tx4927_irq.c, |
6 | * linux/arch/mips/tx4938/common/irq.c | 4 | * linux/arch/mips/tx4938/common/irq.c |
diff --git a/arch/mips/kernel/module.c b/arch/mips/kernel/module.c index 3e9100dcc12d..6f51dda87fce 100644 --- a/arch/mips/kernel/module.c +++ b/arch/mips/kernel/module.c | |||
@@ -98,7 +98,8 @@ static int apply_r_mips_32_rela(struct module *me, u32 *location, Elf_Addr v) | |||
98 | static int apply_r_mips_26_rel(struct module *me, u32 *location, Elf_Addr v) | 98 | static int apply_r_mips_26_rel(struct module *me, u32 *location, Elf_Addr v) |
99 | { | 99 | { |
100 | if (v % 4) { | 100 | if (v % 4) { |
101 | printk(KERN_ERR "module %s: dangerous relocation\n", me->name); | 101 | pr_err("module %s: dangerous R_MIPS_26 REL relocation\n", |
102 | me->name); | ||
102 | return -ENOEXEC; | 103 | return -ENOEXEC; |
103 | } | 104 | } |
104 | 105 | ||
@@ -118,7 +119,8 @@ static int apply_r_mips_26_rel(struct module *me, u32 *location, Elf_Addr v) | |||
118 | static int apply_r_mips_26_rela(struct module *me, u32 *location, Elf_Addr v) | 119 | static int apply_r_mips_26_rela(struct module *me, u32 *location, Elf_Addr v) |
119 | { | 120 | { |
120 | if (v % 4) { | 121 | if (v % 4) { |
121 | printk(KERN_ERR "module %s: dangerous relocation\n", me->name); | 122 | pr_err("module %s: dangerous R_MIPS_26 RELArelocation\n", |
123 | me->name); | ||
122 | return -ENOEXEC; | 124 | return -ENOEXEC; |
123 | } | 125 | } |
124 | 126 | ||
@@ -222,7 +224,7 @@ static int apply_r_mips_lo16_rel(struct module *me, u32 *location, Elf_Addr v) | |||
222 | return 0; | 224 | return 0; |
223 | 225 | ||
224 | out_danger: | 226 | out_danger: |
225 | printk(KERN_ERR "module %s: dangerous " "relocation\n", me->name); | 227 | pr_err("module %s: dangerous R_MIPS_LO16 REL relocation\n", me->name); |
226 | 228 | ||
227 | return -ENOEXEC; | 229 | return -ENOEXEC; |
228 | } | 230 | } |
@@ -301,7 +303,7 @@ int apply_relocate(Elf_Shdr *sechdrs, const char *strtab, | |||
301 | /* This is the symbol it is referring to */ | 303 | /* This is the symbol it is referring to */ |
302 | sym = (Elf_Sym *)sechdrs[symindex].sh_addr | 304 | sym = (Elf_Sym *)sechdrs[symindex].sh_addr |
303 | + ELF_MIPS_R_SYM(rel[i]); | 305 | + ELF_MIPS_R_SYM(rel[i]); |
304 | if (!sym->st_value) { | 306 | if (IS_ERR_VALUE(sym->st_value)) { |
305 | /* Ignore unresolved weak symbol */ | 307 | /* Ignore unresolved weak symbol */ |
306 | if (ELF_ST_BIND(sym->st_info) == STB_WEAK) | 308 | if (ELF_ST_BIND(sym->st_info) == STB_WEAK) |
307 | continue; | 309 | continue; |
@@ -341,7 +343,7 @@ int apply_relocate_add(Elf_Shdr *sechdrs, const char *strtab, | |||
341 | /* This is the symbol it is referring to */ | 343 | /* This is the symbol it is referring to */ |
342 | sym = (Elf_Sym *)sechdrs[symindex].sh_addr | 344 | sym = (Elf_Sym *)sechdrs[symindex].sh_addr |
343 | + ELF_MIPS_R_SYM(rel[i]); | 345 | + ELF_MIPS_R_SYM(rel[i]); |
344 | if (!sym->st_value) { | 346 | if (IS_ERR_VALUE(sym->st_value)) { |
345 | /* Ignore unresolved weak symbol */ | 347 | /* Ignore unresolved weak symbol */ |
346 | if (ELF_ST_BIND(sym->st_info) == STB_WEAK) | 348 | if (ELF_ST_BIND(sym->st_info) == STB_WEAK) |
347 | continue; | 349 | continue; |
diff --git a/arch/mips/kernel/proc.c b/arch/mips/kernel/proc.c index e0a4ac18fa07..26109c4d5170 100644 --- a/arch/mips/kernel/proc.c +++ b/arch/mips/kernel/proc.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * linux/arch/mips/kernel/proc.c | ||
3 | * | ||
4 | * Copyright (C) 1995, 1996, 2001 Ralf Baechle | 2 | * Copyright (C) 1995, 1996, 2001 Ralf Baechle |
5 | * Copyright (C) 2001, 2004 MIPS Technologies, Inc. | 3 | * Copyright (C) 2001, 2004 MIPS Technologies, Inc. |
6 | * Copyright (C) 2004 Maciej W. Rozycki | 4 | * Copyright (C) 2004 Maciej W. Rozycki |
diff --git a/arch/mips/kernel/process.c b/arch/mips/kernel/process.c index c09d681b7181..f3d73e1831c1 100644 --- a/arch/mips/kernel/process.c +++ b/arch/mips/kernel/process.c | |||
@@ -115,7 +115,7 @@ int copy_thread(unsigned long clone_flags, unsigned long usp, | |||
115 | { | 115 | { |
116 | struct thread_info *ti = task_thread_info(p); | 116 | struct thread_info *ti = task_thread_info(p); |
117 | struct pt_regs *childregs; | 117 | struct pt_regs *childregs; |
118 | long childksp; | 118 | unsigned long childksp; |
119 | p->set_child_tid = p->clear_child_tid = NULL; | 119 | p->set_child_tid = p->clear_child_tid = NULL; |
120 | 120 | ||
121 | childksp = (unsigned long)task_stack_page(p) + THREAD_SIZE - 32; | 121 | childksp = (unsigned long)task_stack_page(p) + THREAD_SIZE - 32; |
@@ -132,6 +132,8 @@ int copy_thread(unsigned long clone_flags, unsigned long usp, | |||
132 | 132 | ||
133 | /* set up new TSS. */ | 133 | /* set up new TSS. */ |
134 | childregs = (struct pt_regs *) childksp - 1; | 134 | childregs = (struct pt_regs *) childksp - 1; |
135 | /* Put the stack after the struct pt_regs. */ | ||
136 | childksp = (unsigned long) childregs; | ||
135 | *childregs = *regs; | 137 | *childregs = *regs; |
136 | childregs->regs[7] = 0; /* Clear error flag */ | 138 | childregs->regs[7] = 0; /* Clear error flag */ |
137 | 139 | ||
diff --git a/arch/mips/kernel/scall32-o32.S b/arch/mips/kernel/scall32-o32.S index 20a86e08fd58..b57082123536 100644 --- a/arch/mips/kernel/scall32-o32.S +++ b/arch/mips/kernel/scall32-o32.S | |||
@@ -654,6 +654,7 @@ einval: li v0, -ENOSYS | |||
654 | sys sys_pwritev 6 | 654 | sys sys_pwritev 6 |
655 | sys sys_rt_tgsigqueueinfo 4 | 655 | sys sys_rt_tgsigqueueinfo 4 |
656 | sys sys_perf_counter_open 5 | 656 | sys sys_perf_counter_open 5 |
657 | sys sys_accept4 4 | ||
657 | .endm | 658 | .endm |
658 | 659 | ||
659 | /* We pre-compute the number of _instruction_ bytes needed to | 660 | /* We pre-compute the number of _instruction_ bytes needed to |
diff --git a/arch/mips/kernel/scall64-64.S b/arch/mips/kernel/scall64-64.S index b046130d4c5d..3d866f24e064 100644 --- a/arch/mips/kernel/scall64-64.S +++ b/arch/mips/kernel/scall64-64.S | |||
@@ -491,4 +491,5 @@ sys_call_table: | |||
491 | PTR sys_pwritev /* 5390 */ | 491 | PTR sys_pwritev /* 5390 */ |
492 | PTR sys_rt_tgsigqueueinfo | 492 | PTR sys_rt_tgsigqueueinfo |
493 | PTR sys_perf_counter_open | 493 | PTR sys_perf_counter_open |
494 | PTR sys_accept4 | ||
494 | .size sys_call_table,.-sys_call_table | 495 | .size sys_call_table,.-sys_call_table |
diff --git a/arch/mips/kernel/scall64-n32.S b/arch/mips/kernel/scall64-n32.S index 15874f9812cc..e855b118a079 100644 --- a/arch/mips/kernel/scall64-n32.S +++ b/arch/mips/kernel/scall64-n32.S | |||
@@ -417,4 +417,5 @@ EXPORT(sysn32_call_table) | |||
417 | PTR sys_pwritev | 417 | PTR sys_pwritev |
418 | PTR compat_sys_rt_tgsigqueueinfo /* 5295 */ | 418 | PTR compat_sys_rt_tgsigqueueinfo /* 5295 */ |
419 | PTR sys_perf_counter_open | 419 | PTR sys_perf_counter_open |
420 | PTR sys_accept4 | ||
420 | .size sysn32_call_table,.-sysn32_call_table | 421 | .size sysn32_call_table,.-sysn32_call_table |
diff --git a/arch/mips/kernel/scall64-o32.S b/arch/mips/kernel/scall64-o32.S index 781e0f1e9533..0c49f1a660be 100644 --- a/arch/mips/kernel/scall64-o32.S +++ b/arch/mips/kernel/scall64-o32.S | |||
@@ -537,4 +537,5 @@ sys_call_table: | |||
537 | PTR compat_sys_pwritev | 537 | PTR compat_sys_pwritev |
538 | PTR compat_sys_rt_tgsigqueueinfo | 538 | PTR compat_sys_rt_tgsigqueueinfo |
539 | PTR sys_perf_counter_open | 539 | PTR sys_perf_counter_open |
540 | PTR sys_accept4 | ||
540 | .size sys_call_table,.-sys_call_table | 541 | .size sys_call_table,.-sys_call_table |
diff --git a/arch/mips/kernel/smtc.c b/arch/mips/kernel/smtc.c index 8a0626cbb108..c16bb6d6c25c 100644 --- a/arch/mips/kernel/smtc.c +++ b/arch/mips/kernel/smtc.c | |||
@@ -465,11 +465,8 @@ void smtc_prepare_cpus(int cpus) | |||
465 | smtc_configure_tlb(); | 465 | smtc_configure_tlb(); |
466 | 466 | ||
467 | for (tc = 0, vpe = 0 ; (vpe < nvpe) && (tc < ntc) ; vpe++) { | 467 | for (tc = 0, vpe = 0 ; (vpe < nvpe) && (tc < ntc) ; vpe++) { |
468 | /* | 468 | if (tcpervpe[vpe] == 0) |
469 | * Set the MVP bits. | 469 | continue; |
470 | */ | ||
471 | settc(tc); | ||
472 | write_vpe_c0_vpeconf0(read_vpe_c0_vpeconf0() | VPECONF0_MVP); | ||
473 | if (vpe != 0) | 470 | if (vpe != 0) |
474 | printk(", "); | 471 | printk(", "); |
475 | printk("VPE %d: TC", vpe); | 472 | printk("VPE %d: TC", vpe); |
@@ -488,6 +485,12 @@ void smtc_prepare_cpus(int cpus) | |||
488 | } | 485 | } |
489 | if (vpe != 0) { | 486 | if (vpe != 0) { |
490 | /* | 487 | /* |
488 | * Allow this VPE to control others. | ||
489 | */ | ||
490 | write_vpe_c0_vpeconf0(read_vpe_c0_vpeconf0() | | ||
491 | VPECONF0_MVP); | ||
492 | |||
493 | /* | ||
491 | * Clear any stale software interrupts from VPE's Cause | 494 | * Clear any stale software interrupts from VPE's Cause |
492 | */ | 495 | */ |
493 | write_vpe_c0_cause(0); | 496 | write_vpe_c0_cause(0); |
diff --git a/arch/mips/kernel/stacktrace.c b/arch/mips/kernel/stacktrace.c index 58f5cd76c8c3..d52ff77baf3f 100644 --- a/arch/mips/kernel/stacktrace.c +++ b/arch/mips/kernel/stacktrace.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/mips/kernel/stacktrace.c | ||
3 | * | ||
4 | * Stack trace management functions | 2 | * Stack trace management functions |
5 | * | 3 | * |
6 | * Copyright (C) 2006 Atsushi Nemoto <anemo@mba.ocn.ne.jp> | 4 | * Copyright (C) 2006 Atsushi Nemoto <anemo@mba.ocn.ne.jp> |
diff --git a/arch/mips/kernel/vpe.c b/arch/mips/kernel/vpe.c index 07b9ec2c6e3d..9a1ab7e87fd4 100644 --- a/arch/mips/kernel/vpe.c +++ b/arch/mips/kernel/vpe.c | |||
@@ -73,7 +73,7 @@ static int major; | |||
73 | static const int minor = 1; /* fixed for now */ | 73 | static const int minor = 1; /* fixed for now */ |
74 | 74 | ||
75 | #ifdef CONFIG_MIPS_APSP_KSPD | 75 | #ifdef CONFIG_MIPS_APSP_KSPD |
76 | static struct kspd_notifications kspd_events; | 76 | static struct kspd_notifications kspd_events; |
77 | static int kspd_events_reqd = 0; | 77 | static int kspd_events_reqd = 0; |
78 | #endif | 78 | #endif |
79 | 79 | ||
@@ -155,10 +155,9 @@ struct { | |||
155 | }; | 155 | }; |
156 | 156 | ||
157 | static void release_progmem(void *ptr); | 157 | static void release_progmem(void *ptr); |
158 | extern void save_gp_address(unsigned int secbase, unsigned int rel); | ||
159 | 158 | ||
160 | /* get the vpe associated with this minor */ | 159 | /* get the vpe associated with this minor */ |
161 | struct vpe *get_vpe(int minor) | 160 | static struct vpe *get_vpe(int minor) |
162 | { | 161 | { |
163 | struct vpe *v; | 162 | struct vpe *v; |
164 | 163 | ||
@@ -174,7 +173,7 @@ struct vpe *get_vpe(int minor) | |||
174 | } | 173 | } |
175 | 174 | ||
176 | /* get the vpe associated with this minor */ | 175 | /* get the vpe associated with this minor */ |
177 | struct tc *get_tc(int index) | 176 | static struct tc *get_tc(int index) |
178 | { | 177 | { |
179 | struct tc *t; | 178 | struct tc *t; |
180 | 179 | ||
@@ -186,20 +185,8 @@ struct tc *get_tc(int index) | |||
186 | return NULL; | 185 | return NULL; |
187 | } | 186 | } |
188 | 187 | ||
189 | struct tc *get_tc_unused(void) | ||
190 | { | ||
191 | struct tc *t; | ||
192 | |||
193 | list_for_each_entry(t, &vpecontrol.tc_list, list) { | ||
194 | if (t->state == TC_STATE_UNUSED) | ||
195 | return t; | ||
196 | } | ||
197 | |||
198 | return NULL; | ||
199 | } | ||
200 | |||
201 | /* allocate a vpe and associate it with this minor (or index) */ | 188 | /* allocate a vpe and associate it with this minor (or index) */ |
202 | struct vpe *alloc_vpe(int minor) | 189 | static struct vpe *alloc_vpe(int minor) |
203 | { | 190 | { |
204 | struct vpe *v; | 191 | struct vpe *v; |
205 | 192 | ||
@@ -216,7 +203,7 @@ struct vpe *alloc_vpe(int minor) | |||
216 | } | 203 | } |
217 | 204 | ||
218 | /* allocate a tc. At startup only tc0 is running, all other can be halted. */ | 205 | /* allocate a tc. At startup only tc0 is running, all other can be halted. */ |
219 | struct tc *alloc_tc(int index) | 206 | static struct tc *alloc_tc(int index) |
220 | { | 207 | { |
221 | struct tc *tc; | 208 | struct tc *tc; |
222 | 209 | ||
@@ -232,7 +219,7 @@ out: | |||
232 | } | 219 | } |
233 | 220 | ||
234 | /* clean up and free everything */ | 221 | /* clean up and free everything */ |
235 | void release_vpe(struct vpe *v) | 222 | static void release_vpe(struct vpe *v) |
236 | { | 223 | { |
237 | list_del(&v->list); | 224 | list_del(&v->list); |
238 | if (v->load_addr) | 225 | if (v->load_addr) |
@@ -240,7 +227,7 @@ void release_vpe(struct vpe *v) | |||
240 | kfree(v); | 227 | kfree(v); |
241 | } | 228 | } |
242 | 229 | ||
243 | void dump_mtregs(void) | 230 | static void dump_mtregs(void) |
244 | { | 231 | { |
245 | unsigned long val; | 232 | unsigned long val; |
246 | 233 | ||
@@ -327,7 +314,8 @@ static void layout_sections(struct module *mod, const Elf_Ehdr * hdr, | |||
327 | || (s->sh_flags & masks[m][1]) | 314 | || (s->sh_flags & masks[m][1]) |
328 | || s->sh_entsize != ~0UL) | 315 | || s->sh_entsize != ~0UL) |
329 | continue; | 316 | continue; |
330 | s->sh_entsize = get_offset(&mod->core_size, s); | 317 | s->sh_entsize = |
318 | get_offset((unsigned long *)&mod->core_size, s); | ||
331 | } | 319 | } |
332 | 320 | ||
333 | if (m == 0) | 321 | if (m == 0) |
@@ -461,16 +449,15 @@ static int apply_r_mips_lo16(struct module *me, uint32_t *location, | |||
461 | { | 449 | { |
462 | unsigned long insnlo = *location; | 450 | unsigned long insnlo = *location; |
463 | Elf32_Addr val, vallo; | 451 | Elf32_Addr val, vallo; |
452 | struct mips_hi16 *l, *next; | ||
464 | 453 | ||
465 | /* Sign extend the addend we extract from the lo insn. */ | 454 | /* Sign extend the addend we extract from the lo insn. */ |
466 | vallo = ((insnlo & 0xffff) ^ 0x8000) - 0x8000; | 455 | vallo = ((insnlo & 0xffff) ^ 0x8000) - 0x8000; |
467 | 456 | ||
468 | if (mips_hi16_list != NULL) { | 457 | if (mips_hi16_list != NULL) { |
469 | struct mips_hi16 *l; | ||
470 | 458 | ||
471 | l = mips_hi16_list; | 459 | l = mips_hi16_list; |
472 | while (l != NULL) { | 460 | while (l != NULL) { |
473 | struct mips_hi16 *next; | ||
474 | unsigned long insn; | 461 | unsigned long insn; |
475 | 462 | ||
476 | /* | 463 | /* |
@@ -480,7 +467,7 @@ static int apply_r_mips_lo16(struct module *me, uint32_t *location, | |||
480 | printk(KERN_DEBUG "VPE loader: " | 467 | printk(KERN_DEBUG "VPE loader: " |
481 | "apply_r_mips_lo16/hi16: \t" | 468 | "apply_r_mips_lo16/hi16: \t" |
482 | "inconsistent value information\n"); | 469 | "inconsistent value information\n"); |
483 | return -ENOEXEC; | 470 | goto out_free; |
484 | } | 471 | } |
485 | 472 | ||
486 | /* | 473 | /* |
@@ -518,6 +505,16 @@ static int apply_r_mips_lo16(struct module *me, uint32_t *location, | |||
518 | *location = insnlo; | 505 | *location = insnlo; |
519 | 506 | ||
520 | return 0; | 507 | return 0; |
508 | |||
509 | out_free: | ||
510 | while (l != NULL) { | ||
511 | next = l->next; | ||
512 | kfree(l); | ||
513 | l = next; | ||
514 | } | ||
515 | mips_hi16_list = NULL; | ||
516 | |||
517 | return -ENOEXEC; | ||
521 | } | 518 | } |
522 | 519 | ||
523 | static int (*reloc_handlers[]) (struct module *me, uint32_t *location, | 520 | static int (*reloc_handlers[]) (struct module *me, uint32_t *location, |
@@ -541,7 +538,7 @@ static char *rstrs[] = { | |||
541 | [R_MIPS_PC16] = "MIPS_PC16" | 538 | [R_MIPS_PC16] = "MIPS_PC16" |
542 | }; | 539 | }; |
543 | 540 | ||
544 | int apply_relocations(Elf32_Shdr *sechdrs, | 541 | static int apply_relocations(Elf32_Shdr *sechdrs, |
545 | const char *strtab, | 542 | const char *strtab, |
546 | unsigned int symindex, | 543 | unsigned int symindex, |
547 | unsigned int relsec, | 544 | unsigned int relsec, |
@@ -586,7 +583,7 @@ int apply_relocations(Elf32_Shdr *sechdrs, | |||
586 | return 0; | 583 | return 0; |
587 | } | 584 | } |
588 | 585 | ||
589 | void save_gp_address(unsigned int secbase, unsigned int rel) | 586 | static inline void save_gp_address(unsigned int secbase, unsigned int rel) |
590 | { | 587 | { |
591 | gp_addr = secbase + rel; | 588 | gp_addr = secbase + rel; |
592 | gp_offs = gp_addr - (secbase & 0xffff0000); | 589 | gp_offs = gp_addr - (secbase & 0xffff0000); |
diff --git a/arch/mips/mipssim/sim_time.c b/arch/mips/mipssim/sim_time.c index 0cea932f1241..5492c42f7650 100644 --- a/arch/mips/mipssim/sim_time.c +++ b/arch/mips/mipssim/sim_time.c | |||
@@ -89,13 +89,13 @@ unsigned __cpuinit get_c0_compare_int(void) | |||
89 | if (cpu_has_veic) { | 89 | if (cpu_has_veic) { |
90 | set_vi_handler(MSC01E_INT_CPUCTR, mips_timer_dispatch); | 90 | set_vi_handler(MSC01E_INT_CPUCTR, mips_timer_dispatch); |
91 | mips_cpu_timer_irq = MSC01E_INT_BASE + MSC01E_INT_CPUCTR; | 91 | mips_cpu_timer_irq = MSC01E_INT_BASE + MSC01E_INT_CPUCTR; |
92 | } else { | 92 | |
93 | #endif | 93 | return mips_cpu_timer_irq; |
94 | { | ||
95 | if (cpu_has_vint) | ||
96 | set_vi_handler(cp0_compare_irq, mips_timer_dispatch); | ||
97 | mips_cpu_timer_irq = MIPS_CPU_IRQ_BASE + cp0_compare_irq; | ||
98 | } | 94 | } |
95 | #endif | ||
96 | if (cpu_has_vint) | ||
97 | set_vi_handler(cp0_compare_irq, mips_timer_dispatch); | ||
98 | mips_cpu_timer_irq = MIPS_CPU_IRQ_BASE + cp0_compare_irq; | ||
99 | 99 | ||
100 | return mips_cpu_timer_irq; | 100 | return mips_cpu_timer_irq; |
101 | } | 101 | } |
diff --git a/arch/mips/mm/c-octeon.c b/arch/mips/mm/c-octeon.c index b165cdcb2818..10ab69f7183f 100644 --- a/arch/mips/mm/c-octeon.c +++ b/arch/mips/mm/c-octeon.c | |||
@@ -289,7 +289,7 @@ static void cache_parity_error_octeon(int non_recoverable) | |||
289 | } | 289 | } |
290 | 290 | ||
291 | /** | 291 | /** |
292 | * Called when the the exception is not recoverable | 292 | * Called when the the exception is recoverable |
293 | */ | 293 | */ |
294 | 294 | ||
295 | asmlinkage void cache_parity_error_octeon_recoverable(void) | 295 | asmlinkage void cache_parity_error_octeon_recoverable(void) |
@@ -298,7 +298,7 @@ asmlinkage void cache_parity_error_octeon_recoverable(void) | |||
298 | } | 298 | } |
299 | 299 | ||
300 | /** | 300 | /** |
301 | * Called when the the exception is recoverable | 301 | * Called when the the exception is not recoverable |
302 | */ | 302 | */ |
303 | 303 | ||
304 | asmlinkage void cache_parity_error_octeon_non_recoverable(void) | 304 | asmlinkage void cache_parity_error_octeon_non_recoverable(void) |
diff --git a/arch/mips/mm/extable.c b/arch/mips/mm/extable.c index 297fb9f390dc..9d25d2ba4b9e 100644 --- a/arch/mips/mm/extable.c +++ b/arch/mips/mm/extable.c | |||
@@ -1,5 +1,9 @@ | |||
1 | /* | 1 | /* |
2 | * linux/arch/mips/mm/extable.c | 2 | * This file is subject to the terms and conditions of the GNU General Public |
3 | * License. See the file "COPYING" in the main directory of this archive | ||
4 | * for more details. | ||
5 | * | ||
6 | * Copyright (C) 1997, 99, 2001 - 2004 Ralf Baechle <ralf@linux-mips.org> | ||
3 | */ | 7 | */ |
4 | #include <linux/module.h> | 8 | #include <linux/module.h> |
5 | #include <linux/spinlock.h> | 9 | #include <linux/spinlock.h> |
diff --git a/arch/mips/mm/fault.c b/arch/mips/mm/fault.c index 6751ce9ede9e..f956ecbb8136 100644 --- a/arch/mips/mm/fault.c +++ b/arch/mips/mm/fault.c | |||
@@ -171,6 +171,7 @@ out_of_memory: | |||
171 | * We ran out of memory, call the OOM killer, and return the userspace | 171 | * We ran out of memory, call the OOM killer, and return the userspace |
172 | * (which will retry the fault, or kill us if we got oom-killed). | 172 | * (which will retry the fault, or kill us if we got oom-killed). |
173 | */ | 173 | */ |
174 | up_read(&mm->mmap_sem); | ||
174 | pagefault_out_of_memory(); | 175 | pagefault_out_of_memory(); |
175 | return; | 176 | return; |
176 | 177 | ||
diff --git a/arch/mips/mti-malta/malta-int.c b/arch/mips/mti-malta/malta-int.c index a8756f82c31b..3e0a9b35ba5c 100644 --- a/arch/mips/mti-malta/malta-int.c +++ b/arch/mips/mti-malta/malta-int.c | |||
@@ -331,6 +331,7 @@ static struct irqaction irq_call = { | |||
331 | .flags = IRQF_DISABLED|IRQF_PERCPU, | 331 | .flags = IRQF_DISABLED|IRQF_PERCPU, |
332 | .name = "IPI_call" | 332 | .name = "IPI_call" |
333 | }; | 333 | }; |
334 | #endif /* CONFIG_MIPS_MT_SMP */ | ||
334 | 335 | ||
335 | static int gic_resched_int_base; | 336 | static int gic_resched_int_base; |
336 | static int gic_call_int_base; | 337 | static int gic_call_int_base; |
@@ -346,7 +347,6 @@ unsigned int plat_ipi_resched_int_xlate(unsigned int cpu) | |||
346 | { | 347 | { |
347 | return GIC_RESCHED_INT(cpu); | 348 | return GIC_RESCHED_INT(cpu); |
348 | } | 349 | } |
349 | #endif /* CONFIG_MIPS_MT_SMP */ | ||
350 | 350 | ||
351 | static struct irqaction i8259irq = { | 351 | static struct irqaction i8259irq = { |
352 | .handler = no_action, | 352 | .handler = no_action, |
diff --git a/arch/mips/nxp/pnx8550/common/time.c b/arch/mips/nxp/pnx8550/common/time.c index 8df43e9e4d90..18b192784877 100644 --- a/arch/mips/nxp/pnx8550/common/time.c +++ b/arch/mips/nxp/pnx8550/common/time.c | |||
@@ -138,7 +138,7 @@ __init void plat_time_init(void) | |||
138 | * HZ timer interrupts per second. | 138 | * HZ timer interrupts per second. |
139 | */ | 139 | */ |
140 | mips_hpt_frequency = 27UL * ((1000000UL * n)/(m * pow2p)); | 140 | mips_hpt_frequency = 27UL * ((1000000UL * n)/(m * pow2p)); |
141 | cpj = (mips_hpt_frequency + HZ / 2) / HZ; | 141 | cpj = DIV_ROUND_CLOSEST(mips_hpt_frequency, HZ); |
142 | write_c0_count(0); | 142 | write_c0_count(0); |
143 | timer_ack(); | 143 | timer_ack(); |
144 | 144 | ||
diff --git a/arch/mips/pci/fixup-emma2rh.c b/arch/mips/pci/fixup-emma2rh.c index fba5aad00d51..0d9ccf4dfc5a 100644 --- a/arch/mips/pci/fixup-emma2rh.c +++ b/arch/mips/pci/fixup-emma2rh.c | |||
@@ -1,7 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/mips/pci/fixup-emma2rh.c | ||
3 | * This file defines the PCI configration. | ||
4 | * | ||
5 | * Copyright (C) NEC Electronics Corporation 2004-2006 | 2 | * Copyright (C) NEC Electronics Corporation 2004-2006 |
6 | * | 3 | * |
7 | * This file is based on the arch/mips/ddb5xxx/ddb5477/pci.c | 4 | * This file is based on the arch/mips/ddb5xxx/ddb5477/pci.c |
diff --git a/arch/mips/pci/fixup-sb1250.c b/arch/mips/pci/fixup-sb1250.c index 0ad39e53f7b1..f0bb9146e6c0 100644 --- a/arch/mips/pci/fixup-sb1250.c +++ b/arch/mips/pci/fixup-sb1250.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/mips/pci/fixup-sb1250.c | ||
3 | * | ||
4 | * Copyright (C) 2004, 2006 MIPS Technologies, Inc. All rights reserved. | 2 | * Copyright (C) 2004, 2006 MIPS Technologies, Inc. All rights reserved. |
5 | * Author: Maciej W. Rozycki <macro@mips.com> | 3 | * Author: Maciej W. Rozycki <macro@mips.com> |
6 | * | 4 | * |
diff --git a/arch/mips/pci/ops-emma2rh.c b/arch/mips/pci/ops-emma2rh.c index 5947a70b0b7f..710aef5c070e 100644 --- a/arch/mips/pci/ops-emma2rh.c +++ b/arch/mips/pci/ops-emma2rh.c | |||
@@ -1,7 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/mips/pci/ops-emma2rh.c | ||
3 | * This file defines the PCI operation for EMMA2RH. | ||
4 | * | ||
5 | * Copyright (C) NEC Electronics Corporation 2004-2006 | 2 | * Copyright (C) NEC Electronics Corporation 2004-2006 |
6 | * | 3 | * |
7 | * This file is based on the arch/mips/pci/ops-vr41xx.c | 4 | * This file is based on the arch/mips/pci/ops-vr41xx.c |
diff --git a/arch/mips/pci/pci-emma2rh.c b/arch/mips/pci/pci-emma2rh.c index 2df4190232cd..773e34ff4d1c 100644 --- a/arch/mips/pci/pci-emma2rh.c +++ b/arch/mips/pci/pci-emma2rh.c | |||
@@ -1,7 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/mips/pci/pci-emma2rh.c | ||
3 | * This file defines the PCI configration. | ||
4 | * | ||
5 | * Copyright (C) NEC Electronics Corporation 2004-2006 | 2 | * Copyright (C) NEC Electronics Corporation 2004-2006 |
6 | * | 3 | * |
7 | * This file is based on the arch/mips/ddb5xxx/ddb5477/pci.c | 4 | * This file is based on the arch/mips/ddb5xxx/ddb5477/pci.c |
diff --git a/arch/mips/pci/pci-tx4927.c b/arch/mips/pci/pci-tx4927.c index aaa900596792..a5807406a7f1 100644 --- a/arch/mips/pci/pci-tx4927.c +++ b/arch/mips/pci/pci-tx4927.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * linux/arch/mips/pci/pci-tx4927.c | ||
3 | * | ||
4 | * Based on linux/arch/mips/txx9/rbtx4938/setup.c, | 2 | * Based on linux/arch/mips/txx9/rbtx4938/setup.c, |
5 | * and RBTX49xx patch from CELF patch archive. | 3 | * and RBTX49xx patch from CELF patch archive. |
6 | * | 4 | * |
diff --git a/arch/mips/pci/pci-tx4938.c b/arch/mips/pci/pci-tx4938.c index 1ea257bc3b8f..20e45f30b2ef 100644 --- a/arch/mips/pci/pci-tx4938.c +++ b/arch/mips/pci/pci-tx4938.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * linux/arch/mips/pci/pci-tx4938.c | ||
3 | * | ||
4 | * Based on linux/arch/mips/txx9/rbtx4938/setup.c, | 2 | * Based on linux/arch/mips/txx9/rbtx4938/setup.c, |
5 | * and RBTX49xx patch from CELF patch archive. | 3 | * and RBTX49xx patch from CELF patch archive. |
6 | * | 4 | * |
diff --git a/arch/mips/pci/pci-tx4939.c b/arch/mips/pci/pci-tx4939.c index 5fecf1cdc325..9ef840693baf 100644 --- a/arch/mips/pci/pci-tx4939.c +++ b/arch/mips/pci/pci-tx4939.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * linux/arch/mips/pci/pci-tx4939.c | ||
3 | * | ||
4 | * Based on linux/arch/mips/txx9/rbtx4939/setup.c, | 2 | * Based on linux/arch/mips/txx9/rbtx4939/setup.c, |
5 | * and RBTX49xx patch from CELF patch archive. | 3 | * and RBTX49xx patch from CELF patch archive. |
6 | * | 4 | * |
diff --git a/arch/mips/pci/pcie-octeon.c b/arch/mips/pci/pcie-octeon.c index 75262247f3e4..6aa5c542d52d 100644 --- a/arch/mips/pci/pcie-octeon.c +++ b/arch/mips/pci/pcie-octeon.c | |||
@@ -1040,19 +1040,29 @@ static inline int octeon_pcie_read_config(int pcie_port, struct pci_bus *bus, | |||
1040 | int bus_number = bus->number; | 1040 | int bus_number = bus->number; |
1041 | 1041 | ||
1042 | /* | 1042 | /* |
1043 | * We need to force the bus number to be zero on the root | 1043 | * For the top level bus make sure our hardware bus number |
1044 | * bus. Linux numbers the 2nd root bus to start after all | 1044 | * matches the software one. |
1045 | * buses on root 0. | ||
1046 | */ | 1045 | */ |
1047 | if (bus->parent == NULL) | 1046 | if (bus->parent == NULL) { |
1048 | bus_number = 0; | 1047 | union cvmx_pciercx_cfg006 pciercx_cfg006; |
1048 | pciercx_cfg006.u32 = cvmx_pcie_cfgx_read(pcie_port, | ||
1049 | CVMX_PCIERCX_CFG006(pcie_port)); | ||
1050 | if (pciercx_cfg006.s.pbnum != bus_number) { | ||
1051 | pciercx_cfg006.s.pbnum = bus_number; | ||
1052 | pciercx_cfg006.s.sbnum = bus_number; | ||
1053 | pciercx_cfg006.s.subbnum = bus_number; | ||
1054 | cvmx_pcie_cfgx_write(pcie_port, | ||
1055 | CVMX_PCIERCX_CFG006(pcie_port), | ||
1056 | pciercx_cfg006.u32); | ||
1057 | } | ||
1058 | } | ||
1049 | 1059 | ||
1050 | /* | 1060 | /* |
1051 | * PCIe only has a single device connected to Octeon. It is | 1061 | * PCIe only has a single device connected to Octeon. It is |
1052 | * always device ID 0. Don't bother doing reads for other | 1062 | * always device ID 0. Don't bother doing reads for other |
1053 | * device IDs on the first segment. | 1063 | * device IDs on the first segment. |
1054 | */ | 1064 | */ |
1055 | if ((bus_number == 0) && (devfn >> 3 != 0)) | 1065 | if ((bus->parent == NULL) && (devfn >> 3 != 0)) |
1056 | return PCIBIOS_FUNC_NOT_SUPPORTED; | 1066 | return PCIBIOS_FUNC_NOT_SUPPORTED; |
1057 | 1067 | ||
1058 | /* | 1068 | /* |
@@ -1070,7 +1080,7 @@ static inline int octeon_pcie_read_config(int pcie_port, struct pci_bus *bus, | |||
1070 | * bridge only respondes to device ID 0, function | 1080 | * bridge only respondes to device ID 0, function |
1071 | * 0-1 | 1081 | * 0-1 |
1072 | */ | 1082 | */ |
1073 | if ((bus_number == 0) && (devfn >= 2)) | 1083 | if ((bus->parent == NULL) && (devfn >= 2)) |
1074 | return PCIBIOS_FUNC_NOT_SUPPORTED; | 1084 | return PCIBIOS_FUNC_NOT_SUPPORTED; |
1075 | /* | 1085 | /* |
1076 | * The PCI-X slots are device ID 2,3. Choose one of | 1086 | * The PCI-X slots are device ID 2,3. Choose one of |
@@ -1167,13 +1177,6 @@ static inline int octeon_pcie_write_config(int pcie_port, struct pci_bus *bus, | |||
1167 | int size, u32 val) | 1177 | int size, u32 val) |
1168 | { | 1178 | { |
1169 | int bus_number = bus->number; | 1179 | int bus_number = bus->number; |
1170 | /* | ||
1171 | * We need to force the bus number to be zero on the root | ||
1172 | * bus. Linux numbers the 2nd root bus to start after all | ||
1173 | * busses on root 0. | ||
1174 | */ | ||
1175 | if (bus->parent == NULL) | ||
1176 | bus_number = 0; | ||
1177 | 1180 | ||
1178 | switch (size) { | 1181 | switch (size) { |
1179 | case 4: | 1182 | case 4: |
diff --git a/arch/mips/pmc-sierra/msp71xx/gpio.c b/arch/mips/pmc-sierra/msp71xx/gpio.c index 69848c5813e2..aaccbe524386 100644 --- a/arch/mips/pmc-sierra/msp71xx/gpio.c +++ b/arch/mips/pmc-sierra/msp71xx/gpio.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * @file /arch/mips/pmc-sierra/msp71xx/gpio.c | ||
3 | * | ||
4 | * Generic PMC MSP71xx GPIO handling. These base gpio are controlled by two | 2 | * Generic PMC MSP71xx GPIO handling. These base gpio are controlled by two |
5 | * types of registers. The data register sets the output level when in output | 3 | * types of registers. The data register sets the output level when in output |
6 | * mode and when in input mode will contain the value at the input. The config | 4 | * mode and when in input mode will contain the value at the input. The config |
diff --git a/arch/mips/pmc-sierra/msp71xx/gpio_extended.c b/arch/mips/pmc-sierra/msp71xx/gpio_extended.c index fc6dbc6cf1c0..2a99f360fae4 100644 --- a/arch/mips/pmc-sierra/msp71xx/gpio_extended.c +++ b/arch/mips/pmc-sierra/msp71xx/gpio_extended.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * @file /arch/mips/pmc-sierra/msp71xx/gpio_extended.c | ||
3 | * | ||
4 | * Generic PMC MSP71xx EXTENDED (EXD) GPIO handling. The extended gpio is | 2 | * Generic PMC MSP71xx EXTENDED (EXD) GPIO handling. The extended gpio is |
5 | * a set of hardware registers that have no need for explicit locking as | 3 | * a set of hardware registers that have no need for explicit locking as |
6 | * it is handled by unique method of writing individual set/clr bits. | 4 | * it is handled by unique method of writing individual set/clr bits. |
diff --git a/arch/mips/pmc-sierra/msp71xx/msp_irq_slp.c b/arch/mips/pmc-sierra/msp71xx/msp_irq_slp.c index f5f1b8d2bb9a..61f390232346 100644 --- a/arch/mips/pmc-sierra/msp71xx/msp_irq_slp.c +++ b/arch/mips/pmc-sierra/msp71xx/msp_irq_slp.c | |||
@@ -45,13 +45,6 @@ static inline void mask_msp_slp_irq(unsigned int irq) | |||
45 | */ | 45 | */ |
46 | static inline void ack_msp_slp_irq(unsigned int irq) | 46 | static inline void ack_msp_slp_irq(unsigned int irq) |
47 | { | 47 | { |
48 | mask_slp_irq(irq); | ||
49 | |||
50 | /* | ||
51 | * only really necessary for 18, 16-14 and sometimes 3:0 (since | ||
52 | * these can be edge sensitive) but it doesn't hurt for the others. | ||
53 | */ | ||
54 | |||
55 | /* check for PER interrupt range */ | 48 | /* check for PER interrupt range */ |
56 | if (irq < MSP_PER_INTBASE) | 49 | if (irq < MSP_PER_INTBASE) |
57 | *SLP_INT_STS_REG = (1 << (irq - MSP_SLP_INTBASE)); | 50 | *SLP_INT_STS_REG = (1 << (irq - MSP_SLP_INTBASE)); |
@@ -62,8 +55,7 @@ static inline void ack_msp_slp_irq(unsigned int irq) | |||
62 | static struct irq_chip msp_slp_irq_controller = { | 55 | static struct irq_chip msp_slp_irq_controller = { |
63 | .name = "MSP_SLP", | 56 | .name = "MSP_SLP", |
64 | .ack = ack_msp_slp_irq, | 57 | .ack = ack_msp_slp_irq, |
65 | .mask = ack_msp_slp_irq, | 58 | .mask = mask_msp_slp_irq, |
66 | .mask_ack = ack_msp_slp_irq, | ||
67 | .unmask = unmask_msp_slp_irq, | 59 | .unmask = unmask_msp_slp_irq, |
68 | }; | 60 | }; |
69 | 61 | ||
@@ -79,7 +71,7 @@ void __init msp_slp_irq_init(void) | |||
79 | 71 | ||
80 | /* initialize all the IRQ descriptors */ | 72 | /* initialize all the IRQ descriptors */ |
81 | for (i = MSP_SLP_INTBASE; i < MSP_PER_INTBASE + 32; i++) | 73 | for (i = MSP_SLP_INTBASE; i < MSP_PER_INTBASE + 32; i++) |
82 | set_irq_chip_and_handler(i, &msp_slp_irq_controller | 74 | set_irq_chip_and_handler(i, &msp_slp_irq_controller, |
83 | handle_level_irq); | 75 | handle_level_irq); |
84 | } | 76 | } |
85 | 77 | ||
diff --git a/arch/mips/pmc-sierra/yosemite/atmel_read_eeprom.c b/arch/mips/pmc-sierra/yosemite/atmel_read_eeprom.c index caf5e9a0acc7..fc990cb31941 100644 --- a/arch/mips/pmc-sierra/yosemite/atmel_read_eeprom.c +++ b/arch/mips/pmc-sierra/yosemite/atmel_read_eeprom.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/mips/pmc-sierra/yosemite/atmel_read_eeprom.c | ||
3 | * | ||
4 | * Copyright (C) 2003 PMC-Sierra Inc. | 2 | * Copyright (C) 2003 PMC-Sierra Inc. |
5 | * Author: Manish Lachwani (lachwani@pmc-sierra.com) | 3 | * Author: Manish Lachwani (lachwani@pmc-sierra.com) |
6 | * | 4 | * |
diff --git a/arch/mips/sibyte/swarm/swarm-i2c.c b/arch/mips/sibyte/swarm/swarm-i2c.c index 4282ac9d01d2..062505054d42 100644 --- a/arch/mips/sibyte/swarm/swarm-i2c.c +++ b/arch/mips/sibyte/swarm/swarm-i2c.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/mips/sibyte/swarm/swarm-i2c.c | ||
3 | * | ||
4 | * Broadcom BCM91250A (SWARM), etc. I2C platform setup. | 2 | * Broadcom BCM91250A (SWARM), etc. I2C platform setup. |
5 | * | 3 | * |
6 | * Copyright (c) 2008 Maciej W. Rozycki | 4 | * Copyright (c) 2008 Maciej W. Rozycki |
diff --git a/arch/mips/txx9/generic/mem_tx4927.c b/arch/mips/txx9/generic/mem_tx4927.c index ef6ea6e97873..70f9626f8227 100644 --- a/arch/mips/txx9/generic/mem_tx4927.c +++ b/arch/mips/txx9/generic/mem_tx4927.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * linux/arch/mips/txx9/generic/mem_tx4927.c | ||
3 | * | ||
4 | * common tx4927 memory interface | 2 | * common tx4927 memory interface |
5 | * | 3 | * |
6 | * Author: MontaVista Software, Inc. | 4 | * Author: MontaVista Software, Inc. |
diff --git a/arch/mips/txx9/generic/setup.c b/arch/mips/txx9/generic/setup.c index 3b7d77d61ce0..a205e2ba8e7b 100644 --- a/arch/mips/txx9/generic/setup.c +++ b/arch/mips/txx9/generic/setup.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * linux/arch/mips/txx9/generic/setup.c | ||
3 | * | ||
4 | * Based on linux/arch/mips/txx9/rbtx4938/setup.c, | 2 | * Based on linux/arch/mips/txx9/rbtx4938/setup.c, |
5 | * and RBTX49xx patch from CELF patch archive. | 3 | * and RBTX49xx patch from CELF patch archive. |
6 | * | 4 | * |
diff --git a/arch/mips/txx9/rbtx4939/setup.c b/arch/mips/txx9/rbtx4939/setup.c index c033ffe71cdf..b0c241ecf603 100644 --- a/arch/mips/txx9/rbtx4939/setup.c +++ b/arch/mips/txx9/rbtx4939/setup.c | |||
@@ -512,10 +512,10 @@ static void __init rbtx4939_setup(void) | |||
512 | rbtx4939_ebusc_setup(); | 512 | rbtx4939_ebusc_setup(); |
513 | /* always enable ATA0 */ | 513 | /* always enable ATA0 */ |
514 | txx9_set64(&tx4939_ccfgptr->pcfg, TX4939_PCFG_ATA0MODE); | 514 | txx9_set64(&tx4939_ccfgptr->pcfg, TX4939_PCFG_ATA0MODE); |
515 | rbtx4939_update_ioc_pen(); | ||
516 | if (txx9_master_clock == 0) | 515 | if (txx9_master_clock == 0) |
517 | txx9_master_clock = 20000000; | 516 | txx9_master_clock = 20000000; |
518 | tx4939_setup(); | 517 | tx4939_setup(); |
518 | rbtx4939_update_ioc_pen(); | ||
519 | #ifdef HAVE_RBTX4939_IOSWAB | 519 | #ifdef HAVE_RBTX4939_IOSWAB |
520 | ioswabw = rbtx4939_ioswabw; | 520 | ioswabw = rbtx4939_ioswabw; |
521 | __mem_ioswabw = rbtx4939_mem_ioswabw; | 521 | __mem_ioswabw = rbtx4939_mem_ioswabw; |