aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/include
diff options
context:
space:
mode:
Diffstat (limited to 'arch/mips/include')
-rw-r--r--arch/mips/include/asm/bug.h4
-rw-r--r--arch/mips/include/asm/cacheflush.h1
-rw-r--r--arch/mips/include/asm/mman.h1
-rw-r--r--arch/mips/include/asm/socket.h2
-rw-r--r--arch/mips/include/asm/system.h15
-rw-r--r--arch/mips/include/asm/unistd.h15
6 files changed, 23 insertions, 15 deletions
diff --git a/arch/mips/include/asm/bug.h b/arch/mips/include/asm/bug.h
index 6cf29c26e87..540c98a810d 100644
--- a/arch/mips/include/asm/bug.h
+++ b/arch/mips/include/asm/bug.h
@@ -11,9 +11,7 @@
11static inline void __noreturn BUG(void) 11static inline void __noreturn BUG(void)
12{ 12{
13 __asm__ __volatile__("break %0" : : "i" (BRK_BUG)); 13 __asm__ __volatile__("break %0" : : "i" (BRK_BUG));
14 /* Fool GCC into thinking the function doesn't return. */ 14 unreachable();
15 while (1)
16 ;
17} 15}
18 16
19#define HAVE_ARCH_BUG 17#define HAVE_ARCH_BUG
diff --git a/arch/mips/include/asm/cacheflush.h b/arch/mips/include/asm/cacheflush.h
index 03b1d69b142..40bb9fde205 100644
--- a/arch/mips/include/asm/cacheflush.h
+++ b/arch/mips/include/asm/cacheflush.h
@@ -38,6 +38,7 @@ extern void (*flush_cache_range)(struct vm_area_struct *vma,
38extern void (*flush_cache_page)(struct vm_area_struct *vma, unsigned long page, unsigned long pfn); 38extern void (*flush_cache_page)(struct vm_area_struct *vma, unsigned long page, unsigned long pfn);
39extern void __flush_dcache_page(struct page *page); 39extern void __flush_dcache_page(struct page *page);
40 40
41#define ARCH_IMPLEMENTS_FLUSH_DCACHE_PAGE 1
41static inline void flush_dcache_page(struct page *page) 42static inline void flush_dcache_page(struct page *page)
42{ 43{
43 if (cpu_has_dc_aliases || !cpu_has_ic_fills_f_dc) 44 if (cpu_has_dc_aliases || !cpu_has_ic_fills_f_dc)
diff --git a/arch/mips/include/asm/mman.h b/arch/mips/include/asm/mman.h
index a2250f390a2..c892bfb3e2c 100644
--- a/arch/mips/include/asm/mman.h
+++ b/arch/mips/include/asm/mman.h
@@ -75,6 +75,7 @@
75 75
76#define MADV_MERGEABLE 12 /* KSM may merge identical pages */ 76#define MADV_MERGEABLE 12 /* KSM may merge identical pages */
77#define MADV_UNMERGEABLE 13 /* KSM may not merge identical pages */ 77#define MADV_UNMERGEABLE 13 /* KSM may not merge identical pages */
78#define MADV_HWPOISON 100 /* poison a page for testing */
78 79
79/* compatibility flags */ 80/* compatibility flags */
80#define MAP_FILE 0 81#define MAP_FILE 0
diff --git a/arch/mips/include/asm/socket.h b/arch/mips/include/asm/socket.h
index ae05accd9fe..9de5190f248 100644
--- a/arch/mips/include/asm/socket.h
+++ b/arch/mips/include/asm/socket.h
@@ -80,6 +80,8 @@ To add: #define SO_REUSEPORT 0x0200 /* Allow local address and port reuse. */
80#define SO_TIMESTAMPING 37 80#define SO_TIMESTAMPING 37
81#define SCM_TIMESTAMPING SO_TIMESTAMPING 81#define SCM_TIMESTAMPING SO_TIMESTAMPING
82 82
83#define SO_RXQ_OVFL 40
84
83#ifdef __KERNEL__ 85#ifdef __KERNEL__
84 86
85/** sock_type - Socket types 87/** sock_type - Socket types
diff --git a/arch/mips/include/asm/system.h b/arch/mips/include/asm/system.h
index fcf5f98d90c..83b5509e09e 100644
--- a/arch/mips/include/asm/system.h
+++ b/arch/mips/include/asm/system.h
@@ -12,6 +12,7 @@
12#ifndef _ASM_SYSTEM_H 12#ifndef _ASM_SYSTEM_H
13#define _ASM_SYSTEM_H 13#define _ASM_SYSTEM_H
14 14
15#include <linux/kernel.h>
15#include <linux/types.h> 16#include <linux/types.h>
16#include <linux/irqflags.h> 17#include <linux/irqflags.h>
17 18
@@ -193,10 +194,6 @@ extern __u64 __xchg_u64_unsupported_on_32bit_kernels(volatile __u64 * m, __u64 v
193#define __xchg_u64 __xchg_u64_unsupported_on_32bit_kernels 194#define __xchg_u64 __xchg_u64_unsupported_on_32bit_kernels
194#endif 195#endif
195 196
196/* This function doesn't exist, so you'll get a linker error
197 if something tries to do an invalid xchg(). */
198extern void __xchg_called_with_bad_pointer(void);
199
200static inline unsigned long __xchg(unsigned long x, volatile void * ptr, int size) 197static inline unsigned long __xchg(unsigned long x, volatile void * ptr, int size)
201{ 198{
202 switch (size) { 199 switch (size) {
@@ -205,11 +202,17 @@ static inline unsigned long __xchg(unsigned long x, volatile void * ptr, int siz
205 case 8: 202 case 8:
206 return __xchg_u64(ptr, x); 203 return __xchg_u64(ptr, x);
207 } 204 }
208 __xchg_called_with_bad_pointer(); 205
209 return x; 206 return x;
210} 207}
211 208
212#define xchg(ptr, x) ((__typeof__(*(ptr)))__xchg((unsigned long)(x), (ptr), sizeof(*(ptr)))) 209#define xchg(ptr, x) \
210({ \
211 BUILD_BUG_ON(sizeof(*(ptr)) & ~0xc); \
212 \
213 ((__typeof__(*(ptr))) \
214 __xchg((unsigned long)(x), (ptr), sizeof(*(ptr)))); \
215})
213 216
214extern void set_handler(unsigned long offset, void *addr, unsigned long len); 217extern void set_handler(unsigned long offset, void *addr, unsigned long len);
215extern void set_uncached_handler(unsigned long offset, void *addr, unsigned long len); 218extern void set_uncached_handler(unsigned long offset, void *addr, unsigned long len);
diff --git a/arch/mips/include/asm/unistd.h b/arch/mips/include/asm/unistd.h
index 8c9dfa9e901..65c679ecbe6 100644
--- a/arch/mips/include/asm/unistd.h
+++ b/arch/mips/include/asm/unistd.h
@@ -355,16 +355,17 @@
355#define __NR_rt_tgsigqueueinfo (__NR_Linux + 332) 355#define __NR_rt_tgsigqueueinfo (__NR_Linux + 332)
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 359
359/* 360/*
360 * Offset of the last Linux o32 flavoured syscall 361 * Offset of the last Linux o32 flavoured syscall
361 */ 362 */
362#define __NR_Linux_syscalls 334 363#define __NR_Linux_syscalls 335
363 364
364#endif /* _MIPS_SIM == _MIPS_SIM_ABI32 */ 365#endif /* _MIPS_SIM == _MIPS_SIM_ABI32 */
365 366
366#define __NR_O32_Linux 4000 367#define __NR_O32_Linux 4000
367#define __NR_O32_Linux_syscalls 334 368#define __NR_O32_Linux_syscalls 335
368 369
369#if _MIPS_SIM == _MIPS_SIM_ABI64 370#if _MIPS_SIM == _MIPS_SIM_ABI64
370 371
@@ -666,16 +667,17 @@
666#define __NR_rt_tgsigqueueinfo (__NR_Linux + 291) 667#define __NR_rt_tgsigqueueinfo (__NR_Linux + 291)
667#define __NR_perf_event_open (__NR_Linux + 292) 668#define __NR_perf_event_open (__NR_Linux + 292)
668#define __NR_accept4 (__NR_Linux + 293) 669#define __NR_accept4 (__NR_Linux + 293)
670#define __NR_recvmmsg (__NR_Linux + 294)
669 671
670/* 672/*
671 * Offset of the last Linux 64-bit flavoured syscall 673 * Offset of the last Linux 64-bit flavoured syscall
672 */ 674 */
673#define __NR_Linux_syscalls 293 675#define __NR_Linux_syscalls 294
674 676
675#endif /* _MIPS_SIM == _MIPS_SIM_ABI64 */ 677#endif /* _MIPS_SIM == _MIPS_SIM_ABI64 */
676 678
677#define __NR_64_Linux 5000 679#define __NR_64_Linux 5000
678#define __NR_64_Linux_syscalls 293 680#define __NR_64_Linux_syscalls 294
679 681
680#if _MIPS_SIM == _MIPS_SIM_NABI32 682#if _MIPS_SIM == _MIPS_SIM_NABI32
681 683
@@ -981,16 +983,17 @@
981#define __NR_rt_tgsigqueueinfo (__NR_Linux + 295) 983#define __NR_rt_tgsigqueueinfo (__NR_Linux + 295)
982#define __NR_perf_event_open (__NR_Linux + 296) 984#define __NR_perf_event_open (__NR_Linux + 296)
983#define __NR_accept4 (__NR_Linux + 297) 985#define __NR_accept4 (__NR_Linux + 297)
986#define __NR_recvmmsg (__NR_Linux + 298)
984 987
985/* 988/*
986 * Offset of the last N32 flavoured syscall 989 * Offset of the last N32 flavoured syscall
987 */ 990 */
988#define __NR_Linux_syscalls 297 991#define __NR_Linux_syscalls 298
989 992
990#endif /* _MIPS_SIM == _MIPS_SIM_NABI32 */ 993#endif /* _MIPS_SIM == _MIPS_SIM_NABI32 */
991 994
992#define __NR_N32_Linux 6000 995#define __NR_N32_Linux 6000
993#define __NR_N32_Linux_syscalls 297 996#define __NR_N32_Linux_syscalls 298
994 997
995#ifdef __KERNEL__ 998#ifdef __KERNEL__
996 999