uaccess.h (24bfa6a9e0d4fe414dfc4ad06c93e10c4c37194e) uaccess.h (61a92f703120daf7ed25e046275aa8a2d3085ad4)
1#ifndef _ARCH_POWERPC_UACCESS_H
2#define _ARCH_POWERPC_UACCESS_H
3
4#ifdef __KERNEL__
5#ifndef __ASSEMBLY__
6
7#include <linux/sched.h>
8#include <linux/errno.h>

--- 50 unchanged lines hidden (view full) ---

59
60#endif
61
62#define access_ok(type, addr, size) \
63 (__chk_user_ptr(addr), \
64 __access_ok((__force unsigned long)(addr), (size), get_fs()))
65
66/*
1#ifndef _ARCH_POWERPC_UACCESS_H
2#define _ARCH_POWERPC_UACCESS_H
3
4#ifdef __KERNEL__
5#ifndef __ASSEMBLY__
6
7#include <linux/sched.h>
8#include <linux/errno.h>

--- 50 unchanged lines hidden (view full) ---

59
60#endif
61
62#define access_ok(type, addr, size) \
63 (__chk_user_ptr(addr), \
64 __access_ok((__force unsigned long)(addr), (size), get_fs()))
65
66/*
67 * The exception table consists of pairs of addresses: the first is the
68 * address of an instruction that is allowed to fault, and the second is
67 * The exception table consists of pairs of relative addresses: the first is
68 * the address of an instruction that is allowed to fault, and the second is
69 * the address at which the program should continue. No registers are
69 * the address at which the program should continue. No registers are
70 * modified, so it is entirely up to the continuation code to figure out
71 * what to do.
70 * modified, so it is entirely up to the continuation code to figure out what
71 * to do.
72 *
72 *
73 * All the routines below use bits of fixup code that are out of line
74 * with the main instruction path. This means when everything is well,
75 * we don't even have to jump over them. Further, they do not intrude
76 * on our cache or tlb entries.
73 * All the routines below use bits of fixup code that are out of line with the
74 * main instruction path. This means when everything is well, we don't even
75 * have to jump over them. Further, they do not intrude on our cache or tlb
76 * entries.
77 */
78
77 */
78
79#define ARCH_HAS_RELATIVE_EXTABLE
80
79struct exception_table_entry {
81struct exception_table_entry {
80 unsigned long insn;
81 unsigned long fixup;
82 int insn;
83 int fixup;
82};
83
84};
85
86static inline unsigned long extable_fixup(const struct exception_table_entry *x)
87{
88 return (unsigned long)&x->fixup + x->fixup;
89}
90
84/*
85 * These are the main single-value transfer routines. They automatically
86 * use the right size if we just have the right pointer type.
87 *
88 * This gets kind of ugly. We want to return _two_ values in "get_user()"
89 * and yet we don't want to do any pointers, because that is too much
90 * of a performance impact. Thus we have a few rather ugly macros here,
91 * and hide all the ugliness from the user.

--- 330 unchanged lines hidden ---
91/*
92 * These are the main single-value transfer routines. They automatically
93 * use the right size if we just have the right pointer type.
94 *
95 * This gets kind of ugly. We want to return _two_ values in "get_user()"
96 * and yet we don't want to do any pointers, because that is too much
97 * of a performance impact. Thus we have a few rather ugly macros here,
98 * and hide all the ugliness from the user.

--- 330 unchanged lines hidden ---