diff options
author | Ralf Baechle <ralf@linux-mips.org> | 2014-03-31 12:17:33 -0400 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2014-03-31 12:17:33 -0400 |
commit | ade63aada79c61bcd5f51cbd310f237399892268 (patch) | |
tree | 4f8605528bfd9b6261679883974b9ac4870223dd /arch/mips | |
parent | 9a1724c7506bfa7d3d9dcab13f83e9e6446929f9 (diff) | |
parent | c14af233fbe279d0e561ecf84f1208b1bae087ef (diff) |
Merge branch '3.14-fixes' into mips-for-linux-next
Diffstat (limited to 'arch/mips')
-rw-r--r-- | arch/mips/Kconfig | 29 | ||||
-rw-r--r-- | arch/mips/Kconfig.debug | 10 | ||||
-rw-r--r-- | arch/mips/alchemy/board-gpr.c | 4 | ||||
-rw-r--r-- | arch/mips/alchemy/board-mtx1.c | 4 | ||||
-rw-r--r-- | arch/mips/bcm47xx/board.c | 1 | ||||
-rw-r--r-- | arch/mips/bcm47xx/nvram.c | 2 | ||||
-rw-r--r-- | arch/mips/cavium-octeon/octeon-irq.c | 22 | ||||
-rw-r--r-- | arch/mips/include/asm/asmmacro.h | 15 | ||||
-rw-r--r-- | arch/mips/include/asm/fpu.h | 2 | ||||
-rw-r--r-- | arch/mips/include/asm/ftrace.h | 20 | ||||
-rw-r--r-- | arch/mips/include/asm/mach-au1x00/au1000.h | 12 | ||||
-rw-r--r-- | arch/mips/include/asm/syscall.h | 10 | ||||
-rw-r--r-- | arch/mips/include/uapi/asm/inst.h | 4 | ||||
-rw-r--r-- | arch/mips/kernel/ftrace.c | 5 | ||||
-rw-r--r-- | arch/mips/kernel/r4k_fpu.S | 16 | ||||
-rw-r--r-- | arch/mips/kernel/rtlx-cmp.c | 3 | ||||
-rw-r--r-- | arch/mips/kernel/rtlx-mt.c | 3 | ||||
-rw-r--r-- | arch/mips/math-emu/cp1emu.c | 6 | ||||
-rw-r--r-- | arch/mips/mti-malta/malta-amon.c | 2 | ||||
-rw-r--r-- | arch/mips/mti-malta/malta-int.c | 4 | ||||
-rw-r--r-- | arch/mips/pci/msi-octeon.c | 1 | ||||
-rw-r--r-- | arch/mips/power/hibernate.S | 1 |
22 files changed, 97 insertions, 79 deletions
diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig index 14aeb174e00f..fc9be7c8c5aa 100644 --- a/arch/mips/Kconfig +++ b/arch/mips/Kconfig | |||
@@ -125,7 +125,7 @@ config BCM47XX | |||
125 | select SYS_SUPPORTS_32BIT_KERNEL | 125 | select SYS_SUPPORTS_32BIT_KERNEL |
126 | select SYS_SUPPORTS_LITTLE_ENDIAN | 126 | select SYS_SUPPORTS_LITTLE_ENDIAN |
127 | select SYS_HAS_EARLY_PRINTK | 127 | select SYS_HAS_EARLY_PRINTK |
128 | select EARLY_PRINTK_8250 if EARLY_PRINTK | 128 | select USE_GENERIC_EARLY_PRINTK_8250 |
129 | help | 129 | help |
130 | Support for BCM47XX based boards | 130 | Support for BCM47XX based boards |
131 | 131 | ||
@@ -152,7 +152,6 @@ config MIPS_COBALT | |||
152 | select CSRC_R4K | 152 | select CSRC_R4K |
153 | select CEVT_GT641XX | 153 | select CEVT_GT641XX |
154 | select DMA_NONCOHERENT | 154 | select DMA_NONCOHERENT |
155 | select EARLY_PRINTK_8250 if EARLY_PRINTK | ||
156 | select HW_HAS_PCI | 155 | select HW_HAS_PCI |
157 | select I8253 | 156 | select I8253 |
158 | select I8259 | 157 | select I8259 |
@@ -165,6 +164,7 @@ config MIPS_COBALT | |||
165 | select SYS_SUPPORTS_32BIT_KERNEL | 164 | select SYS_SUPPORTS_32BIT_KERNEL |
166 | select SYS_SUPPORTS_64BIT_KERNEL | 165 | select SYS_SUPPORTS_64BIT_KERNEL |
167 | select SYS_SUPPORTS_LITTLE_ENDIAN | 166 | select SYS_SUPPORTS_LITTLE_ENDIAN |
167 | select USE_GENERIC_EARLY_PRINTK_8250 | ||
168 | 168 | ||
169 | config MACH_DECSTATION | 169 | config MACH_DECSTATION |
170 | bool "DECstations" | 170 | bool "DECstations" |
@@ -677,6 +677,7 @@ config SNI_RM | |||
677 | select SYS_SUPPORTS_BIG_ENDIAN | 677 | select SYS_SUPPORTS_BIG_ENDIAN |
678 | select SYS_SUPPORTS_HIGHMEM | 678 | select SYS_SUPPORTS_HIGHMEM |
679 | select SYS_SUPPORTS_LITTLE_ENDIAN | 679 | select SYS_SUPPORTS_LITTLE_ENDIAN |
680 | select USE_GENERIC_EARLY_PRINTK_8250 | ||
680 | help | 681 | help |
681 | The SNI RM200/300/400 are MIPS-based machines manufactured by | 682 | The SNI RM200/300/400 are MIPS-based machines manufactured by |
682 | Siemens Nixdorf Informationssysteme (SNI), parent company of Pyramid | 683 | Siemens Nixdorf Informationssysteme (SNI), parent company of Pyramid |
@@ -1824,12 +1825,12 @@ endchoice | |||
1824 | 1825 | ||
1825 | config FORCE_MAX_ZONEORDER | 1826 | config FORCE_MAX_ZONEORDER |
1826 | int "Maximum zone order" | 1827 | int "Maximum zone order" |
1827 | range 14 64 if HUGETLB_PAGE && PAGE_SIZE_64KB | 1828 | range 14 64 if MIPS_HUGE_TLB_SUPPORT && PAGE_SIZE_64KB |
1828 | default "14" if HUGETLB_PAGE && PAGE_SIZE_64KB | 1829 | default "14" if MIPS_HUGE_TLB_SUPPORT && PAGE_SIZE_64KB |
1829 | range 13 64 if HUGETLB_PAGE && PAGE_SIZE_32KB | 1830 | range 13 64 if MIPS_HUGE_TLB_SUPPORT && PAGE_SIZE_32KB |
1830 | default "13" if HUGETLB_PAGE && PAGE_SIZE_32KB | 1831 | default "13" if MIPS_HUGE_TLB_SUPPORT && PAGE_SIZE_32KB |
1831 | range 12 64 if HUGETLB_PAGE && PAGE_SIZE_16KB | 1832 | range 12 64 if MIPS_HUGE_TLB_SUPPORT && PAGE_SIZE_16KB |
1832 | default "12" if HUGETLB_PAGE && PAGE_SIZE_16KB | 1833 | default "12" if MIPS_HUGE_TLB_SUPPORT && PAGE_SIZE_16KB |
1833 | range 11 64 | 1834 | range 11 64 |
1834 | default "11" | 1835 | default "11" |
1835 | help | 1836 | help |
@@ -2456,9 +2457,8 @@ config SECCOMP | |||
2456 | If unsure, say Y. Only embedded should say N here. | 2457 | If unsure, say Y. Only embedded should say N here. |
2457 | 2458 | ||
2458 | config MIPS_O32_FP64_SUPPORT | 2459 | config MIPS_O32_FP64_SUPPORT |
2459 | bool "Support for O32 binaries using 64-bit FP" | 2460 | bool "Support for O32 binaries using 64-bit FP (EXPERIMENTAL)" |
2460 | depends on 32BIT || MIPS32_O32 | 2461 | depends on 32BIT || MIPS32_O32 |
2461 | default y | ||
2462 | help | 2462 | help |
2463 | When this is enabled, the kernel will support use of 64-bit floating | 2463 | When this is enabled, the kernel will support use of 64-bit floating |
2464 | point registers with binaries using the O32 ABI along with the | 2464 | point registers with binaries using the O32 ABI along with the |
@@ -2470,7 +2470,14 @@ config MIPS_O32_FP64_SUPPORT | |||
2470 | of your kernel & potentially improve FP emulation performance by | 2470 | of your kernel & potentially improve FP emulation performance by |
2471 | saying N here. | 2471 | saying N here. |
2472 | 2472 | ||
2473 | If unsure, say Y. | 2473 | Although binutils currently supports use of this flag the details |
2474 | concerning its effect upon the O32 ABI in userland are still being | ||
2475 | worked on. In order to avoid userland becoming dependant upon current | ||
2476 | behaviour before the details have been finalised, this option should | ||
2477 | be considered experimental and only enabled by those working upon | ||
2478 | said details. | ||
2479 | |||
2480 | If unsure, say N. | ||
2474 | 2481 | ||
2475 | config USE_OF | 2482 | config USE_OF |
2476 | bool | 2483 | bool |
diff --git a/arch/mips/Kconfig.debug b/arch/mips/Kconfig.debug index b147e7038ff0..25de29211d76 100644 --- a/arch/mips/Kconfig.debug +++ b/arch/mips/Kconfig.debug | |||
@@ -21,13 +21,17 @@ config EARLY_PRINTK | |||
21 | unless you want to debug such a crash. | 21 | unless you want to debug such a crash. |
22 | 22 | ||
23 | config EARLY_PRINTK_8250 | 23 | config EARLY_PRINTK_8250 |
24 | bool "8250/16550 and compatible serial early printk driver" | 24 | bool |
25 | depends on EARLY_PRINTK | 25 | depends on EARLY_PRINTK && USE_GENERIC_EARLY_PRINTK_8250 |
26 | default n | 26 | default y |
27 | help | 27 | help |
28 | "8250/16550 and compatible serial early printk driver" | ||
28 | If you say Y here, it will be possible to use a 8250/16550 serial | 29 | If you say Y here, it will be possible to use a 8250/16550 serial |
29 | port as the boot console. | 30 | port as the boot console. |
30 | 31 | ||
32 | config USE_GENERIC_EARLY_PRINTK_8250 | ||
33 | bool | ||
34 | |||
31 | config CMDLINE_BOOL | 35 | config CMDLINE_BOOL |
32 | bool "Built-in kernel command line" | 36 | bool "Built-in kernel command line" |
33 | default n | 37 | default n |
diff --git a/arch/mips/alchemy/board-gpr.c b/arch/mips/alchemy/board-gpr.c index 9edc35ff8cf1..acf9a2a37f5a 100644 --- a/arch/mips/alchemy/board-gpr.c +++ b/arch/mips/alchemy/board-gpr.c | |||
@@ -53,10 +53,8 @@ void __init prom_init(void) | |||
53 | prom_init_cmdline(); | 53 | prom_init_cmdline(); |
54 | 54 | ||
55 | memsize_str = prom_getenv("memsize"); | 55 | memsize_str = prom_getenv("memsize"); |
56 | if (!memsize_str) | 56 | if (!memsize_str || kstrtoul(memsize_str, 0, &memsize)) |
57 | memsize = 0x04000000; | 57 | memsize = 0x04000000; |
58 | else | ||
59 | strict_strtoul(memsize_str, 0, &memsize); | ||
60 | add_memory_region(0, memsize, BOOT_MEM_RAM); | 58 | add_memory_region(0, memsize, BOOT_MEM_RAM); |
61 | } | 59 | } |
62 | 60 | ||
diff --git a/arch/mips/alchemy/board-mtx1.c b/arch/mips/alchemy/board-mtx1.c index 9969dbab19e3..25a59a23547e 100644 --- a/arch/mips/alchemy/board-mtx1.c +++ b/arch/mips/alchemy/board-mtx1.c | |||
@@ -52,10 +52,8 @@ void __init prom_init(void) | |||
52 | prom_init_cmdline(); | 52 | prom_init_cmdline(); |
53 | 53 | ||
54 | memsize_str = prom_getenv("memsize"); | 54 | memsize_str = prom_getenv("memsize"); |
55 | if (!memsize_str) | 55 | if (!memsize_str || kstrtoul(memsize_str, 0, &memsize)) |
56 | memsize = 0x04000000; | 56 | memsize = 0x04000000; |
57 | else | ||
58 | strict_strtoul(memsize_str, 0, &memsize); | ||
59 | add_memory_region(0, memsize, BOOT_MEM_RAM); | 57 | add_memory_region(0, memsize, BOOT_MEM_RAM); |
60 | } | 58 | } |
61 | 59 | ||
diff --git a/arch/mips/bcm47xx/board.c b/arch/mips/bcm47xx/board.c index adf1ca83f800..44ab1be68c3c 100644 --- a/arch/mips/bcm47xx/board.c +++ b/arch/mips/bcm47xx/board.c | |||
@@ -1,3 +1,4 @@ | |||
1 | #include <linux/errno.h> | ||
1 | #include <linux/export.h> | 2 | #include <linux/export.h> |
2 | #include <linux/string.h> | 3 | #include <linux/string.h> |
3 | #include <bcm47xx_board.h> | 4 | #include <bcm47xx_board.h> |
diff --git a/arch/mips/bcm47xx/nvram.c b/arch/mips/bcm47xx/nvram.c index 6decb27cf48b..2bed73a684ae 100644 --- a/arch/mips/bcm47xx/nvram.c +++ b/arch/mips/bcm47xx/nvram.c | |||
@@ -196,7 +196,7 @@ int bcm47xx_nvram_gpio_pin(const char *name) | |||
196 | char nvram_var[10]; | 196 | char nvram_var[10]; |
197 | char buf[30]; | 197 | char buf[30]; |
198 | 198 | ||
199 | for (i = 0; i < 16; i++) { | 199 | for (i = 0; i < 32; i++) { |
200 | err = snprintf(nvram_var, sizeof(nvram_var), "gpio%i", i); | 200 | err = snprintf(nvram_var, sizeof(nvram_var), "gpio%i", i); |
201 | if (err <= 0) | 201 | if (err <= 0) |
202 | continue; | 202 | continue; |
diff --git a/arch/mips/cavium-octeon/octeon-irq.c b/arch/mips/cavium-octeon/octeon-irq.c index 25fbfae06c1f..c2bb4f896ce7 100644 --- a/arch/mips/cavium-octeon/octeon-irq.c +++ b/arch/mips/cavium-octeon/octeon-irq.c | |||
@@ -975,10 +975,6 @@ static int octeon_irq_ciu_xlat(struct irq_domain *d, | |||
975 | if (ciu > 1 || bit > 63) | 975 | if (ciu > 1 || bit > 63) |
976 | return -EINVAL; | 976 | return -EINVAL; |
977 | 977 | ||
978 | /* These are the GPIO lines */ | ||
979 | if (ciu == 0 && bit >= 16 && bit < 32) | ||
980 | return -EINVAL; | ||
981 | |||
982 | *out_hwirq = (ciu << 6) | bit; | 978 | *out_hwirq = (ciu << 6) | bit; |
983 | *out_type = 0; | 979 | *out_type = 0; |
984 | 980 | ||
@@ -1007,6 +1003,10 @@ static int octeon_irq_ciu_map(struct irq_domain *d, | |||
1007 | if (!octeon_irq_virq_in_range(virq)) | 1003 | if (!octeon_irq_virq_in_range(virq)) |
1008 | return -EINVAL; | 1004 | return -EINVAL; |
1009 | 1005 | ||
1006 | /* Don't map irq if it is reserved for GPIO. */ | ||
1007 | if (line == 0 && bit >= 16 && bit <32) | ||
1008 | return 0; | ||
1009 | |||
1010 | if (line > 1 || octeon_irq_ciu_to_irq[line][bit] != 0) | 1010 | if (line > 1 || octeon_irq_ciu_to_irq[line][bit] != 0) |
1011 | return -EINVAL; | 1011 | return -EINVAL; |
1012 | 1012 | ||
@@ -1525,10 +1525,6 @@ static int octeon_irq_ciu2_xlat(struct irq_domain *d, | |||
1525 | ciu = intspec[0]; | 1525 | ciu = intspec[0]; |
1526 | bit = intspec[1]; | 1526 | bit = intspec[1]; |
1527 | 1527 | ||
1528 | /* Line 7 are the GPIO lines */ | ||
1529 | if (ciu > 6 || bit > 63) | ||
1530 | return -EINVAL; | ||
1531 | |||
1532 | *out_hwirq = (ciu << 6) | bit; | 1528 | *out_hwirq = (ciu << 6) | bit; |
1533 | *out_type = 0; | 1529 | *out_type = 0; |
1534 | 1530 | ||
@@ -1570,8 +1566,14 @@ static int octeon_irq_ciu2_map(struct irq_domain *d, | |||
1570 | if (!octeon_irq_virq_in_range(virq)) | 1566 | if (!octeon_irq_virq_in_range(virq)) |
1571 | return -EINVAL; | 1567 | return -EINVAL; |
1572 | 1568 | ||
1573 | /* Line 7 are the GPIO lines */ | 1569 | /* |
1574 | if (line > 6 || octeon_irq_ciu_to_irq[line][bit] != 0) | 1570 | * Don't map irq if it is reserved for GPIO. |
1571 | * (Line 7 are the GPIO lines.) | ||
1572 | */ | ||
1573 | if (line == 7) | ||
1574 | return 0; | ||
1575 | |||
1576 | if (line > 7 || octeon_irq_ciu_to_irq[line][bit] != 0) | ||
1575 | return -EINVAL; | 1577 | return -EINVAL; |
1576 | 1578 | ||
1577 | if (octeon_irq_ciu2_is_edge(line, bit)) | 1579 | if (octeon_irq_ciu2_is_edge(line, bit)) |
diff --git a/arch/mips/include/asm/asmmacro.h b/arch/mips/include/asm/asmmacro.h index fe3b03c793e5..b464b8b1147a 100644 --- a/arch/mips/include/asm/asmmacro.h +++ b/arch/mips/include/asm/asmmacro.h | |||
@@ -9,6 +9,7 @@ | |||
9 | #define _ASM_ASMMACRO_H | 9 | #define _ASM_ASMMACRO_H |
10 | 10 | ||
11 | #include <asm/hazards.h> | 11 | #include <asm/hazards.h> |
12 | #include <asm/asm-offsets.h> | ||
12 | 13 | ||
13 | #ifdef CONFIG_32BIT | 14 | #ifdef CONFIG_32BIT |
14 | #include <asm/asmmacro-32.h> | 15 | #include <asm/asmmacro-32.h> |
@@ -54,11 +55,21 @@ | |||
54 | .endm | 55 | .endm |
55 | 56 | ||
56 | .macro local_irq_disable reg=t0 | 57 | .macro local_irq_disable reg=t0 |
58 | #ifdef CONFIG_PREEMPT | ||
59 | lw \reg, TI_PRE_COUNT($28) | ||
60 | addi \reg, \reg, 1 | ||
61 | sw \reg, TI_PRE_COUNT($28) | ||
62 | #endif | ||
57 | mfc0 \reg, CP0_STATUS | 63 | mfc0 \reg, CP0_STATUS |
58 | ori \reg, \reg, 1 | 64 | ori \reg, \reg, 1 |
59 | xori \reg, \reg, 1 | 65 | xori \reg, \reg, 1 |
60 | mtc0 \reg, CP0_STATUS | 66 | mtc0 \reg, CP0_STATUS |
61 | irq_disable_hazard | 67 | irq_disable_hazard |
68 | #ifdef CONFIG_PREEMPT | ||
69 | lw \reg, TI_PRE_COUNT($28) | ||
70 | addi \reg, \reg, -1 | ||
71 | sw \reg, TI_PRE_COUNT($28) | ||
72 | #endif | ||
62 | .endm | 73 | .endm |
63 | #endif /* CONFIG_MIPS_MT_SMTC */ | 74 | #endif /* CONFIG_MIPS_MT_SMTC */ |
64 | 75 | ||
@@ -106,7 +117,7 @@ | |||
106 | .endm | 117 | .endm |
107 | 118 | ||
108 | .macro fpu_save_double thread status tmp | 119 | .macro fpu_save_double thread status tmp |
109 | #if defined(CONFIG_MIPS64) || defined(CONFIG_CPU_MIPS32_R2) | 120 | #if defined(CONFIG_64BIT) || defined(CONFIG_CPU_MIPS32_R2) |
110 | sll \tmp, \status, 5 | 121 | sll \tmp, \status, 5 |
111 | bgez \tmp, 10f | 122 | bgez \tmp, 10f |
112 | fpu_save_16odd \thread | 123 | fpu_save_16odd \thread |
@@ -159,7 +170,7 @@ | |||
159 | .endm | 170 | .endm |
160 | 171 | ||
161 | .macro fpu_restore_double thread status tmp | 172 | .macro fpu_restore_double thread status tmp |
162 | #if defined(CONFIG_MIPS64) || defined(CONFIG_CPU_MIPS32_R2) | 173 | #if defined(CONFIG_64BIT) || defined(CONFIG_CPU_MIPS32_R2) |
163 | sll \tmp, \status, 5 | 174 | sll \tmp, \status, 5 |
164 | bgez \tmp, 10f # 16 register mode? | 175 | bgez \tmp, 10f # 16 register mode? |
165 | 176 | ||
diff --git a/arch/mips/include/asm/fpu.h b/arch/mips/include/asm/fpu.h index 8a3d61f0017f..4d86b72750c7 100644 --- a/arch/mips/include/asm/fpu.h +++ b/arch/mips/include/asm/fpu.h | |||
@@ -57,7 +57,7 @@ static inline int __enable_fpu(enum fpu_mode mode) | |||
57 | return 0; | 57 | return 0; |
58 | 58 | ||
59 | case FPU_64BIT: | 59 | case FPU_64BIT: |
60 | #if !(defined(CONFIG_CPU_MIPS32_R2) || defined(CONFIG_MIPS64)) | 60 | #if !(defined(CONFIG_CPU_MIPS32_R2) || defined(CONFIG_64BIT)) |
61 | /* we only have a 32-bit FPU */ | 61 | /* we only have a 32-bit FPU */ |
62 | return SIGFPE; | 62 | return SIGFPE; |
63 | #endif | 63 | #endif |
diff --git a/arch/mips/include/asm/ftrace.h b/arch/mips/include/asm/ftrace.h index ce35c9af0c28..992aaba603b5 100644 --- a/arch/mips/include/asm/ftrace.h +++ b/arch/mips/include/asm/ftrace.h | |||
@@ -22,12 +22,12 @@ extern void _mcount(void); | |||
22 | #define safe_load(load, src, dst, error) \ | 22 | #define safe_load(load, src, dst, error) \ |
23 | do { \ | 23 | do { \ |
24 | asm volatile ( \ | 24 | asm volatile ( \ |
25 | "1: " load " %[" STR(dst) "], 0(%[" STR(src) "])\n"\ | 25 | "1: " load " %[tmp_dst], 0(%[tmp_src])\n" \ |
26 | " li %[" STR(error) "], 0\n" \ | 26 | " li %[tmp_err], 0\n" \ |
27 | "2:\n" \ | 27 | "2:\n" \ |
28 | \ | 28 | \ |
29 | ".section .fixup, \"ax\"\n" \ | 29 | ".section .fixup, \"ax\"\n" \ |
30 | "3: li %[" STR(error) "], 1\n" \ | 30 | "3: li %[tmp_err], 1\n" \ |
31 | " j 2b\n" \ | 31 | " j 2b\n" \ |
32 | ".previous\n" \ | 32 | ".previous\n" \ |
33 | \ | 33 | \ |
@@ -35,8 +35,8 @@ do { \ | |||
35 | STR(PTR) "\t1b, 3b\n\t" \ | 35 | STR(PTR) "\t1b, 3b\n\t" \ |
36 | ".previous\n" \ | 36 | ".previous\n" \ |
37 | \ | 37 | \ |
38 | : [dst] "=&r" (dst), [error] "=r" (error)\ | 38 | : [tmp_dst] "=&r" (dst), [tmp_err] "=r" (error)\ |
39 | : [src] "r" (src) \ | 39 | : [tmp_src] "r" (src) \ |
40 | : "memory" \ | 40 | : "memory" \ |
41 | ); \ | 41 | ); \ |
42 | } while (0) | 42 | } while (0) |
@@ -44,12 +44,12 @@ do { \ | |||
44 | #define safe_store(store, src, dst, error) \ | 44 | #define safe_store(store, src, dst, error) \ |
45 | do { \ | 45 | do { \ |
46 | asm volatile ( \ | 46 | asm volatile ( \ |
47 | "1: " store " %[" STR(src) "], 0(%[" STR(dst) "])\n"\ | 47 | "1: " store " %[tmp_src], 0(%[tmp_dst])\n"\ |
48 | " li %[" STR(error) "], 0\n" \ | 48 | " li %[tmp_err], 0\n" \ |
49 | "2:\n" \ | 49 | "2:\n" \ |
50 | \ | 50 | \ |
51 | ".section .fixup, \"ax\"\n" \ | 51 | ".section .fixup, \"ax\"\n" \ |
52 | "3: li %[" STR(error) "], 1\n" \ | 52 | "3: li %[tmp_err], 1\n" \ |
53 | " j 2b\n" \ | 53 | " j 2b\n" \ |
54 | ".previous\n" \ | 54 | ".previous\n" \ |
55 | \ | 55 | \ |
@@ -57,8 +57,8 @@ do { \ | |||
57 | STR(PTR) "\t1b, 3b\n\t" \ | 57 | STR(PTR) "\t1b, 3b\n\t" \ |
58 | ".previous\n" \ | 58 | ".previous\n" \ |
59 | \ | 59 | \ |
60 | : [error] "=r" (error) \ | 60 | : [tmp_err] "=r" (error) \ |
61 | : [dst] "r" (dst), [src] "r" (src)\ | 61 | : [tmp_dst] "r" (dst), [tmp_src] "r" (src)\ |
62 | : "memory" \ | 62 | : "memory" \ |
63 | ); \ | 63 | ); \ |
64 | } while (0) | 64 | } while (0) |
diff --git a/arch/mips/include/asm/mach-au1x00/au1000.h b/arch/mips/include/asm/mach-au1x00/au1000.h index 54f9e84db8ac..b4c3ecb17d48 100644 --- a/arch/mips/include/asm/mach-au1x00/au1000.h +++ b/arch/mips/include/asm/mach-au1x00/au1000.h | |||
@@ -1161,18 +1161,6 @@ enum soc_au1200_ints { | |||
1161 | #define MAC_RX_BUFF3_STATUS 0x30 | 1161 | #define MAC_RX_BUFF3_STATUS 0x30 |
1162 | #define MAC_RX_BUFF3_ADDR 0x34 | 1162 | #define MAC_RX_BUFF3_ADDR 0x34 |
1163 | 1163 | ||
1164 | #define UART_RX 0 /* Receive buffer */ | ||
1165 | #define UART_TX 4 /* Transmit buffer */ | ||
1166 | #define UART_IER 8 /* Interrupt Enable Register */ | ||
1167 | #define UART_IIR 0xC /* Interrupt ID Register */ | ||
1168 | #define UART_FCR 0x10 /* FIFO Control Register */ | ||
1169 | #define UART_LCR 0x14 /* Line Control Register */ | ||
1170 | #define UART_MCR 0x18 /* Modem Control Register */ | ||
1171 | #define UART_LSR 0x1C /* Line Status Register */ | ||
1172 | #define UART_MSR 0x20 /* Modem Status Register */ | ||
1173 | #define UART_CLK 0x28 /* Baud Rate Clock Divider */ | ||
1174 | #define UART_MOD_CNTRL 0x100 /* Module Control */ | ||
1175 | |||
1176 | /* SSIO */ | 1164 | /* SSIO */ |
1177 | #define SSI0_STATUS 0xB1600000 | 1165 | #define SSI0_STATUS 0xB1600000 |
1178 | # define SSI_STATUS_BF (1 << 4) | 1166 | # define SSI_STATUS_BF (1 << 4) |
diff --git a/arch/mips/include/asm/syscall.h b/arch/mips/include/asm/syscall.h index 9031745cec1b..6c488c85d791 100644 --- a/arch/mips/include/asm/syscall.h +++ b/arch/mips/include/asm/syscall.h | |||
@@ -13,6 +13,7 @@ | |||
13 | #ifndef __ASM_MIPS_SYSCALL_H | 13 | #ifndef __ASM_MIPS_SYSCALL_H |
14 | #define __ASM_MIPS_SYSCALL_H | 14 | #define __ASM_MIPS_SYSCALL_H |
15 | 15 | ||
16 | #include <linux/compiler.h> | ||
16 | #include <linux/audit.h> | 17 | #include <linux/audit.h> |
17 | #include <linux/elf-em.h> | 18 | #include <linux/elf-em.h> |
18 | #include <linux/kernel.h> | 19 | #include <linux/kernel.h> |
@@ -50,14 +51,14 @@ static inline unsigned long mips_get_syscall_arg(unsigned long *arg, | |||
50 | 51 | ||
51 | #ifdef CONFIG_32BIT | 52 | #ifdef CONFIG_32BIT |
52 | case 4: case 5: case 6: case 7: | 53 | case 4: case 5: case 6: case 7: |
53 | return get_user(*arg, (int *)usp + 4 * n); | 54 | return get_user(*arg, (int *)usp + n); |
54 | #endif | 55 | #endif |
55 | 56 | ||
56 | #ifdef CONFIG_64BIT | 57 | #ifdef CONFIG_64BIT |
57 | case 4: case 5: case 6: case 7: | 58 | case 4: case 5: case 6: case 7: |
58 | #ifdef CONFIG_MIPS32_O32 | 59 | #ifdef CONFIG_MIPS32_O32 |
59 | if (test_thread_flag(TIF_32BIT_REGS)) | 60 | if (test_thread_flag(TIF_32BIT_REGS)) |
60 | return get_user(*arg, (int *)usp + 4 * n); | 61 | return get_user(*arg, (int *)usp + n); |
61 | else | 62 | else |
62 | #endif | 63 | #endif |
63 | *arg = regs->regs[4 + n]; | 64 | *arg = regs->regs[4 + n]; |
@@ -68,6 +69,8 @@ static inline unsigned long mips_get_syscall_arg(unsigned long *arg, | |||
68 | default: | 69 | default: |
69 | BUG(); | 70 | BUG(); |
70 | } | 71 | } |
72 | |||
73 | unreachable(); | ||
71 | } | 74 | } |
72 | 75 | ||
73 | static inline long syscall_get_return_value(struct task_struct *task, | 76 | static inline long syscall_get_return_value(struct task_struct *task, |
@@ -100,7 +103,6 @@ static inline void syscall_get_arguments(struct task_struct *task, | |||
100 | unsigned int i, unsigned int n, | 103 | unsigned int i, unsigned int n, |
101 | unsigned long *args) | 104 | unsigned long *args) |
102 | { | 105 | { |
103 | unsigned long arg; | ||
104 | int ret; | 106 | int ret; |
105 | /* O32 ABI syscall() - Either 64-bit with O32 or 32-bit */ | 107 | /* O32 ABI syscall() - Either 64-bit with O32 or 32-bit */ |
106 | if ((config_enabled(CONFIG_32BIT) || | 108 | if ((config_enabled(CONFIG_32BIT) || |
@@ -111,7 +113,7 @@ static inline void syscall_get_arguments(struct task_struct *task, | |||
111 | } | 113 | } |
112 | 114 | ||
113 | while (n--) | 115 | while (n--) |
114 | ret |= mips_get_syscall_arg(&arg, task, regs, i++); | 116 | ret |= mips_get_syscall_arg(args++, task, regs, i++); |
115 | 117 | ||
116 | /* | 118 | /* |
117 | * No way to communicate an error because this is a void function. | 119 | * No way to communicate an error because this is a void function. |
diff --git a/arch/mips/include/uapi/asm/inst.h b/arch/mips/include/uapi/asm/inst.h index 1a44c5ac6f4f..df6e775f3fef 100644 --- a/arch/mips/include/uapi/asm/inst.h +++ b/arch/mips/include/uapi/asm/inst.h | |||
@@ -170,8 +170,8 @@ enum cop1_sdw_func { | |||
170 | */ | 170 | */ |
171 | enum cop1x_func { | 171 | enum cop1x_func { |
172 | lwxc1_op = 0x00, ldxc1_op = 0x01, | 172 | lwxc1_op = 0x00, ldxc1_op = 0x01, |
173 | pfetch_op = 0x07, swxc1_op = 0x08, | 173 | swxc1_op = 0x08, sdxc1_op = 0x09, |
174 | sdxc1_op = 0x09, madd_s_op = 0x20, | 174 | pfetch_op = 0x0f, madd_s_op = 0x20, |
175 | madd_d_op = 0x21, madd_e_op = 0x22, | 175 | madd_d_op = 0x21, madd_e_op = 0x22, |
176 | msub_s_op = 0x28, msub_d_op = 0x29, | 176 | msub_s_op = 0x28, msub_d_op = 0x29, |
177 | msub_e_op = 0x2a, nmadd_s_op = 0x30, | 177 | msub_e_op = 0x2a, nmadd_s_op = 0x30, |
diff --git a/arch/mips/kernel/ftrace.c b/arch/mips/kernel/ftrace.c index ddcc3500248d..74fe73506d8f 100644 --- a/arch/mips/kernel/ftrace.c +++ b/arch/mips/kernel/ftrace.c | |||
@@ -115,11 +115,10 @@ static int ftrace_modify_code_2(unsigned long ip, unsigned int new_code1, | |||
115 | safe_store_code(new_code1, ip, faulted); | 115 | safe_store_code(new_code1, ip, faulted); |
116 | if (unlikely(faulted)) | 116 | if (unlikely(faulted)) |
117 | return -EFAULT; | 117 | return -EFAULT; |
118 | ip += 4; | 118 | safe_store_code(new_code2, ip + 4, faulted); |
119 | safe_store_code(new_code2, ip, faulted); | ||
120 | if (unlikely(faulted)) | 119 | if (unlikely(faulted)) |
121 | return -EFAULT; | 120 | return -EFAULT; |
122 | flush_icache_range(ip, ip + 8); /* original ip + 12 */ | 121 | flush_icache_range(ip, ip + 8); |
123 | return 0; | 122 | return 0; |
124 | } | 123 | } |
125 | #endif | 124 | #endif |
diff --git a/arch/mips/kernel/r4k_fpu.S b/arch/mips/kernel/r4k_fpu.S index 0cfa7a56a153..71814272d148 100644 --- a/arch/mips/kernel/r4k_fpu.S +++ b/arch/mips/kernel/r4k_fpu.S | |||
@@ -36,9 +36,9 @@ | |||
36 | LEAF(_save_fp_context) | 36 | LEAF(_save_fp_context) |
37 | cfc1 t1, fcr31 | 37 | cfc1 t1, fcr31 |
38 | 38 | ||
39 | #if defined(CONFIG_64BIT) || defined(CONFIG_MIPS32_R2) | 39 | #if defined(CONFIG_64BIT) || defined(CONFIG_CPU_MIPS32_R2) |
40 | .set push | 40 | .set push |
41 | #ifdef CONFIG_MIPS32_R2 | 41 | #ifdef CONFIG_CPU_MIPS32_R2 |
42 | .set mips64r2 | 42 | .set mips64r2 |
43 | mfc0 t0, CP0_STATUS | 43 | mfc0 t0, CP0_STATUS |
44 | sll t0, t0, 5 | 44 | sll t0, t0, 5 |
@@ -147,11 +147,11 @@ LEAF(_save_fp_context32) | |||
147 | * - cp1 status/control register | 147 | * - cp1 status/control register |
148 | */ | 148 | */ |
149 | LEAF(_restore_fp_context) | 149 | LEAF(_restore_fp_context) |
150 | EX lw t0, SC_FPC_CSR(a0) | 150 | EX lw t1, SC_FPC_CSR(a0) |
151 | 151 | ||
152 | #if defined(CONFIG_64BIT) || defined(CONFIG_MIPS32_R2) | 152 | #if defined(CONFIG_64BIT) || defined(CONFIG_CPU_MIPS32_R2) |
153 | .set push | 153 | .set push |
154 | #ifdef CONFIG_MIPS32_R2 | 154 | #ifdef CONFIG_CPU_MIPS32_R2 |
155 | .set mips64r2 | 155 | .set mips64r2 |
156 | mfc0 t0, CP0_STATUS | 156 | mfc0 t0, CP0_STATUS |
157 | sll t0, t0, 5 | 157 | sll t0, t0, 5 |
@@ -192,7 +192,7 @@ LEAF(_restore_fp_context) | |||
192 | EX ldc1 $f26, SC_FPREGS+208(a0) | 192 | EX ldc1 $f26, SC_FPREGS+208(a0) |
193 | EX ldc1 $f28, SC_FPREGS+224(a0) | 193 | EX ldc1 $f28, SC_FPREGS+224(a0) |
194 | EX ldc1 $f30, SC_FPREGS+240(a0) | 194 | EX ldc1 $f30, SC_FPREGS+240(a0) |
195 | ctc1 t0, fcr31 | 195 | ctc1 t1, fcr31 |
196 | jr ra | 196 | jr ra |
197 | li v0, 0 # success | 197 | li v0, 0 # success |
198 | END(_restore_fp_context) | 198 | END(_restore_fp_context) |
@@ -200,7 +200,7 @@ LEAF(_restore_fp_context) | |||
200 | #ifdef CONFIG_MIPS32_COMPAT | 200 | #ifdef CONFIG_MIPS32_COMPAT |
201 | LEAF(_restore_fp_context32) | 201 | LEAF(_restore_fp_context32) |
202 | /* Restore an o32 sigcontext. */ | 202 | /* Restore an o32 sigcontext. */ |
203 | EX lw t0, SC32_FPC_CSR(a0) | 203 | EX lw t1, SC32_FPC_CSR(a0) |
204 | 204 | ||
205 | mfc0 t0, CP0_STATUS | 205 | mfc0 t0, CP0_STATUS |
206 | sll t0, t0, 5 | 206 | sll t0, t0, 5 |
@@ -240,7 +240,7 @@ LEAF(_restore_fp_context32) | |||
240 | EX ldc1 $f26, SC32_FPREGS+208(a0) | 240 | EX ldc1 $f26, SC32_FPREGS+208(a0) |
241 | EX ldc1 $f28, SC32_FPREGS+224(a0) | 241 | EX ldc1 $f28, SC32_FPREGS+224(a0) |
242 | EX ldc1 $f30, SC32_FPREGS+240(a0) | 242 | EX ldc1 $f30, SC32_FPREGS+240(a0) |
243 | ctc1 t0, fcr31 | 243 | ctc1 t1, fcr31 |
244 | jr ra | 244 | jr ra |
245 | li v0, 0 # success | 245 | li v0, 0 # success |
246 | END(_restore_fp_context32) | 246 | END(_restore_fp_context32) |
diff --git a/arch/mips/kernel/rtlx-cmp.c b/arch/mips/kernel/rtlx-cmp.c index 56dc69635153..758fb3cd2326 100644 --- a/arch/mips/kernel/rtlx-cmp.c +++ b/arch/mips/kernel/rtlx-cmp.c | |||
@@ -112,5 +112,8 @@ void __exit rtlx_module_exit(void) | |||
112 | 112 | ||
113 | for (i = 0; i < RTLX_CHANNELS; i++) | 113 | for (i = 0; i < RTLX_CHANNELS; i++) |
114 | device_destroy(mt_class, MKDEV(major, i)); | 114 | device_destroy(mt_class, MKDEV(major, i)); |
115 | |||
115 | unregister_chrdev(major, RTLX_MODULE_NAME); | 116 | unregister_chrdev(major, RTLX_MODULE_NAME); |
117 | |||
118 | aprp_hook = NULL; | ||
116 | } | 119 | } |
diff --git a/arch/mips/kernel/rtlx-mt.c b/arch/mips/kernel/rtlx-mt.c index 91d61ba422b4..9c1aca00fd54 100644 --- a/arch/mips/kernel/rtlx-mt.c +++ b/arch/mips/kernel/rtlx-mt.c | |||
@@ -144,5 +144,8 @@ void __exit rtlx_module_exit(void) | |||
144 | 144 | ||
145 | for (i = 0; i < RTLX_CHANNELS; i++) | 145 | for (i = 0; i < RTLX_CHANNELS; i++) |
146 | device_destroy(mt_class, MKDEV(major, i)); | 146 | device_destroy(mt_class, MKDEV(major, i)); |
147 | |||
147 | unregister_chrdev(major, RTLX_MODULE_NAME); | 148 | unregister_chrdev(major, RTLX_MODULE_NAME); |
149 | |||
150 | aprp_hook = NULL; | ||
148 | } | 151 | } |
diff --git a/arch/mips/math-emu/cp1emu.c b/arch/mips/math-emu/cp1emu.c index 71a697c9d385..7b3c9acae689 100644 --- a/arch/mips/math-emu/cp1emu.c +++ b/arch/mips/math-emu/cp1emu.c | |||
@@ -1561,10 +1561,10 @@ static int fpux_emu(struct pt_regs *xcp, struct mips_fpu_struct *ctx, | |||
1561 | break; | 1561 | break; |
1562 | } | 1562 | } |
1563 | 1563 | ||
1564 | case 0x7: /* 7 */ | 1564 | case 0x3: |
1565 | if (MIPSInst_FUNC(ir) != pfetch_op) { | 1565 | if (MIPSInst_FUNC(ir) != pfetch_op) |
1566 | return SIGILL; | 1566 | return SIGILL; |
1567 | } | 1567 | |
1568 | /* ignore prefx operation */ | 1568 | /* ignore prefx operation */ |
1569 | break; | 1569 | break; |
1570 | 1570 | ||
diff --git a/arch/mips/mti-malta/malta-amon.c b/arch/mips/mti-malta/malta-amon.c index 592ac0427426..84ac523b0ce0 100644 --- a/arch/mips/mti-malta/malta-amon.c +++ b/arch/mips/mti-malta/malta-amon.c | |||
@@ -72,7 +72,7 @@ int amon_cpu_start(int cpu, | |||
72 | return 0; | 72 | return 0; |
73 | } | 73 | } |
74 | 74 | ||
75 | #ifdef CONFIG_MIPS_VPE_LOADER | 75 | #ifdef CONFIG_MIPS_VPE_LOADER_CMP |
76 | int vpe_run(struct vpe *v) | 76 | int vpe_run(struct vpe *v) |
77 | { | 77 | { |
78 | struct vpe_notifications *n; | 78 | struct vpe_notifications *n; |
diff --git a/arch/mips/mti-malta/malta-int.c b/arch/mips/mti-malta/malta-int.c index c6cbfebcac9b..b71ee809191a 100644 --- a/arch/mips/mti-malta/malta-int.c +++ b/arch/mips/mti-malta/malta-int.c | |||
@@ -117,7 +117,7 @@ static void malta_hw0_irqdispatch(void) | |||
117 | 117 | ||
118 | do_IRQ(MALTA_INT_BASE + irq); | 118 | do_IRQ(MALTA_INT_BASE + irq); |
119 | 119 | ||
120 | #ifdef MIPS_VPE_APSP_API | 120 | #ifdef CONFIG_MIPS_VPE_APSP_API_MT |
121 | if (aprp_hook) | 121 | if (aprp_hook) |
122 | aprp_hook(); | 122 | aprp_hook(); |
123 | #endif | 123 | #endif |
@@ -311,7 +311,7 @@ static void ipi_call_dispatch(void) | |||
311 | 311 | ||
312 | static irqreturn_t ipi_resched_interrupt(int irq, void *dev_id) | 312 | static irqreturn_t ipi_resched_interrupt(int irq, void *dev_id) |
313 | { | 313 | { |
314 | #ifdef MIPS_VPE_APSP_API | 314 | #ifdef CONFIG_MIPS_VPE_APSP_API_CMP |
315 | if (aprp_hook) | 315 | if (aprp_hook) |
316 | aprp_hook(); | 316 | aprp_hook(); |
317 | #endif | 317 | #endif |
diff --git a/arch/mips/pci/msi-octeon.c b/arch/mips/pci/msi-octeon.c index d37be36dc659..2b91b0e61566 100644 --- a/arch/mips/pci/msi-octeon.c +++ b/arch/mips/pci/msi-octeon.c | |||
@@ -150,6 +150,7 @@ msi_irq_allocated: | |||
150 | msg.address_lo = | 150 | msg.address_lo = |
151 | ((128ul << 20) + CVMX_PCI_MSI_RCV) & 0xffffffff; | 151 | ((128ul << 20) + CVMX_PCI_MSI_RCV) & 0xffffffff; |
152 | msg.address_hi = ((128ul << 20) + CVMX_PCI_MSI_RCV) >> 32; | 152 | msg.address_hi = ((128ul << 20) + CVMX_PCI_MSI_RCV) >> 32; |
153 | break; | ||
153 | case OCTEON_DMA_BAR_TYPE_BIG: | 154 | case OCTEON_DMA_BAR_TYPE_BIG: |
154 | /* When using big bar, Bar 0 is based at 0 */ | 155 | /* When using big bar, Bar 0 is based at 0 */ |
155 | msg.address_lo = (0 + CVMX_PCI_MSI_RCV) & 0xffffffff; | 156 | msg.address_lo = (0 + CVMX_PCI_MSI_RCV) & 0xffffffff; |
diff --git a/arch/mips/power/hibernate.S b/arch/mips/power/hibernate.S index 7e0277a1048f..32a7c828f073 100644 --- a/arch/mips/power/hibernate.S +++ b/arch/mips/power/hibernate.S | |||
@@ -43,6 +43,7 @@ LEAF(swsusp_arch_resume) | |||
43 | bne t1, t3, 1b | 43 | bne t1, t3, 1b |
44 | PTR_L t0, PBE_NEXT(t0) | 44 | PTR_L t0, PBE_NEXT(t0) |
45 | bnez t0, 0b | 45 | bnez t0, 0b |
46 | jal local_flush_tlb_all /* Avoid TLB mismatch after kernel resume */ | ||
46 | PTR_LA t0, saved_regs | 47 | PTR_LA t0, saved_regs |
47 | PTR_L ra, PT_R31(t0) | 48 | PTR_L ra, PT_R31(t0) |
48 | PTR_L sp, PT_R29(t0) | 49 | PTR_L sp, PT_R29(t0) |