2005-04-16 22:20:36 +00:00
|
|
|
#include <linux/module.h>
|
|
|
|
#include <linux/smp.h>
|
|
|
|
#include <linux/user.h>
|
|
|
|
#include <linux/elfcore.h>
|
|
|
|
#include <linux/sched.h>
|
|
|
|
#include <linux/in6.h>
|
|
|
|
#include <linux/interrupt.h>
|
|
|
|
#include <linux/vmalloc.h>
|
|
|
|
#include <linux/pci.h>
|
|
|
|
#include <linux/irq.h>
|
2007-09-24 09:11:27 +00:00
|
|
|
#include <asm/sections.h>
|
2005-04-16 22:20:36 +00:00
|
|
|
#include <asm/processor.h>
|
|
|
|
#include <asm/uaccess.h>
|
|
|
|
#include <asm/checksum.h>
|
|
|
|
#include <asm/io.h>
|
|
|
|
#include <asm/delay.h>
|
|
|
|
#include <asm/tlbflush.h>
|
|
|
|
#include <asm/cacheflush.h>
|
2008-09-21 07:43:45 +00:00
|
|
|
#include <asm/ftrace.h>
|
2005-04-16 22:20:36 +00:00
|
|
|
|
|
|
|
extern int dump_fpu(struct pt_regs *, elf_fpregset_t *);
|
|
|
|
extern struct hw_interrupt_type no_irq_type;
|
|
|
|
|
|
|
|
/* platform dependent support */
|
|
|
|
EXPORT_SYMBOL(dump_fpu);
|
|
|
|
EXPORT_SYMBOL(kernel_thread);
|
|
|
|
EXPORT_SYMBOL(irq_desc);
|
|
|
|
EXPORT_SYMBOL(no_irq_type);
|
|
|
|
|
|
|
|
EXPORT_SYMBOL(strlen);
|
|
|
|
|
|
|
|
/* PCI exports */
|
|
|
|
#ifdef CONFIG_PCI
|
|
|
|
EXPORT_SYMBOL(pci_alloc_consistent);
|
|
|
|
EXPORT_SYMBOL(pci_free_consistent);
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/* mem exports */
|
|
|
|
EXPORT_SYMBOL(memchr);
|
|
|
|
EXPORT_SYMBOL(memcpy);
|
|
|
|
EXPORT_SYMBOL(memset);
|
|
|
|
EXPORT_SYMBOL(memmove);
|
|
|
|
EXPORT_SYMBOL(__copy_user);
|
|
|
|
|
|
|
|
#ifdef CONFIG_MMU
|
|
|
|
EXPORT_SYMBOL(get_vm_area);
|
|
|
|
#endif
|
|
|
|
|
|
|
|
EXPORT_SYMBOL(__udelay);
|
|
|
|
EXPORT_SYMBOL(__ndelay);
|
|
|
|
EXPORT_SYMBOL(__const_udelay);
|
|
|
|
|
sh: Fix FPU tuning on toolchains with mismatched multilib targets.
Presently there is very little standing in the way of using an SH-4
toolchain for building an SH-2 kernel, and vice versa. Binutils itself
has no limitations whatsoever and supports explicit ISA hinting, which
we already use with varying degrees of success today.
This leaves GCC as the odd one out, due to a rather dubious policy
decision by the GCC folks to not include all of the CPU family variants
in the default list of multilib targets in GCC4. Despite best efforts to
the contrary, libgcc itself already contains awareness of the various CPU
types and remains generally usable, allowing it to safely be referenced
even on a mismatched target (and indeed, explicit ISA tuning by binutils
keeps us honest in terms of ensuring that we do not link incompatible
objects in).
In order to support this, a couple of changes had to be made. Firstly,
the introduction of MAYBE_DECLARE_EXPORT(), which provides a __weak
extern reference for libgcc resident routines when finer-grained
-m<cpu-family> based tuning is not supported by the toolchain. This
fixes up the __sdivsi3_i4i and __udivsi3_i4i references when dealing
with SH-2 kernels linked with an SH-4 libgcc. Secondly, in case where we
are unable to find a suitable match for CPU family tuning but still
have a toolchain that defaults to FP instruction generation, a suitable
nofpu target must be selected. This is accomplished by selecting the
first nofpu multilib target supported by the toolchain, which is
also necessary for selecting the proper libgcc to link against.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-10-28 08:19:35 +00:00
|
|
|
#define DECLARE_EXPORT(name) \
|
|
|
|
extern void name(void);EXPORT_SYMBOL(name)
|
2005-04-16 22:20:36 +00:00
|
|
|
|
2008-11-20 06:26:35 +00:00
|
|
|
DECLARE_EXPORT(__udivsi3);
|
|
|
|
DECLARE_EXPORT(__sdivsi3);
|
2008-11-18 08:33:48 +00:00
|
|
|
DECLARE_EXPORT(__lshrsi3);
|
2007-07-20 07:59:49 +00:00
|
|
|
DECLARE_EXPORT(__ashrsi3);
|
|
|
|
DECLARE_EXPORT(__ashlsi3);
|
|
|
|
DECLARE_EXPORT(__ashiftrt_r4_6);
|
|
|
|
DECLARE_EXPORT(__ashiftrt_r4_7);
|
|
|
|
DECLARE_EXPORT(__ashiftrt_r4_8);
|
|
|
|
DECLARE_EXPORT(__ashiftrt_r4_9);
|
|
|
|
DECLARE_EXPORT(__ashiftrt_r4_10);
|
|
|
|
DECLARE_EXPORT(__ashiftrt_r4_11);
|
|
|
|
DECLARE_EXPORT(__ashiftrt_r4_12);
|
|
|
|
DECLARE_EXPORT(__ashiftrt_r4_13);
|
|
|
|
DECLARE_EXPORT(__ashiftrt_r4_14);
|
|
|
|
DECLARE_EXPORT(__ashiftrt_r4_15);
|
|
|
|
DECLARE_EXPORT(__ashiftrt_r4_20);
|
|
|
|
DECLARE_EXPORT(__ashiftrt_r4_21);
|
|
|
|
DECLARE_EXPORT(__ashiftrt_r4_22);
|
|
|
|
DECLARE_EXPORT(__ashiftrt_r4_23);
|
|
|
|
DECLARE_EXPORT(__ashiftrt_r4_24);
|
|
|
|
DECLARE_EXPORT(__ashiftrt_r4_27);
|
|
|
|
DECLARE_EXPORT(__ashiftrt_r4_30);
|
2008-11-18 08:33:48 +00:00
|
|
|
DECLARE_EXPORT(__movstr);
|
2007-07-20 07:59:49 +00:00
|
|
|
DECLARE_EXPORT(__movstrSI8);
|
|
|
|
DECLARE_EXPORT(__movstrSI12);
|
2006-10-03 04:14:04 +00:00
|
|
|
DECLARE_EXPORT(__movstrSI16);
|
2007-07-20 07:59:49 +00:00
|
|
|
DECLARE_EXPORT(__movstrSI20);
|
|
|
|
DECLARE_EXPORT(__movstrSI24);
|
|
|
|
DECLARE_EXPORT(__movstrSI28);
|
|
|
|
DECLARE_EXPORT(__movstrSI32);
|
|
|
|
DECLARE_EXPORT(__movstrSI36);
|
|
|
|
DECLARE_EXPORT(__movstrSI40);
|
|
|
|
DECLARE_EXPORT(__movstrSI44);
|
|
|
|
DECLARE_EXPORT(__movstrSI48);
|
|
|
|
DECLARE_EXPORT(__movstrSI52);
|
|
|
|
DECLARE_EXPORT(__movstrSI56);
|
|
|
|
DECLARE_EXPORT(__movstrSI60);
|
2005-04-16 22:20:36 +00:00
|
|
|
DECLARE_EXPORT(__movstr_i4_even);
|
|
|
|
DECLARE_EXPORT(__movstr_i4_odd);
|
|
|
|
DECLARE_EXPORT(__movstrSI12_i4);
|
2008-11-18 08:33:48 +00:00
|
|
|
DECLARE_EXPORT(__udiv_qrnnd_16);
|
2008-11-20 06:26:35 +00:00
|
|
|
DECLARE_EXPORT(__sdivsi3_i4);
|
|
|
|
DECLARE_EXPORT(__udivsi3_i4);
|
2008-11-18 08:33:48 +00:00
|
|
|
DECLARE_EXPORT(__sdivsi3_i4i);
|
|
|
|
DECLARE_EXPORT(__udivsi3_i4i);
|
2005-04-16 22:20:36 +00:00
|
|
|
|
2007-07-31 08:07:28 +00:00
|
|
|
#if !defined(CONFIG_CACHE_OFF) && (defined(CONFIG_CPU_SH4) || \
|
|
|
|
defined(CONFIG_SH7705_CACHE_32KB))
|
2005-04-16 22:20:36 +00:00
|
|
|
/* needed by some modules */
|
|
|
|
EXPORT_SYMBOL(flush_cache_all);
|
|
|
|
EXPORT_SYMBOL(flush_cache_range);
|
|
|
|
EXPORT_SYMBOL(flush_dcache_page);
|
|
|
|
#endif
|
|
|
|
|
2007-07-31 08:07:28 +00:00
|
|
|
#if !defined(CONFIG_CACHE_OFF) && defined(CONFIG_MMU) && \
|
|
|
|
(defined(CONFIG_CPU_SH4) || defined(CONFIG_SH7705_CACHE_32KB))
|
2006-09-27 08:25:07 +00:00
|
|
|
EXPORT_SYMBOL(clear_user_page);
|
2005-04-16 22:20:36 +00:00
|
|
|
#endif
|
|
|
|
|
2008-10-31 07:20:36 +00:00
|
|
|
#ifdef CONFIG_FUNCTION_TRACER
|
2008-09-21 07:43:45 +00:00
|
|
|
EXPORT_SYMBOL(mcount);
|
|
|
|
#endif
|
2005-04-16 22:20:36 +00:00
|
|
|
EXPORT_SYMBOL(csum_partial);
|
2007-07-20 07:59:49 +00:00
|
|
|
EXPORT_SYMBOL(csum_partial_copy_generic);
|
2006-09-27 03:31:01 +00:00
|
|
|
#ifdef CONFIG_IPV6
|
2005-04-16 22:20:36 +00:00
|
|
|
EXPORT_SYMBOL(csum_ipv6_magic);
|
2006-09-27 03:31:01 +00:00
|
|
|
#endif
|
2005-04-16 22:20:36 +00:00
|
|
|
EXPORT_SYMBOL(clear_page);
|
2008-03-04 23:23:47 +00:00
|
|
|
EXPORT_SYMBOL(copy_page);
|
2007-07-20 07:59:49 +00:00
|
|
|
EXPORT_SYMBOL(__clear_user);
|
2007-09-24 09:11:27 +00:00
|
|
|
EXPORT_SYMBOL(_ebss);
|
2008-04-15 17:21:47 +00:00
|
|
|
EXPORT_SYMBOL(empty_zero_page);
|
2008-10-21 10:45:08 +00:00
|
|
|
|
|
|
|
#ifndef CONFIG_CACHE_OFF
|
|
|
|
EXPORT_SYMBOL(__flush_purge_region);
|
|
|
|
EXPORT_SYMBOL(__flush_wback_region);
|
|
|
|
EXPORT_SYMBOL(__flush_invalidate_region);
|
|
|
|
#endif
|