Skip to content

Commit ff0ff78

Browse files
committed
Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus
* 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus: MIPS: lantiq: use export.h in favour of module.h MAINTAINERS: The MIPS git tree has moved. MIPS: Fix build error due to missing inclusion of <linux/export.h>. MIPS: ASID conflict after CPU hotplug MIPS: Octeon: Fix compile error in arch/mips/cavium-octeon/flash_setup.c MIPS: errloongson2_clock: Fix build error by including linux/module.h STAGING: octeon-ethernet: Fix compile error caused by skb_frag_struct change MIPS: Hook up process_vm_readv and process_vm_writev system calls. MIPS: Kernel hangs occasionally during boot. MIPS: Octeon: Mark SMP-IPI interrupt as IRQF_NO_THREAD MIPS: BCM47xx: fix build with GENERIC_GPIO configuration MIPS: NXP: Remove unused source files. MIPS: Yosemite, Emma: Fix off-by-two in arcs_cmdline buffer size check
2 parents b1914cb + 4af92e7 commit ff0ff78

33 files changed

Lines changed: 82 additions & 332 deletions

File tree

‎MAINTAINERS‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4339,7 +4339,7 @@ MIPS
43394339
M: Ralf Baechle <ralf@linux-mips.org>
43404340
L: linux-mips@linux-mips.org
43414341
W: http://www.linux-mips.org/
4342-
T: git git://git.linux-mips.org/pub/scm/linux.git
4342+
T: git git://git.linux-mips.org/pub/scm/ralf/linux.git
43434343
Q: http://patchwork.linux-mips.org/project/linux-mips/list/
43444344
S: Supported
43454345
F: Documentation/mips/

‎arch/mips/cavium-octeon/flash_setup.c‎

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,6 @@
1717

