diff options
Diffstat (limited to 'include/asm-sparc64')
-rw-r--r-- | include/asm-sparc64/cacheflush.h | 5 | ||||
-rw-r--r-- | include/asm-sparc64/cpudata.h | 10 | ||||
-rw-r--r-- | include/asm-sparc64/head.h | 9 | ||||
-rw-r--r-- | include/asm-sparc64/openprom.h | 4 | ||||
-rw-r--r-- | include/asm-sparc64/oplib.h | 66 | ||||
-rw-r--r-- | include/asm-sparc64/page.h | 17 | ||||
-rw-r--r-- | include/asm-sparc64/pgtable.h | 14 | ||||
-rw-r--r-- | include/asm-sparc64/uaccess.h | 24 |
8 files changed, 72 insertions, 77 deletions
diff --git a/include/asm-sparc64/cacheflush.h b/include/asm-sparc64/cacheflush.h index ededd2659eab..b3f61659ba81 100644 --- a/include/asm-sparc64/cacheflush.h +++ b/include/asm-sparc64/cacheflush.h | |||
@@ -66,6 +66,11 @@ extern void flush_ptrace_access(struct vm_area_struct *, struct page *, | |||
66 | #define flush_cache_vmap(start, end) do { } while (0) | 66 | #define flush_cache_vmap(start, end) do { } while (0) |
67 | #define flush_cache_vunmap(start, end) do { } while (0) | 67 | #define flush_cache_vunmap(start, end) do { } while (0) |
68 | 68 | ||
69 | #ifdef CONFIG_DEBUG_PAGEALLOC | ||
70 | /* internal debugging function */ | ||
71 | void kernel_map_pages(struct page *page, int numpages, int enable); | ||
72 | #endif | ||
73 | |||
69 | #endif /* !__ASSEMBLY__ */ | 74 | #endif /* !__ASSEMBLY__ */ |
70 | 75 | ||
71 | #endif /* _SPARC64_CACHEFLUSH_H */ | 76 | #endif /* _SPARC64_CACHEFLUSH_H */ |
diff --git a/include/asm-sparc64/cpudata.h b/include/asm-sparc64/cpudata.h index 9a3a81f1cc58..74de79dca915 100644 --- a/include/asm-sparc64/cpudata.h +++ b/include/asm-sparc64/cpudata.h | |||
@@ -22,6 +22,16 @@ typedef struct { | |||
22 | unsigned int __pad1; | 22 | unsigned int __pad1; |
23 | unsigned long *pte_cache[2]; | 23 | unsigned long *pte_cache[2]; |
24 | unsigned long *pgd_cache; | 24 | unsigned long *pgd_cache; |
25 | |||
26 | /* Dcache line 3, rarely used */ | ||
27 | unsigned int dcache_size; | ||
28 | unsigned int dcache_line_size; | ||
29 | unsigned int icache_size; | ||
30 | unsigned int icache_line_size; | ||
31 | unsigned int ecache_size; | ||
32 | unsigned int ecache_line_size; | ||
33 | unsigned int __pad2; | ||
34 | unsigned int __pad3; | ||
25 | } cpuinfo_sparc; | 35 | } cpuinfo_sparc; |
26 | 36 | ||
27 | DECLARE_PER_CPU(cpuinfo_sparc, __cpu_data); | 37 | DECLARE_PER_CPU(cpuinfo_sparc, __cpu_data); |
diff --git a/include/asm-sparc64/head.h b/include/asm-sparc64/head.h index b63a33cf4971..0abd3a674e8f 100644 --- a/include/asm-sparc64/head.h +++ b/include/asm-sparc64/head.h | |||
@@ -12,9 +12,12 @@ | |||
12 | #define __JALAPENO_ID 0x003e0016 | 12 | #define __JALAPENO_ID 0x003e0016 |
13 | 13 | ||
14 | #define CHEETAH_MANUF 0x003e | 14 | #define CHEETAH_MANUF 0x003e |
15 | #define CHEETAH_IMPL 0x0014 | 15 | #define CHEETAH_IMPL 0x0014 /* Ultra-III */ |
16 | #define CHEETAH_PLUS_IMPL 0x0015 | 16 | #define CHEETAH_PLUS_IMPL 0x0015 /* Ultra-III+ */ |
17 | #define JALAPENO_IMPL 0x0016 | 17 | #define JALAPENO_IMPL 0x0016 /* Ultra-IIIi */ |
18 | #define JAGUAR_IMPL 0x0018 /* Ultra-IV */ | ||
19 | #define PANTHER_IMPL 0x0019 /* Ultra-IV+ */ | ||
20 | #define SERRANO_IMPL 0x0022 /* Ultra-IIIi+ */ | ||
18 | 21 | ||
19 | #define BRANCH_IF_CHEETAH_BASE(tmp1,tmp2,label) \ | 22 | #define BRANCH_IF_CHEETAH_BASE(tmp1,tmp2,label) \ |
20 | rdpr %ver, %tmp1; \ | 23 | rdpr %ver, %tmp1; \ |
diff --git a/include/asm-sparc64/openprom.h b/include/asm-sparc64/openprom.h index 0a336901d585..b4959d2b0d99 100644 --- a/include/asm-sparc64/openprom.h +++ b/include/asm-sparc64/openprom.h | |||
@@ -186,8 +186,8 @@ struct linux_prom_registers { | |||
186 | }; | 186 | }; |
187 | 187 | ||
188 | struct linux_prom64_registers { | 188 | struct linux_prom64_registers { |
189 | long phys_addr; | 189 | unsigned long phys_addr; |
190 | long reg_size; | 190 | unsigned long reg_size; |
191 | }; | 191 | }; |
192 | 192 | ||
193 | struct linux_prom_irqs { | 193 | struct linux_prom_irqs { |
diff --git a/include/asm-sparc64/oplib.h b/include/asm-sparc64/oplib.h index a432d9e7daaa..d02f1e8ae1a6 100644 --- a/include/asm-sparc64/oplib.h +++ b/include/asm-sparc64/oplib.h | |||
@@ -38,6 +38,20 @@ extern int prom_stdin, prom_stdout; | |||
38 | */ | 38 | */ |
39 | extern int prom_chosen_node; | 39 | extern int prom_chosen_node; |
40 | 40 | ||
41 | /* Helper values and strings in arch/sparc64/kernel/head.S */ | ||
42 | extern const char prom_finddev_name[]; | ||
43 | extern const char prom_chosen_path[]; | ||
44 | extern const char prom_getprop_name[]; | ||
45 | extern const char prom_mmu_name[]; | ||
46 | extern const char prom_callmethod_name[]; | ||
47 | extern const char prom_translate_name[]; | ||
48 | extern const char prom_map_name[]; | ||
49 | extern const char prom_unmap_name[]; | ||
50 | extern int prom_mmu_ihandle_cache; | ||
51 | extern unsigned int prom_boot_mapped_pc; | ||
52 | extern unsigned int prom_boot_mapping_mode; | ||
53 | extern unsigned long prom_boot_mapping_phys_high, prom_boot_mapping_phys_low; | ||
54 | |||
41 | struct linux_mlist_p1275 { | 55 | struct linux_mlist_p1275 { |
42 | struct linux_mlist_p1275 *theres_more; | 56 | struct linux_mlist_p1275 *theres_more; |
43 | unsigned long start_adr; | 57 | unsigned long start_adr; |
@@ -68,7 +82,7 @@ extern char *prom_getbootargs(void); | |||
68 | * of the string is different on V0 vs. V2->higher proms. The caller must | 82 | * of the string is different on V0 vs. V2->higher proms. The caller must |
69 | * know what he/she is doing! Returns the device descriptor, an int. | 83 | * know what he/she is doing! Returns the device descriptor, an int. |
70 | */ | 84 | */ |
71 | extern int prom_devopen(char *device_string); | 85 | extern int prom_devopen(const char *device_string); |
72 | 86 | ||
73 | /* Close a previously opened device described by the passed integer | 87 | /* Close a previously opened device described by the passed integer |
74 | * descriptor. | 88 | * descriptor. |
@@ -81,27 +95,13 @@ extern int prom_devclose(int device_handle); | |||
81 | extern void prom_seek(int device_handle, unsigned int seek_hival, | 95 | extern void prom_seek(int device_handle, unsigned int seek_hival, |
82 | unsigned int seek_lowval); | 96 | unsigned int seek_lowval); |
83 | 97 | ||
84 | /* Machine memory configuration routine. */ | ||
85 | |||
86 | /* This function returns a V0 format memory descriptor table, it has three | ||
87 | * entries. One for the total amount of physical ram on the machine, one | ||
88 | * for the amount of physical ram available, and one describing the virtual | ||
89 | * areas which are allocated by the prom. So, in a sense the physical | ||
90 | * available is a calculation of the total physical minus the physical mapped | ||
91 | * by the prom with virtual mappings. | ||
92 | * | ||
93 | * These lists are returned pre-sorted, this should make your life easier | ||
94 | * since the prom itself is way too lazy to do such nice things. | ||
95 | */ | ||
96 | extern struct linux_mem_p1275 *prom_meminfo(void); | ||
97 | |||
98 | /* Miscellaneous routines, don't really fit in any category per se. */ | 98 | /* Miscellaneous routines, don't really fit in any category per se. */ |
99 | 99 | ||
100 | /* Reboot the machine with the command line passed. */ | 100 | /* Reboot the machine with the command line passed. */ |
101 | extern void prom_reboot(char *boot_command); | 101 | extern void prom_reboot(const char *boot_command); |
102 | 102 | ||
103 | /* Evaluate the forth string passed. */ | 103 | /* Evaluate the forth string passed. */ |
104 | extern void prom_feval(char *forth_string); | 104 | extern void prom_feval(const char *forth_string); |
105 | 105 | ||
106 | /* Enter the prom, with possibility of continuation with the 'go' | 106 | /* Enter the prom, with possibility of continuation with the 'go' |
107 | * command in newer proms. | 107 | * command in newer proms. |
@@ -154,7 +154,7 @@ extern char prom_getchar(void); | |||
154 | extern void prom_putchar(char character); | 154 | extern void prom_putchar(char character); |
155 | 155 | ||
156 | /* Prom's internal routines, don't use in kernel/boot code. */ | 156 | /* Prom's internal routines, don't use in kernel/boot code. */ |
157 | extern void prom_printf(char *fmt, ...); | 157 | extern void prom_printf(const char *fmt, ...); |
158 | extern void prom_write(const char *buf, unsigned int len); | 158 | extern void prom_write(const char *buf, unsigned int len); |
159 | 159 | ||
160 | /* Query for input device type */ | 160 | /* Query for input device type */ |
@@ -215,7 +215,7 @@ extern int prom_getunumber(int syndrome_code, | |||
215 | char *buf, int buflen); | 215 | char *buf, int buflen); |
216 | 216 | ||
217 | /* Retain physical memory to the caller across soft resets. */ | 217 | /* Retain physical memory to the caller across soft resets. */ |
218 | extern unsigned long prom_retain(char *name, | 218 | extern unsigned long prom_retain(const char *name, |
219 | unsigned long pa_low, unsigned long pa_high, | 219 | unsigned long pa_low, unsigned long pa_high, |
220 | long size, long align); | 220 | long size, long align); |
221 | 221 | ||
@@ -269,28 +269,28 @@ extern int prom_getsibling(int node); | |||
269 | /* Get the length, at the passed node, of the given property type. | 269 | /* Get the length, at the passed node, of the given property type. |
270 | * Returns -1 on error (ie. no such property at this node). | 270 | * Returns -1 on error (ie. no such property at this node). |
271 | */ | 271 | */ |
272 | extern int prom_getproplen(int thisnode, char *property); | 272 | extern int prom_getproplen(int thisnode, const char *property); |
273 | 273 | ||
274 | /* Fetch the requested property using the given buffer. Returns | 274 | /* Fetch the requested property using the given buffer. Returns |
275 | * the number of bytes the prom put into your buffer or -1 on error. | 275 | * the number of bytes the prom put into your buffer or -1 on error. |
276 | */ | 276 | */ |
277 | extern int prom_getproperty(int thisnode, char *property, | 277 | extern int prom_getproperty(int thisnode, const char *property, |
278 | char *prop_buffer, int propbuf_size); | 278 | char *prop_buffer, int propbuf_size); |
279 | 279 | ||
280 | /* Acquire an integer property. */ | 280 | /* Acquire an integer property. */ |
281 | extern int prom_getint(int node, char *property); | 281 | extern int prom_getint(int node, const char *property); |
282 | 282 | ||
283 | /* Acquire an integer property, with a default value. */ | 283 | /* Acquire an integer property, with a default value. */ |
284 | extern int prom_getintdefault(int node, char *property, int defval); | 284 | extern int prom_getintdefault(int node, const char *property, int defval); |
285 | 285 | ||
286 | /* Acquire a boolean property, 0=FALSE 1=TRUE. */ | 286 | /* Acquire a boolean property, 0=FALSE 1=TRUE. */ |
287 | extern int prom_getbool(int node, char *prop); | 287 | extern int prom_getbool(int node, const char *prop); |
288 | 288 | ||
289 | /* Acquire a string property, null string on error. */ | 289 | /* Acquire a string property, null string on error. */ |
290 | extern void prom_getstring(int node, char *prop, char *buf, int bufsize); | 290 | extern void prom_getstring(int node, const char *prop, char *buf, int bufsize); |
291 | 291 | ||
292 | /* Does the passed node have the given "name"? YES=1 NO=0 */ | 292 | /* Does the passed node have the given "name"? YES=1 NO=0 */ |
293 | extern int prom_nodematch(int thisnode, char *name); | 293 | extern int prom_nodematch(int thisnode, const char *name); |
294 | 294 | ||
295 | /* Puts in buffer a prom name in the form name@x,y or name (x for which_io | 295 | /* Puts in buffer a prom name in the form name@x,y or name (x for which_io |
296 | * and y for first regs phys address | 296 | * and y for first regs phys address |
@@ -300,7 +300,7 @@ extern int prom_getname(int node, char *buf, int buflen); | |||
300 | /* Search all siblings starting at the passed node for "name" matching | 300 | /* Search all siblings starting at the passed node for "name" matching |
301 | * the given string. Returns the node on success, zero on failure. | 301 | * the given string. Returns the node on success, zero on failure. |
302 | */ | 302 | */ |
303 | extern int prom_searchsiblings(int node_start, char *name); | 303 | extern int prom_searchsiblings(int node_start, const char *name); |
304 | 304 | ||
305 | /* Return the first property type, as a string, for the given node. | 305 | /* Return the first property type, as a string, for the given node. |
306 | * Returns a null string on error. Buffer should be at least 32B long. | 306 | * Returns a null string on error. Buffer should be at least 32B long. |
@@ -310,21 +310,21 @@ extern char *prom_firstprop(int node, char *buffer); | |||
310 | /* Returns the next property after the passed property for the given | 310 | /* Returns the next property after the passed property for the given |
311 | * node. Returns null string on failure. Buffer should be at least 32B long. | 311 | * node. Returns null string on failure. Buffer should be at least 32B long. |
312 | */ | 312 | */ |
313 | extern char *prom_nextprop(int node, char *prev_property, char *buffer); | 313 | extern char *prom_nextprop(int node, const char *prev_property, char *buffer); |
314 | 314 | ||
315 | /* Returns 1 if the specified node has given property. */ | 315 | /* Returns 1 if the specified node has given property. */ |
316 | extern int prom_node_has_property(int node, char *property); | 316 | extern int prom_node_has_property(int node, const char *property); |
317 | 317 | ||
318 | /* Returns phandle of the path specified */ | 318 | /* Returns phandle of the path specified */ |
319 | extern int prom_finddevice(char *name); | 319 | extern int prom_finddevice(const char *name); |
320 | 320 | ||
321 | /* Set the indicated property at the given node with the passed value. | 321 | /* Set the indicated property at the given node with the passed value. |
322 | * Returns the number of bytes of your value that the prom took. | 322 | * Returns the number of bytes of your value that the prom took. |
323 | */ | 323 | */ |
324 | extern int prom_setprop(int node, char *prop_name, char *prop_value, | 324 | extern int prom_setprop(int node, const char *prop_name, char *prop_value, |
325 | int value_size); | 325 | int value_size); |
326 | 326 | ||
327 | extern int prom_pathtoinode(char *path); | 327 | extern int prom_pathtoinode(const char *path); |
328 | extern int prom_inst2pkg(int); | 328 | extern int prom_inst2pkg(int); |
329 | 329 | ||
330 | /* CPU probing helpers. */ | 330 | /* CPU probing helpers. */ |
@@ -334,7 +334,7 @@ int cpu_find_by_mid(int mid, int *prom_node); | |||
334 | /* Client interface level routines. */ | 334 | /* Client interface level routines. */ |
335 | extern void prom_set_trap_table(unsigned long tba); | 335 | extern void prom_set_trap_table(unsigned long tba); |
336 | 336 | ||
337 | extern long p1275_cmd (char *, long, ...); | 337 | extern long p1275_cmd(const char *, long, ...); |
338 | 338 | ||
339 | 339 | ||
340 | #if 0 | 340 | #if 0 |
diff --git a/include/asm-sparc64/page.h b/include/asm-sparc64/page.h index 7f8d764abc47..5426bb28a993 100644 --- a/include/asm-sparc64/page.h +++ b/include/asm-sparc64/page.h | |||
@@ -140,23 +140,6 @@ extern unsigned long page_to_pfn(struct page *); | |||
140 | #define virt_to_phys __pa | 140 | #define virt_to_phys __pa |
141 | #define phys_to_virt __va | 141 | #define phys_to_virt __va |
142 | 142 | ||
143 | /* The following structure is used to hold the physical | ||
144 | * memory configuration of the machine. This is filled in | ||
145 | * probe_memory() and is later used by mem_init() to set up | ||
146 | * mem_map[]. We statically allocate SPARC_PHYS_BANKS of | ||
147 | * these structs, this is arbitrary. The entry after the | ||
148 | * last valid one has num_bytes==0. | ||
149 | */ | ||
150 | |||
151 | struct sparc_phys_banks { | ||
152 | unsigned long base_addr; | ||
153 | unsigned long num_bytes; | ||
154 | }; | ||
155 | |||
156 | #define SPARC_PHYS_BANKS 32 | ||
157 | |||
158 | extern struct sparc_phys_banks sp_banks[SPARC_PHYS_BANKS]; | ||
159 | |||
160 | #endif /* !(__ASSEMBLY__) */ | 143 | #endif /* !(__ASSEMBLY__) */ |
161 | 144 | ||
162 | #define VM_DATA_DEFAULT_FLAGS (VM_READ | VM_WRITE | VM_EXEC | \ | 145 | #define VM_DATA_DEFAULT_FLAGS (VM_READ | VM_WRITE | VM_EXEC | \ |
diff --git a/include/asm-sparc64/pgtable.h b/include/asm-sparc64/pgtable.h index a297f6144f0f..8c6dfc6c7af6 100644 --- a/include/asm-sparc64/pgtable.h +++ b/include/asm-sparc64/pgtable.h | |||
@@ -60,13 +60,13 @@ | |||
60 | * table can map | 60 | * table can map |
61 | */ | 61 | */ |
62 | #define PMD_SHIFT (PAGE_SHIFT + (PAGE_SHIFT-3)) | 62 | #define PMD_SHIFT (PAGE_SHIFT + (PAGE_SHIFT-3)) |
63 | #define PMD_SIZE (1UL << PMD_SHIFT) | 63 | #define PMD_SIZE (_AC(1,UL) << PMD_SHIFT) |
64 | #define PMD_MASK (~(PMD_SIZE-1)) | 64 | #define PMD_MASK (~(PMD_SIZE-1)) |
65 | #define PMD_BITS (PAGE_SHIFT - 2) | 65 | #define PMD_BITS (PAGE_SHIFT - 2) |
66 | 66 | ||
67 | /* PGDIR_SHIFT determines what a third-level page table entry can map */ | 67 | /* PGDIR_SHIFT determines what a third-level page table entry can map */ |
68 | #define PGDIR_SHIFT (PAGE_SHIFT + (PAGE_SHIFT-3) + PMD_BITS) | 68 | #define PGDIR_SHIFT (PAGE_SHIFT + (PAGE_SHIFT-3) + PMD_BITS) |
69 | #define PGDIR_SIZE (1UL << PGDIR_SHIFT) | 69 | #define PGDIR_SIZE (_AC(1,UL) << PGDIR_SHIFT) |
70 | #define PGDIR_MASK (~(PGDIR_SIZE-1)) | 70 | #define PGDIR_MASK (~(PGDIR_SIZE-1)) |
71 | #define PGDIR_BITS (PAGE_SHIFT - 2) | 71 | #define PGDIR_BITS (PAGE_SHIFT - 2) |
72 | 72 | ||
@@ -98,7 +98,9 @@ | |||
98 | #define _PAGE_NFO _AC(0x1000000000000000,UL) /* No Fault Only */ | 98 | #define _PAGE_NFO _AC(0x1000000000000000,UL) /* No Fault Only */ |
99 | #define _PAGE_IE _AC(0x0800000000000000,UL) /* Invert Endianness */ | 99 | #define _PAGE_IE _AC(0x0800000000000000,UL) /* Invert Endianness */ |
100 | #define _PAGE_SOFT2 _AC(0x07FC000000000000,UL) /* Software bits, set 2 */ | 100 | #define _PAGE_SOFT2 _AC(0x07FC000000000000,UL) /* Software bits, set 2 */ |
101 | #define _PAGE_RES1 _AC(0x0003000000000000,UL) /* Reserved */ | 101 | #define _PAGE_RES1 _AC(0x0002000000000000,UL) /* Reserved */ |
102 | #define _PAGE_SZ32MB _AC(0x0001000000000000,UL) /* (Panther) 32MB page */ | ||
103 | #define _PAGE_SZ256MB _AC(0x2001000000000000,UL) /* (Panther) 256MB page */ | ||
102 | #define _PAGE_SN _AC(0x0000800000000000,UL) /* (Cheetah) Snoop */ | 104 | #define _PAGE_SN _AC(0x0000800000000000,UL) /* (Cheetah) Snoop */ |
103 | #define _PAGE_RES2 _AC(0x0000780000000000,UL) /* Reserved */ | 105 | #define _PAGE_RES2 _AC(0x0000780000000000,UL) /* Reserved */ |
104 | #define _PAGE_PADDR_SF _AC(0x000001FFFFFFE000,UL) /* (Spitfire) paddr[40:13]*/ | 106 | #define _PAGE_PADDR_SF _AC(0x000001FFFFFFE000,UL) /* (Spitfire) paddr[40:13]*/ |
@@ -336,7 +338,11 @@ static inline void set_pte_at(struct mm_struct *mm, unsigned long addr, pte_t *p | |||
336 | #define pte_clear(mm,addr,ptep) \ | 338 | #define pte_clear(mm,addr,ptep) \ |
337 | set_pte_at((mm), (addr), (ptep), __pte(0UL)) | 339 | set_pte_at((mm), (addr), (ptep), __pte(0UL)) |
338 | 340 | ||
339 | extern pgd_t swapper_pg_dir[1]; | 341 | extern pgd_t swapper_pg_dir[2048]; |
342 | extern pmd_t swapper_low_pmd_dir[2048]; | ||
343 | |||
344 | extern void paging_init(void); | ||
345 | extern unsigned long find_ecache_flush_span(unsigned long size); | ||
340 | 346 | ||
341 | /* These do nothing with the way I have things setup. */ | 347 | /* These do nothing with the way I have things setup. */ |
342 | #define mmu_lockarea(vaddr, len) (vaddr) | 348 | #define mmu_lockarea(vaddr, len) (vaddr) |
diff --git a/include/asm-sparc64/uaccess.h b/include/asm-sparc64/uaccess.h index 80a65d7e3dbf..203e8eee6351 100644 --- a/include/asm-sparc64/uaccess.h +++ b/include/asm-sparc64/uaccess.h | |||
@@ -70,26 +70,14 @@ static inline int access_ok(int type, const void __user * addr, unsigned long si | |||
70 | * with the main instruction path. This means when everything is well, | 70 | * with the main instruction path. This means when everything is well, |
71 | * we don't even have to jump over them. Further, they do not intrude | 71 | * we don't even have to jump over them. Further, they do not intrude |
72 | * on our cache or tlb entries. | 72 | * on our cache or tlb entries. |
73 | * | ||
74 | * There is a special way how to put a range of potentially faulting | ||
75 | * insns (like twenty ldd/std's with now intervening other instructions) | ||
76 | * You specify address of first in insn and 0 in fixup and in the next | ||
77 | * exception_table_entry you specify last potentially faulting insn + 1 | ||
78 | * and in fixup the routine which should handle the fault. | ||
79 | * That fixup code will get | ||
80 | * (faulting_insn_address - first_insn_in_the_range_address)/4 | ||
81 | * in %g2 (ie. index of the faulting instruction in the range). | ||
82 | */ | 73 | */ |
83 | 74 | ||
84 | struct exception_table_entry | 75 | struct exception_table_entry { |
85 | { | 76 | unsigned int insn, fixup; |
86 | unsigned insn, fixup; | ||
87 | }; | 77 | }; |
88 | 78 | ||
89 | /* Special exable search, which handles ranges. Returns fixup */ | ||
90 | unsigned long search_extables_range(unsigned long addr, unsigned long *g2); | ||
91 | |||
92 | extern void __ret_efault(void); | 79 | extern void __ret_efault(void); |
80 | extern void __retl_efault(void); | ||
93 | 81 | ||
94 | /* Uh, these should become the main single-value transfer routines.. | 82 | /* Uh, these should become the main single-value transfer routines.. |
95 | * They automatically use the right size if we just have the right | 83 | * They automatically use the right size if we just have the right |
@@ -263,7 +251,7 @@ copy_from_user(void *to, const void __user *from, unsigned long size) | |||
263 | { | 251 | { |
264 | unsigned long ret = ___copy_from_user(to, from, size); | 252 | unsigned long ret = ___copy_from_user(to, from, size); |
265 | 253 | ||
266 | if (ret) | 254 | if (unlikely(ret)) |
267 | ret = copy_from_user_fixup(to, from, size); | 255 | ret = copy_from_user_fixup(to, from, size); |
268 | return ret; | 256 | return ret; |
269 | } | 257 | } |
@@ -279,7 +267,7 @@ copy_to_user(void __user *to, const void *from, unsigned long size) | |||
279 | { | 267 | { |
280 | unsigned long ret = ___copy_to_user(to, from, size); | 268 | unsigned long ret = ___copy_to_user(to, from, size); |
281 | 269 | ||
282 | if (ret) | 270 | if (unlikely(ret)) |
283 | ret = copy_to_user_fixup(to, from, size); | 271 | ret = copy_to_user_fixup(to, from, size); |
284 | return ret; | 272 | return ret; |
285 | } | 273 | } |
@@ -295,7 +283,7 @@ copy_in_user(void __user *to, void __user *from, unsigned long size) | |||
295 | { | 283 | { |
296 | unsigned long ret = ___copy_in_user(to, from, size); | 284 | unsigned long ret = ___copy_in_user(to, from, size); |
297 | 285 | ||
298 | if (ret) | 286 | if (unlikely(ret)) |
299 | ret = copy_in_user_fixup(to, from, size); | 287 | ret = copy_in_user_fixup(to, from, size); |
300 | return ret; | 288 | return ret; |
301 | } | 289 | } |