Fix exporting of consistent_{alloc,free,sync} on PPC8xx/4xx.
[opensuse:kernel.git] / arch / ppc / kernel / ppc_ksyms.c
1 /*
2  * BK Id: %F% %I% %G% %U% %#%
3  */
4 #include <linux/config.h>
5 #include <linux/module.h>
6 #include <linux/threads.h>
7 #include <linux/smp.h>
8 #include <linux/elfcore.h>
9 #include <linux/sched.h>
10 #include <linux/string.h>
11 #include <linux/interrupt.h>
12 #include <linux/tty.h>
13 #include <linux/vt_kern.h>
14 #include <linux/nvram.h>
15 #include <linux/console.h>
16 #include <linux/irq.h>
17 #include <linux/pci.h>
18 #include <linux/delay.h>
19 #include <linux/ide.h>
20
21 #include <asm/page.h>
22 #include <asm/semaphore.h>
23 #include <asm/processor.h>
24 #include <asm/uaccess.h>
25 #include <asm/io.h>
26 #include <asm/ide.h>
27 #include <asm/atomic.h>
28 #include <asm/bitops.h>
29 #include <asm/checksum.h>
30 #include <asm/pgtable.h>
31 #include <linux/adb.h>
32 #include <linux/cuda.h>
33 #include <linux/pmu.h>
34 #include <asm/prom.h>
35 #include <asm/system.h>
36 #include <asm/pci-bridge.h>
37 #include <asm/irq.h>
38 #include <asm/pmac_feature.h>
39 #include <asm/dma.h>
40 #include <asm/machdep.h>
41 #include <asm/hw_irq.h>
42 #include <asm/nvram.h>
43 #include <asm/mmu_context.h>
44 #include <asm/backlight.h>
45 #ifdef CONFIG_SMP
46 #include <asm/smplock.h>
47 #include <asm/smp.h>
48 #endif /* CONFIG_SMP */
49 #include <asm/time.h>
50 #include <asm/cputable.h>
51 #include <asm/btext.h>
52
53 #ifdef  CONFIG_8xx
54 #include <asm/commproc.h>
55 #endif
56
57 /* Tell string.h we don't want memcpy etc. as cpp defines */
58 #define EXPORT_SYMTAB_STROPS
59
60 extern void ppc_generic_ide_fix_driveid(struct hd_driveid *id);
61 extern void transfer_to_handler(void);
62 extern void do_syscall_trace(void);
63 extern void do_IRQ(struct pt_regs *regs);
64 extern void MachineCheckException(struct pt_regs *regs);
65 extern void AlignmentException(struct pt_regs *regs);
66 extern void ProgramCheckException(struct pt_regs *regs);
67 extern void SingleStepException(struct pt_regs *regs);
68 extern int do_signal(sigset_t *, struct pt_regs *);
69 extern int pmac_newworld;
70 extern int sys_sigreturn(struct pt_regs *regs);
71
72 long long __ashrdi3(long long, int);
73 long long __ashldi3(long long, int);
74 long long __lshrdi3(long long, int);
75 int abs(int);
76
77 extern unsigned char __res[];
78
79 extern unsigned long ret_to_user_hook;
80 extern unsigned long mm_ptov (unsigned long paddr);
81
82 extern void *consistent_alloc(int gfp, size_t size, dma_addr_t *dma_handle);
83 extern void consistent_free(void *vaddr);
84 extern void consistent_sync(void *vaddr, size_t size, int direction);
85
86 EXPORT_SYMBOL(clear_page);
87 EXPORT_SYMBOL(do_signal);
88 EXPORT_SYMBOL(do_syscall_trace);
89 EXPORT_SYMBOL(transfer_to_handler);
90 EXPORT_SYMBOL(do_IRQ);
91 EXPORT_SYMBOL(MachineCheckException);
92 EXPORT_SYMBOL(AlignmentException);
93 EXPORT_SYMBOL(ProgramCheckException);
94 EXPORT_SYMBOL(SingleStepException);
95 EXPORT_SYMBOL(sys_sigreturn);
96 EXPORT_SYMBOL(ppc_n_lost_interrupts);
97 EXPORT_SYMBOL(ppc_lost_interrupts);
98 EXPORT_SYMBOL(enable_irq);
99 EXPORT_SYMBOL(disable_irq);
100 EXPORT_SYMBOL(disable_irq_nosync);
101 EXPORT_SYMBOL(probe_irq_mask);
102 #ifdef CONFIG_SMP
103 EXPORT_SYMBOL(kernel_flag);
104 #endif /* CONFIG_SMP */
105
106 EXPORT_SYMBOL(ISA_DMA_THRESHOLD);
107 EXPORT_SYMBOL_NOVERS(DMA_MODE_READ);
108 EXPORT_SYMBOL(DMA_MODE_WRITE);
109 #if defined(CONFIG_ALL_PPC)
110 EXPORT_SYMBOL(_prep_type);
111 EXPORT_SYMBOL(ucSystemType);
112 #endif
113
114 #if !__INLINE_BITOPS
115 EXPORT_SYMBOL(set_bit);
116 EXPORT_SYMBOL(clear_bit);
117 EXPORT_SYMBOL(change_bit);
118 EXPORT_SYMBOL(test_and_set_bit);
119 EXPORT_SYMBOL(test_and_clear_bit);
120 EXPORT_SYMBOL(test_and_change_bit);
121 #endif /* __INLINE_BITOPS */
122
123 EXPORT_SYMBOL(strcpy);
124 EXPORT_SYMBOL(strncpy);
125 EXPORT_SYMBOL(strcat);
126 EXPORT_SYMBOL(strncat);
127 EXPORT_SYMBOL(strchr);
128 EXPORT_SYMBOL(strrchr);
129 EXPORT_SYMBOL(strpbrk);
130 EXPORT_SYMBOL(strtok);
131 EXPORT_SYMBOL(strstr);
132 EXPORT_SYMBOL(strlen);
133 EXPORT_SYMBOL(strnlen);
134 EXPORT_SYMBOL(strcmp);
135 EXPORT_SYMBOL(strncmp);
136 EXPORT_SYMBOL(strcasecmp);
137
138 /* EXPORT_SYMBOL(csum_partial); already in net/netsyms.c */
139 EXPORT_SYMBOL(csum_partial_copy_generic);
140 EXPORT_SYMBOL(ip_fast_csum);
141 EXPORT_SYMBOL(csum_tcpudp_magic);
142
143 EXPORT_SYMBOL(__copy_tofrom_user);
144 EXPORT_SYMBOL(__clear_user);
145 EXPORT_SYMBOL(__strncpy_from_user);
146 EXPORT_SYMBOL(__strnlen_user);
147
148 /*
149 EXPORT_SYMBOL(inb);
150 EXPORT_SYMBOL(inw);
151 EXPORT_SYMBOL(inl);
152 EXPORT_SYMBOL(outb);
153 EXPORT_SYMBOL(outw);
154 EXPORT_SYMBOL(outl);
155 EXPORT_SYMBOL(outsl);*/
156
157 EXPORT_SYMBOL(_insb);
158 EXPORT_SYMBOL(_outsb);
159 EXPORT_SYMBOL(_insw);
160 EXPORT_SYMBOL(_outsw);
161 EXPORT_SYMBOL(_insl);
162 EXPORT_SYMBOL(_outsl);
163 EXPORT_SYMBOL(_insw_ns);
164 EXPORT_SYMBOL(_outsw_ns);
165 EXPORT_SYMBOL(_insl_ns);
166 EXPORT_SYMBOL(_outsl_ns);
167 EXPORT_SYMBOL(iopa);
168 EXPORT_SYMBOL(mm_ptov);
169 #ifndef CONFIG_PPC_ISERIES
170 EXPORT_SYMBOL(ioremap);
171 EXPORT_SYMBOL(__ioremap);
172 EXPORT_SYMBOL(iounmap);
173 #endif
174
175 #if defined(CONFIG_BLK_DEV_IDE) || defined(CONFIG_BLK_DEV_IDE_MODULE)
176 EXPORT_SYMBOL(ppc_ide_md);
177 EXPORT_SYMBOL(ppc_generic_ide_fix_driveid);
178 #endif
179
180 #ifdef CONFIG_PCI
181 EXPORT_SYMBOL_NOVERS(isa_io_base);
182 EXPORT_SYMBOL_NOVERS(isa_mem_base);
183 EXPORT_SYMBOL_NOVERS(pci_dram_offset);
184 EXPORT_SYMBOL(pci_alloc_consistent);
185 EXPORT_SYMBOL(pci_free_consistent);
186 EXPORT_SYMBOL(pci_bus_io_base);
187 EXPORT_SYMBOL(pci_bus_io_base_phys);
188 EXPORT_SYMBOL(pci_bus_mem_base_phys);
189 EXPORT_SYMBOL(pci_bus_to_hose);
190 EXPORT_SYMBOL(pci_resource_to_bus);
191 EXPORT_SYMBOL(pci_phys_to_bus);
192 EXPORT_SYMBOL(pci_bus_to_phys);
193 #endif /* CONFIG_PCI */
194
195 #ifdef CONFIG_NOT_COHERENT_CACHE
196 EXPORT_SYMBOL(consistent_alloc);
197 EXPORT_SYMBOL(consistent_free);
198 EXPORT_SYMBOL(consistent_sync);
199 #endif
200
201 EXPORT_SYMBOL(start_thread);
202 EXPORT_SYMBOL(kernel_thread);
203
204 EXPORT_SYMBOL(flush_instruction_cache);
205 EXPORT_SYMBOL(giveup_fpu);
206 EXPORT_SYMBOL(enable_kernel_fp);
207 EXPORT_SYMBOL(flush_icache_range);
208 EXPORT_SYMBOL(flush_dcache_range);
209 EXPORT_SYMBOL(flush_icache_user_range);
210 EXPORT_SYMBOL(flush_icache_page);
211 EXPORT_SYMBOL(flush_dcache_page);
212 EXPORT_SYMBOL(xchg_u32);
213 #ifdef CONFIG_ALTIVEC
214 EXPORT_SYMBOL(last_task_used_altivec);
215 EXPORT_SYMBOL(giveup_altivec);
216 #endif /* CONFIG_ALTIVEC */
217 #ifdef CONFIG_SMP
218 EXPORT_SYMBOL(global_irq_lock);
219 EXPORT_SYMBOL(global_irq_holder);
220 EXPORT_SYMBOL(__global_cli);
221 EXPORT_SYMBOL(__global_sti);
222 EXPORT_SYMBOL(__global_save_flags);
223 EXPORT_SYMBOL(__global_restore_flags);
224 #ifdef SPINLOCK_DEBUG
225 EXPORT_SYMBOL(_raw_spin_lock);
226 EXPORT_SYMBOL(_raw_spin_unlock);
227 EXPORT_SYMBOL(_raw_spin_trylock);
228 EXPORT_SYMBOL(_raw_read_lock);
229 EXPORT_SYMBOL(_raw_read_unlock);
230 EXPORT_SYMBOL(_raw_write_lock);
231 EXPORT_SYMBOL(_raw_write_unlock);
232 #endif
233 EXPORT_SYMBOL(smp_call_function);
234 EXPORT_SYMBOL(smp_hw_index);
235 EXPORT_SYMBOL(smp_num_cpus);
236 EXPORT_SYMBOL(synchronize_irq);
237 #endif
238
239 EXPORT_SYMBOL(ppc_md);
240
241 #ifdef CONFIG_ADB
242 EXPORT_SYMBOL(adb_request);
243 EXPORT_SYMBOL(adb_register);
244 EXPORT_SYMBOL(adb_unregister);
245 EXPORT_SYMBOL(adb_poll);
246 EXPORT_SYMBOL(adb_try_handler_change);
247 #endif /* CONFIG_ADB */
248 #ifdef CONFIG_ADB_CUDA
249 EXPORT_SYMBOL(cuda_request);
250 EXPORT_SYMBOL(cuda_poll);
251 #endif /* CONFIG_ADB_CUDA */
252 #ifdef CONFIG_PMAC_BACKLIGHT
253 EXPORT_SYMBOL(get_backlight_level);
254 EXPORT_SYMBOL(set_backlight_level);
255 EXPORT_SYMBOL(set_backlight_enable);
256 EXPORT_SYMBOL(register_backlight_controller);
257 #endif /* CONFIG_PMAC_BACKLIGHT */
258 #if defined(CONFIG_ALL_PPC)
259 EXPORT_SYMBOL(_machine);
260 EXPORT_SYMBOL_NOVERS(sys_ctrler);
261 EXPORT_SYMBOL(find_devices);
262 EXPORT_SYMBOL(find_type_devices);
263 EXPORT_SYMBOL(find_compatible_devices);
264 EXPORT_SYMBOL(find_path_device);
265 EXPORT_SYMBOL(device_is_compatible);
266 EXPORT_SYMBOL(machine_is_compatible);
267 EXPORT_SYMBOL(find_all_nodes);
268 EXPORT_SYMBOL(get_property);
269 EXPORT_SYMBOL(request_OF_resource);
270 EXPORT_SYMBOL(release_OF_resource);
271 EXPORT_SYMBOL(pci_device_to_OF_node);
272 EXPORT_SYMBOL(pci_device_from_OF_node);
273 EXPORT_SYMBOL(pmac_newworld);
274 #endif /* defined(CONFIG_ALL_PPC) */
275 #if defined(CONFIG_BOOTX_TEXT)
276 EXPORT_SYMBOL(btext_update_display);
277 #endif
278 #if defined(CONFIG_SCSI) && defined(CONFIG_ALL_PPC)
279 EXPORT_SYMBOL(note_scsi_host);
280 #endif
281 #ifdef CONFIG_VT
282 EXPORT_SYMBOL(kd_mksound);
283 #endif
284 #ifdef CONFIG_NVRAM
285 EXPORT_SYMBOL(nvram_read_byte);
286 EXPORT_SYMBOL(nvram_write_byte);
287 EXPORT_SYMBOL(pmac_xpram_read);
288 EXPORT_SYMBOL(pmac_xpram_write);
289 #endif /* CONFIG_NVRAM */
290 EXPORT_SYMBOL(to_tm);
291
292 EXPORT_SYMBOL_NOVERS(__ashrdi3);
293 EXPORT_SYMBOL_NOVERS(__ashldi3);
294 EXPORT_SYMBOL_NOVERS(__lshrdi3);
295 EXPORT_SYMBOL_NOVERS(memcpy);
296 EXPORT_SYMBOL_NOVERS(memset);
297 EXPORT_SYMBOL_NOVERS(memmove);
298 EXPORT_SYMBOL_NOVERS(memscan);
299 EXPORT_SYMBOL_NOVERS(memcmp);
300 EXPORT_SYMBOL_NOVERS(memchr);
301
302 EXPORT_SYMBOL(abs);
303
304 #if defined(CONFIG_FB_VGA16_MODULE)
305 EXPORT_SYMBOL(screen_info);
306 #endif
307
308 EXPORT_SYMBOL(__delay);
309 #ifndef INLINE_IRQS
310 EXPORT_SYMBOL(__sti);
311 EXPORT_SYMBOL(__sti_end);
312 EXPORT_SYMBOL(__cli);
313 EXPORT_SYMBOL(__cli_end);
314 EXPORT_SYMBOL(__save_flags_ptr);
315 EXPORT_SYMBOL(__save_flags_ptr_end);
316 EXPORT_SYMBOL(__restore_flags);
317 EXPORT_SYMBOL(__restore_flags_end);
318 #endif
319 EXPORT_SYMBOL(timer_interrupt_intercept);
320 EXPORT_SYMBOL(timer_interrupt);
321 EXPORT_SYMBOL(do_IRQ_intercept);
322 EXPORT_SYMBOL(irq_desc);
323 void ppc_irq_dispatch_handler(struct pt_regs *, int);
324 EXPORT_SYMBOL(ppc_irq_dispatch_handler);
325 EXPORT_SYMBOL(tb_ticks_per_jiffy);
326 EXPORT_SYMBOL(get_wchan);
327 EXPORT_SYMBOL(console_drivers);
328 #ifdef CONFIG_XMON
329 extern void xmon_printf(char *fmt, ...);
330 EXPORT_SYMBOL(xmon);
331 EXPORT_SYMBOL(xmon_printf);
332 #endif
333 EXPORT_SYMBOL(__up);
334 EXPORT_SYMBOL(__down);
335 EXPORT_SYMBOL(__down_interruptible);
336
337 #if defined(CONFIG_KGDB) || defined(CONFIG_XMON)
338 extern void (*debugger)(struct pt_regs *regs);
339 extern int (*debugger_bpt)(struct pt_regs *regs);
340 extern int (*debugger_sstep)(struct pt_regs *regs);
341 extern int (*debugger_iabr_match)(struct pt_regs *regs);
342 extern int (*debugger_dabr_match)(struct pt_regs *regs);
343 extern void (*debugger_fault_handler)(struct pt_regs *regs);
344
345 EXPORT_SYMBOL(debugger);
346 EXPORT_SYMBOL(debugger_bpt);
347 EXPORT_SYMBOL(debugger_sstep);
348 EXPORT_SYMBOL(debugger_iabr_match);
349 EXPORT_SYMBOL(debugger_dabr_match);
350 EXPORT_SYMBOL(debugger_fault_handler);
351 #endif
352
353 #ifdef  CONFIG_8xx
354 EXPORT_SYMBOL(__res);
355 EXPORT_SYMBOL(cpm_install_handler);
356 EXPORT_SYMBOL(cpm_free_handler);
357 #endif /* CONFIG_8xx */
358 #if defined(CONFIG_8xx) || defined(CONFIG_8260)
359 EXPORT_SYMBOL(request_8xxirq);
360 #endif
361
362 EXPORT_SYMBOL(ret_to_user_hook);
363 EXPORT_SYMBOL(next_mmu_context);
364 EXPORT_SYMBOL(set_context);
365 EXPORT_SYMBOL(handle_mm_fault); /* For MOL */
366 EXPORT_SYMBOL_NOVERS(disarm_decr);
367 #ifdef CONFIG_PPC_STD_MMU
368 EXPORT_SYMBOL(flush_hash_pages); /* For MOL */
369 extern long *intercept_table;
370 EXPORT_SYMBOL(intercept_table);
371 #endif
372 extern long *ret_from_intercept;
373 EXPORT_SYMBOL(ret_from_intercept);
374 EXPORT_SYMBOL(cur_cpu_spec);
375 #if defined(CONFIG_ALL_PPC)
376 extern unsigned long agp_special_page;
377 EXPORT_SYMBOL_NOVERS(agp_special_page);
378 #endif /* defined(CONFIG_ALL_PPC) */