diff options
author | jmallett <jmallett@FreeBSD.org> | 2012-03-12 21:25:32 +0000 |
---|---|---|
committer | jmallett <jmallett@FreeBSD.org> | 2012-03-12 21:25:32 +0000 |
commit | 195d12217257f3fd4b328858cbb31ccf5a101652 (patch) | |
tree | f982d7b32e1a65ea4d9f9f78cf4321252085149f /sys/mips/mips | |
parent | cb55999141197a7294c6e4eefb8d5ed74c97a25d (diff) | |
download | FreeBSD-src-195d12217257f3fd4b328858cbb31ccf5a101652.zip FreeBSD-src-195d12217257f3fd4b328858cbb31ccf5a101652.tar.gz |
o) Use ABI, not ISA_* options, to determine whether to compile bits if libkern
required for the ABI the kernel is being built for.
XXX This is implemented in a kind-of nasty way that involves including source
files, but it's still an improvement.
o) Retire ISA_* options since they're unused and were always wrong.
Diffstat (limited to 'sys/mips/mips')
-rw-r--r-- | sys/mips/mips/bus_space_generic.c | 1 | ||||
-rw-r--r-- | sys/mips/mips/cache.c | 2 | ||||
-rw-r--r-- | sys/mips/mips/cache_mipsNN.c | 2 | ||||
-rw-r--r-- | sys/mips/mips/cpu.c | 2 | ||||
-rw-r--r-- | sys/mips/mips/exception.S | 3 | ||||
-rw-r--r-- | sys/mips/mips/freebsd32_machdep.c | 1 | ||||
-rw-r--r-- | sys/mips/mips/libkern_machdep.c | 39 | ||||
-rw-r--r-- | sys/mips/mips/machdep.c | 1 | ||||
-rw-r--r-- | sys/mips/mips/pm_machdep.c | 1 | ||||
-rw-r--r-- | sys/mips/mips/support.S | 1 | ||||
-rw-r--r-- | sys/mips/mips/swtch.S | 1 | ||||
-rw-r--r-- | sys/mips/mips/tick.c | 2 | ||||
-rw-r--r-- | sys/mips/mips/vm_machdep.c | 1 |
13 files changed, 39 insertions, 18 deletions
diff --git a/sys/mips/mips/bus_space_generic.c b/sys/mips/mips/bus_space_generic.c index 8412725..14f611f 100644 --- a/sys/mips/mips/bus_space_generic.c +++ b/sys/mips/mips/bus_space_generic.c @@ -197,7 +197,6 @@ static struct bus_space generic_space = { }; /* Ultra-gross kludge */ -#include "opt_cputype.h" #if defined(CPU_CNMIPS) && (defined(__mips_n32) || defined(__mips_o32)) #include <contrib/octeon-sdk/cvmx.h> #define rd8(a) cvmx_read64_uint8(a) diff --git a/sys/mips/mips/cache.c b/sys/mips/mips/cache.c index 6483319..9423179 100644 --- a/sys/mips/mips/cache.c +++ b/sys/mips/mips/cache.c @@ -73,8 +73,6 @@ __FBSDID("$FreeBSD$"); #include <sys/types.h> #include <sys/systm.h> -#include "opt_cputype.h" - #include <machine/cpuinfo.h> #include <machine/cache.h> diff --git a/sys/mips/mips/cache_mipsNN.c b/sys/mips/mips/cache_mipsNN.c index 98014b1..823391c 100644 --- a/sys/mips/mips/cache_mipsNN.c +++ b/sys/mips/mips/cache_mipsNN.c @@ -38,8 +38,6 @@ #include <sys/cdefs.h> __FBSDID("$FreeBSD$"); -#include "opt_cputype.h" - #include <sys/types.h> #include <sys/systm.h> #include <sys/param.h> diff --git a/sys/mips/mips/cpu.c b/sys/mips/mips/cpu.c index 23016ff..da13ca4 100644 --- a/sys/mips/mips/cpu.c +++ b/sys/mips/mips/cpu.c @@ -27,8 +27,6 @@ #include <sys/cdefs.h> __FBSDID("$FreeBSD$"); -#include "opt_cputype.h" - #include <sys/param.h> #include <sys/kernel.h> #include <sys/module.h> diff --git a/sys/mips/mips/exception.S b/sys/mips/mips/exception.S index d9ace8a..34cf564 100644 --- a/sys/mips/mips/exception.S +++ b/sys/mips/mips/exception.S @@ -54,7 +54,6 @@ * assembly language support routines. */ -#include "opt_cputype.h" #include "opt_ddb.h" #include <machine/asm.h> #include <machine/cpu.h> @@ -62,8 +61,6 @@ #include <machine/cpuregs.h> #include <machine/pte.h> -#include "opt_cputype.h" - #include "assym.s" .set noreorder # Noreorder is default style! diff --git a/sys/mips/mips/freebsd32_machdep.c b/sys/mips/mips/freebsd32_machdep.c index 2fc4afe..dfdf70f 100644 --- a/sys/mips/mips/freebsd32_machdep.c +++ b/sys/mips/mips/freebsd32_machdep.c @@ -31,7 +31,6 @@ */ #include "opt_compat.h" -#include "opt_cputype.h" #define __ELF_WORD_SIZE 32 diff --git a/sys/mips/mips/libkern_machdep.c b/sys/mips/mips/libkern_machdep.c new file mode 100644 index 0000000..6548bed --- /dev/null +++ b/sys/mips/mips/libkern_machdep.c @@ -0,0 +1,39 @@ +/*- + * Copyright (c) 2012 Juli Mallett <jmallett@FreeBSD.org> + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +/* + * Include libkern support routines for 64-bit operations when building o32 + * kernels. + */ +#if defined(__mips_o32) +#include <libkern/divdi3.c> +#include <libkern/moddi3.c> +#include <libkern/qdivrem.c> +#include <libkern/udivdi3.c> +#include <libkern/umoddi3.c> +#endif diff --git a/sys/mips/mips/machdep.c b/sys/mips/mips/machdep.c index d178241..8a9fabe 100644 --- a/sys/mips/mips/machdep.c +++ b/sys/mips/mips/machdep.c @@ -42,7 +42,6 @@ #include <sys/cdefs.h> __FBSDID("$FreeBSD$"); -#include "opt_cputype.h" #include "opt_ddb.h" #include "opt_md.h" diff --git a/sys/mips/mips/pm_machdep.c b/sys/mips/mips/pm_machdep.c index 3366d82..6a7180a 100644 --- a/sys/mips/mips/pm_machdep.c +++ b/sys/mips/mips/pm_machdep.c @@ -39,7 +39,6 @@ __FBSDID("$FreeBSD$"); #include "opt_compat.h" -#include "opt_cputype.h" #include <sys/types.h> #include <sys/param.h> diff --git a/sys/mips/mips/support.S b/sys/mips/mips/support.S index 98bc7fe..6f355f6 100644 --- a/sys/mips/mips/support.S +++ b/sys/mips/mips/support.S @@ -87,7 +87,6 @@ * assembly language support routines. */ -#include "opt_cputype.h" #include "opt_ddb.h" #include <sys/errno.h> #include <machine/asm.h> diff --git a/sys/mips/mips/swtch.S b/sys/mips/mips/swtch.S index 8c43f24..3487a9d 100644 --- a/sys/mips/mips/swtch.S +++ b/sys/mips/mips/swtch.S @@ -56,7 +56,6 @@ */ #include "opt_compat.h" -#include "opt_cputype.h" #include <sys/syscall.h> #include <machine/asm.h> #include <machine/cpu.h> diff --git a/sys/mips/mips/tick.c b/sys/mips/mips/tick.c index d344b1b..50f4f24 100644 --- a/sys/mips/mips/tick.c +++ b/sys/mips/mips/tick.c @@ -33,8 +33,6 @@ #include <sys/cdefs.h> __FBSDID("$FreeBSD$"); -#include "opt_cputype.h" - #include <sys/param.h> #include <sys/systm.h> #include <sys/sysctl.h> diff --git a/sys/mips/mips/vm_machdep.c b/sys/mips/mips/vm_machdep.c index 472738e..76a520f 100644 --- a/sys/mips/mips/vm_machdep.c +++ b/sys/mips/mips/vm_machdep.c @@ -42,7 +42,6 @@ __FBSDID("$FreeBSD$"); #include "opt_compat.h" -#include "opt_cputype.h" #include "opt_ddb.h" #include <sys/param.h> |