diff options
38 files changed, 41 insertions, 61 deletions
diff --git a/sys/conf/files.mips b/sys/conf/files.mips index 0cde851c45e2..18be6d720f66 100644 --- a/sys/conf/files.mips +++ b/sys/conf/files.mips @@ -56,6 +56,7 @@ mips/mips/in_cksum.c optional inet | inet6 mips/mips/locore.S standard no-obj mips/mips/minidump_machdep.c standard mips/mips/mem.c optional mem +mips/mips/libkern_machdep.c standard mips/mips/nexus.c standard mips/mips/stack_machdep.c optional ddb | stack mips/mips/support.S standard @@ -72,18 +73,13 @@ geom/geom_mbr_enc.c optional geom_mbr libkern/ashldi3.c standard libkern/ashrdi3.c standard libkern/cmpdi2.c standard -libkern/divdi3.c optional isa_mips32 libkern/ffsl.c standard libkern/fls.c standard libkern/flsl.c standard libkern/lshrdi3.c standard libkern/memchr.c optional fdt libkern/memmove.c standard -libkern/moddi3.c optional isa_mips32 -libkern/qdivrem.c optional isa_mips32 libkern/ucmpdi2.c standard -libkern/udivdi3.c optional isa_mips32 -libkern/umoddi3.c optional isa_mips32 #XXX: We can't use these versions, as strcmp.c is included conf/files #libkern/mips/strcmp.S standard diff --git a/sys/conf/options.mips b/sys/conf/options.mips index 4cf93440c6f3..237b472495a0 100644 --- a/sys/conf/options.mips +++ b/sys/conf/options.mips @@ -38,14 +38,6 @@ CPU_CNMIPS opt_global.h CPU_RMI opt_global.h CPU_NLM opt_global.h -# XXX These are bogus and should be replaced by proper ABI or ISA checks. -ISA_MIPS1 opt_cputype.h -ISA_MIPS3 opt_cputype.h -ISA_MIPS32 opt_cputype.h -ISA_MIPS32v2 opt_cputype.h -ISA_MIPS64 opt_cputype.h -ISA_MIPS64v2 opt_cputype.h - COMPAT_FREEBSD32 opt_compat.h YAMON opt_global.h diff --git a/sys/mips/adm5120/std.adm5120 b/sys/mips/adm5120/std.adm5120 index c76a3939f5f4..bbd9f0b5a33a 100644 --- a/sys/mips/adm5120/std.adm5120 +++ b/sys/mips/adm5120/std.adm5120 @@ -6,7 +6,6 @@ files "../adm5120/files.adm5120" machine mips mipsel cpu CPU_MIPS4KC -options ISA_MIPS32 # device admpci device admsw diff --git a/sys/mips/alchemy/std.alchemy b/sys/mips/alchemy/std.alchemy index 82f08867614d..1b8b83b17f3d 100644 --- a/sys/mips/alchemy/std.alchemy +++ b/sys/mips/alchemy/std.alchemy @@ -6,4 +6,3 @@ files "../alchemy/files.alchemy" machine mips mipsel cpu CPU_MIPS4KC -options ISA_MIPS32 diff --git a/sys/mips/atheros/std.ar71xx b/sys/mips/atheros/std.ar71xx index 14859e0835d3..b43771905b79 100644 --- a/sys/mips/atheros/std.ar71xx +++ b/sys/mips/atheros/std.ar71xx @@ -6,4 +6,3 @@ files "../atheros/files.ar71xx" machine mips mipseb cpu CPU_MIPS4KC -options ISA_MIPS32 diff --git a/sys/mips/conf/AR71XX_BASE b/sys/mips/conf/AR71XX_BASE index 4b447cf8d0d6..78905f5e9a89 100644 --- a/sys/mips/conf/AR71XX_BASE +++ b/sys/mips/conf/AR71XX_BASE @@ -10,7 +10,6 @@ machine mips mipseb ident AR71XX_BASE cpu CPU_MIPS4KC -options ISA_MIPS32 makeoptions TARGET_BIG_ENDIAN makeoptions KERNLOADADDR=0x80050000 options HZ=1000 diff --git a/sys/mips/conf/AR91XX_BASE b/sys/mips/conf/AR91XX_BASE index d97b234995ee..571f974306b3 100644 --- a/sys/mips/conf/AR91XX_BASE +++ b/sys/mips/conf/AR91XX_BASE @@ -13,7 +13,6 @@ machine mips mipseb ident AR91XX_BASE cpu CPU_MIPS4KC -options ISA_MIPS32 makeoptions KERNLOADADDR=0x80050000 options HZ=1000 diff --git a/sys/mips/conf/MALTA b/sys/mips/conf/MALTA index 27598fb75c4f..54ece7421aa4 100644 --- a/sys/mips/conf/MALTA +++ b/sys/mips/conf/MALTA @@ -33,8 +33,6 @@ options TICK_USE_YAMON_FREQ=defined include "../malta/std.malta" -options ISA_MIPS32 - hints "MALTA.hints" #Default places to look for devices. makeoptions DEBUG=-g #Build kernel with gdb(1) debug symbols diff --git a/sys/mips/conf/MALTA64 b/sys/mips/conf/MALTA64 index 45b686255d97..3f3ace0b6b03 100644 --- a/sys/mips/conf/MALTA64 +++ b/sys/mips/conf/MALTA64 @@ -33,8 +33,6 @@ options TICK_USE_YAMON_FREQ=defined include "../malta/std.malta" -options ISA_MIPS64 - hints "MALTA.hints" #Default places to look for devices. makeoptions DEBUG=-g #Build kernel with gdb(1) debug symbols diff --git a/sys/mips/conf/OCTEON1 b/sys/mips/conf/OCTEON1 index 83579437e434..fe7d1128b261 100644 --- a/sys/mips/conf/OCTEON1 +++ b/sys/mips/conf/OCTEON1 @@ -37,9 +37,6 @@ makeoptions DEBUG=-g #Build kernel with gdb(1) debug symbols #options OCTEON_VENDOR_LANNER # Support for Lanner boards. #options OCTEON_BOARD_CAPK_0100ND # Support for CAPK-0100nd. -# XXX This option is very nearly irrelevant. -options ISA_MIPS64 - options SCHED_ULE # ULE scheduler options PREEMPTION # Enable kernel thread preemption options INET # InterNETworking diff --git a/sys/mips/conf/SWARM b/sys/mips/conf/SWARM index 53c9e5248757..10d6a1227065 100644 --- a/sys/mips/conf/SWARM +++ b/sys/mips/conf/SWARM @@ -7,7 +7,6 @@ include "std.SWARM" ident SWARM machine mips mipseb -options ISA_MIPS32 makeoptions ARCH_FLAGS="-mabi=32 -march=mips32" makeoptions LDSCRIPT_NAME= ldscript.mips.cfe diff --git a/sys/mips/conf/SWARM_SMP b/sys/mips/conf/SWARM_SMP index 59bf57d20f24..a3ec092d954e 100644 --- a/sys/mips/conf/SWARM_SMP +++ b/sys/mips/conf/SWARM_SMP @@ -10,7 +10,6 @@ options SMP options PRINTF_BUFR_SIZE=128 machine mips mipseb -options ISA_MIPS32 makeoptions ARCH_FLAGS="-mabi=32 -march=mips32" makeoptions LDSCRIPT_NAME= ldscript.mips.cfe diff --git a/sys/mips/conf/XLP b/sys/mips/conf/XLP index b6cef20729b4..9c1de77bcd66 100644 --- a/sys/mips/conf/XLP +++ b/sys/mips/conf/XLP @@ -20,7 +20,6 @@ machine mips mipseb ident XLP -options ISA_MIPS32 makeoptions KERNLOADADDR=0x80100000 include "std.XLP" diff --git a/sys/mips/conf/XLP64 b/sys/mips/conf/XLP64 index 9080e24a2dc1..165eb7508440 100644 --- a/sys/mips/conf/XLP64 +++ b/sys/mips/conf/XLP64 @@ -20,7 +20,6 @@ machine mips mips64eb ident XLP64 -options ISA_MIPS64 makeoptions ARCH_FLAGS="-march=mips64r2 -mabi=64" makeoptions KERNLOADADDR=0xffffffff80100000 diff --git a/sys/mips/conf/XLPN32 b/sys/mips/conf/XLPN32 index d196f859b0eb..74c3627ff438 100644 --- a/sys/mips/conf/XLPN32 +++ b/sys/mips/conf/XLPN32 @@ -20,7 +20,6 @@ machine mips mipsn32eb ident XLPN32 -options ISA_MIPS64 makeoptions ARCH_FLAGS="-march=mips64 -mabi=n32" makeoptions KERNLOADADDR=0x80100000 diff --git a/sys/mips/conf/XLR b/sys/mips/conf/XLR index 16845f46220b..a13235ffef12 100644 --- a/sys/mips/conf/XLR +++ b/sys/mips/conf/XLR @@ -53,7 +53,6 @@ makeoptions MODULES_OVERRIDE="" makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols makeoptions KERNLOADADDR=0x80100000 #profile 2 -options ISA_MIPS32 options SCHED_ULE # ULE scheduler #options VERBOSE_SYSINIT diff --git a/sys/mips/conf/XLR64 b/sys/mips/conf/XLR64 index aa3c1b392075..66162451a17b 100644 --- a/sys/mips/conf/XLR64 +++ b/sys/mips/conf/XLR64 @@ -26,8 +26,6 @@ makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols makeoptions ARCH_FLAGS="-march=mips64 -mabi=64" makeoptions KERNLOADADDR=0xffffffff80100000 -options ISA_MIPS64 - #profile 2 options SCHED_ULE # ULE scheduler diff --git a/sys/mips/conf/XLRN32 b/sys/mips/conf/XLRN32 index eecab94e781a..6b733cdf16a0 100644 --- a/sys/mips/conf/XLRN32 +++ b/sys/mips/conf/XLRN32 @@ -26,7 +26,6 @@ makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols makeoptions ARCH_FLAGS="-march=mips64 -mabi=n32" makeoptions KERNLOADADDR=0x80100000 -options ISA_MIPS64 #profile 2 options SCHED_ULE # ULE scheduler diff --git a/sys/mips/idt/std.idt b/sys/mips/idt/std.idt index 83eba1ff21ee..5457c276a434 100644 --- a/sys/mips/idt/std.idt +++ b/sys/mips/idt/std.idt @@ -4,4 +4,3 @@ files "../idt/files.idt" machine mips mipsel -options ISA_MIPS32 diff --git a/sys/mips/include/_bus.h b/sys/mips/include/_bus.h index 1eaf6fad7e36..b7018021148a 100644 --- a/sys/mips/include/_bus.h +++ b/sys/mips/include/_bus.h @@ -31,10 +31,10 @@ #ifndef MIPS_INCLUDE__BUS_H #define MIPS_INCLUDE__BUS_H + /* * Bus address and size types */ -#include "opt_cputype.h" #if defined(CPU_CNMIPS) && !defined(__mips_n64) typedef uint64_t bus_addr_t; #else diff --git a/sys/mips/malta/std.malta b/sys/mips/malta/std.malta index 2003ff1e08b5..0b74136f0779 100644 --- a/sys/mips/malta/std.malta +++ b/sys/mips/malta/std.malta @@ -2,7 +2,6 @@ files "../malta/files.malta" cpu CPU_MIPS4KC -#options ISA_MIPS32 device pci device ata options ATA_CAM diff --git a/sys/mips/mips/bus_space_generic.c b/sys/mips/mips/bus_space_generic.c index 84127256389c..14f611ffe529 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 6483319967cb..94231798374e 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 98014b17f3b0..823391cf9331 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 23016ffe7075..da13ca45c866 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 d9ace8a6dd55..34cf56480523 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 2fc4afe4633c..dfdf70f2cab1 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 000000000000..6548bed6d7e8 --- /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 d1782418824b..8a9fabe3801c 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 3366d8247441..6a7180a128a8 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 98bc7fe33ee6..6f355f63ce37 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 8c43f246f4ef..3487a9dec9c2 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 d344b1b5ade0..50f4f24ead34 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 472738ef3e62..76a520f040d1 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> diff --git a/sys/mips/nlm/tick.c b/sys/mips/nlm/tick.c index 874a2526c5b8..09f3bb67997b 100644 --- a/sys/mips/nlm/tick.c +++ b/sys/mips/nlm/tick.c @@ -35,8 +35,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/rmi/tick.c b/sys/mips/rmi/tick.c index 1d5cf5692c7e..39f0a04e49b1 100644 --- a/sys/mips/rmi/tick.c +++ b/sys/mips/rmi/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/rt305x/std.rt305x b/sys/mips/rt305x/std.rt305x index 6c56e151e505..c7212a2c6d3e 100644 --- a/sys/mips/rt305x/std.rt305x +++ b/sys/mips/rt305x/std.rt305x @@ -4,5 +4,4 @@ files "../rt305x/files.rt305x" cpu CPU_MIPS4KC -options ISA_MIPS32 diff --git a/sys/mips/sentry5/std.sentry5 b/sys/mips/sentry5/std.sentry5 index 0cf3655290a1..984de76508f4 100644 --- a/sys/mips/sentry5/std.sentry5 +++ b/sys/mips/sentry5/std.sentry5 @@ -4,7 +4,6 @@ machine mips mipsel cpu CPU_MIPS4KC -options ISA_MIPS32 options CPU_SENTRY5 # XXX should this be a # sub-cpu option? files "../sentry5/files.sentry5" |