1818
static struct map_info flash_map;
1919
static struct mtd_info *mymtd;
20-
static int nr_parts;
21-
static struct mtd_partition *parts;
2220
static const char *part_probe_types[] = {
2321
"cmdlinepart",
2422
#ifdef CONFIG_MTD_REDBOOT_PARTS
@@ -61,11 +59,8 @@ static int __init flash_init(void)
6159
mymtd = do_map_probe("cfi_probe", &flash_map);
6260
if (mymtd) {
6361
mymtd->owner = THIS_MODULE;
64-
65-
nr_parts = parse_mtd_partitions(mymtd,
66-
part_probe_types,
67-
&parts, 0);
68-
mtd_device_register(mymtd, parts, nr_parts);
62+
mtd_device_parse_register(mymtd, part_probe_types,
63+
0, NULL, 0);
6964
} else {
7065
pr_err("Failed to register MTD device for flash\n");
7166
}

‎arch/mips/cavium-octeon/smp.c‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -207,8 +207,9 @@ void octeon_prepare_cpus(unsigned int max_cpus)
207207
* the other bits alone.
208208
*/
209209
cvmx_write_csr(CVMX_CIU_MBOX_CLRX(cvmx_get_core_num()), 0xffff);
210-
if (request_irq(OCTEON_IRQ_MBOX0, mailbox_interrupt, IRQF_DISABLED,
211-
"SMP-IPI", mailbox_interrupt)) {
210+
if (request_irq(OCTEON_IRQ_MBOX0, mailbox_interrupt,
211+
IRQF_PERCPU | IRQF_NO_THREAD, "SMP-IPI",
212+
mailbox_interrupt)) {
212213
panic("Cannot request_irq(OCTEON_IRQ_MBOX0)\n");
213214
}
214215
}

‎arch/mips/emma/common/prom.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ void __init prom_init(void)
5050

5151
/* arg[0] is "g", the rest is boot parameters */
5252
for (i = 1; i < argc; i++) {
53-
if (strlen(arcs_cmdline) + strlen(arg[i] + 1)
53+
if (strlen(arcs_cmdline) + strlen(arg[i]) + 1
5454
>= sizeof(arcs_cmdline))
5555
break;
5656
strcat(arcs_cmdline, arg[i]);

‎arch/mips/include/asm/mach-bcm47xx/gpio.h‎

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ static inline int gpio_get_value(unsigned gpio)
3636
return -EINVAL;
3737
}
3838

39+
#define gpio_get_value_cansleep gpio_get_value
40+
3941
static inline void gpio_set_value(unsigned gpio, int value)
4042
{
4143
switch (bcm47xx_bus_type) {
@@ -54,6 +56,19 @@ static inline void gpio_set_value(unsigned gpio, int value)
5456
}
5557
}
5658

59+
#define gpio_set_value_cansleep gpio_set_value
60+
61+
static inline int gpio_cansleep(unsigned gpio)
62+
{
63+
return 0;
64+
}
65+
66+
static inline int gpio_is_valid(unsigned gpio)
67+
{
68+
return gpio < (BCM47XX_EXTIF_GPIO_LINES + BCM47XX_CHIPCO_GPIO_LINES);
69+
}
70+
71+
5772
static inline int gpio_direction_input(unsigned gpio)
5873
{
5974
switch (bcm47xx_bus_type) {
@@ -137,7 +152,4 @@ static inline int gpio_polarity(unsigned gpio, int value)
137152
}
138153

139154

140-
/* cansleep wrappers */
141-
#include <asm-generic/gpio.h>
142-
143155
#endif /* __BCM47XX_GPIO_H */

‎arch/mips/include/asm/unistd.h‎

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -365,16 +365,18 @@
365365
#define __NR_syncfs (__NR_Linux + 342)
366366
#define __NR_sendmmsg (__NR_Linux + 343)
367367
#define __NR_setns (__NR_Linux + 344)
368+
#define __NR_process_vm_readv (__NR_Linux + 345)
369+
#define __NR_process_vm_writev (__NR_Linux + 346)
368370

369371
/*
370372
* Offset of the last Linux o32 flavoured syscall
371373
*/
372-
#define __NR_Linux_syscalls 344
374+
#define __NR_Linux_syscalls 346
373375

374376
#endif /* _MIPS_SIM == _MIPS_SIM_ABI32 */
375377

376378
#define __NR_O32_Linux 4000
377-
#define __NR_O32_Linux_syscalls 344
379+
#define __NR_O32_Linux_syscalls 346
378380

379381
#if _MIPS_SIM == _MIPS_SIM_ABI64
380382

@@ -686,16 +688,18 @@
686688
#define __NR_syncfs (__NR_Linux + 301)
687689
#define __NR_sendmmsg (__NR_Linux + 302)
688690
#define __NR_setns (__NR_Linux + 303)
691+
#define __NR_process_vm_readv (__NR_Linux + 304)
692+
#define __NR_process_vm_writev (__NR_Linux + 305)
689693

690694
/*
691695
* Offset of the last Linux 64-bit flavoured syscall
692696
*/
693-
#define __NR_Linux_syscalls 303
697+
#define __NR_Linux_syscalls 305
694698

695699
#endif /* _MIPS_SIM == _MIPS_SIM_ABI64 */
696700

697701
#define __NR_64_Linux 5000
698-
#define __NR_64_Linux_syscalls 303
702+
#define __NR_64_Linux_syscalls 305
699703

700704
#if _MIPS_SIM == _MIPS_SIM_NABI32
701705

@@ -1012,16 +1016,18 @@
10121016
#define __NR_syncfs (__NR_Linux + 306)
10131017
#define __NR_sendmmsg (__NR_Linux + 307)
10141018
#define __NR_setns (__NR_Linux + 308)
1019+
#define __NR_process_vm_readv (__NR_Linux + 309)
1020+
#define __NR_process_vm_writev (__NR_Linux + 310)
10151021

10161022
/*
10171023
* Offset of the last N32 flavoured syscall
10181024
*/
1019-
#define __NR_Linux_syscalls 308
1025+
#define __NR_Linux_syscalls 310
10201026

10211027
#endif /* _MIPS_SIM == _MIPS_SIM_NABI32 */
10221028

10231029
#define __NR_N32_Linux 6000
1024-
#define __NR_N32_Linux_syscalls 308
1030+
#define __NR_N32_Linux_syscalls 310
10251031

10261032
#ifdef __KERNEL__
10271033

‎arch/mips/kernel/cevt-r4k.c‎

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -103,19 +103,10 @@ static int c0_compare_int_pending(void)
103103

104104
/*
105105
* Compare interrupt can be routed and latched outside the core,
106-
* so a single execution hazard barrier may not be enough to give
107-
* it time to clear as seen in the Cause register. 4 time the
108-
* pipeline depth seems reasonably conservative, and empirically
109-
* works better in configurations with high CPU/bus clock ratios.
106+
* so wait up to worst case number of cycle counter ticks for timer interrupt
107+
* changes to propagate to the cause register.
110108
*/
111-
112-
#define compare_change_hazard() \
113-
do { \
114-
irq_disable_hazard(); \
115-
irq_disable_hazard(); \
116-
irq_disable_hazard(); \
117-
irq_disable_hazard(); \
118-
} while (0)
109+
#define COMPARE_INT_SEEN_TICKS 50
119110

120111
int c0_compare_int_usable(void)
121112
{
@@ -126,8 +117,12 @@ int c0_compare_int_usable(void)
126117
* IP7 already pending? Try to clear it by acking the timer.
127118
*/
128119
if (c0_compare_int_pending()) {
129-
write_c0_compare(read_c0_count());
130-
compare_change_hazard();
120+
cnt = read_c0_count();
121+
write_c0_compare(cnt);
122+
back_to_back_c0_hazard();
123+
while (read_c0_count() < (cnt + COMPARE_INT_SEEN_TICKS))
124+
if (!c0_compare_int_pending())
125+
break;
131126
if (c0_compare_int_pending())
132127
return 0;
133128
}
@@ -136,7 +131,7 @@ int c0_compare_int_usable(void)
136131
cnt = read_c0_count();
137132
cnt += delta;
138133
write_c0_compare(cnt);
139-
compare_change_hazard();
134+
back_to_back_c0_hazard();
140135
if ((int)(read_c0_count() - cnt) < 0)
141136
break;
142137
/* increase delta if the timer was already expired */
@@ -145,12 +140,17 @@ int c0_compare_int_usable(void)
145140
while ((int)(read_c0_count() - cnt) <= 0)
146141
; /* Wait for expiry */
147142

148-
compare_change_hazard();
143+
while (read_c0_count() < (cnt + COMPARE_INT_SEEN_TICKS))
144+
if (c0_compare_int_pending())
145+
break;
149146
if (!c0_compare_int_pending())
150147
return 0;
151-
152-
write_c0_compare(read_c0_count());
153-
compare_change_hazard();
148+
cnt = read_c0_count();
149+
write_c0_compare(cnt);
150+
back_to_back_c0_hazard();
151+
while (read_c0_count() < (cnt + COMPARE_INT_SEEN_TICKS))
152+
if (!c0_compare_int_pending())
153+
break;
154154
if (c0_compare_int_pending())
155155
return 0;
156156

‎arch/mips/kernel/cpufreq/loongson2_clock.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
* for more details.
88
*/
99

10+
#include <linux/module.h>
1011
#include <linux/cpufreq.h>
1112
#include <linux/platform_device.h>
1213

‎arch/mips/kernel/scall32-o32.S‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -591,6 +591,8 @@ einval: li v0, -ENOSYS
591591
sys sys_syncfs 1
592592
sys sys_sendmmsg 4
593593
sys sys_setns 2
594+
sys sys_process_vm_readv 6 /* 4345 */
595+
sys sys_process_vm_writev 6
594596
.endm
595597

596598
/* We pre-compute the number of _instruction_ bytes needed to

‎arch/mips/kernel/scall64-64.S‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -430,4 +430,6 @@ sys_call_table:
430430
PTR sys_syncfs
431431
PTR sys_sendmmsg
432432
PTR sys_setns
433+
PTR sys_process_vm_readv
434+
PTR sys_process_vm_writev /* 5305 */
433435
.size sys_call_table,.-sys_call_table

0 commit comments

Comments
 (0)