2005-04-16 18:20:36 -04: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 05:11:27 -04:00
|
|
|
#include <asm/sections.h>
|
2005-04-16 18:20:36 -04: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 03:43:45 -04:00
|
|
|
#include <asm/ftrace.h>
|
2005-04-16 18:20:36 -04:00
|
|
|
|
|
|
|
extern int dump_fpu(struct pt_regs *, elf_fpregset_t *);
|
|
|
|
|
|
|
|
/* platform dependent support */
|
|
|
|
EXPORT_SYMBOL(dump_fpu);
|
|
|
|
EXPORT_SYMBOL(kernel_thread);
|
|
|
|
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);
|
|
|
|
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 04:19:35 -04:00
|
|
|
#define DECLARE_EXPORT(name) \
|
|
|
|
extern void name(void);EXPORT_SYMBOL(name)
|
2005-04-16 18:20:36 -04:00
|
|
|
|
2008-11-20 01:26:35 -05:00
|
|
|
DECLARE_EXPORT(__udivsi3);
|
|
|
|
DECLARE_EXPORT(__sdivsi3);
|
2008-11-18 03:33:48 -05:00
|
|
|
DECLARE_EXPORT(__lshrsi3);
|
2007-07-20 03:59:49 -04: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 03:33:48 -05:00
|
|
|
DECLARE_EXPORT(__movstr);
|
2007-07-20 03:59:49 -04:00
|
|
|
DECLARE_EXPORT(__movstrSI8);
|
|
|
|
DECLARE_EXPORT(__movstrSI12);
|
2006-10-03 00:14:04 -04:00
|
|
|
DECLARE_EXPORT(__movstrSI16);
|
2007-07-20 03:59:49 -04: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 18:20:36 -04:00
|
|
|
DECLARE_EXPORT(__movstr_i4_even);
|
|
|
|
DECLARE_EXPORT(__movstr_i4_odd);
|
|
|
|
DECLARE_EXPORT(__movstrSI12_i4);
|
2008-11-25 13:44:07 -05:00
|
|
|
DECLARE_EXPORT(__movmem_i4_even);
|
|
|
|
DECLARE_EXPORT(__movmem_i4_odd);
|
|
|
|
DECLARE_EXPORT(__movmemSI12_i4);
|
2008-11-18 03:33:48 -05:00
|
|
|
DECLARE_EXPORT(__udiv_qrnnd_16);
|
2008-11-20 01:26:35 -05:00
|
|
|
DECLARE_EXPORT(__sdivsi3_i4);
|
|
|
|
DECLARE_EXPORT(__udivsi3_i4);
|
2008-11-18 03:33:48 -05:00
|
|
|
DECLARE_EXPORT(__sdivsi3_i4i);
|
|
|
|
DECLARE_EXPORT(__udivsi3_i4i);
|
2005-04-16 18:20:36 -04:00
|
|
|
|
2007-07-31 04:07:28 -04:00
|
|
|
#if !defined(CONFIG_CACHE_OFF) && (defined(CONFIG_CPU_SH4) || \
|
|
|
|
defined(CONFIG_SH7705_CACHE_32KB))
|
2005-04-16 18:20:36 -04:00
|
|
|
/* needed by some modules */
|
|
|
|
EXPORT_SYMBOL(flush_cache_all);
|
|
|
|
EXPORT_SYMBOL(flush_cache_range);
|
|
|
|
EXPORT_SYMBOL(flush_dcache_page);
|
|
|
|
#endif
|
|
|
|
|
2007-07-31 04:07:28 -04:00
|
|
|
#if !defined(CONFIG_CACHE_OFF) && defined(CONFIG_MMU) && \
|
|
|
|
(defined(CONFIG_CPU_SH4) || defined(CONFIG_SH7705_CACHE_32KB))
|
2006-09-27 04:25:07 -04:00
|
|
|
EXPORT_SYMBOL(clear_user_page);
|
2005-04-16 18:20:36 -04:00
|
|
|
#endif
|
|
|
|
|
2009-07-11 06:56:58 -04:00
|
|
|
#ifdef CONFIG_MCOUNT
|
2009-07-11 07:32:14 -04:00
|
|
|
DECLARE_EXPORT(mcount);
|
2008-09-21 03:43:45 -04:00
|
|
|
#endif
|
2005-04-16 18:20:36 -04:00
|
|
|
EXPORT_SYMBOL(csum_partial);
|
2007-07-20 03:59:49 -04:00
|
|
|
EXPORT_SYMBOL(csum_partial_copy_generic);
|
2006-09-26 23:31:01 -04:00
|
|
|
#ifdef CONFIG_IPV6
|
2005-04-16 18:20:36 -04:00
|
|
|
EXPORT_SYMBOL(csum_ipv6_magic);
|
2006-09-26 23:31:01 -04:00
|
|
|
#endif
|
2005-04-16 18:20:36 -04:00
|
|
|
EXPORT_SYMBOL(clear_page);
|
2008-03-04 18:23:47 -05:00
|
|
|
EXPORT_SYMBOL(copy_page);
|
2007-07-20 03:59:49 -04:00
|
|
|
EXPORT_SYMBOL(__clear_user);
|
2007-09-24 05:11:27 -04:00
|
|
|
EXPORT_SYMBOL(_ebss);
|
2008-04-15 13:21:47 -04:00
|
|
|
EXPORT_SYMBOL(empty_zero_page);
|
2008-10-21 06:45:08 -04:00
|
|
|
|
|
|
|
#ifndef CONFIG_CACHE_OFF
|
|
|
|
EXPORT_SYMBOL(__flush_purge_region);
|
|
|
|
EXPORT_SYMBOL(__flush_wback_region);
|
|
|
|
EXPORT_SYMBOL(__flush_invalidate_region);
|
|
|
|
#endif
|