Skip to content

Commit

Permalink
Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upst…
Browse files Browse the repository at this point in the history
…ream-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
  • Loading branch information
torvalds committed Nov 16, 2011
2 parents b1914cb + 4af92e7 commit ff0ff78
Show file tree
Hide file tree
Showing 33 changed files with 82 additions and 332 deletions.
2 changes: 1 addition & 1 deletion MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -4339,7 +4339,7 @@ MIPS
M: Ralf Baechle <[email protected]>
L: [email protected]
W: http://www.linux-mips.org/
T: git git://git.linux-mips.org/pub/scm/linux.git
T: git git://git.linux-mips.org/pub/scm/ralf/linux.git
Q: http://patchwork.linux-mips.org/project/linux-mips/list/
S: Supported
F: Documentation/mips/
Expand Down
9 changes: 2 additions & 7 deletions arch/mips/cavium-octeon/flash_setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@

static struct map_info flash_map;
static struct mtd_info *mymtd;
static int nr_parts;
static struct mtd_partition *parts;
static const char *part_probe_types[] = {
"cmdlinepart",
#ifdef CONFIG_MTD_REDBOOT_PARTS
Expand Down Expand Up @@ -61,11 +59,8 @@ static int __init flash_init(void)
mymtd = do_map_probe("cfi_probe", &flash_map);
if (mymtd) {
mymtd->owner = THIS_MODULE;

nr_parts = parse_mtd_partitions(mymtd,
part_probe_types,
&parts, 0);
mtd_device_register(mymtd, parts, nr_parts);
mtd_device_parse_register(mymtd, part_probe_types,
0, NULL, 0);
} else {
pr_err("Failed to register MTD device for flash\n");
}
Expand Down
5 changes: 3 additions & 2 deletions arch/mips/cavium-octeon/smp.c
Original file line number Diff line number Diff line change
Expand Up @@ -207,8 +207,9 @@ void octeon_prepare_cpus(unsigned int max_cpus)
* the other bits alone.
*/
cvmx_write_csr(CVMX_CIU_MBOX_CLRX(cvmx_get_core_num()), 0xffff);
if (request_irq(OCTEON_IRQ_MBOX0, mailbox_interrupt, IRQF_DISABLED,
"SMP-IPI", mailbox_interrupt)) {
if (request_irq(OCTEON_IRQ_MBOX0, mailbox_interrupt,
IRQF_PERCPU | IRQF_NO_THREAD, "SMP-IPI",
mailbox_interrupt)) {
panic("Cannot request_irq(OCTEON_IRQ_MBOX0)\n");
}
}
Expand Down
2 changes: 1 addition & 1 deletion arch/mips/emma/common/prom.c
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ void __init prom_init(void)

/* arg[0] is "g", the rest is boot parameters */
for (i = 1; i < argc; i++) {
if (strlen(arcs_cmdline) + strlen(arg[i] + 1)
if (strlen(arcs_cmdline) + strlen(arg[i]) + 1
>= sizeof(arcs_cmdline))
break;
strcat(arcs_cmdline, arg[i]);
Expand Down
18 changes: 15 additions & 3 deletions arch/mips/include/asm/mach-bcm47xx/gpio.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ static inline int gpio_get_value(unsigned gpio)
return -EINVAL;
}

#define gpio_get_value_cansleep gpio_get_value

static inline void gpio_set_value(unsigned gpio, int value)
{
switch (bcm47xx_bus_type) {
Expand All @@ -54,6 +56,19 @@ static inline void gpio_set_value(unsigned gpio, int value)
}
}

#define gpio_set_value_cansleep gpio_set_value

static inline int gpio_cansleep(unsigned gpio)
{
return 0;
}

static inline int gpio_is_valid(unsigned gpio)
{
return gpio < (BCM47XX_EXTIF_GPIO_LINES + BCM47XX_CHIPCO_GPIO_LINES);
}


static inline int gpio_direction_input(unsigned gpio)
{
switch (bcm47xx_bus_type) {
Expand Down Expand Up @@ -137,7 +152,4 @@ static inline int gpio_polarity(unsigned gpio, int value)
}


/* cansleep wrappers */
#include <asm-generic/gpio.h>

#endif /* __BCM47XX_GPIO_H */
18 changes: 12 additions & 6 deletions arch/mips/include/asm/unistd.h
Original file line number Diff line number Diff line change
Expand Up @@ -365,16 +365,18 @@
#define __NR_syncfs (__NR_Linux + 342)
#define __NR_sendmmsg (__NR_Linux + 343)
#define __NR_setns (__NR_Linux + 344)
#define __NR_process_vm_readv (__NR_Linux + 345)
#define __NR_process_vm_writev (__NR_Linux + 346)

/*
* Offset of the last Linux o32 flavoured syscall
*/
#define __NR_Linux_syscalls 344
#define __NR_Linux_syscalls 346

#endif /* _MIPS_SIM == _MIPS_SIM_ABI32 */

#define __NR_O32_Linux 4000
#define __NR_O32_Linux_syscalls 344
#define __NR_O32_Linux_syscalls 346

#if _MIPS_SIM == _MIPS_SIM_ABI64

Expand Down Expand Up @@ -686,16 +688,18 @@
#define __NR_syncfs (__NR_Linux + 301)
#define __NR_sendmmsg (__NR_Linux + 302)
#define __NR_setns (__NR_Linux + 303)
#define __NR_process_vm_readv (__NR_Linux + 304)
#define __NR_process_vm_writev (__NR_Linux + 305)

/*
* Offset of the last Linux 64-bit flavoured syscall
*/
#define __NR_Linux_syscalls 303
#define __NR_Linux_syscalls 305

#endif /* _MIPS_SIM == _MIPS_SIM_ABI64 */

#define __NR_64_Linux 5000
#define __NR_64_Linux_syscalls 303
#define __NR_64_Linux_syscalls 305

#if _MIPS_SIM == _MIPS_SIM_NABI32

Expand Down Expand Up @@ -1012,16 +1016,18 @@
#define __NR_syncfs (__NR_Linux + 306)
#define __NR_sendmmsg (__NR_Linux + 307)
#define __NR_setns (__NR_Linux + 308)
#define __NR_process_vm_readv (__NR_Linux + 309)
#define __NR_process_vm_writev (__NR_Linux + 310)

/*
* Offset of the last N32 flavoured syscall
*/
#define __NR_Linux_syscalls 308
#define __NR_Linux_syscalls 310

#endif /* _MIPS_SIM == _MIPS_SIM_NABI32 */

#define __NR_N32_Linux 6000
#define __NR_N32_Linux_syscalls 308
#define __NR_N32_Linux_syscalls 310

#ifdef __KERNEL__

Expand Down
38 changes: 19 additions & 19 deletions arch/mips/kernel/cevt-r4k.c
Original file line number Diff line number Diff line change
Expand Up @@ -103,19 +103,10 @@ static int c0_compare_int_pending(void)

/*
* Compare interrupt can be routed and latched outside the core,
* so a single execution hazard barrier may not be enough to give
* it time to clear as seen in the Cause register. 4 time the
* pipeline depth seems reasonably conservative, and empirically
* works better in configurations with high CPU/bus clock ratios.
* so wait up to worst case number of cycle counter ticks for timer interrupt
* changes to propagate to the cause register.
*/

#define compare_change_hazard() \
do { \
irq_disable_hazard(); \
irq_disable_hazard(); \
irq_disable_hazard(); \
irq_disable_hazard(); \
} while (0)
#define COMPARE_INT_SEEN_TICKS 50

int c0_compare_int_usable(void)
{
Expand All @@ -126,8 +117,12 @@ int c0_compare_int_usable(void)
* IP7 already pending? Try to clear it by acking the timer.
*/
if (c0_compare_int_pending()) {
write_c0_compare(read_c0_count());
compare_change_hazard();
cnt = read_c0_count();
write_c0_compare(cnt);
back_to_back_c0_hazard();
while (read_c0_count() < (cnt + COMPARE_INT_SEEN_TICKS))
if (!c0_compare_int_pending())
break;
if (c0_compare_int_pending())
return 0;
}
Expand All @@ -136,7 +131,7 @@ int c0_compare_int_usable(void)
cnt = read_c0_count();
cnt += delta;
write_c0_compare(cnt);
compare_change_hazard();
back_to_back_c0_hazard();
if ((int)(read_c0_count() - cnt) < 0)
break;
/* increase delta if the timer was already expired */
Expand All @@ -145,12 +140,17 @@ int c0_compare_int_usable(void)
while ((int)(read_c0_count() - cnt) <= 0)
; /* Wait for expiry */

compare_change_hazard();
while (read_c0_count() < (cnt + COMPARE_INT_SEEN_TICKS))
if (c0_compare_int_pending())
break;
if (!c0_compare_int_pending())
return 0;

write_c0_compare(read_c0_count());
compare_change_hazard();
cnt = read_c0_count();
write_c0_compare(cnt);
back_to_back_c0_hazard();
while (read_c0_count() < (cnt + COMPARE_INT_SEEN_TICKS))
if (!c0_compare_int_pending())
break;
if (c0_compare_int_pending())
return 0;

Expand Down
1 change: 1 addition & 0 deletions arch/mips/kernel/cpufreq/loongson2_clock.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
* for more details.
*/

#include <linux/module.h>
#include <linux/cpufreq.h>
#include <linux/platform_device.h>

Expand Down
2 changes: 2 additions & 0 deletions arch/mips/kernel/scall32-o32.S
Original file line number Diff line number Diff line change
Expand Up @@ -591,6 +591,8 @@ einval: li v0, -ENOSYS
sys sys_syncfs 1
sys sys_sendmmsg 4
sys sys_setns 2
sys sys_process_vm_readv 6 /* 4345 */
sys sys_process_vm_writev 6
.endm

/* We pre-compute the number of _instruction_ bytes needed to
Expand Down
2 changes: 2 additions & 0 deletions arch/mips/kernel/scall64-64.S
Original file line number Diff line number Diff line change
Expand Up @@ -430,4 +430,6 @@ sys_call_table:
PTR sys_syncfs
PTR sys_sendmmsg
PTR sys_setns
PTR sys_process_vm_readv
PTR sys_process_vm_writev /* 5305 */
.size sys_call_table,.-sys_call_table
2 changes: 2 additions & 0 deletions arch/mips/kernel/scall64-n32.S
Original file line number Diff line number Diff line change
Expand Up @@ -430,4 +430,6 @@ EXPORT(sysn32_call_table)
PTR sys_syncfs
PTR compat_sys_sendmmsg
PTR sys_setns
PTR compat_sys_process_vm_readv
PTR compat_sys_process_vm_writev /* 6310 */
.size sysn32_call_table,.-sysn32_call_table
2 changes: 2 additions & 0 deletions arch/mips/kernel/scall64-o32.S
Original file line number Diff line number Diff line change
Expand Up @@ -548,4 +548,6 @@ sys_call_table:
PTR sys_syncfs
PTR compat_sys_sendmmsg
PTR sys_setns
PTR compat_sys_process_vm_readv /* 4345 */
PTR compat_sys_process_vm_writev
.size sys_call_table,.-sys_call_table
3 changes: 2 additions & 1 deletion arch/mips/kernel/traps.c
Original file line number Diff line number Diff line change
Expand Up @@ -1596,7 +1596,8 @@ void __cpuinit per_cpu_trap_init(void)
}
#endif /* CONFIG_MIPS_MT_SMTC */

cpu_data[cpu].asid_cache = ASID_FIRST_VERSION;
if (!cpu_data[cpu].asid_cache)
cpu_data[cpu].asid_cache = ASID_FIRST_VERSION;

atomic_inc(&init_mm.mm_count);
current->active_mm = &init_mm;
Expand Down
2 changes: 1 addition & 1 deletion arch/mips/lantiq/clk.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* Copyright (C) 2010 John Crispin <[email protected]>
*/
#include <linux/io.h>
#include <linux/module.h>
#include <linux/export.h>
#include <linux/init.h>
#include <linux/kernel.h>
#include <linux/types.h>
Expand Down
2 changes: 1 addition & 1 deletion arch/mips/lantiq/devices.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
*/

#include <linux/init.h>
#include <linux/module.h>
#include <linux/export.h>
#include <linux/types.h>
#include <linux/string.h>
#include <linux/kernel.h>
Expand Down
2 changes: 1 addition & 1 deletion arch/mips/lantiq/prom.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* Copyright (C) 2010 John Crispin <[email protected]>
*/

#include <linux/module.h>
#include <linux/export.h>
#include <linux/clk.h>
#include <asm/bootinfo.h>
#include <asm/time.h>
Expand Down
2 changes: 1 addition & 1 deletion arch/mips/lantiq/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
*/

#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/export.h>
#include <linux/io.h>
#include <linux/ioport.h>
#include <asm/bootinfo.h>
Expand Down
2 changes: 1 addition & 1 deletion arch/mips/lantiq/xway/clk-ase.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
*/

#include <linux/io.h>
#include <linux/module.h>
#include <linux/export.h>
#include <linux/init.h>
#include <linux/clk.h>

Expand Down
2 changes: 1 addition & 1 deletion arch/mips/lantiq/xway/clk-xway.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
*/

#include <linux/io.h>
#include <linux/module.h>
#include <linux/export.h>
#include <linux/init.h>
#include <linux/clk.h>

Expand Down
2 changes: 1 addition & 1 deletion arch/mips/lantiq/xway/devices.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
*/

#include <linux/init.h>
#include <linux/module.h>
#include <linux/export.h>
#include <linux/types.h>
#include <linux/string.h>
#include <linux/mtd/physmap.h>
Expand Down
1 change: 1 addition & 0 deletions arch/mips/lantiq/xway/dma.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
#include <linux/platform_device.h>
#include <linux/io.h>
#include <linux/dma-mapping.h>
#include <linux/export.h>

#include <lantiq_soc.h>
#include <xway_dma.h>
Expand Down
2 changes: 1 addition & 1 deletion arch/mips/lantiq/xway/gpio.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
*/

#include <linux/slab.h>
#include <linux/module.h>
#include <linux/export.h>
#include <linux/platform_device.h>
#include <linux/gpio.h>
#include <linux/ioport.h>
Expand Down
2 changes: 1 addition & 1 deletion arch/mips/lantiq/xway/gpio_ebu.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
*/

#include <linux/init.h>
#include <linux/module.h>
#include <linux/export.h>
#include <linux/types.h>
#include <linux/platform_device.h>
#include <linux/mutex.h>
Expand Down
2 changes: 1 addition & 1 deletion arch/mips/lantiq/xway/gpio_stp.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

#include <linux/slab.h>
#include <linux/init.h>
#include <linux/module.h>
#include <linux/export.h>
#include <linux/types.h>
#include <linux/platform_device.h>
#include <linux/mutex.h>
Expand Down
2 changes: 1 addition & 1 deletion arch/mips/lantiq/xway/prom-ase.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* Copyright (C) 2010 John Crispin <[email protected]>
*/

#include <linux/module.h>
#include <linux/export.h>
#include <linux/clk.h>
#include <asm/bootinfo.h>
#include <asm/time.h>
Expand Down
2 changes: 1 addition & 1 deletion arch/mips/lantiq/xway/prom-xway.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* Copyright (C) 2010 John Crispin <[email protected]>
*/

#include <linux/module.h>
#include <linux/export.h>
#include <linux/clk.h>
#include <asm/bootinfo.h>
#include <asm/time.h>
Expand Down
2 changes: 1 addition & 1 deletion arch/mips/lantiq/xway/reset.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#include <linux/io.h>
#include <linux/ioport.h>
#include <linux/pm.h>
#include <linux/module.h>
#include <linux/export.h>
#include <asm/reboot.h>

#include <lantiq_soc.h>
Expand Down
Loading

0 comments on commit ff0ff78

Please sign in to comment.