mirror of
https://github.com/FEX-Emu/linux.git
synced 2024-12-23 01:40:30 +00:00
parisc: Use BUILD_BUG() instead of undefined functions
Signed-off-by: Helge Deller <deller@gmx.de>
This commit is contained in:
parent
e6be7bb8a3
commit
8dd95c68f3
@ -9,6 +9,8 @@
|
||||
#include <asm/errno.h>
|
||||
#include <asm-generic/uaccess-unaligned.h>
|
||||
|
||||
#include <linux/bug.h>
|
||||
|
||||
#define VERIFY_READ 0
|
||||
#define VERIFY_WRITE 1
|
||||
|
||||
@ -28,11 +30,6 @@
|
||||
* that put_user is the same as __put_user, etc.
|
||||
*/
|
||||
|
||||
extern int __get_kernel_bad(void);
|
||||
extern int __get_user_bad(void);
|
||||
extern int __put_kernel_bad(void);
|
||||
extern int __put_user_bad(void);
|
||||
|
||||
static inline long access_ok(int type, const void __user * addr,
|
||||
unsigned long size)
|
||||
{
|
||||
@ -43,8 +40,8 @@ static inline long access_ok(int type, const void __user * addr,
|
||||
#define get_user __get_user
|
||||
|
||||
#if !defined(CONFIG_64BIT)
|
||||
#define LDD_KERNEL(ptr) __get_kernel_bad();
|
||||
#define LDD_USER(ptr) __get_user_bad();
|
||||
#define LDD_KERNEL(ptr) BUILD_BUG()
|
||||
#define LDD_USER(ptr) BUILD_BUG()
|
||||
#define STD_KERNEL(x, ptr) __put_kernel_asm64(x,ptr)
|
||||
#define STD_USER(x, ptr) __put_user_asm64(x,ptr)
|
||||
#define ASM_WORD_INSN ".word\t"
|
||||
@ -94,7 +91,7 @@ struct exception_data {
|
||||
case 2: __get_kernel_asm("ldh",ptr); break; \
|
||||
case 4: __get_kernel_asm("ldw",ptr); break; \
|
||||
case 8: LDD_KERNEL(ptr); break; \
|
||||
default: __get_kernel_bad(); break; \
|
||||
default: BUILD_BUG(); break; \
|
||||
} \
|
||||
} \
|
||||
else { \
|
||||
@ -103,7 +100,7 @@ struct exception_data {
|
||||
case 2: __get_user_asm("ldh",ptr); break; \
|
||||
case 4: __get_user_asm("ldw",ptr); break; \
|
||||
case 8: LDD_USER(ptr); break; \
|
||||
default: __get_user_bad(); break; \
|
||||
default: BUILD_BUG(); break; \
|
||||
} \
|
||||
} \
|
||||
\
|
||||
@ -136,7 +133,7 @@ struct exception_data {
|
||||
case 2: __put_kernel_asm("sth",__x,ptr); break; \
|
||||
case 4: __put_kernel_asm("stw",__x,ptr); break; \
|
||||
case 8: STD_KERNEL(__x,ptr); break; \
|
||||
default: __put_kernel_bad(); break; \
|
||||
default: BUILD_BUG(); break; \
|
||||
} \
|
||||
} \
|
||||
else { \
|
||||
@ -145,7 +142,7 @@ struct exception_data {
|
||||
case 2: __put_user_asm("sth",__x,ptr); break; \
|
||||
case 4: __put_user_asm("stw",__x,ptr); break; \
|
||||
case 8: STD_USER(__x,ptr); break; \
|
||||
default: __put_user_bad(); break; \
|
||||
default: BUILD_BUG(); break; \
|
||||
} \
|
||||
} \
|
||||
\
|
||||
|
Loading…
Reference in New Issue
Block a user