diff options
Diffstat (limited to 'arch/mips')
39 files changed, 192 insertions, 110 deletions
diff --git a/arch/mips/Kbuild b/arch/mips/Kbuild index e322d65f33a4..7dd65cfae837 100644 --- a/arch/mips/Kbuild +++ b/arch/mips/Kbuild | |||
@@ -7,6 +7,10 @@ subdir-ccflags-y := -Werror | |||
7 | include arch/mips/Kbuild.platforms | 7 | include arch/mips/Kbuild.platforms |
8 | obj-y := $(platform-y) | 8 | obj-y := $(platform-y) |
9 | 9 | ||
10 | # make clean traverses $(obj-) without having included .config, so | ||
11 | # everything ends up here | ||
12 | obj- := $(platform-) | ||
13 | |||
10 | # mips object files | 14 | # mips object files |
11 | # The object files are linked as core-y files would be linked | 15 | # The object files are linked as core-y files would be linked |
12 | 16 | ||
diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig index 3ad59dde4852..4c9f402295dd 100644 --- a/arch/mips/Kconfig +++ b/arch/mips/Kconfig | |||
@@ -13,6 +13,7 @@ config MIPS | |||
13 | select HAVE_KPROBES | 13 | select HAVE_KPROBES |
14 | select HAVE_KRETPROBES | 14 | select HAVE_KRETPROBES |
15 | select RTC_LIB if !MACH_LOONGSON | 15 | select RTC_LIB if !MACH_LOONGSON |
16 | select GENERIC_ATOMIC64 if !64BIT | ||
16 | 17 | ||
17 | mainmenu "Linux/MIPS Kernel Configuration" | 18 | mainmenu "Linux/MIPS Kernel Configuration" |
18 | 19 | ||
@@ -880,11 +881,15 @@ config NO_IOPORT | |||
880 | config GENERIC_ISA_DMA | 881 | config GENERIC_ISA_DMA |
881 | bool | 882 | bool |
882 | select ZONE_DMA if GENERIC_ISA_DMA_SUPPORT_BROKEN=n | 883 | select ZONE_DMA if GENERIC_ISA_DMA_SUPPORT_BROKEN=n |
884 | select ISA_DMA_API | ||
883 | 885 | ||
884 | config GENERIC_ISA_DMA_SUPPORT_BROKEN | 886 | config GENERIC_ISA_DMA_SUPPORT_BROKEN |
885 | bool | 887 | bool |
886 | select GENERIC_ISA_DMA | 888 | select GENERIC_ISA_DMA |
887 | 889 | ||
890 | config ISA_DMA_API | ||
891 | bool | ||
892 | |||
888 | config GENERIC_GPIO | 893 | config GENERIC_GPIO |
889 | bool | 894 | bool |
890 | 895 | ||
@@ -1646,8 +1651,16 @@ config MIPS_MT_SMP | |||
1646 | select SYS_SUPPORTS_SMP | 1651 | select SYS_SUPPORTS_SMP |
1647 | select SMP_UP | 1652 | select SMP_UP |
1648 | help | 1653 | help |
1649 | This is a kernel model which is also known a VSMP or lately | 1654 | This is a kernel model which is known a VSMP but lately has been |
1650 | has been marketesed into SMVP. | 1655 | marketesed into SMVP. |
1656 | Virtual SMP uses the processor's VPEs to implement virtual | ||
1657 | processors. In currently available configuration of the 34K processor | ||
1658 | this allows for a dual processor. Both processors will share the same | ||
1659 | primary caches; each will obtain the half of the TLB for it's own | ||
1660 | exclusive use. For a layman this model can be described as similar to | ||
1661 | what Intel calls Hyperthreading. | ||
1662 | |||
1663 | For further information see http://www.linux-mips.org/wiki/34K#VSMP | ||
1651 | 1664 | ||
1652 | config MIPS_MT_SMTC | 1665 | config MIPS_MT_SMTC |
1653 | bool "SMTC: Use all TCs on all VPEs for SMP" | 1666 | bool "SMTC: Use all TCs on all VPEs for SMP" |
@@ -1664,6 +1677,14 @@ config MIPS_MT_SMTC | |||
1664 | help | 1677 | help |
1665 | This is a kernel model which is known a SMTC or lately has been | 1678 | This is a kernel model which is known a SMTC or lately has been |
1666 | marketesed into SMVP. | 1679 | marketesed into SMVP. |
1680 | is presenting the available TC's of the core as processors to Linux. | ||
1681 | On currently available 34K processors this means a Linux system will | ||
1682 | see up to 5 processors. The implementation of the SMTC kernel differs | ||
1683 | significantly from VSMP and cannot efficiently coexist in the same | ||
1684 | kernel binary so the choice between VSMP and SMTC is a compile time | ||
1685 | decision. | ||
1686 | |||
1687 | For further information see http://www.linux-mips.org/wiki/34K#SMTC | ||
1667 | 1688 | ||
1668 | endchoice | 1689 | endchoice |
1669 | 1690 | ||
diff --git a/arch/mips/alchemy/common/prom.c b/arch/mips/alchemy/common/prom.c index c29511b11d44..534021059629 100644 --- a/arch/mips/alchemy/common/prom.c +++ b/arch/mips/alchemy/common/prom.c | |||
@@ -43,7 +43,7 @@ int prom_argc; | |||
43 | char **prom_argv; | 43 | char **prom_argv; |
44 | char **prom_envp; | 44 | char **prom_envp; |
45 | 45 | ||
46 | void prom_init_cmdline(void) | 46 | void __init prom_init_cmdline(void) |
47 | { | 47 | { |
48 | int i; | 48 | int i; |
49 | 49 | ||
@@ -104,7 +104,7 @@ static inline void str2eaddr(unsigned char *ea, unsigned char *str) | |||
104 | } | 104 | } |
105 | } | 105 | } |
106 | 106 | ||
107 | int prom_get_ethernet_addr(char *ethernet_addr) | 107 | int __init prom_get_ethernet_addr(char *ethernet_addr) |
108 | { | 108 | { |
109 | char *ethaddr_str; | 109 | char *ethaddr_str; |
110 | 110 | ||
@@ -123,7 +123,6 @@ int prom_get_ethernet_addr(char *ethernet_addr) | |||
123 | 123 | ||
124 | return 0; | 124 | return 0; |
125 | } | 125 | } |
126 | EXPORT_SYMBOL(prom_get_ethernet_addr); | ||
127 | 126 | ||
128 | void __init prom_free_prom_memory(void) | 127 | void __init prom_free_prom_memory(void) |
129 | { | 128 | { |
diff --git a/arch/mips/boot/compressed/Makefile b/arch/mips/boot/compressed/Makefile index ed9bb709c9a3..5042d51b0512 100644 --- a/arch/mips/boot/compressed/Makefile +++ b/arch/mips/boot/compressed/Makefile | |||
@@ -59,7 +59,7 @@ $(obj)/piggy.o: $(obj)/dummy.o $(obj)/vmlinux.bin.z FORCE | |||
59 | hostprogs-y := calc_vmlinuz_load_addr | 59 | hostprogs-y := calc_vmlinuz_load_addr |
60 | 60 | ||
61 | VMLINUZ_LOAD_ADDRESS = $(shell $(obj)/calc_vmlinuz_load_addr \ | 61 | VMLINUZ_LOAD_ADDRESS = $(shell $(obj)/calc_vmlinuz_load_addr \ |
62 | $(objtree)/$(KBUILD_IMAGE) $(VMLINUX_LOAD_ADDRESS)) | 62 | $(obj)/vmlinux.bin $(VMLINUX_LOAD_ADDRESS)) |
63 | 63 | ||
64 | vmlinuzobjs-y += $(obj)/piggy.o | 64 | vmlinuzobjs-y += $(obj)/piggy.o |
65 | 65 | ||
@@ -105,4 +105,4 @@ OBJCOPYFLAGS_vmlinuz.srec := $(OBJCOPYFLAGS) -S -O srec | |||
105 | vmlinuz.srec: vmlinuz | 105 | vmlinuz.srec: vmlinuz |
106 | $(call cmd,objcopy) | 106 | $(call cmd,objcopy) |
107 | 107 | ||
108 | clean-files := $(objtree)/vmlinuz.* | 108 | clean-files := $(objtree)/vmlinuz $(objtree)/vmlinuz.{32,ecoff,bin,srec} |
diff --git a/arch/mips/cavium-octeon/Kconfig b/arch/mips/cavium-octeon/Kconfig index 094c17e38e16..47323ca452dc 100644 --- a/arch/mips/cavium-octeon/Kconfig +++ b/arch/mips/cavium-octeon/Kconfig | |||
@@ -83,3 +83,7 @@ config ARCH_SPARSEMEM_ENABLE | |||
83 | def_bool y | 83 | def_bool y |
84 | select SPARSEMEM_STATIC | 84 | select SPARSEMEM_STATIC |
85 | depends on CPU_CAVIUM_OCTEON | 85 | depends on CPU_CAVIUM_OCTEON |
86 | |||
87 | config CAVIUM_OCTEON_HELPER | ||
88 | def_bool y | ||
89 | depends on OCTEON_ETHERNET || PCI | ||
diff --git a/arch/mips/cavium-octeon/cpu.c b/arch/mips/cavium-octeon/cpu.c index c664c8cc2b42..a5b427909b5c 100644 --- a/arch/mips/cavium-octeon/cpu.c +++ b/arch/mips/cavium-octeon/cpu.c | |||
@@ -41,7 +41,7 @@ static int cnmips_cu2_call(struct notifier_block *nfb, unsigned long action, | |||
41 | return NOTIFY_OK; /* Let default notifier send signals */ | 41 | return NOTIFY_OK; /* Let default notifier send signals */ |
42 | } | 42 | } |
43 | 43 | ||
44 | static int cnmips_cu2_setup(void) | 44 | static int __init cnmips_cu2_setup(void) |
45 | { | 45 | { |
46 | return cu2_notifier(cnmips_cu2_call, 0); | 46 | return cu2_notifier(cnmips_cu2_call, 0); |
47 | } | 47 | } |
diff --git a/arch/mips/cavium-octeon/executive/Makefile b/arch/mips/cavium-octeon/executive/Makefile index 2fd66db6939e..7f41c5be2190 100644 --- a/arch/mips/cavium-octeon/executive/Makefile +++ b/arch/mips/cavium-octeon/executive/Makefile | |||
@@ -11,4 +11,4 @@ | |||
11 | 11 | ||
12 | obj-y += cvmx-bootmem.o cvmx-l2c.o cvmx-sysinfo.o octeon-model.o | 12 | obj-y += cvmx-bootmem.o cvmx-l2c.o cvmx-sysinfo.o octeon-model.o |
13 | 13 | ||
14 | obj-$(CONFIG_PCI) += cvmx-helper-errata.o cvmx-helper-jtag.o | 14 | obj-$(CONFIG_CAVIUM_OCTEON_HELPER) += cvmx-helper-errata.o cvmx-helper-jtag.o |
diff --git a/arch/mips/dec/Platform b/arch/mips/dec/Platform index 3adbcbd95db1..cf55a6f4e720 100644 --- a/arch/mips/dec/Platform +++ b/arch/mips/dec/Platform | |||
@@ -1,7 +1,7 @@ | |||
1 | # | 1 | # |
2 | # DECstation family | 2 | # DECstation family |
3 | # | 3 | # |
4 | platform-$(CONFIG_MACH_DECSTATION) = dec/ | 4 | platform-$(CONFIG_MACH_DECSTATION) += dec/ |
5 | cflags-$(CONFIG_MACH_DECSTATION) += \ | 5 | cflags-$(CONFIG_MACH_DECSTATION) += \ |
6 | -I$(srctree)/arch/mips/include/asm/mach-dec | 6 | -I$(srctree)/arch/mips/include/asm/mach-dec |
7 | libs-$(CONFIG_MACH_DECSTATION) += arch/mips/dec/prom/ | 7 | libs-$(CONFIG_MACH_DECSTATION) += arch/mips/dec/prom/ |
diff --git a/arch/mips/include/asm/atomic.h b/arch/mips/include/asm/atomic.h index c63c56bfd184..47d87da379f9 100644 --- a/arch/mips/include/asm/atomic.h +++ b/arch/mips/include/asm/atomic.h | |||
@@ -782,6 +782,10 @@ static __inline__ int atomic64_add_unless(atomic64_t *v, long a, long u) | |||
782 | */ | 782 | */ |
783 | #define atomic64_add_negative(i, v) (atomic64_add_return(i, (v)) < 0) | 783 | #define atomic64_add_negative(i, v) (atomic64_add_return(i, (v)) < 0) |
784 | 784 | ||
785 | #else /* !CONFIG_64BIT */ | ||
786 | |||
787 | #include <asm-generic/atomic64.h> | ||
788 | |||
785 | #endif /* CONFIG_64BIT */ | 789 | #endif /* CONFIG_64BIT */ |
786 | 790 | ||
787 | /* | 791 | /* |
diff --git a/arch/mips/include/asm/cop2.h b/arch/mips/include/asm/cop2.h index 2cb2f0c2c4f8..3532e2c5f098 100644 --- a/arch/mips/include/asm/cop2.h +++ b/arch/mips/include/asm/cop2.h | |||
@@ -24,7 +24,7 @@ extern int cu2_notifier_call_chain(unsigned long val, void *v); | |||
24 | 24 | ||
25 | #define cu2_notifier(fn, pri) \ | 25 | #define cu2_notifier(fn, pri) \ |
26 | ({ \ | 26 | ({ \ |
27 | static struct notifier_block fn##_nb __cpuinitdata = { \ | 27 | static struct notifier_block fn##_nb = { \ |
28 | .notifier_call = fn, \ | 28 | .notifier_call = fn, \ |
29 | .priority = pri \ | 29 | .priority = pri \ |
30 | }; \ | 30 | }; \ |
diff --git a/arch/mips/include/asm/fcntl.h b/arch/mips/include/asm/fcntl.h index e482fe90fe88..75eddedcfc3e 100644 --- a/arch/mips/include/asm/fcntl.h +++ b/arch/mips/include/asm/fcntl.h | |||
@@ -56,6 +56,7 @@ | |||
56 | */ | 56 | */ |
57 | 57 | ||
58 | #ifdef CONFIG_32BIT | 58 | #ifdef CONFIG_32BIT |
59 | #include <linux/types.h> | ||
59 | 60 | ||
60 | struct flock { | 61 | struct flock { |
61 | short l_type; | 62 | short l_type; |
diff --git a/arch/mips/include/asm/gic.h b/arch/mips/include/asm/gic.h index 9b9436a4d816..86548da650e7 100644 --- a/arch/mips/include/asm/gic.h +++ b/arch/mips/include/asm/gic.h | |||
@@ -321,6 +321,7 @@ struct gic_intrmask_regs { | |||
321 | */ | 321 | */ |
322 | struct gic_intr_map { | 322 | struct gic_intr_map { |
323 | unsigned int cpunum; /* Directed to this CPU */ | 323 | unsigned int cpunum; /* Directed to this CPU */ |
324 | #define GIC_UNUSED 0xdead /* Dummy data */ | ||
324 | unsigned int pin; /* Directed to this Pin */ | 325 | unsigned int pin; /* Directed to this Pin */ |
325 | unsigned int polarity; /* Polarity : +/- */ | 326 | unsigned int polarity; /* Polarity : +/- */ |
326 | unsigned int trigtype; /* Trigger : Edge/Levl */ | 327 | unsigned int trigtype; /* Trigger : Edge/Levl */ |
diff --git a/arch/mips/include/asm/mach-tx49xx/kmalloc.h b/arch/mips/include/asm/mach-tx49xx/kmalloc.h index b74caf65482b..ff9a8b86cb93 100644 --- a/arch/mips/include/asm/mach-tx49xx/kmalloc.h +++ b/arch/mips/include/asm/mach-tx49xx/kmalloc.h | |||
@@ -1,6 +1,6 @@ | |||
1 | #ifndef __ASM_MACH_TX49XX_KMALLOC_H | 1 | #ifndef __ASM_MACH_TX49XX_KMALLOC_H |
2 | #define __ASM_MACH_TX49XX_KMALLOC_H | 2 | #define __ASM_MACH_TX49XX_KMALLOC_H |
3 | 3 | ||
4 | #define ARCH_KMALLOC_MINALIGN L1_CACHE_BYTES | 4 | #define ARCH_DMA_MINALIGN L1_CACHE_BYTES |
5 | 5 | ||
6 | #endif /* __ASM_MACH_TX49XX_KMALLOC_H */ | 6 | #endif /* __ASM_MACH_TX49XX_KMALLOC_H */ |
diff --git a/arch/mips/include/asm/mips-boards/maltaint.h b/arch/mips/include/asm/mips-boards/maltaint.h index cea872fc6f5c..d11aa02a956a 100644 --- a/arch/mips/include/asm/mips-boards/maltaint.h +++ b/arch/mips/include/asm/mips-boards/maltaint.h | |||
@@ -88,9 +88,6 @@ | |||
88 | 88 | ||
89 | #define GIC_EXT_INTR(x) x | 89 | #define GIC_EXT_INTR(x) x |
90 | 90 | ||
91 | /* Dummy data */ | ||
92 | #define X 0xdead | ||
93 | |||
94 | /* External Interrupts used for IPI */ | 91 | /* External Interrupts used for IPI */ |
95 | #define GIC_IPI_EXT_INTR_RESCHED_VPE0 16 | 92 | #define GIC_IPI_EXT_INTR_RESCHED_VPE0 16 |
96 | #define GIC_IPI_EXT_INTR_CALLFNC_VPE0 17 | 93 | #define GIC_IPI_EXT_INTR_CALLFNC_VPE0 17 |
diff --git a/arch/mips/include/asm/page.h b/arch/mips/include/asm/page.h index a16beafcea91..e59cd1ac09c2 100644 --- a/arch/mips/include/asm/page.h +++ b/arch/mips/include/asm/page.h | |||
@@ -150,6 +150,20 @@ typedef struct { unsigned long pgprot; } pgprot_t; | |||
150 | ((unsigned long)(x) - PAGE_OFFSET + PHYS_OFFSET) | 150 | ((unsigned long)(x) - PAGE_OFFSET + PHYS_OFFSET) |
151 | #endif | 151 | #endif |
152 | #define __va(x) ((void *)((unsigned long)(x) + PAGE_OFFSET - PHYS_OFFSET)) | 152 | #define __va(x) ((void *)((unsigned long)(x) + PAGE_OFFSET - PHYS_OFFSET)) |
153 | |||
154 | /* | ||
155 | * RELOC_HIDE was originally added by 6007b903dfe5f1d13e0c711ac2894bdd4a61b1ad | ||
156 | * (lmo) rsp. 8431fd094d625b94d364fe393076ccef88e6ce18 (kernel.org). The | ||
157 | * discussion can be found in lkml posting | ||
158 | * <a2ebde260608230500o3407b108hc03debb9da6e62c@mail.gmail.com> which is | ||
159 | * archived at http://lists.linuxcoding.com/kernel/2006-q3/msg17360.html | ||
160 | * | ||
161 | * It is unclear if the misscompilations mentioned in | ||
162 | * http://lkml.org/lkml/2010/8/8/138 also affect MIPS so we keep this one | ||
163 | * until GCC 3.x has been retired before we can apply | ||
164 | * https://patchwork.linux-mips.org/patch/1541/ | ||
165 | */ | ||
166 | |||
153 | #define __pa_symbol(x) __pa(RELOC_HIDE((unsigned long)(x), 0)) | 167 | #define __pa_symbol(x) __pa(RELOC_HIDE((unsigned long)(x), 0)) |
154 | 168 | ||
155 | #define pfn_to_kaddr(pfn) __va((pfn) << PAGE_SHIFT) | 169 | #define pfn_to_kaddr(pfn) __va((pfn) << PAGE_SHIFT) |
diff --git a/arch/mips/include/asm/siginfo.h b/arch/mips/include/asm/siginfo.h index 96e28f18dad1..1ca64b4d33d9 100644 --- a/arch/mips/include/asm/siginfo.h +++ b/arch/mips/include/asm/siginfo.h | |||
@@ -88,6 +88,7 @@ typedef struct siginfo { | |||
88 | #ifdef __ARCH_SI_TRAPNO | 88 | #ifdef __ARCH_SI_TRAPNO |
89 | int _trapno; /* TRAP # which caused the signal */ | 89 | int _trapno; /* TRAP # which caused the signal */ |
90 | #endif | 90 | #endif |
91 | short _addr_lsb; | ||
91 | } _sigfault; | 92 | } _sigfault; |
92 | 93 | ||
93 | /* SIGPOLL, SIGXFSZ (To do ...) */ | 94 | /* SIGPOLL, SIGXFSZ (To do ...) */ |
diff --git a/arch/mips/include/asm/thread_info.h b/arch/mips/include/asm/thread_info.h index 2376f2e06e47..70df9c0d3c5b 100644 --- a/arch/mips/include/asm/thread_info.h +++ b/arch/mips/include/asm/thread_info.h | |||
@@ -146,7 +146,8 @@ register struct thread_info *__current_thread_info __asm__("$28"); | |||
146 | #define _TIF_LOAD_WATCH (1<<TIF_LOAD_WATCH) | 146 | #define _TIF_LOAD_WATCH (1<<TIF_LOAD_WATCH) |
147 | 147 | ||
148 | /* work to do on interrupt/exception return */ | 148 | /* work to do on interrupt/exception return */ |
149 | #define _TIF_WORK_MASK (0x0000ffef & ~_TIF_SECCOMP) | 149 | #define _TIF_WORK_MASK (0x0000ffef & \ |
150 | ~(_TIF_SECCOMP | _TIF_SYSCALL_AUDIT)) | ||
150 | /* work to do on any return to u-space */ | 151 | /* work to do on any return to u-space */ |
151 | #define _TIF_ALLWORK_MASK (0x8000ffff & ~_TIF_SECCOMP) | 152 | #define _TIF_ALLWORK_MASK (0x8000ffff & ~_TIF_SECCOMP) |
152 | 153 | ||
diff --git a/arch/mips/include/asm/unistd.h b/arch/mips/include/asm/unistd.h index baa318a59c97..550725b881d5 100644 --- a/arch/mips/include/asm/unistd.h +++ b/arch/mips/include/asm/unistd.h | |||
@@ -356,16 +356,19 @@ | |||
356 | #define __NR_perf_event_open (__NR_Linux + 333) | 356 | #define __NR_perf_event_open (__NR_Linux + 333) |
357 | #define __NR_accept4 (__NR_Linux + 334) | 357 | #define __NR_accept4 (__NR_Linux + 334) |
358 | #define __NR_recvmmsg (__NR_Linux + 335) | 358 | #define __NR_recvmmsg (__NR_Linux + 335) |
359 | #define __NR_fanotify_init (__NR_Linux + 336) | ||
360 | #define __NR_fanotify_mark (__NR_Linux + 337) | ||
361 | #define __NR_prlimit64 (__NR_Linux + 338) | ||
359 | 362 | ||
360 | /* | 363 | /* |
361 | * Offset of the last Linux o32 flavoured syscall | 364 | * Offset of the last Linux o32 flavoured syscall |
362 | */ | 365 | */ |
363 | #define __NR_Linux_syscalls 335 | 366 | #define __NR_Linux_syscalls 338 |
364 | 367 | ||
365 | #endif /* _MIPS_SIM == _MIPS_SIM_ABI32 */ | 368 | #endif /* _MIPS_SIM == _MIPS_SIM_ABI32 */ |
366 | 369 | ||
367 | #define __NR_O32_Linux 4000 | 370 | #define __NR_O32_Linux 4000 |
368 | #define __NR_O32_Linux_syscalls 335 | 371 | #define __NR_O32_Linux_syscalls 338 |
369 | 372 | ||
370 | #if _MIPS_SIM == _MIPS_SIM_ABI64 | 373 | #if _MIPS_SIM == _MIPS_SIM_ABI64 |
371 | 374 | ||
@@ -668,16 +671,19 @@ | |||
668 | #define __NR_perf_event_open (__NR_Linux + 292) | 671 | #define __NR_perf_event_open (__NR_Linux + 292) |
669 | #define __NR_accept4 (__NR_Linux + 293) | 672 | #define __NR_accept4 (__NR_Linux + 293) |
670 | #define __NR_recvmmsg (__NR_Linux + 294) | 673 | #define __NR_recvmmsg (__NR_Linux + 294) |
674 | #define __NR_fanotify_init (__NR_Linux + 295) | ||
675 | #define __NR_fanotify_mark (__NR_Linux + 296) | ||
676 | #define __NR_prlimit64 (__NR_Linux + 297) | ||
671 | 677 | ||
672 | /* | 678 | /* |
673 | * Offset of the last Linux 64-bit flavoured syscall | 679 | * Offset of the last Linux 64-bit flavoured syscall |
674 | */ | 680 | */ |
675 | #define __NR_Linux_syscalls 294 | 681 | #define __NR_Linux_syscalls 297 |
676 | 682 | ||
677 | #endif /* _MIPS_SIM == _MIPS_SIM_ABI64 */ | 683 | #endif /* _MIPS_SIM == _MIPS_SIM_ABI64 */ |
678 | 684 | ||
679 | #define __NR_64_Linux 5000 | 685 | #define __NR_64_Linux 5000 |
680 | #define __NR_64_Linux_syscalls 294 | 686 | #define __NR_64_Linux_syscalls 297 |
681 | 687 | ||
682 | #if _MIPS_SIM == _MIPS_SIM_NABI32 | 688 | #if _MIPS_SIM == _MIPS_SIM_NABI32 |
683 | 689 | ||
@@ -985,16 +991,19 @@ | |||
985 | #define __NR_accept4 (__NR_Linux + 297) | 991 | #define __NR_accept4 (__NR_Linux + 297) |
986 | #define __NR_recvmmsg (__NR_Linux + 298) | 992 | #define __NR_recvmmsg (__NR_Linux + 298) |
987 | #define __NR_getdents64 (__NR_Linux + 299) | 993 | #define __NR_getdents64 (__NR_Linux + 299) |
994 | #define __NR_fanotify_init (__NR_Linux + 300) | ||
995 | #define __NR_fanotify_mark (__NR_Linux + 301) | ||
996 | #define __NR_prlimit64 (__NR_Linux + 302) | ||
988 | 997 | ||
989 | /* | 998 | /* |
990 | * Offset of the last N32 flavoured syscall | 999 | * Offset of the last N32 flavoured syscall |
991 | */ | 1000 | */ |
992 | #define __NR_Linux_syscalls 299 | 1001 | #define __NR_Linux_syscalls 302 |
993 | 1002 | ||
994 | #endif /* _MIPS_SIM == _MIPS_SIM_NABI32 */ | 1003 | #endif /* _MIPS_SIM == _MIPS_SIM_NABI32 */ |
995 | 1004 | ||
996 | #define __NR_N32_Linux 6000 | 1005 | #define __NR_N32_Linux 6000 |
997 | #define __NR_N32_Linux_syscalls 299 | 1006 | #define __NR_N32_Linux_syscalls 302 |
998 | 1007 | ||
999 | #ifdef __KERNEL__ | 1008 | #ifdef __KERNEL__ |
1000 | 1009 | ||
diff --git a/arch/mips/jz4740/Platform b/arch/mips/jz4740/Platform index 6a97230e3d05..ba91be9c21ef 100644 --- a/arch/mips/jz4740/Platform +++ b/arch/mips/jz4740/Platform | |||
@@ -1,3 +1,3 @@ | |||
1 | core-$(CONFIG_MACH_JZ4740) += arch/mips/jz4740/ | 1 | platform-$(CONFIG_MACH_JZ4740) += jz4740/ |
2 | cflags-$(CONFIG_MACH_JZ4740) += -I$(srctree)/arch/mips/include/asm/mach-jz4740 | 2 | cflags-$(CONFIG_MACH_JZ4740) += -I$(srctree)/arch/mips/include/asm/mach-jz4740 |
3 | load-$(CONFIG_MACH_JZ4740) += 0xffffffff80010000 | 3 | load-$(CONFIG_MACH_JZ4740) += 0xffffffff80010000 |
diff --git a/arch/mips/kernel/branch.c b/arch/mips/kernel/branch.c index 0176ed015c89..32103cc2a257 100644 --- a/arch/mips/kernel/branch.c +++ b/arch/mips/kernel/branch.c | |||
@@ -40,7 +40,6 @@ int __compute_return_epc(struct pt_regs *regs) | |||
40 | return -EFAULT; | 40 | return -EFAULT; |
41 | } | 41 | } |
42 | 42 | ||
43 | regs->regs[0] = 0; | ||
44 | switch (insn.i_format.opcode) { | 43 | switch (insn.i_format.opcode) { |
45 | /* | 44 | /* |
46 | * jr and jalr are in r_format format. | 45 | * jr and jalr are in r_format format. |
diff --git a/arch/mips/kernel/irq-gic.c b/arch/mips/kernel/irq-gic.c index b181f2f0ea8e..82ba9f62f49e 100644 --- a/arch/mips/kernel/irq-gic.c +++ b/arch/mips/kernel/irq-gic.c | |||
@@ -7,7 +7,6 @@ | |||
7 | #include <asm/io.h> | 7 | #include <asm/io.h> |
8 | #include <asm/gic.h> | 8 | #include <asm/gic.h> |
9 | #include <asm/gcmpregs.h> | 9 | #include <asm/gcmpregs.h> |
10 | #include <asm/mips-boards/maltaint.h> | ||
11 | #include <asm/irq.h> | 10 | #include <asm/irq.h> |
12 | #include <linux/hardirq.h> | 11 | #include <linux/hardirq.h> |
13 | #include <asm-generic/bitops/find.h> | 12 | #include <asm-generic/bitops/find.h> |
@@ -131,7 +130,7 @@ static int gic_set_affinity(unsigned int irq, const struct cpumask *cpumask) | |||
131 | int i; | 130 | int i; |
132 | 131 | ||
133 | irq -= _irqbase; | 132 | irq -= _irqbase; |
134 | pr_debug(KERN_DEBUG "%s(%d) called\n", __func__, irq); | 133 | pr_debug("%s(%d) called\n", __func__, irq); |
135 | cpumask_and(&tmp, cpumask, cpu_online_mask); | 134 | cpumask_and(&tmp, cpumask, cpu_online_mask); |
136 | if (cpus_empty(tmp)) | 135 | if (cpus_empty(tmp)) |
137 | return -1; | 136 | return -1; |
@@ -222,7 +221,7 @@ static void __init gic_basic_init(int numintrs, int numvpes, | |||
222 | /* Setup specifics */ | 221 | /* Setup specifics */ |
223 | for (i = 0; i < mapsize; i++) { | 222 | for (i = 0; i < mapsize; i++) { |
224 | cpu = intrmap[i].cpunum; | 223 | cpu = intrmap[i].cpunum; |
225 | if (cpu == X) | 224 | if (cpu == GIC_UNUSED) |
226 | continue; | 225 | continue; |
227 | if (cpu == 0 && i != 0 && intrmap[i].flags == 0) | 226 | if (cpu == 0 && i != 0 && intrmap[i].flags == 0) |
228 | continue; | 227 | continue; |
diff --git a/arch/mips/kernel/kgdb.c b/arch/mips/kernel/kgdb.c index 1f4e2fa64140..f4546e97c60d 100644 --- a/arch/mips/kernel/kgdb.c +++ b/arch/mips/kernel/kgdb.c | |||
@@ -283,7 +283,7 @@ static int kgdb_mips_notify(struct notifier_block *self, unsigned long cmd, | |||
283 | struct pt_regs *regs = args->regs; | 283 | struct pt_regs *regs = args->regs; |
284 | int trap = (regs->cp0_cause & 0x7c) >> 2; | 284 | int trap = (regs->cp0_cause & 0x7c) >> 2; |
285 | 285 | ||
286 | /* Userpace events, ignore. */ | 286 | /* Userspace events, ignore. */ |
287 | if (user_mode(regs)) | 287 | if (user_mode(regs)) |
288 | return NOTIFY_DONE; | 288 | return NOTIFY_DONE; |
289 | 289 | ||
diff --git a/arch/mips/kernel/kspd.c b/arch/mips/kernel/kspd.c index 80e2ba694bab..29811f043399 100644 --- a/arch/mips/kernel/kspd.c +++ b/arch/mips/kernel/kspd.c | |||
@@ -251,7 +251,7 @@ void sp_work_handle_request(void) | |||
251 | memset(&tz, 0, sizeof(tz)); | 251 | memset(&tz, 0, sizeof(tz)); |
252 | if ((ret.retval = sp_syscall(__NR_gettimeofday, (int)&tv, | 252 | if ((ret.retval = sp_syscall(__NR_gettimeofday, (int)&tv, |
253 | (int)&tz, 0, 0)) == 0) | 253 | (int)&tz, 0, 0)) == 0) |
254 | ret.retval = tv.tv_sec; | 254 | ret.retval = tv.tv_sec; |
255 | break; | 255 | break; |
256 | 256 | ||
257 | case MTSP_SYSCALL_EXIT: | 257 | case MTSP_SYSCALL_EXIT: |
diff --git a/arch/mips/kernel/linux32.c b/arch/mips/kernel/linux32.c index c2dab140dc98..6343b4a5b835 100644 --- a/arch/mips/kernel/linux32.c +++ b/arch/mips/kernel/linux32.c | |||
@@ -341,3 +341,10 @@ asmlinkage long sys32_lookup_dcookie(u32 a0, u32 a1, char __user *buf, | |||
341 | { | 341 | { |
342 | return sys_lookup_dcookie(merge_64(a0, a1), buf, len); | 342 | return sys_lookup_dcookie(merge_64(a0, a1), buf, len); |
343 | } | 343 | } |
344 | |||
345 | SYSCALL_DEFINE6(32_fanotify_mark, int, fanotify_fd, unsigned int, flags, | ||
346 | u64, a3, u64, a4, int, dfd, const char __user *, pathname) | ||
347 | { | ||
348 | return sys_fanotify_mark(fanotify_fd, flags, merge_64(a3, a4), | ||
349 | dfd, pathname); | ||
350 | } | ||
diff --git a/arch/mips/kernel/mips-mt-fpaff.c b/arch/mips/kernel/mips-mt-fpaff.c index 2340f11dc29c..9a526ba6f257 100644 --- a/arch/mips/kernel/mips-mt-fpaff.c +++ b/arch/mips/kernel/mips-mt-fpaff.c | |||
@@ -103,7 +103,7 @@ asmlinkage long mipsmt_sys_sched_setaffinity(pid_t pid, unsigned int len, | |||
103 | if (!check_same_owner(p) && !capable(CAP_SYS_NICE)) | 103 | if (!check_same_owner(p) && !capable(CAP_SYS_NICE)) |
104 | goto out_unlock; | 104 | goto out_unlock; |
105 | 105 | ||
106 | retval = security_task_setscheduler(p, 0, NULL); | 106 | retval = security_task_setscheduler(p) |
107 | if (retval) | 107 | if (retval) |
108 | goto out_unlock; | 108 | goto out_unlock; |
109 | 109 | ||
diff --git a/arch/mips/kernel/ptrace.c b/arch/mips/kernel/ptrace.c index c51b95ff8644..c8777333e198 100644 --- a/arch/mips/kernel/ptrace.c +++ b/arch/mips/kernel/ptrace.c | |||
@@ -536,7 +536,7 @@ asmlinkage void do_syscall_trace(struct pt_regs *regs, int entryexit) | |||
536 | { | 536 | { |
537 | /* do the secure computing check first */ | 537 | /* do the secure computing check first */ |
538 | if (!entryexit) | 538 | if (!entryexit) |
539 | secure_computing(regs->regs[0]); | 539 | secure_computing(regs->regs[2]); |
540 | 540 | ||
541 | if (unlikely(current->audit_context) && entryexit) | 541 | if (unlikely(current->audit_context) && entryexit) |
542 | audit_syscall_exit(AUDITSC_RESULT(regs->regs[2]), | 542 | audit_syscall_exit(AUDITSC_RESULT(regs->regs[2]), |
@@ -565,7 +565,7 @@ asmlinkage void do_syscall_trace(struct pt_regs *regs, int entryexit) | |||
565 | 565 | ||
566 | out: | 566 | out: |
567 | if (unlikely(current->audit_context) && !entryexit) | 567 | if (unlikely(current->audit_context) && !entryexit) |
568 | audit_syscall_entry(audit_arch(), regs->regs[0], | 568 | audit_syscall_entry(audit_arch(), regs->regs[2], |
569 | regs->regs[4], regs->regs[5], | 569 | regs->regs[4], regs->regs[5], |
570 | regs->regs[6], regs->regs[7]); | 570 | regs->regs[6], regs->regs[7]); |
571 | } | 571 | } |
diff --git a/arch/mips/kernel/scall32-o32.S b/arch/mips/kernel/scall32-o32.S index 17202bbe843f..fbaabad0e6e2 100644 --- a/arch/mips/kernel/scall32-o32.S +++ b/arch/mips/kernel/scall32-o32.S | |||
@@ -63,9 +63,9 @@ stack_done: | |||
63 | sw t0, PT_R7(sp) # set error flag | 63 | sw t0, PT_R7(sp) # set error flag |
64 | beqz t0, 1f | 64 | beqz t0, 1f |
65 | 65 | ||
66 | lw t1, PT_R2(sp) # syscall number | ||
66 | negu v0 # error | 67 | negu v0 # error |
67 | sw v0, PT_R0(sp) # set flag for syscall | 68 | sw t1, PT_R0(sp) # save it for syscall restarting |
68 | # restarting | ||
69 | 1: sw v0, PT_R2(sp) # result | 69 | 1: sw v0, PT_R2(sp) # result |
70 | 70 | ||
71 | o32_syscall_exit: | 71 | o32_syscall_exit: |
@@ -104,9 +104,9 @@ syscall_trace_entry: | |||
104 | sw t0, PT_R7(sp) # set error flag | 104 | sw t0, PT_R7(sp) # set error flag |
105 | beqz t0, 1f | 105 | beqz t0, 1f |
106 | 106 | ||
107 | lw t1, PT_R2(sp) # syscall number | ||
107 | negu v0 # error | 108 | negu v0 # error |
108 | sw v0, PT_R0(sp) # set flag for syscall | 109 | sw t1, PT_R0(sp) # save it for syscall restarting |
109 | # restarting | ||
110 | 1: sw v0, PT_R2(sp) # result | 110 | 1: sw v0, PT_R2(sp) # result |
111 | 111 | ||
112 | j syscall_exit | 112 | j syscall_exit |
@@ -169,8 +169,7 @@ stackargs: | |||
169 | * We probably should handle this case a bit more drastic. | 169 | * We probably should handle this case a bit more drastic. |
170 | */ | 170 | */ |
171 | bad_stack: | 171 | bad_stack: |
172 | negu v0 # error | 172 | li v0, EFAULT |
173 | sw v0, PT_R0(sp) | ||
174 | sw v0, PT_R2(sp) | 173 | sw v0, PT_R2(sp) |
175 | li t0, 1 # set error flag | 174 | li t0, 1 # set error flag |
176 | sw t0, PT_R7(sp) | 175 | sw t0, PT_R7(sp) |
@@ -583,7 +582,10 @@ einval: li v0, -ENOSYS | |||
583 | sys sys_rt_tgsigqueueinfo 4 | 582 | sys sys_rt_tgsigqueueinfo 4 |
584 | sys sys_perf_event_open 5 | 583 | sys sys_perf_event_open 5 |
585 | sys sys_accept4 4 | 584 | sys sys_accept4 4 |
586 | sys sys_recvmmsg 5 | 585 | sys sys_recvmmsg 5 /* 4335 */ |
586 | sys sys_fanotify_init 2 | ||
587 | sys sys_fanotify_mark 6 | ||
588 | sys sys_prlimit64 4 | ||
587 | .endm | 589 | .endm |
588 | 590 | ||
589 | /* We pre-compute the number of _instruction_ bytes needed to | 591 | /* 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 a8a6c596eb04..3f4179283207 100644 --- a/arch/mips/kernel/scall64-64.S +++ b/arch/mips/kernel/scall64-64.S | |||
@@ -66,9 +66,9 @@ NESTED(handle_sys64, PT_SIZE, sp) | |||
66 | sd t0, PT_R7(sp) # set error flag | 66 | sd t0, PT_R7(sp) # set error flag |
67 | beqz t0, 1f | 67 | beqz t0, 1f |
68 | 68 | ||
69 | ld t1, PT_R2(sp) # syscall number | ||
69 | dnegu v0 # error | 70 | dnegu v0 # error |
70 | sd v0, PT_R0(sp) # set flag for syscall | 71 | sd t1, PT_R0(sp) # save it for syscall restarting |
71 | # restarting | ||
72 | 1: sd v0, PT_R2(sp) # result | 72 | 1: sd v0, PT_R2(sp) # result |
73 | 73 | ||
74 | n64_syscall_exit: | 74 | n64_syscall_exit: |
@@ -109,8 +109,9 @@ syscall_trace_entry: | |||
109 | sd t0, PT_R7(sp) # set error flag | 109 | sd t0, PT_R7(sp) # set error flag |
110 | beqz t0, 1f | 110 | beqz t0, 1f |
111 | 111 | ||
112 | ld t1, PT_R2(sp) # syscall number | ||
112 | dnegu v0 # error | 113 | dnegu v0 # error |
113 | sd v0, PT_R0(sp) # set flag for syscall restarting | 114 | sd t1, PT_R0(sp) # save it for syscall restarting |
114 | 1: sd v0, PT_R2(sp) # result | 115 | 1: sd v0, PT_R2(sp) # result |
115 | 116 | ||
116 | j syscall_exit | 117 | j syscall_exit |
@@ -416,9 +417,12 @@ sys_call_table: | |||
416 | PTR sys_pipe2 | 417 | PTR sys_pipe2 |
417 | PTR sys_inotify_init1 | 418 | PTR sys_inotify_init1 |
418 | PTR sys_preadv | 419 | PTR sys_preadv |
419 | PTR sys_pwritev /* 5390 */ | 420 | PTR sys_pwritev /* 5290 */ |
420 | PTR sys_rt_tgsigqueueinfo | 421 | PTR sys_rt_tgsigqueueinfo |
421 | PTR sys_perf_event_open | 422 | PTR sys_perf_event_open |
422 | PTR sys_accept4 | 423 | PTR sys_accept4 |
423 | PTR sys_recvmmsg | 424 | PTR sys_recvmmsg |
425 | PTR sys_fanotify_init /* 5295 */ | ||
426 | PTR sys_fanotify_mark | ||
427 | PTR sys_prlimit64 | ||
424 | .size sys_call_table,.-sys_call_table | 428 | .size sys_call_table,.-sys_call_table |
diff --git a/arch/mips/kernel/scall64-n32.S b/arch/mips/kernel/scall64-n32.S index a3d66137731a..f08ece6d8acc 100644 --- a/arch/mips/kernel/scall64-n32.S +++ b/arch/mips/kernel/scall64-n32.S | |||
@@ -65,8 +65,9 @@ NESTED(handle_sysn32, PT_SIZE, sp) | |||
65 | sd t0, PT_R7(sp) # set error flag | 65 | sd t0, PT_R7(sp) # set error flag |
66 | beqz t0, 1f | 66 | beqz t0, 1f |
67 | 67 | ||
68 | ld t1, PT_R2(sp) # syscall number | ||
68 | dnegu v0 # error | 69 | dnegu v0 # error |
69 | sd v0, PT_R0(sp) # set flag for syscall restarting | 70 | sd t1, PT_R0(sp) # save it for syscall restarting |
70 | 1: sd v0, PT_R2(sp) # result | 71 | 1: sd v0, PT_R2(sp) # result |
71 | 72 | ||
72 | local_irq_disable # make sure need_resched and | 73 | local_irq_disable # make sure need_resched and |
@@ -106,8 +107,9 @@ n32_syscall_trace_entry: | |||
106 | sd t0, PT_R7(sp) # set error flag | 107 | sd t0, PT_R7(sp) # set error flag |
107 | beqz t0, 1f | 108 | beqz t0, 1f |
108 | 109 | ||
110 | ld t1, PT_R2(sp) # syscall number | ||
109 | dnegu v0 # error | 111 | dnegu v0 # error |
110 | sd v0, PT_R0(sp) # set flag for syscall restarting | 112 | sd t1, PT_R0(sp) # save it for syscall restarting |
111 | 1: sd v0, PT_R2(sp) # result | 113 | 1: sd v0, PT_R2(sp) # result |
112 | 114 | ||
113 | j syscall_exit | 115 | j syscall_exit |
@@ -320,10 +322,10 @@ EXPORT(sysn32_call_table) | |||
320 | PTR sys_cacheflush | 322 | PTR sys_cacheflush |
321 | PTR sys_cachectl | 323 | PTR sys_cachectl |
322 | PTR sys_sysmips | 324 | PTR sys_sysmips |
323 | PTR sys_io_setup /* 6200 */ | 325 | PTR compat_sys_io_setup /* 6200 */ |
324 | PTR sys_io_destroy | 326 | PTR sys_io_destroy |
325 | PTR sys_io_getevents | 327 | PTR compat_sys_io_getevents |
326 | PTR sys_io_submit | 328 | PTR compat_sys_io_submit |
327 | PTR sys_io_cancel | 329 | PTR sys_io_cancel |
328 | PTR sys_exit_group /* 6205 */ | 330 | PTR sys_exit_group /* 6205 */ |
329 | PTR sys_lookup_dcookie | 331 | PTR sys_lookup_dcookie |
@@ -419,5 +421,8 @@ EXPORT(sysn32_call_table) | |||
419 | PTR sys_perf_event_open | 421 | PTR sys_perf_event_open |
420 | PTR sys_accept4 | 422 | PTR sys_accept4 |
421 | PTR compat_sys_recvmmsg | 423 | PTR compat_sys_recvmmsg |
422 | PTR sys_getdents | 424 | PTR sys_getdents64 |
425 | PTR sys_fanotify_init /* 6300 */ | ||
426 | PTR sys_fanotify_mark | ||
427 | PTR sys_prlimit64 | ||
423 | .size sysn32_call_table,.-sysn32_call_table | 428 | .size sysn32_call_table,.-sysn32_call_table |
diff --git a/arch/mips/kernel/scall64-o32.S b/arch/mips/kernel/scall64-o32.S index 813689ef2384..78d768a3e19d 100644 --- a/arch/mips/kernel/scall64-o32.S +++ b/arch/mips/kernel/scall64-o32.S | |||
@@ -93,8 +93,9 @@ NESTED(handle_sys, PT_SIZE, sp) | |||
93 | sd t0, PT_R7(sp) # set error flag | 93 | sd t0, PT_R7(sp) # set error flag |
94 | beqz t0, 1f | 94 | beqz t0, 1f |
95 | 95 | ||
96 | ld t1, PT_R2(sp) # syscall number | ||
96 | dnegu v0 # error | 97 | dnegu v0 # error |
97 | sd v0, PT_R0(sp) # flag for syscall restarting | 98 | sd t1, PT_R0(sp) # save it for syscall restarting |
98 | 1: sd v0, PT_R2(sp) # result | 99 | 1: sd v0, PT_R2(sp) # result |
99 | 100 | ||
100 | o32_syscall_exit: | 101 | o32_syscall_exit: |
@@ -142,8 +143,9 @@ trace_a_syscall: | |||
142 | sd t0, PT_R7(sp) # set error flag | 143 | sd t0, PT_R7(sp) # set error flag |
143 | beqz t0, 1f | 144 | beqz t0, 1f |
144 | 145 | ||
146 | ld t1, PT_R2(sp) # syscall number | ||
145 | dnegu v0 # error | 147 | dnegu v0 # error |
146 | sd v0, PT_R0(sp) # set flag for syscall restarting | 148 | sd t1, PT_R0(sp) # save it for syscall restarting |
147 | 1: sd v0, PT_R2(sp) # result | 149 | 1: sd v0, PT_R2(sp) # result |
148 | 150 | ||
149 | j syscall_exit | 151 | j syscall_exit |
@@ -154,8 +156,7 @@ trace_a_syscall: | |||
154 | * The stackpointer for a call with more than 4 arguments is bad. | 156 | * The stackpointer for a call with more than 4 arguments is bad. |
155 | */ | 157 | */ |
156 | bad_stack: | 158 | bad_stack: |
157 | dnegu v0 # error | 159 | li v0, EFAULT |
158 | sd v0, PT_R0(sp) | ||
159 | sd v0, PT_R2(sp) | 160 | sd v0, PT_R2(sp) |
160 | li t0, 1 # set error flag | 161 | li t0, 1 # set error flag |
161 | sd t0, PT_R7(sp) | 162 | sd t0, PT_R7(sp) |
@@ -444,10 +445,10 @@ sys_call_table: | |||
444 | PTR compat_sys_futex | 445 | PTR compat_sys_futex |
445 | PTR compat_sys_sched_setaffinity | 446 | PTR compat_sys_sched_setaffinity |
446 | PTR compat_sys_sched_getaffinity /* 4240 */ | 447 | PTR compat_sys_sched_getaffinity /* 4240 */ |
447 | PTR sys_io_setup | 448 | PTR compat_sys_io_setup |
448 | PTR sys_io_destroy | 449 | PTR sys_io_destroy |
449 | PTR sys_io_getevents | 450 | PTR compat_sys_io_getevents |
450 | PTR sys_io_submit | 451 | PTR compat_sys_io_submit |
451 | PTR sys_io_cancel /* 4245 */ | 452 | PTR sys_io_cancel /* 4245 */ |
452 | PTR sys_exit_group | 453 | PTR sys_exit_group |
453 | PTR sys32_lookup_dcookie | 454 | PTR sys32_lookup_dcookie |
@@ -538,5 +539,8 @@ sys_call_table: | |||
538 | PTR compat_sys_rt_tgsigqueueinfo | 539 | PTR compat_sys_rt_tgsigqueueinfo |
539 | PTR sys_perf_event_open | 540 | PTR sys_perf_event_open |
540 | PTR sys_accept4 | 541 | PTR sys_accept4 |
541 | PTR compat_sys_recvmmsg | 542 | PTR compat_sys_recvmmsg /* 4335 */ |
543 | PTR sys_fanotify_init | ||
544 | PTR sys_32_fanotify_mark | ||
545 | PTR sys_prlimit64 | ||
542 | .size sys_call_table,.-sys_call_table | 546 | .size sys_call_table,.-sys_call_table |
diff --git a/arch/mips/kernel/signal.c b/arch/mips/kernel/signal.c index 2099d5a4c4b7..5922342bca39 100644 --- a/arch/mips/kernel/signal.c +++ b/arch/mips/kernel/signal.c | |||
@@ -390,7 +390,6 @@ asmlinkage void sys_rt_sigreturn(nabi_no_regargs struct pt_regs regs) | |||
390 | { | 390 | { |
391 | struct rt_sigframe __user *frame; | 391 | struct rt_sigframe __user *frame; |
392 | sigset_t set; | 392 | sigset_t set; |
393 | stack_t st; | ||
394 | int sig; | 393 | int sig; |
395 | 394 | ||
396 | frame = (struct rt_sigframe __user *) regs.regs[29]; | 395 | frame = (struct rt_sigframe __user *) regs.regs[29]; |
@@ -411,11 +410,9 @@ asmlinkage void sys_rt_sigreturn(nabi_no_regargs struct pt_regs regs) | |||
411 | else if (sig) | 410 | else if (sig) |
412 | force_sig(sig, current); | 411 | force_sig(sig, current); |
413 | 412 | ||
414 | if (__copy_from_user(&st, &frame->rs_uc.uc_stack, sizeof(st))) | ||
415 | goto badframe; | ||
416 | /* It is more difficult to avoid calling this function than to | 413 | /* It is more difficult to avoid calling this function than to |
417 | call it and ignore errors. */ | 414 | call it and ignore errors. */ |
418 | do_sigaltstack((stack_t __user *)&st, NULL, regs.regs[29]); | 415 | do_sigaltstack(&frame->rs_uc.uc_stack, NULL, regs.regs[29]); |
419 | 416 | ||
420 | /* | 417 | /* |
421 | * Don't let your children do this ... | 418 | * Don't let your children do this ... |
@@ -550,23 +547,26 @@ static int handle_signal(unsigned long sig, siginfo_t *info, | |||
550 | struct mips_abi *abi = current->thread.abi; | 547 | struct mips_abi *abi = current->thread.abi; |
551 | void *vdso = current->mm->context.vdso; | 548 | void *vdso = current->mm->context.vdso; |
552 | 549 | ||
553 | switch(regs->regs[0]) { | 550 | if (regs->regs[0]) { |
554 | case ERESTART_RESTARTBLOCK: | 551 | switch(regs->regs[2]) { |
555 | case ERESTARTNOHAND: | 552 | case ERESTART_RESTARTBLOCK: |
556 | regs->regs[2] = EINTR; | 553 | case ERESTARTNOHAND: |
557 | break; | ||
558 | case ERESTARTSYS: | ||
559 | if (!(ka->sa.sa_flags & SA_RESTART)) { | ||
560 | regs->regs[2] = EINTR; | 554 | regs->regs[2] = EINTR; |
561 | break; | 555 | break; |
556 | case ERESTARTSYS: | ||
557 | if (!(ka->sa.sa_flags & SA_RESTART)) { | ||
558 | regs->regs[2] = EINTR; | ||
559 | break; | ||
560 | } | ||
561 | /* fallthrough */ | ||
562 | case ERESTARTNOINTR: | ||
563 | regs->regs[7] = regs->regs[26]; | ||
564 | regs->regs[2] = regs->regs[0]; | ||
565 | regs->cp0_epc -= 4; | ||
562 | } | 566 | } |
563 | /* fallthrough */ | ||
564 | case ERESTARTNOINTR: /* Userland will reload $v0. */ | ||
565 | regs->regs[7] = regs->regs[26]; | ||
566 | regs->cp0_epc -= 8; | ||
567 | } | ||
568 | 567 | ||
569 | regs->regs[0] = 0; /* Don't deal with this again. */ | 568 | regs->regs[0] = 0; /* Don't deal with this again. */ |
569 | } | ||
570 | 570 | ||
571 | if (sig_uses_siginfo(ka)) | 571 | if (sig_uses_siginfo(ka)) |
572 | ret = abi->setup_rt_frame(vdso + abi->rt_signal_return_offset, | 572 | ret = abi->setup_rt_frame(vdso + abi->rt_signal_return_offset, |
@@ -575,6 +575,9 @@ static int handle_signal(unsigned long sig, siginfo_t *info, | |||
575 | ret = abi->setup_frame(vdso + abi->signal_return_offset, | 575 | ret = abi->setup_frame(vdso + abi->signal_return_offset, |
576 | ka, regs, sig, oldset); | 576 | ka, regs, sig, oldset); |
577 | 577 | ||
578 | if (ret) | ||
579 | return ret; | ||
580 | |||
578 | spin_lock_irq(¤t->sighand->siglock); | 581 | spin_lock_irq(¤t->sighand->siglock); |
579 | sigorsets(¤t->blocked, ¤t->blocked, &ka->sa.sa_mask); | 582 | sigorsets(¤t->blocked, ¤t->blocked, &ka->sa.sa_mask); |
580 | if (!(ka->sa.sa_flags & SA_NODEFER)) | 583 | if (!(ka->sa.sa_flags & SA_NODEFER)) |
@@ -622,17 +625,13 @@ static void do_signal(struct pt_regs *regs) | |||
622 | return; | 625 | return; |
623 | } | 626 | } |
624 | 627 | ||
625 | /* | ||
626 | * Who's code doesn't conform to the restartable syscall convention | ||
627 | * dies here!!! The li instruction, a single machine instruction, | ||
628 | * must directly be followed by the syscall instruction. | ||
629 | */ | ||
630 | if (regs->regs[0]) { | 628 | if (regs->regs[0]) { |
631 | if (regs->regs[2] == ERESTARTNOHAND || | 629 | if (regs->regs[2] == ERESTARTNOHAND || |
632 | regs->regs[2] == ERESTARTSYS || | 630 | regs->regs[2] == ERESTARTSYS || |
633 | regs->regs[2] == ERESTARTNOINTR) { | 631 | regs->regs[2] == ERESTARTNOINTR) { |
632 | regs->regs[2] = regs->regs[0]; | ||
634 | regs->regs[7] = regs->regs[26]; | 633 | regs->regs[7] = regs->regs[26]; |
635 | regs->cp0_epc -= 8; | 634 | regs->cp0_epc -= 4; |
636 | } | 635 | } |
637 | if (regs->regs[2] == ERESTART_RESTARTBLOCK) { | 636 | if (regs->regs[2] == ERESTART_RESTARTBLOCK) { |
638 | regs->regs[2] = current->thread.abi->restart; | 637 | regs->regs[2] = current->thread.abi->restart; |
diff --git a/arch/mips/kernel/signal_n32.c b/arch/mips/kernel/signal_n32.c index 2c5df818c65a..ee24d814d5b9 100644 --- a/arch/mips/kernel/signal_n32.c +++ b/arch/mips/kernel/signal_n32.c | |||
@@ -109,6 +109,7 @@ asmlinkage int sysn32_rt_sigsuspend(nabi_no_regargs struct pt_regs regs) | |||
109 | asmlinkage void sysn32_rt_sigreturn(nabi_no_regargs struct pt_regs regs) | 109 | asmlinkage void sysn32_rt_sigreturn(nabi_no_regargs struct pt_regs regs) |
110 | { | 110 | { |
111 | struct rt_sigframe_n32 __user *frame; | 111 | struct rt_sigframe_n32 __user *frame; |
112 | mm_segment_t old_fs; | ||
112 | sigset_t set; | 113 | sigset_t set; |
113 | stack_t st; | 114 | stack_t st; |
114 | s32 sp; | 115 | s32 sp; |
@@ -143,7 +144,11 @@ asmlinkage void sysn32_rt_sigreturn(nabi_no_regargs struct pt_regs regs) | |||
143 | 144 | ||
144 | /* It is more difficult to avoid calling this function than to | 145 | /* It is more difficult to avoid calling this function than to |
145 | call it and ignore errors. */ | 146 | call it and ignore errors. */ |
147 | old_fs = get_fs(); | ||
148 | set_fs(KERNEL_DS); | ||
146 | do_sigaltstack((stack_t __user *)&st, NULL, regs.regs[29]); | 149 | do_sigaltstack((stack_t __user *)&st, NULL, regs.regs[29]); |
150 | set_fs(old_fs); | ||
151 | |||
147 | 152 | ||
148 | /* | 153 | /* |
149 | * Don't let your children do this ... | 154 | * Don't let your children do this ... |
diff --git a/arch/mips/kernel/unaligned.c b/arch/mips/kernel/unaligned.c index 69b039ca8d83..33d5a5ce4a29 100644 --- a/arch/mips/kernel/unaligned.c +++ b/arch/mips/kernel/unaligned.c | |||
@@ -109,8 +109,6 @@ static void emulate_load_store_insn(struct pt_regs *regs, | |||
109 | unsigned long value; | 109 | unsigned long value; |
110 | unsigned int res; | 110 | unsigned int res; |
111 | 111 | ||
112 | regs->regs[0] = 0; | ||
113 | |||
114 | /* | 112 | /* |
115 | * This load never faults. | 113 | * This load never faults. |
116 | */ | 114 | */ |
diff --git a/arch/mips/mm/dma-default.c b/arch/mips/mm/dma-default.c index 7ba890860d98..469d4019f795 100644 --- a/arch/mips/mm/dma-default.c +++ b/arch/mips/mm/dma-default.c | |||
@@ -44,27 +44,39 @@ static inline int cpu_is_noncoherent_r10000(struct device *dev) | |||
44 | 44 | ||
45 | static gfp_t massage_gfp_flags(const struct device *dev, gfp_t gfp) | 45 | static gfp_t massage_gfp_flags(const struct device *dev, gfp_t gfp) |
46 | { | 46 | { |
47 | gfp_t dma_flag; | ||
48 | |||
47 | /* ignore region specifiers */ | 49 | /* ignore region specifiers */ |
48 | gfp &= ~(__GFP_DMA | __GFP_DMA32 | __GFP_HIGHMEM); | 50 | gfp &= ~(__GFP_DMA | __GFP_DMA32 | __GFP_HIGHMEM); |
49 | 51 | ||
50 | #ifdef CONFIG_ZONE_DMA | 52 | #ifdef CONFIG_ISA |
51 | if (dev == NULL) | 53 | if (dev == NULL) |
52 | gfp |= __GFP_DMA; | 54 | dma_flag = __GFP_DMA; |
53 | else if (dev->coherent_dma_mask < DMA_BIT_MASK(24)) | ||
54 | gfp |= __GFP_DMA; | ||
55 | else | 55 | else |
56 | #endif | 56 | #endif |
57 | #ifdef CONFIG_ZONE_DMA32 | 57 | #if defined(CONFIG_ZONE_DMA32) && defined(CONFIG_ZONE_DMA) |
58 | if (dev->coherent_dma_mask < DMA_BIT_MASK(32)) | 58 | if (dev->coherent_dma_mask < DMA_BIT_MASK(32)) |
59 | gfp |= __GFP_DMA32; | 59 | dma_flag = __GFP_DMA; |
60 | else if (dev->coherent_dma_mask < DMA_BIT_MASK(64)) | ||
61 | dma_flag = __GFP_DMA32; | ||
62 | else | ||
63 | #endif | ||
64 | #if defined(CONFIG_ZONE_DMA32) && !defined(CONFIG_ZONE_DMA) | ||
65 | if (dev->coherent_dma_mask < DMA_BIT_MASK(64)) | ||
66 | dma_flag = __GFP_DMA32; | ||
67 | else | ||
68 | #endif | ||
69 | #if defined(CONFIG_ZONE_DMA) && !defined(CONFIG_ZONE_DMA32) | ||
70 | if (dev->coherent_dma_mask < DMA_BIT_MASK(64)) | ||
71 | dma_flag = __GFP_DMA; | ||
60 | else | 72 | else |
61 | #endif | 73 | #endif |
62 | ; | 74 | dma_flag = 0; |
63 | 75 | ||
64 | /* Don't invoke OOM killer */ | 76 | /* Don't invoke OOM killer */ |
65 | gfp |= __GFP_NORETRY; | 77 | gfp |= __GFP_NORETRY; |
66 | 78 | ||
67 | return gfp; | 79 | return gfp | dma_flag; |
68 | } | 80 | } |
69 | 81 | ||
70 | void *dma_alloc_noncoherent(struct device *dev, size_t size, | 82 | void *dma_alloc_noncoherent(struct device *dev, size_t size, |
diff --git a/arch/mips/mm/sc-rm7k.c b/arch/mips/mm/sc-rm7k.c index 1ef75cd80a0d..274af3be1442 100644 --- a/arch/mips/mm/sc-rm7k.c +++ b/arch/mips/mm/sc-rm7k.c | |||
@@ -30,7 +30,7 @@ | |||
30 | #define tc_lsize 32 | 30 | #define tc_lsize 32 |
31 | 31 | ||
32 | extern unsigned long icache_way_size, dcache_way_size; | 32 | extern unsigned long icache_way_size, dcache_way_size; |
33 | unsigned long tcache_size; | 33 | static unsigned long tcache_size; |
34 | 34 | ||
35 | #include <asm/r4kcache.h> | 35 | #include <asm/r4kcache.h> |
36 | 36 | ||
diff --git a/arch/mips/mti-malta/malta-int.c b/arch/mips/mti-malta/malta-int.c index 15949b0be811..b79b24afe3a2 100644 --- a/arch/mips/mti-malta/malta-int.c +++ b/arch/mips/mti-malta/malta-int.c | |||
@@ -385,6 +385,8 @@ static int __initdata msc_nr_eicirqs = ARRAY_SIZE(msc_eicirqmap); | |||
385 | */ | 385 | */ |
386 | 386 | ||
387 | #define GIC_CPU_NMI GIC_MAP_TO_NMI_MSK | 387 | #define GIC_CPU_NMI GIC_MAP_TO_NMI_MSK |
388 | #define X GIC_UNUSED | ||
389 | |||
388 | static struct gic_intr_map gic_intr_map[GIC_NUM_INTRS] = { | 390 | static struct gic_intr_map gic_intr_map[GIC_NUM_INTRS] = { |
389 | { X, X, X, X, 0 }, | 391 | { X, X, X, X, 0 }, |
390 | { X, X, X, X, 0 }, | 392 | { X, X, X, X, 0 }, |
@@ -404,6 +406,7 @@ static struct gic_intr_map gic_intr_map[GIC_NUM_INTRS] = { | |||
404 | { X, X, X, X, 0 }, | 406 | { X, X, X, X, 0 }, |
405 | /* The remainder of this table is initialised by fill_ipi_map */ | 407 | /* The remainder of this table is initialised by fill_ipi_map */ |
406 | }; | 408 | }; |
409 | #undef X | ||
407 | 410 | ||
408 | /* | 411 | /* |
409 | * GCMP needs to be detected before any SMP initialisation | 412 | * GCMP needs to be detected before any SMP initialisation |
diff --git a/arch/mips/pci/pci-rc32434.c b/arch/mips/pci/pci-rc32434.c index 71f7d27b0d4c..f31218e17d3c 100644 --- a/arch/mips/pci/pci-rc32434.c +++ b/arch/mips/pci/pci-rc32434.c | |||
@@ -118,7 +118,7 @@ static int __init rc32434_pcibridge_init(void) | |||
118 | if (!((pcicvalue == PCIM_H_EA) || | 118 | if (!((pcicvalue == PCIM_H_EA) || |
119 | (pcicvalue == PCIM_H_IA_FIX) || | 119 | (pcicvalue == PCIM_H_IA_FIX) || |
120 | (pcicvalue == PCIM_H_IA_RR))) { | 120 | (pcicvalue == PCIM_H_IA_RR))) { |
121 | pr_err(KERN_ERR "PCI init error!!!\n"); | 121 | pr_err("PCI init error!!!\n"); |
122 | /* Not in Host Mode, return ERROR */ | 122 | /* Not in Host Mode, return ERROR */ |
123 | return -1; | 123 | return -1; |
124 | } | 124 | } |
diff --git a/arch/mips/pnx8550/common/reset.c b/arch/mips/pnx8550/common/reset.c index fadd8744a6bc..e7a12ff304b9 100644 --- a/arch/mips/pnx8550/common/reset.c +++ b/arch/mips/pnx8550/common/reset.c | |||
@@ -22,29 +22,19 @@ | |||
22 | */ | 22 | */ |
23 | #include <linux/kernel.h> | 23 | #include <linux/kernel.h> |
24 | 24 | ||
25 | #include <asm/processor.h> | ||
25 | #include <asm/reboot.h> | 26 | #include <asm/reboot.h> |
26 | #include <glb.h> | 27 | #include <glb.h> |
27 | 28 | ||
28 | void pnx8550_machine_restart(char *command) | 29 | void pnx8550_machine_restart(char *command) |
29 | { | 30 | { |
30 | char head[] = "************* Machine restart *************"; | ||
31 | char foot[] = "*******************************************"; | ||
32 | |||
33 | printk("\n\n"); | ||
34 | printk("%s\n", head); | ||
35 | if (command != NULL) | ||
36 | printk("* %s\n", command); | ||
37 | printk("%s\n", foot); | ||
38 | |||
39 | PNX8550_RST_CTL = PNX8550_RST_DO_SW_RST; | 31 | PNX8550_RST_CTL = PNX8550_RST_DO_SW_RST; |
40 | } | 32 | } |
41 | 33 | ||
42 | void pnx8550_machine_halt(void) | 34 | void pnx8550_machine_halt(void) |
43 | { | 35 | { |
44 | printk("*** Machine halt. (Not implemented) ***\n"); | 36 | while (1) { |
45 | } | 37 | if (cpu_wait) |
46 | 38 | cpu_wait(); | |
47 | void pnx8550_machine_power_off(void) | 39 | } |
48 | { | ||
49 | printk("*** Machine power off. (Not implemented) ***\n"); | ||
50 | } | 40 | } |
diff --git a/arch/mips/pnx8550/common/setup.c b/arch/mips/pnx8550/common/setup.c index 64246c9c875c..43cb3945fdbf 100644 --- a/arch/mips/pnx8550/common/setup.c +++ b/arch/mips/pnx8550/common/setup.c | |||
@@ -44,7 +44,6 @@ | |||
44 | extern void __init board_setup(void); | 44 | extern void __init board_setup(void); |
45 | extern void pnx8550_machine_restart(char *); | 45 | extern void pnx8550_machine_restart(char *); |
46 | extern void pnx8550_machine_halt(void); | 46 | extern void pnx8550_machine_halt(void); |
47 | extern void pnx8550_machine_power_off(void); | ||
48 | extern struct resource ioport_resource; | 47 | extern struct resource ioport_resource; |
49 | extern struct resource iomem_resource; | 48 | extern struct resource iomem_resource; |
50 | extern char *prom_getcmdline(void); | 49 | extern char *prom_getcmdline(void); |
@@ -100,7 +99,7 @@ void __init plat_mem_setup(void) | |||
100 | 99 | ||
101 | _machine_restart = pnx8550_machine_restart; | 100 | _machine_restart = pnx8550_machine_restart; |
102 | _machine_halt = pnx8550_machine_halt; | 101 | _machine_halt = pnx8550_machine_halt; |
103 | pm_power_off = pnx8550_machine_power_off; | 102 | pm_power_off = pnx8550_machine_halt; |
104 | 103 | ||
105 | /* Clear the Global 2 Register, PCI Inta Output Enable Registers | 104 | /* Clear the Global 2 Register, PCI Inta Output Enable Registers |
106 | Bit 1:Enable DAC Powerdown | 105 | Bit 1:Enable DAC Powerdown |