svn commit: r357455 - in head: lib/libkvm sys sys/cam sys/cddl/compat/opensolaris/sys sys/cddl/contrib/opensolaris/common/lz4 sys/cddl/contrib/opensolaris/uts/common/sys sys/conf sys/contrib/ck/inc...

Warner Losh imp at FreeBSD.org
Mon Feb 3 17:35:19 UTC 2020


Author: imp
Date: Mon Feb  3 17:35:11 2020
New Revision: 357455
URL: https://svnweb.freebsd.org/changeset/base/357455

Log:
  Remove sparc64 kernel support
  
  Remove all sparc64 specific files
  Remove all sparc64 ifdefs
  Removee indireeect sparc64 ifdefs

Deleted:
  head/sys/conf/Makefile.sparc64
  head/sys/conf/files.sparc64
  head/sys/conf/ldscript.sparc64
  head/sys/conf/options.sparc64
  head/sys/dev/atkbdc/atkbdc_ebus.c
  head/sys/dev/auxio/auxio.c
  head/sys/dev/auxio/auxioreg.h
  head/sys/dev/esp/esp_sbus.c
  head/sys/dev/fb/creator.c
  head/sys/dev/fb/creator_vt.c
  head/sys/dev/fb/creatorreg.h
  head/sys/dev/fb/machfb.c
  head/sys/dev/fb/machfbreg.h
  head/sys/dev/gem/if_gem_sbus.c
  head/sys/dev/hme/if_hme_sbus.c
  head/sys/dev/hwpmc/hwpmc_sparc64.c
  head/sys/dev/isp/isp_sbus.c
  head/sys/dev/ispfw/asm_1000.h
  head/sys/dev/le/if_le_lebuffer.c
  head/sys/dev/le/if_le_ledma.c
  head/sys/dev/le/lebuffer_sbus.c
  head/sys/dev/pcf/envctrl.c
  head/sys/dev/pcf/pcf_ebus.c
  head/sys/dev/scc/scc_bfe_ebus.c
  head/sys/dev/scc/scc_bfe_sbus.c
  head/sys/dev/sound/sbus/apcdmareg.h
  head/sys/dev/sound/sbus/cs4231.c
  head/sys/dev/sound/sbus/cs4231.h
  head/sys/dev/uart/uart_bus_ebus.c
  head/sys/dev/uart/uart_cpu_sparc64.c
  head/sys/dev/uart/uart_kbd_sun.c
  head/sys/dev/uart/uart_kbd_sun.h
  head/sys/dev/uart/uart_kbd_sun_tables.h
  head/sys/modules/auxio/Makefile
  head/sys/modules/epic/Makefile
  head/sys/modules/sound/driver/audiocs/Makefile
  head/sys/sparc64/central/central.c
  head/sys/sparc64/conf/DEFAULTS
  head/sys/sparc64/conf/GENERIC
  head/sys/sparc64/conf/GENERIC-NODEBUG
  head/sys/sparc64/conf/GENERIC.hints
  head/sys/sparc64/conf/Makefile
  head/sys/sparc64/conf/NOTES
  head/sys/sparc64/ebus/ebus.c
  head/sys/sparc64/ebus/ebusreg.h
  head/sys/sparc64/ebus/epic.c
  head/sys/sparc64/fhc/clkbrd.c
  head/sys/sparc64/fhc/clkbrdreg.h
  head/sys/sparc64/fhc/fhc.c
  head/sys/sparc64/fhc/fhcreg.h
  head/sys/sparc64/include/_align.h
  head/sys/sparc64/include/_bus.h
  head/sys/sparc64/include/_inttypes.h
  head/sys/sparc64/include/_limits.h
  head/sys/sparc64/include/_stdint.h
  head/sys/sparc64/include/_types.h
  head/sys/sparc64/include/asi.h
  head/sys/sparc64/include/asm.h
  head/sys/sparc64/include/asmacros.h
  head/sys/sparc64/include/atomic.h
  head/sys/sparc64/include/bus.h
  head/sys/sparc64/include/bus_common.h
  head/sys/sparc64/include/bus_dma.h
  head/sys/sparc64/include/bus_private.h
  head/sys/sparc64/include/cache.h
  head/sys/sparc64/include/ccr.h
  head/sys/sparc64/include/clock.h
  head/sys/sparc64/include/cmt.h
  head/sys/sparc64/include/counter.h
  head/sys/sparc64/include/cpu.h
  head/sys/sparc64/include/cpufunc.h
  head/sys/sparc64/include/db_machdep.h
  head/sys/sparc64/include/dcr.h
  head/sys/sparc64/include/dump.h
  head/sys/sparc64/include/efi.h
  head/sys/sparc64/include/elf.h
  head/sys/sparc64/include/endian.h
  head/sys/sparc64/include/exec.h
  head/sys/sparc64/include/fireplane.h
  head/sys/sparc64/include/float.h
  head/sys/sparc64/include/floatingpoint.h
  head/sys/sparc64/include/fp.h
  head/sys/sparc64/include/frame.h
  head/sys/sparc64/include/fsr.h
  head/sys/sparc64/include/gdb_machdep.h
  head/sys/sparc64/include/idprom.h
  head/sys/sparc64/include/ieee.h
  head/sys/sparc64/include/ieeefp.h
  head/sys/sparc64/include/in_cksum.h
  head/sys/sparc64/include/instr.h
  head/sys/sparc64/include/intr_machdep.h
  head/sys/sparc64/include/iommureg.h
  head/sys/sparc64/include/iommuvar.h
  head/sys/sparc64/include/jbus.h
  head/sys/sparc64/include/kdb.h
  head/sys/sparc64/include/kerneldump.h
  head/sys/sparc64/include/ktr.h
  head/sys/sparc64/include/limits.h
  head/sys/sparc64/include/lsu.h
  head/sys/sparc64/include/mcntl.h
  head/sys/sparc64/include/md_var.h
  head/sys/sparc64/include/memdev.h
  head/sys/sparc64/include/metadata.h
  head/sys/sparc64/include/nexusvar.h
  head/sys/sparc64/include/ofw_machdep.h
  head/sys/sparc64/include/ofw_mem.h
  head/sys/sparc64/include/ofw_nexus.h
  head/sys/sparc64/include/param.h
  head/sys/sparc64/include/pcb.h
  head/sys/sparc64/include/pcpu.h
  head/sys/sparc64/include/pcpu_aux.h
  head/sys/sparc64/include/pmap.h
  head/sys/sparc64/include/pmc_mdep.h
  head/sys/sparc64/include/proc.h
  head/sys/sparc64/include/procctl.h
  head/sys/sparc64/include/profile.h
  head/sys/sparc64/include/pstate.h
  head/sys/sparc64/include/ptrace.h
  head/sys/sparc64/include/reg.h
  head/sys/sparc64/include/reloc.h
  head/sys/sparc64/include/resource.h
  head/sys/sparc64/include/runq.h
  head/sys/sparc64/include/sc_machdep.h
  head/sys/sparc64/include/setjmp.h
  head/sys/sparc64/include/sf_buf.h
  head/sys/sparc64/include/sigframe.h
  head/sys/sparc64/include/signal.h
  head/sys/sparc64/include/smp.h
  head/sys/sparc64/include/stack.h
  head/sys/sparc64/include/stdarg.h
  head/sys/sparc64/include/sysarch.h
  head/sys/sparc64/include/tick.h
  head/sys/sparc64/include/tlb.h
  head/sys/sparc64/include/trap.h
  head/sys/sparc64/include/tsb.h
  head/sys/sparc64/include/tstate.h
  head/sys/sparc64/include/tte.h
  head/sys/sparc64/include/ucontext.h
  head/sys/sparc64/include/upa.h
  head/sys/sparc64/include/utrap.h
  head/sys/sparc64/include/vdso.h
  head/sys/sparc64/include/ver.h
  head/sys/sparc64/include/vm.h
  head/sys/sparc64/include/vmparam.h
  head/sys/sparc64/include/watch.h
  head/sys/sparc64/include/wstate.h
  head/sys/sparc64/isa/isa.c
  head/sys/sparc64/isa/isa_dma.c
  head/sys/sparc64/isa/ofw_isa.c
  head/sys/sparc64/isa/ofw_isa.h
  head/sys/sparc64/pci/apb.c
  head/sys/sparc64/pci/fire.c
  head/sys/sparc64/pci/firereg.h
  head/sys/sparc64/pci/firevar.h
  head/sys/sparc64/pci/ofw_pci.c
  head/sys/sparc64/pci/ofw_pci.h
  head/sys/sparc64/pci/ofw_pci_if.m
  head/sys/sparc64/pci/ofw_pcib.c
  head/sys/sparc64/pci/ofw_pcib_subr.c
  head/sys/sparc64/pci/ofw_pcib_subr.h
  head/sys/sparc64/pci/ofw_pcibus.c
  head/sys/sparc64/pci/psycho.c
  head/sys/sparc64/pci/psychoreg.h
  head/sys/sparc64/pci/psychovar.h
  head/sys/sparc64/pci/sbbc.c
  head/sys/sparc64/pci/schizo.c
  head/sys/sparc64/pci/schizoreg.h
  head/sys/sparc64/pci/schizovar.h
  head/sys/sparc64/sbus/dma_sbus.c
  head/sys/sparc64/sbus/lsi64854.c
  head/sys/sparc64/sbus/lsi64854reg.h
  head/sys/sparc64/sbus/lsi64854var.h
  head/sys/sparc64/sbus/ofw_sbus.h
  head/sys/sparc64/sbus/sbus.c
  head/sys/sparc64/sbus/sbusreg.h
  head/sys/sparc64/sbus/sbusvar.h
  head/sys/sparc64/sparc64/ata_machdep.c
  head/sys/sparc64/sparc64/autoconf.c
  head/sys/sparc64/sparc64/bus_machdep.c
  head/sys/sparc64/sparc64/cache.c
  head/sys/sparc64/sparc64/cam_machdep.c
  head/sys/sparc64/sparc64/cheetah.c
  head/sys/sparc64/sparc64/clock.c
  head/sys/sparc64/sparc64/counter.c
  head/sys/sparc64/sparc64/db_disasm.c
  head/sys/sparc64/sparc64/db_hwwatch.c
  head/sys/sparc64/sparc64/db_interface.c
  head/sys/sparc64/sparc64/db_trace.c
  head/sys/sparc64/sparc64/dump_machdep.c
  head/sys/sparc64/sparc64/eeprom.c
  head/sys/sparc64/sparc64/elf_machdep.c
  head/sys/sparc64/sparc64/exception.S
  head/sys/sparc64/sparc64/gdb_machdep.c
  head/sys/sparc64/sparc64/genassym.c
  head/sys/sparc64/sparc64/identcpu.c
  head/sys/sparc64/sparc64/in_cksum.c
  head/sys/sparc64/sparc64/interrupt.S
  head/sys/sparc64/sparc64/intr_machdep.c
  head/sys/sparc64/sparc64/iommu.c
  head/sys/sparc64/sparc64/jbusppm.c
  head/sys/sparc64/sparc64/locore.S
  head/sys/sparc64/sparc64/machdep.c
  head/sys/sparc64/sparc64/mem.c
  head/sys/sparc64/sparc64/mp_exception.S
  head/sys/sparc64/sparc64/mp_locore.S
  head/sys/sparc64/sparc64/mp_machdep.c
  head/sys/sparc64/sparc64/nexus.c
  head/sys/sparc64/sparc64/ofw_machdep.c
  head/sys/sparc64/sparc64/pmap.c
  head/sys/sparc64/sparc64/prof_machdep.c
  head/sys/sparc64/sparc64/rtc.c
  head/sys/sparc64/sparc64/rwindow.c
  head/sys/sparc64/sparc64/sc_machdep.c
  head/sys/sparc64/sparc64/schppm.c
  head/sys/sparc64/sparc64/spitfire.c
  head/sys/sparc64/sparc64/ssm.c
  head/sys/sparc64/sparc64/stack_machdep.c
  head/sys/sparc64/sparc64/support.S
  head/sys/sparc64/sparc64/swtch.S
  head/sys/sparc64/sparc64/sys_machdep.c
  head/sys/sparc64/sparc64/tick.c
  head/sys/sparc64/sparc64/tlb.c
  head/sys/sparc64/sparc64/trap.c
  head/sys/sparc64/sparc64/tsb.c
  head/sys/sparc64/sparc64/uio_machdep.c
  head/sys/sparc64/sparc64/upa.c
  head/sys/sparc64/sparc64/vm_machdep.c
  head/sys/sparc64/sparc64/zeus.c
Modified:
  head/lib/libkvm/Makefile
  head/sys/Makefile
  head/sys/cam/cam_xpt.c
  head/sys/cddl/compat/opensolaris/sys/atomic.h
  head/sys/cddl/contrib/opensolaris/common/lz4/lz4.c
  head/sys/cddl/contrib/opensolaris/uts/common/sys/asm_linkage.h
  head/sys/conf/NOTES
  head/sys/conf/files
  head/sys/conf/kern.mk
  head/sys/conf/kern.opts.mk
  head/sys/contrib/ck/include/ck_md.h
  head/sys/dev/ata/ata-pci.c
  head/sys/dev/ata/chipsets/ata-promise.c
  head/sys/dev/atkbdc/atkbd.c
  head/sys/dev/atkbdc/atkbdc.c
  head/sys/dev/bge/if_bge.c
  head/sys/dev/cas/if_cas.c
  head/sys/dev/dc/if_dc.c
  head/sys/dev/fb/fbreg.h
  head/sys/dev/firewire/sbp.c
  head/sys/dev/gem/if_gem_pci.c
  head/sys/dev/hme/if_hme_pci.c
  head/sys/dev/isp/isp_freebsd.h
  head/sys/dev/isp/isp_pci.c
  head/sys/dev/ispfw/ispfw.c
  head/sys/dev/mpt/mpt.h
  head/sys/dev/mpt/mpt_pci.c
  head/sys/dev/mthca/mthca_srq.c
  head/sys/dev/mxge/if_mxge_var.h
  head/sys/dev/ofw/openfirm.h
  head/sys/dev/proto/proto_core.c
  head/sys/dev/sfxge/common/efsys.h
  head/sys/dev/sound/pci/t4dwave.c
  head/sys/dev/sym/sym_hipd.c
  head/sys/dev/syscons/scgfbrndr.c
  head/sys/dev/syscons/schistory.c
  head/sys/dev/syscons/scterm-dumb.c
  head/sys/dev/syscons/scterm-sc.c
  head/sys/dev/syscons/scterm-teken.c
  head/sys/dev/syscons/scvtb.c
  head/sys/dev/syscons/syscons.c
  head/sys/dev/syscons/syscons.h
  head/sys/dev/vt/hw/fb/vt_early_fb.c
  head/sys/dev/vt/hw/ofwfb/ofwfb.c
  head/sys/kern/kern_exit.c
  head/sys/kern/kern_malloc.c
  head/sys/kern/subr_param.c
  head/sys/kern/subr_uio.c
  head/sys/kern/subr_witness.c
  head/sys/modules/Makefile
  head/sys/modules/bge/Makefile
  head/sys/modules/cas/Makefile
  head/sys/modules/esp/Makefile
  head/sys/modules/gem/Makefile
  head/sys/modules/hme/Makefile
  head/sys/modules/hwpmc/Makefile
  head/sys/modules/i2c/controllers/pcf/Makefile
  head/sys/modules/isp/Makefile
  head/sys/modules/ispfw/Makefile
  head/sys/modules/le/Makefile
  head/sys/modules/scc/Makefile
  head/sys/modules/sound/driver/Makefile
  head/sys/modules/syscons/Makefile
  head/sys/modules/uart/Makefile
  head/sys/sys/linker.h
  head/sys/vm/vm_kern.c

Modified: head/lib/libkvm/Makefile
==============================================================================
--- head/lib/libkvm/Makefile	Mon Feb  3 17:34:57 2020	(r357454)
+++ head/lib/libkvm/Makefile	Mon Feb  3 17:35:11 2020	(r357455)
@@ -19,8 +19,7 @@ SRCS=	kvm.c kvm_cptime.c kvm_getloadavg.c \
 	kvm_minidump_mips.c \
 	kvm_powerpc.c kvm_powerpc64.c \
 	kvm_minidump_riscv.c \
-	kvm_minidump_powerpc64.c kvm_minidump_powerpc64_hpt.c \
-	kvm_sparc64.c
+	kvm_minidump_powerpc64.c kvm_minidump_powerpc64_hpt.c
 INCS=	kvm.h
 
 LIBADD=	elf

Modified: head/sys/Makefile
==============================================================================
--- head/sys/Makefile	Mon Feb  3 17:34:57 2020	(r357454)
+++ head/sys/Makefile	Mon Feb  3 17:35:11 2020	(r357455)
@@ -8,7 +8,7 @@ CSCOPEDIRS=	bsm cam cddl compat conf contrib crypto dd
 		rpc security sys ufs vm xdr xen ${CSCOPE_ARCHDIR}
 .if !defined(CSCOPE_ARCHDIR)
 .if defined(ALL_ARCH)
-CSCOPE_ARCHDIR = amd64 arm arm64 i386 mips powerpc riscv sparc64 x86
+CSCOPE_ARCHDIR = amd64 arm arm64 i386 mips powerpc riscv x86
 .else
 CSCOPE_ARCHDIR = ${MACHINE}
 .if ${MACHINE} != ${MACHINE_CPUARCH}

Modified: head/sys/cam/cam_xpt.c
==============================================================================
--- head/sys/cam/cam_xpt.c	Mon Feb  3 17:34:57 2020	(r357454)
+++ head/sys/cam/cam_xpt.c	Mon Feb  3 17:35:11 2020	(r357455)
@@ -2716,17 +2716,6 @@ xpt_action_default(union ccb *start_ccb)
 			start_ccb->ccb_h.status = CAM_REQ_CMP;
 			break;
 		}
-#if defined(__sparc64__)
-		/*
-		 * For sparc64, we may need adjust the geometry of large
-		 * disks in order to fit the limitations of the 16-bit
-		 * fields of the VTOC8 disk label.
-		 */
-		if (scsi_da_bios_params(&start_ccb->ccg) != 0) {
-			start_ccb->ccb_h.status = CAM_REQ_CMP;
-			break;
-		}
-#endif
 		goto call_sim;
 	case XPT_ABORT:
 	{

Modified: head/sys/cddl/compat/opensolaris/sys/atomic.h
==============================================================================
--- head/sys/cddl/compat/opensolaris/sys/atomic.h	Mon Feb  3 17:34:57 2020	(r357454)
+++ head/sys/cddl/compat/opensolaris/sys/atomic.h	Mon Feb  3 17:35:11 2020	(r357455)
@@ -91,7 +91,6 @@ atomic_dec_32_nv(volatile uint32_t *target)
 	return (atomic_add_32_nv(target, -1));
 }
 
-#ifndef __sparc64__
 static inline uint32_t
 atomic_cas_32(volatile uint32_t *target, uint32_t cmp, uint32_t newval)
 {
@@ -107,7 +106,6 @@ atomic_cas_32(volatile uint32_t *target, uint32_t cmp,
 #endif
 	return (cmp);
 }
-#endif
 
 #if defined(__LP64__) || defined(__mips_n32) || \
     defined(ARM_HAVE_ATOMIC64) || defined(I386_HAVE_ATOMIC64) || \
@@ -124,7 +122,6 @@ atomic_add_64_nv(volatile uint64_t *target, int64_t de
 	return (atomic_fetchadd_64(target, delta) + delta);
 }
 
-#ifndef __sparc64__
 static inline uint64_t
 atomic_cas_64(volatile uint64_t *target, uint64_t cmp, uint64_t newval)
 {
@@ -140,7 +137,6 @@ atomic_cas_64(volatile uint64_t *target, uint64_t cmp,
 #endif
 	return (cmp);
 }
-#endif
 #endif
 
 static __inline void

Modified: head/sys/cddl/contrib/opensolaris/common/lz4/lz4.c
==============================================================================
--- head/sys/cddl/contrib/opensolaris/common/lz4/lz4.c	Mon Feb  3 17:34:57 2020	(r357454)
+++ head/sys/cddl/contrib/opensolaris/common/lz4/lz4.c	Mon Feb  3 17:35:11 2020	(r357455)
@@ -246,16 +246,6 @@ lz4_decompress(void *s_start, void *d_start, size_t s_
 #endif
 
 /*
- * FreeBSD: can't use GCC's __builtin_ctz when using sparc64 because
- * gcc currently rely on libcompiler_rt.
- *
- * TODO: revisit this when situation changes.
- */
-#if defined(__sparc64__)
-#define	LZ4_FORCE_SW_BITCOUNT
-#endif
-
-/*
  * Compiler Options
  */
 #if __STDC_VERSION__ >= 199901L	/* C99 */

Modified: head/sys/cddl/contrib/opensolaris/uts/common/sys/asm_linkage.h
==============================================================================
--- head/sys/cddl/contrib/opensolaris/uts/common/sys/asm_linkage.h	Mon Feb  3 17:34:57 2020	(r357454)
+++ head/sys/cddl/contrib/opensolaris/uts/common/sys/asm_linkage.h	Mon Feb  3 17:35:11 2020	(r357455)
@@ -41,11 +41,6 @@ extern "C" {
 
 #define	ASM_ENTRY_ALIGN	16
 
-#elif defined(__sparc64__)
-
-/* GCC uses 32-byte function alignment for UltraSPARC CPUs. */
-#define	ASM_ENTRY_ALIGN	32
-
 #else
 
 #error Unsupported architecture.

Modified: head/sys/conf/NOTES
==============================================================================
--- head/sys/conf/NOTES	Mon Feb  3 17:34:57 2020	(r357454)
+++ head/sys/conf/NOTES	Mon Feb  3 17:35:11 2020	(r357455)
@@ -2045,8 +2045,6 @@ device		sound
 # snd_ad1816:		Analog Devices AD1816 ISA PnP/non-PnP.
 # snd_als4000:		Avance Logic ALS4000 PCI.
 # snd_atiixp:		ATI IXP 200/300/400 PCI.
-# snd_audiocs:		Crystal Semiconductor CS4231 SBus/EBus. Only
-#			for sparc64.
 # snd_cmi:		CMedia CMI8338/CMI8738 PCI.
 # snd_cs4281:		Crystal Semiconductor CS4281 PCI.
 # snd_csa:		Crystal Semiconductor CS461x/428x PCI. (except
@@ -2089,7 +2087,6 @@ device		sound
 device		snd_ad1816
 device		snd_als4000
 device		snd_atiixp
-#device		snd_audiocs
 device		snd_cmi
 device		snd_cs4281
 device		snd_csa

Modified: head/sys/conf/files
==============================================================================
--- head/sys/conf/files	Mon Feb  3 17:34:57 2020	(r357454)
+++ head/sys/conf/files	Mon Feb  3 17:35:11 2020	(r357455)
@@ -1743,7 +1743,6 @@ dev/fxp/if_fxp.c		optional fxp
 dev/fxp/inphy.c			optional fxp
 dev/gem/if_gem.c		optional gem
 dev/gem/if_gem_pci.c		optional gem pci
-dev/gem/if_gem_sbus.c		optional gem sbus
 dev/gpio/dwgpio/dwgpio.c	optional gpio dwgpio fdt
 dev/gpio/dwgpio/dwgpio_bus.c	optional gpio dwgpio fdt
 dev/gpio/dwgpio/dwgpio_if.m	optional gpio dwgpio fdt
@@ -1769,7 +1768,6 @@ dev/gpio/ofw_gpiobus.c		optional fdt gpio
 dev/hifn/hifn7751.c		optional hifn
 dev/hme/if_hme.c		optional hme
 dev/hme/if_hme_pci.c		optional hme pci
-dev/hme/if_hme_sbus.c		optional hme sbus
 dev/hptiop/hptiop.c		optional hptiop scbus
 dev/hwpmc/hwpmc_logging.c	optional hwpmc
 dev/hwpmc/hwpmc_mod.c		optional hwpmc
@@ -1885,7 +1883,6 @@ dev/isp/isp.c			optional isp
 dev/isp/isp_freebsd.c		optional isp
 dev/isp/isp_library.c		optional isp
 dev/isp/isp_pci.c		optional isp pci
-dev/isp/isp_sbus.c		optional isp sbus
 dev/isp/isp_target.c		optional isp
 dev/ispfw/ispfw.c		optional ispfw
 dev/iwi/if_iwi.c		optional iwi
@@ -3009,9 +3006,7 @@ rtwn-rtl8821aufw.fw		optional rtwn-rtl8821aufw | rtwnf
 	clean		"rtwn-rtl8821aufw.fw"
 dev/safe/safe.c			optional safe
 dev/scc/scc_if.m		optional scc
-dev/scc/scc_bfe_ebus.c		optional scc ebus
 dev/scc/scc_bfe_quicc.c		optional scc quicc
-dev/scc/scc_bfe_sbus.c		optional scc fhc | scc sbus
 dev/scc/scc_core.c		optional scc
 dev/scc/scc_dev_quicc.c		optional scc quicc
 dev/scc/scc_dev_sab82532.c	optional scc
@@ -3171,7 +3166,6 @@ dev/tws/tws_hdm.c		optional tws
 dev/tws/tws_services.c		optional tws
 dev/tws/tws_user.c		optional tws
 dev/uart/uart_bus_acpi.c	optional uart acpi
-dev/uart/uart_bus_ebus.c	optional uart ebus
 dev/uart/uart_bus_fdt.c		optional uart fdt
 dev/uart/uart_bus_isa.c		optional uart isa
 dev/uart/uart_bus_pccard.c	optional uart pccard

Modified: head/sys/conf/kern.mk
==============================================================================
--- head/sys/conf/kern.mk	Mon Feb  3 17:34:57 2020	(r357454)
+++ head/sys/conf/kern.mk	Mon Feb  3 17:35:11 2020	(r357455)
@@ -154,18 +154,6 @@ CFLAGS+=	-mno-relax
 .endif
 
 #
-# For sparc64 we want the medany code model so modules may be located
-# anywhere in the 64-bit address space.  We also tell GCC to use floating
-# point emulation.  This avoids using floating point registers for integer
-# operations which it has a tendency to do.
-#
-.if ${MACHINE_CPUARCH} == "sparc64"
-CFLAGS.clang+=	-mcmodel=large -fno-dwarf2-cfi-asm
-CFLAGS.gcc+=	-mcmodel=medany -msoft-float
-INLINE_LIMIT?=	15000
-.endif
-
-#
 # For AMD64, we explicitly prohibit the use of FPU, SSE and other SIMD
 # operations inside the kernel itself.  These operations are exclusively
 # reserved for user applications.
@@ -315,5 +303,4 @@ LD_EMULATION_powerpc= elf32ppc_fbsd
 LD_EMULATION_powerpcspe= elf32ppc_fbsd
 LD_EMULATION_powerpc64= elf64ppc_fbsd
 LD_EMULATION_riscv64= elf64lriscv
-LD_EMULATION_sparc64= elf64_sparc_fbsd
 LD_EMULATION=${LD_EMULATION_${MACHINE_ARCH}}

Modified: head/sys/conf/kern.opts.mk
==============================================================================
--- head/sys/conf/kern.opts.mk	Mon Feb  3 17:34:57 2020	(r357454)
+++ head/sys/conf/kern.opts.mk	Mon Feb  3 17:35:11 2020	(r357455)
@@ -93,8 +93,8 @@ BROKEN_OPTIONS+= OFED
 BROKEN_OPTIONS+= KERNEL_RETPOLINE
 .endif
 
-# EFI doesn't exist on mips, powerpc, sparc or riscv.
-.if ${MACHINE:Mmips} || ${MACHINE:Mpowerpc} || ${MACHINE:Msparc64} || ${MACHINE:Mriscv}
+# EFI doesn't exist on mips, powerpc, or riscv.
+.if ${MACHINE:Mmips} || ${MACHINE:Mpowerpc} || ${MACHINE:Mriscv}
 BROKEN_OPTIONS+=EFI
 .endif
 

Modified: head/sys/contrib/ck/include/ck_md.h
==============================================================================
--- head/sys/contrib/ck/include/ck_md.h	Mon Feb  3 17:34:57 2020	(r357454)
+++ head/sys/contrib/ck/include/ck_md.h	Mon Feb  3 17:35:11 2020	(r357455)
@@ -114,9 +114,6 @@ net $
 #define CK_MD_SSE_DISABLE 1
 #elif defined(__amd64__)
 #define CK_MD_TSO
-#elif defined(__sparc64__) && !defined(__sparcv9__)
-#define __sparcv9__
-#define CK_MD_TSO
 #elif defined(__powerpc64__) && !defined(__ppc64__)
 #define __ppc64__
 #elif defined(__powerpc__) && !defined(__ppc__)

Modified: head/sys/dev/ata/ata-pci.c
==============================================================================
--- head/sys/dev/ata/ata-pci.c	Mon Feb  3 17:34:57 2020	(r357454)
+++ head/sys/dev/ata/ata-pci.c	Mon Feb  3 17:35:11 2020	(r357455)
@@ -147,17 +147,9 @@ ata_pci_detach(device_t dev)
     if (ctlr->chipdeinit != NULL)
 	ctlr->chipdeinit(dev);
     if (ctlr->r_res2) {
-#ifdef __sparc64__
-	bus_space_unmap(rman_get_bustag(ctlr->r_res2),
-	    rman_get_bushandle(ctlr->r_res2), rman_get_size(ctlr->r_res2));
-#endif
 	bus_release_resource(dev, ctlr->r_type2, ctlr->r_rid2, ctlr->r_res2);
     }
     if (ctlr->r_res1) {
-#ifdef __sparc64__
-	bus_space_unmap(rman_get_bustag(ctlr->r_res1),
-	    rman_get_bushandle(ctlr->r_res1), rman_get_size(ctlr->r_res1));
-#endif
 	bus_release_resource(dev, ctlr->r_type1, ctlr->r_rid1, ctlr->r_res1);
     }
 

Modified: head/sys/dev/ata/chipsets/ata-promise.c
==============================================================================
--- head/sys/dev/ata/chipsets/ata-promise.c	Mon Feb  3 17:34:57 2020	(r357454)
+++ head/sys/dev/ata/chipsets/ata-promise.c	Mon Feb  3 17:35:11 2020	(r357455)
@@ -250,14 +250,6 @@ ata_promise_chipinit(device_t dev)
 						    &ctlr->r_rid1, RF_ACTIVE)))
 	    goto failnfree;
 
-#ifdef __sparc64__
-	if (ctlr->chip->cfg2 == PR_SX4X &&
-	    !bus_space_map(rman_get_bustag(ctlr->r_res1),
-	    rman_get_bushandle(ctlr->r_res1), rman_get_size(ctlr->r_res1),
-	    BUS_SPACE_MAP_LINEAR, NULL))
-		goto failnfree;
-#endif
-
 	ctlr->r_type2 = SYS_RES_MEMORY;
 	ctlr->r_rid2 = PCIR_BAR(3);
 	if (!(ctlr->r_res2 = bus_alloc_resource_any(dev, ctlr->r_type2,

Modified: head/sys/dev/atkbdc/atkbd.c
==============================================================================
--- head/sys/dev/atkbdc/atkbd.c	Mon Feb  3 17:34:57 2020	(r357454)
+++ head/sys/dev/atkbdc/atkbd.c	Mon Feb  3 17:35:11 2020	(r357455)
@@ -74,7 +74,6 @@ typedef struct atkbd_state {
 } atkbd_state_t;
 
 static void		atkbd_timeout(void *arg);
-static void		atkbd_shutdown_final(void *v);
 static int		atkbd_reset(KBDC kbdc, int flags, int c);
 
 #define HAS_QUIRK(p, q)		(((atkbdc_softc_t *)(p))->quirks & q)
@@ -151,9 +150,6 @@ atkbd_attach_unit(device_t dev, keyboard_t **kbd, int 
 	if (bootverbose)
 		(*sw->diag)(*kbd, bootverbose);
 
-	EVENTHANDLER_REGISTER(shutdown_final, atkbd_shutdown_final, *kbd,
-	    SHUTDOWN_PRI_DEFAULT);
-
 	return 0;
 }
 
@@ -1148,30 +1144,6 @@ atkbd_poll(keyboard_t *kbd, int on)
 	return 0;
 }
 
-static void
-atkbd_shutdown_final(void *v)
-{
-#ifdef __sparc64__
-	keyboard_t *kbd = v;
-	KBDC kbdc = ((atkbd_state_t *)kbd->kb_data)->kbdc;
-
-	/*
-	 * Turn off the translation in preparation for handing the keyboard
-	 * over to the OFW as the OBP driver doesn't use translation and
-	 * also doesn't disable it itself resulting in a broken keymap at
-	 * the boot prompt. Also disable the aux port and the interrupts as
-	 * the OBP driver doesn't use them, i.e. polls the keyboard. Not
-	 * disabling the interrupts doesn't cause real problems but the
-	 * responsiveness is a bit better when they are turned off.
-	 */
-	send_kbd_command(kbdc, KBDC_DISABLE_KBD);
-	set_controller_command_byte(kbdc,
-	    KBD_AUX_CONTROL_BITS | KBD_KBD_CONTROL_BITS | KBD_TRANSLATION,
-	    KBD_DISABLE_AUX_PORT | KBD_DISABLE_KBD_INT | KBD_ENABLE_KBD_PORT);
-	send_kbd_command(kbdc, KBDC_ENABLE_KBD);
-#endif
-}
-
 static int
 atkbd_reset(KBDC kbdc, int flags, int c)
 {
@@ -1467,14 +1439,6 @@ init_keyboard(KBDC kbdc, int *type, int flags)
 			return EIO;
 		}
 	}
-
-#if defined(__sparc64__)
-	if (send_kbd_command_and_data(
-		kbdc, KBDC_SET_SCANCODE_SET, 2) != KBD_ACK) {
-		printf("atkbd: can't set translation.\n");
-	}
-	c |= KBD_TRANSLATION;
-#endif
 
 	/*
 	 * Some keyboards require a SETLEDS command to be sent after

Modified: head/sys/dev/atkbdc/atkbdc.c
==============================================================================
--- head/sys/dev/atkbdc/atkbdc.c	Mon Feb  3 17:34:57 2020	(r357454)
+++ head/sys/dev/atkbdc/atkbdc.c	Mon Feb  3 17:35:11 2020	(r357455)
@@ -52,13 +52,7 @@ __FBSDID("$FreeBSD$");
 
 #include <dev/atkbdc/atkbdcreg.h>
 
-#ifdef __sparc64__
-#include <dev/ofw/openfirm.h>
-#include <machine/bus_private.h>
-#include <machine/ofw_machdep.h>
-#else
 #include <isa/isareg.h>
-#endif
 
 /* constants */
 
@@ -98,10 +92,6 @@ static atkbdc_softc_t *atkbdc_softc[MAXKBDC] = { &defa
 
 static int verbose = KBDIO_DEBUG;
 
-#ifdef __sparc64__
-static struct bus_space_tag atkbdc_bst_store[MAXKBDC];
-#endif
-
 /* function prototypes */
 
 static int atkbdc_setup(atkbdc_softc_t *sc, bus_space_tag_t tag,
@@ -197,55 +187,16 @@ atkbdc_configure(void)
 	volatile int i;
 	register_t flags;
 #endif
-#ifdef __sparc64__
-	char name[32];
-	phandle_t chosen, node;
-	ihandle_t stdin;
-	bus_addr_t port0;
-	bus_addr_t port1;
-	int space;
-#else
 	int port0;
 	int port1;
-#endif
 
 	/* XXX: tag should be passed from the caller */
 #if defined(__amd64__) || defined(__i386__)
 	tag = X86_BUS_SPACE_IO;
-#elif defined(__sparc64__)
-	tag = &atkbdc_bst_store[0];
 #else
 #error "define tag!"
 #endif
 
-#ifdef __sparc64__
-	if ((chosen = OF_finddevice("/chosen")) == -1)
-		return 0;
-	if (OF_getprop(chosen, "stdin", &stdin, sizeof(stdin)) == -1)
-		return 0;
-	if ((node = OF_instance_to_package(stdin)) == -1)
-		return 0;
-	if (OF_getprop(node, "name", name, sizeof(name)) == -1)
-		return 0;
-	name[sizeof(name) - 1] = '\0';
-	if (strcmp(name, "kb_ps2") != 0)
-		return 0;
-	/*
-	 * The stdin handle points to an instance of a PS/2 keyboard
-	 * package but we want the 8042 controller, which is the parent
-	 * of that keyboard node.
-	 */
-	if ((node = OF_parent(node)) == 0)
-		return 0;
-	if (OF_decode_addr(node, 0, &space, &port0) != 0)
-		return 0;
-	h0 = sparc64_fake_bustag(space, port0, tag);
-	bus_space_subregion(tag, h0, KBD_DATA_PORT, 1, &h0);
-	if (OF_decode_addr(node, 1, &space, &port1) != 0)
-		return 0;
-	h1 = sparc64_fake_bustag(space, port1, tag);
-	bus_space_subregion(tag, h1, KBD_STATUS_PORT, 1, &h1);
-#else
 	port0 = IO_KBD;
 	resource_int_value("atkbdc", 0, "port", &port0);
 	port1 = IO_KBD + KBD_STATUS_PORT;
@@ -255,7 +206,6 @@ atkbdc_configure(void)
 #else
 	h0 = (bus_space_handle_t)port0;
 	h1 = (bus_space_handle_t)port1;
-#endif
 #endif
 
 #if defined(__i386__) || defined(__amd64__)

Modified: head/sys/dev/bge/if_bge.c
==============================================================================
--- head/sys/dev/bge/if_bge.c	Mon Feb  3 17:34:57 2020	(r357454)
+++ head/sys/dev/bge/if_bge.c	Mon Feb  3 17:35:11 2020	(r357455)
@@ -112,13 +112,6 @@ __FBSDID("$FreeBSD$");
 #include "miidevs.h"
 #include <dev/mii/brgphyreg.h>
 
-#ifdef __sparc64__
-#include <dev/ofw/ofw_bus.h>
-#include <dev/ofw/openfirm.h>
-#include <machine/ofw_machdep.h>
-#include <machine/ver.h>
-#endif
-
 #include <dev/pci/pcireg.h>
 #include <dev/pci/pcivar.h>
 
@@ -557,47 +550,9 @@ static SYSCTL_NODE(_hw, OID_AUTO, bge, CTLFLAG_RD, 0, 
 SYSCTL_INT(_hw_bge, OID_AUTO, allow_asf, CTLFLAG_RDTUN, &bge_allow_asf, 0,
 	"Allow ASF mode if available");
 
-#define	SPARC64_BLADE_1500_MODEL	"SUNW,Sun-Blade-1500"
-#define	SPARC64_BLADE_1500_PATH_BGE	"/pci at 1f,700000/network at 2"
-#define	SPARC64_BLADE_2500_MODEL	"SUNW,Sun-Blade-2500"
-#define	SPARC64_BLADE_2500_PATH_BGE	"/pci at 1c,600000/network at 3"
-#define	SPARC64_OFW_SUBVENDOR		"subsystem-vendor-id"
-
 static int
 bge_has_eaddr(struct bge_softc *sc)
 {
-#ifdef __sparc64__
-	char buf[sizeof(SPARC64_BLADE_1500_PATH_BGE)];
-	device_t dev;
-	uint32_t subvendor;
-
-	dev = sc->bge_dev;
-
-	/*
-	 * The on-board BGEs found in sun4u machines aren't fitted with
-	 * an EEPROM which means that we have to obtain the MAC address
-	 * via OFW and that some tests will always fail.  We distinguish
-	 * such BGEs by the subvendor ID, which also has to be obtained
-	 * from OFW instead of the PCI configuration space as the latter
-	 * indicates Broadcom as the subvendor of the netboot interface.
-	 * For early Blade 1500 and 2500 we even have to check the OFW
-	 * device path as the subvendor ID always defaults to Broadcom
-	 * there.
-	 */
-	if (OF_getprop(ofw_bus_get_node(dev), SPARC64_OFW_SUBVENDOR,
-	    &subvendor, sizeof(subvendor)) == sizeof(subvendor) &&
-	    (subvendor == FJTSU_VENDORID || subvendor == SUN_VENDORID))
-		return (0);
-	memset(buf, 0, sizeof(buf));
-	if (OF_package_to_path(ofw_bus_get_node(dev), buf, sizeof(buf)) > 0) {
-		if (strcmp(sparc64_model, SPARC64_BLADE_1500_MODEL) == 0 &&
-		    strcmp(buf, SPARC64_BLADE_1500_PATH_BGE) == 0)
-			return (0);
-		if (strcmp(sparc64_model, SPARC64_BLADE_2500_MODEL) == 0 &&
-		    strcmp(buf, SPARC64_BLADE_2500_PATH_BGE) == 0)
-			return (0);
-	}
-#endif
 	return (1);
 }
 
@@ -6744,15 +6699,7 @@ bge_sysctl_mem_read(SYSCTL_HANDLER_ARGS)
 static int
 bge_get_eaddr_fw(struct bge_softc *sc, uint8_t ether_addr[])
 {
-#ifdef __sparc64__
-	if (sc->bge_flags & BGE_FLAG_EADDR)
-		return (1);
-
-	OF_getetheraddr(sc->bge_dev, ether_addr);
-	return (0);
-#else
 	return (1);
-#endif
 }
 
 static int

Modified: head/sys/dev/cas/if_cas.c
==============================================================================
--- head/sys/dev/cas/if_cas.c	Mon Feb  3 17:34:57 2020	(r357454)
+++ head/sys/dev/cas/if_cas.c	Mon Feb  3 17:35:11 2020	(r357455)
@@ -78,7 +78,7 @@ __FBSDID("$FreeBSD$");
 #include <netinet/udp.h>
 
 #include <machine/bus.h>
-#if defined(__powerpc__) || defined(__sparc64__)
+#if defined(__powerpc__)
 #include <dev/ofw/ofw_bus.h>
 #include <dev/ofw/openfirm.h>
 #include <machine/ofw_machdep.h>
@@ -1045,14 +1045,10 @@ cas_init_locked(struct cas_softc *sc)
 
 	/*
 	 * Enable infinite bursts for revisions without PCI issues if
-	 * applicable.  Doing so greatly improves the TX performance on
-	 * !__sparc64__ (on sparc64, setting CAS_INF_BURST improves TX
-	 * performance only marginally but hurts RX throughput quite a bit).
+	 * applicable.  Doing so greatly improves the TX performance.
 	 */
 	CAS_WRITE_4(sc, CAS_INF_BURST,
-#if !defined(__sparc64__)
 	    (sc->sc_flags & CAS_TABORT) == 0 ? CAS_INF_BURST_EN :
-#endif
 	    0);
 
 	/* Set up interrupts. */
@@ -2652,7 +2648,7 @@ cas_pci_attach(device_t dev)
 	char buf[sizeof(CAS_LOCAL_MAC_ADDRESS)];
 	struct cas_softc *sc;
 	int i;
-#if !(defined(__powerpc__) || defined(__sparc64__))
+#if !defined(__powerpc__)
 	u_char enaddr[4][ETHER_ADDR_LEN];
 	u_int j, k, lma, pcs[4], phy;
 #endif
@@ -2696,7 +2692,7 @@ cas_pci_attach(device_t dev)
 
 	CAS_LOCK_INIT(sc, device_get_nameunit(dev));
 
-#if defined(__powerpc__) || defined(__sparc64__)
+#if defined(__powerpc__)
 	OF_getetheraddr(dev, sc->sc_enaddr);
 	if (OF_getprop(ofw_bus_get_node(dev), CAS_PHY_INTERFACE, buf,
 	    sizeof(buf)) > 0 || OF_getprop(ofw_bus_get_node(dev),

Modified: head/sys/dev/dc/if_dc.c
==============================================================================
--- head/sys/dev/dc/if_dc.c	Mon Feb  3 17:34:57 2020	(r357454)
+++ head/sys/dev/dc/if_dc.c	Mon Feb  3 17:35:11 2020	(r357455)
@@ -135,11 +135,6 @@ __FBSDID("$FreeBSD$");
 
 #include <dev/dc/if_dcreg.h>
 
-#ifdef __sparc64__
-#include <dev/ofw/openfirm.h>
-#include <machine/ofw_machdep.h>
-#endif
-
 MODULE_DEPEND(dc, pci, 1, 1, 1);
 MODULE_DEPEND(dc, ether, 1, 1, 1);
 MODULE_DEPEND(dc, miibus, 1, 1, 1);
@@ -2293,14 +2288,6 @@ dc_attach(device_t dev)
 		break;
 	case DC_TYPE_DM9102:
 		dc_read_eeprom(sc, (caddr_t)&eaddr, DC_EE_NODEADDR, 3, 0);
-#ifdef __sparc64__
-		/*
-		 * If this is an onboard dc(4) the station address read from
-		 * the EEPROM is all zero and we have to get it from the FCode.
-		 */
-		if (eaddr[0] == 0 && (eaddr[1] & ~0xffff) == 0)
-			OF_getetheraddr(dev, (caddr_t)&eaddr);
-#endif
 		break;
 	case DC_TYPE_21143:
 	case DC_TYPE_ASIX:

Modified: head/sys/dev/fb/fbreg.h
==============================================================================
--- head/sys/dev/fb/fbreg.h	Mon Feb  3 17:34:57 2020	(r357454)
+++ head/sys/dev/fb/fbreg.h	Mon Feb  3 17:35:11 2020	(r357455)
@@ -51,13 +51,6 @@ copyw(uint16_t *src, uint16_t *dst, size_t size)
 #define bzero_io(d, c)		bzero((void *)(d), (c))
 #define fill_io(p, d, c)	fill((p), (void *)(d), (c))
 #define fillw_io(p, d, c)	fillw((p), (void *)(d), (c))
-#elif defined(__sparc64__)
-static __inline void
-fillw(int val, uint16_t *buf, size_t size)
-{
-	while (size--)
-		*buf++ = val;
-}
 #elif defined(__powerpc__)
 
 #define bcopy_io(s, d, c)	ofwfb_bcopy((void *)(s), (void *)(d), (c))
@@ -102,7 +95,7 @@ fillw(int val, uint16_t *buf, size_t size)
 #define	writew(a, v)		(*(uint16_t*)(a) = (v))
 #endif
 
-#else /* !__i386__ && !__amd64__ && !__sparc64__ && !__powerpc__ */
+#else /* !__i386__ && !__amd64__ && !__powerpc__ */
 #define bcopy_io(s, d, c)	memcpy_io((d), (s), (c))
 #define bcopy_toio(s, d, c)	memcpy_toio((d), (void *)(s), (c))
 #define bcopy_fromio(s, d, c)	memcpy_fromio((void *)(d), (s), (c))

Modified: head/sys/dev/firewire/sbp.c
==============================================================================
--- head/sys/dev/firewire/sbp.c	Mon Feb  3 17:34:57 2020	(r357454)
+++ head/sys/dev/firewire/sbp.c	Mon Feb  3 17:35:11 2020	(r357455)
@@ -134,11 +134,7 @@ SYSCTL_INT(_hw_firewire_sbp, OID_AUTO, tags, CTLFLAG_R
 #define NEED_RESPONSE 0
 
 #define SBP_SEG_MAX rounddown(0xffff, PAGE_SIZE)
-#ifdef __sparc64__ /* iommu */
-#define SBP_IND_MAX howmany(SBP_MAXPHYS, SBP_SEG_MAX)
-#else
 #define SBP_IND_MAX howmany(SBP_MAXPHYS, PAGE_SIZE)
-#endif
 struct sbp_ocb {
 	STAILQ_ENTRY(sbp_ocb)	ocb;
 	union ccb	*ccb;

Modified: head/sys/dev/gem/if_gem_pci.c
==============================================================================
--- head/sys/dev/gem/if_gem_pci.c	Mon Feb  3 17:34:57 2020	(r357454)
+++ head/sys/dev/gem/if_gem_pci.c	Mon Feb  3 17:35:11 2020	(r357455)
@@ -53,7 +53,7 @@ __FBSDID("$FreeBSD$");
 #include <net/if.h>
 
 #include <machine/bus.h>
-#if defined(__powerpc__) || defined(__sparc64__)
+#if defined(__powerpc__)
 #include <dev/ofw/ofw_bus.h>
 #include <dev/ofw/openfirm.h>
 #include <machine/ofw_machdep.h>
@@ -149,7 +149,7 @@ gem_pci_attach(device_t dev)
 {
 	struct gem_softc *sc;
 	int i;
-#if defined(__powerpc__) || defined(__sparc64__)
+#if defined(__powerpc__)
 	char buf[sizeof(GEM_SHARED_PINS)];
 #else
 	int j;
@@ -215,7 +215,7 @@ gem_pci_attach(device_t dev)
 	   GEM_PCI_BIF_CNF_M66EN) != 0)
 		sc->sc_flags |= GEM_PCI66;
 
-#if defined(__powerpc__) || defined(__sparc64__)
+#if defined(__powerpc__)
 	OF_getetheraddr(dev, sc->sc_enaddr);
 	if (OF_getprop(ofw_bus_get_node(dev), GEM_SHARED_PINS, buf,
 	    sizeof(buf)) > 0) {

Modified: head/sys/dev/hme/if_hme_pci.c
==============================================================================
--- head/sys/dev/hme/if_hme_pci.c	Mon Feb  3 17:34:57 2020	(r357454)
+++ head/sys/dev/hme/if_hme_pci.c	Mon Feb  3 17:35:11 2020	(r357455)
@@ -50,7 +50,7 @@ __FBSDID("$FreeBSD$");
 #include <sys/socket.h>
 
 #include <machine/bus.h>
-#if defined(__powerpc__) || defined(__sparc64__)
+#if defined(__powerpc__)
 #include <dev/ofw/openfirm.h>
 #include <machine/ofw_machdep.h>
 #endif
@@ -140,7 +140,7 @@ hme_pci_attach(device_t dev)
 	bus_space_tag_t	memt;
 	bus_space_handle_t memh;
 	int i, error = 0;
-#if !(defined(__powerpc__) || defined(__sparc64__))
+#if !defined(__powerpc__)
 	device_t *children, ebus_dev;
 	struct resource *ebus_rres;
 	int j, slot;
@@ -197,7 +197,7 @@ hme_pci_attach(device_t dev)
 	bus_space_subregion(memt, memh, 0x6000, 0x1000, &sc->sc_mach);
 	bus_space_subregion(memt, memh, 0x7000, 0x1000, &sc->sc_mifh);
 
-#if defined(__powerpc__) || defined(__sparc64__)
+#if defined(__powerpc__)
 	OF_getetheraddr(dev, sc->sc_enaddr);
 #else
 	/*

Modified: head/sys/dev/isp/isp_freebsd.h
==============================================================================
--- head/sys/dev/isp/isp_freebsd.h	Mon Feb  3 17:34:57 2020	(r357454)
+++ head/sys/dev/isp/isp_freebsd.h	Mon Feb  3 17:35:11 2020	(r357455)
@@ -71,11 +71,7 @@
 /*
  * Efficiency- get rid of SBus code && tests unless we need them.
  */
-#ifdef __sparc64__
-#define	ISP_SBUS_SUPPORTED	1
-#else
 #define	ISP_SBUS_SUPPORTED	0
-#endif
 
 #define	ISP_IFLAGS	INTR_TYPE_CAM | INTR_ENTROPY | INTR_MPSAFE
 

Modified: head/sys/dev/isp/isp_pci.c
==============================================================================
--- head/sys/dev/isp/isp_pci.c	Mon Feb  3 17:34:57 2020	(r357454)
+++ head/sys/dev/isp/isp_pci.c	Mon Feb  3 17:35:11 2020	(r357455)
@@ -48,12 +48,6 @@ __FBSDID("$FreeBSD$");
 #include <sys/rman.h>
 #include <sys/malloc.h>
 #include <sys/uio.h>
-
-#ifdef __sparc64__
-#include <dev/ofw/openfirm.h>
-#include <machine/ofw_machdep.h>
-#endif
-
 #include <dev/isp/isp_freebsd.h>
 
 static uint32_t isp_pci_rd_reg(ispsoftc_t *, int);
@@ -493,11 +487,7 @@ isp_get_specific_options(device_t dev, int chan, ispso
 		if (IS_FC(isp)) {
 			ISP_FC_PC(isp, chan)->default_id = 109 - chan;
 		} else {
-#ifdef __sparc64__
-			ISP_SPI_PC(isp, chan)->iid = OF_getscsinitid(dev);
-#else
 			ISP_SPI_PC(isp, chan)->iid = 7;
-#endif
 		}
 	} else {
 		if (IS_FC(isp)) {

Modified: head/sys/dev/ispfw/ispfw.c
==============================================================================
--- head/sys/dev/ispfw/ispfw.c	Mon Feb  3 17:34:57 2020	(r357454)
+++ head/sys/dev/ispfw/ispfw.c	Mon Feb  3 17:35:11 2020	(r357455)
@@ -39,9 +39,6 @@ __FBSDID("$FreeBSD$");
 #include <sys/systm.h>
 
 #if	defined(ISP_ALL) || !defined(KLD_MODULE) 
-#ifdef __sparc64__
-#define	ISP_1000	1
-#endif
 #define	ISP_1040	1
 #define	ISP_1040_IT	1
 #define	ISP_1080	1
@@ -60,13 +57,6 @@ __FBSDID("$FreeBSD$");
 #define	MODULE_NAME	"ispfw"
 #endif
 
-#if	defined(ISP_1000)
-#ifdef __sparc64__
-#include <dev/ispfw/asm_1000.h>
-#else
-#error "firmware not compatible with this platform"
-#endif
-#endif
 #if	defined(ISP_1040) || defined(ISP_1040_IT)
 #include <dev/ispfw/asm_1040.h>
 #endif
@@ -95,9 +85,6 @@ __FBSDID("$FreeBSD$");
 #include <dev/ispfw/asm_2500.h>
 #endif
 
-#if	defined(ISP_1000)
-static int	isp_1000_loaded;
-#endif
 #if	defined(ISP_1040)
 static int	isp_1040_loaded;
 #endif
@@ -152,9 +139,6 @@ static int
 do_load_fw(void)
 {
 
-#if	defined(ISP_1000)
-	RMACRO(isp_1000);
-#endif
 #if	defined(ISP_1040)
 	RMACRO(isp_1040);
 #endif
@@ -190,9 +174,6 @@ do_unload_fw(void)
 {
 	int error = 0;
 
-#if	defined(ISP_1000)
-	UMACRO(isp_1000);
-#endif
 #if	defined(ISP_1040)
 	UMACRO(isp_1040);
 #endif
@@ -240,8 +221,6 @@ static moduledata_t ispfw_mod = {
 };
 #if	defined(ISP_ALL) || !defined(KLD_MODULE) 
 DECLARE_MODULE(ispfw, ispfw_mod, SI_SUB_DRIVERS, SI_ORDER_THIRD);
-#elif	defined(ISP_1000)
-DECLARE_MODULE(isp_1000, ispfw_mod, SI_SUB_DRIVERS, SI_ORDER_THIRD);
 #elif	defined(ISP_1040)
 DECLARE_MODULE(isp_1040, ispfw_mod, SI_SUB_DRIVERS, SI_ORDER_THIRD);
 #elif	defined(ISP_1080)

Modified: head/sys/dev/mpt/mpt.h
==============================================================================
--- head/sys/dev/mpt/mpt.h	Mon Feb  3 17:34:57 2020	(r357454)
+++ head/sys/dev/mpt/mpt.h	Mon Feb  3 17:35:11 2020	(r357455)
@@ -122,11 +122,6 @@
 #include <machine/cpu.h>
 #include <machine/resource.h>
 
-#ifdef __sparc64__
-#include <dev/ofw/openfirm.h>
-#include <machine/ofw_machdep.h>
-#endif
-
 #include <dev/pci/pcireg.h>
 #include <dev/pci/pcivar.h>
 

Modified: head/sys/dev/mpt/mpt_pci.c
==============================================================================
--- head/sys/dev/mpt/mpt_pci.c	Mon Feb  3 17:34:57 2020	(r357454)
+++ head/sys/dev/mpt/mpt_pci.c	Mon Feb  3 17:35:11 2020	(r357455)
@@ -372,10 +372,6 @@ mpt_pci_attach(device_t dev)
 	mpt->verbose = MPT_PRT_NONE;
 	mpt->role = MPT_ROLE_NONE;
 	mpt->mpt_ini_id = MPT_INI_ID_NONE;
-#ifdef __sparc64__
-	if (mpt->is_spi)
-		mpt->mpt_ini_id = OF_getscsinitid(dev);
-#endif
 	mpt_set_options(mpt);
 	if (mpt->verbose == MPT_PRT_NONE) {
 		mpt->verbose = MPT_PRT_WARN;

Modified: head/sys/dev/mthca/mthca_srq.c
==============================================================================
--- head/sys/dev/mthca/mthca_srq.c	Mon Feb  3 17:34:57 2020	(r357454)
+++ head/sys/dev/mthca/mthca_srq.c	Mon Feb  3 17:35:11 2020	(r357455)
@@ -115,16 +115,10 @@ static void mthca_arbel_init_srq_context(struct mthca_
 					 struct mthca_srq *srq,
 					 struct mthca_arbel_srq_context *context)
 {
-	int logsize, max;
+	int logsize;
 
 	memset(context, 0, sizeof *context);
-
-	/*
-	 * Put max in a temporary variable to work around gcc bug
-	 * triggered by ilog2() on sparc64.
-	 */
-	max = srq->max;
-	logsize = ilog2(max);
+	logsize = ilog2(srq->max);
 	context->state_logsize_srqn = cpu_to_be32(logsize << 24 | srq->srqn);
 	context->lkey = cpu_to_be32(srq->mr.ibmr.lkey);
 	context->db_index = cpu_to_be32(srq->db_index);

Modified: head/sys/dev/mxge/if_mxge_var.h
==============================================================================
--- head/sys/dev/mxge/if_mxge_var.h	Mon Feb  3 17:34:57 2020	(r357454)
+++ head/sys/dev/mxge/if_mxge_var.h	Mon Feb  3 17:35:11 2020	(r357455)
@@ -325,27 +325,6 @@ struct mxge_pkt_info {
 };
 
 
-/* implement our own memory barriers, since bus_space_barrier
-   cannot handle write-combining regions */
-
-#if __FreeBSD_version < 800053
-
-#if defined (__GNUC__)
-  #if #cpu(i386) || defined __i386 || defined i386 || defined __i386__ || #cpu(x86_64) || defined __x86_64__
-    #define wmb()  __asm__ __volatile__ ("sfence;": : :"memory")
-  #elif #cpu(sparc64) || defined sparc64 || defined __sparcv9 
-    #define wmb()  __asm__ __volatile__ ("membar #MemIssue": : :"memory")
-  #elif #cpu(sparc) || defined sparc || defined __sparc__
-    #define wmb()  __asm__ __volatile__ ("stbar;": : :"memory")
-  #else
-    #define wmb() 	/* XXX just to make this compile */
-  #endif
-#else
-  #error "unknown compiler"
-#endif
-
-#endif
-
 static inline void
 mxge_pio_copy(volatile void *to_v, void *from_v, size_t size)
 {

Modified: head/sys/dev/ofw/openfirm.h
==============================================================================
--- head/sys/dev/ofw/openfirm.h	Mon Feb  3 17:34:57 2020	(r357454)
+++ head/sys/dev/ofw/openfirm.h	Mon Feb  3 17:35:11 2020	(r357455)
@@ -178,13 +178,10 @@ int		OF_interpret(const char *cmd, int nreturns, ...);
 /*
  * Decode the Nth register property of the given device node and create a bus
  * space tag and handle for accessing it.  This is for use in setting up things
- * like early console output before newbus is available.  The implementation is
- * machine-dependent, and sparc uses a different function signature as well.
+ * like early console output before newbus is available.
  */
-#ifndef __sparc64__
 int		OF_decode_addr(phandle_t dev, int regno, bus_space_tag_t *ptag,
 		    bus_space_handle_t *phandle, bus_size_t *sz);
-#endif
 
 #endif /* _KERNEL */
 #endif /* _DEV_OPENFIRM_H_ */

Modified: head/sys/dev/proto/proto_core.c
==============================================================================
--- head/sys/dev/proto/proto_core.c	Mon Feb  3 17:34:57 2020	(r357454)
+++ head/sys/dev/proto/proto_core.c	Mon Feb  3 17:35:11 2020	(r357455)
@@ -507,9 +507,7 @@ proto_mmap(struct cdev *cdev, vm_ooffset_t offset, vm_
 		if (offset >= r->r_size)
 			return (EINVAL);
 		*paddr = rman_get_start(r->r_d.res) + offset;
-#ifndef __sparc64__
 		*memattr = VM_MEMATTR_UNCACHEABLE;
-#endif
 		break;
 	case PROTO_RES_BUSDMA:
 		if (!proto_busdma_mmap_allowed(r->r_d.busdma, offset))

Modified: head/sys/dev/sfxge/common/efsys.h
==============================================================================
--- head/sys/dev/sfxge/common/efsys.h	Mon Feb  3 17:34:57 2020	(r357454)
+++ head/sys/dev/sfxge/common/efsys.h	Mon Feb  3 17:35:11 2020	(r357455)
@@ -130,26 +130,6 @@ prefetch_read_once(void *addr)
 	    :
 	    : "r" (addr));
 }
-#elif defined(__sparc64__)
-static __inline void
-prefetch_read_many(void *addr)
-{
-
-	__asm__(
-	    "prefetch [%0], 0"
-	    :
-	    : "r" (addr));
-}
-
-static __inline void
-prefetch_read_once(void *addr)
-{
-
-	__asm__(
-	    "prefetch [%0], 1"
-	    :
-	    : "r" (addr));
-}
 #else
 static __inline void
 prefetch_read_many(void *addr)

Modified: head/sys/dev/sound/pci/t4dwave.c
==============================================================================
--- head/sys/dev/sound/pci/t4dwave.c	Mon Feb  3 17:34:57 2020	(r357454)
+++ head/sys/dev/sound/pci/t4dwave.c	Mon Feb  3 17:35:11 2020	(r357455)
@@ -829,11 +829,6 @@ tr_pci_attach(device_t dev)
 	bus_addr_t	lowaddr;
 	int		i, dacn;
 	char 		status[SND_STATUSLEN];
-#ifdef __sparc64__
-	device_t	*children;
-	int		nchildren;
-	u_int32_t	data;
-#endif
 
 	tr = malloc(sizeof(*tr), M_DEVBUF, M_WAITOK | M_ZERO);
 	tr->type = pci_get_devid(dev);
@@ -900,34 +895,9 @@ tr_pci_attach(device_t dev)
 		 * using a low address of BUS_SPACE_MAXADDR_32BIT for both
 		 * we might end up with the play buffer being in the 32-bit
 		 * range while the record buffer isn't or vice versa. So we
-		 * limit enabling the 31st bit to sparc64, where the IOMMU
-		 * guarantees that we're using a 32-bit address (and in turn
-		 * requires it).
+		 * don't enabling the 31st bit.
 		 */
 		lowaddr = ALI_MAXADDR;
-#ifdef __sparc64__
-		if (device_get_children(device_get_parent(dev), &children,
-		    &nchildren) == 0) {
-			for (i = 0; i < nchildren; i++) {
-				if (pci_get_devid(children[i]) == 0x153310b9) {
-					lowaddr = BUS_SPACE_MAXADDR_32BIT;
-					data = pci_read_config(children[i],
-					    0x7e, 1);
-					if (bootverbose)
-						device_printf(dev,
-						    "M1533 0x7e: 0x%x -> ",
-						    data);
-					data |= 0x1;
-					if (bootverbose)
-						printf("0x%x\n", data);
-					pci_write_config(children[i], 0x7e,
-					    data, 1);
-					break;
-				}
-			}
-		}
-		free(children, M_TEMP);
-#endif
 		tr->hwchns = ALI_MAXHWCH;
 		tr->bufsz = ALI_BUFSZ;
 	} else {

Modified: head/sys/dev/sym/sym_hipd.c
==============================================================================
--- head/sys/dev/sym/sym_hipd.c	Mon Feb  3 17:34:57 2020	(r357454)
+++ head/sys/dev/sym/sym_hipd.c	Mon Feb  3 17:35:11 2020	(r357455)
@@ -90,11 +90,6 @@ __FBSDID("$FreeBSD$");
 #include <machine/resource.h>
 #include <machine/atomic.h>
 
-#ifdef __sparc64__
-#include <dev/ofw/openfirm.h>
-#include <machine/ofw_machdep.h>
-#endif
-
 #include <sys/rman.h>
 
 #include <cam/cam.h>
@@ -134,8 +129,6 @@ typedef	u_int32_t u32;
 #define MEMORY_BARRIER()	do { ; } while(0)
 #elif	defined	__powerpc__
 #define MEMORY_BARRIER()	__asm__ volatile("eieio; sync" : : : "memory")
-#elif	defined	__sparc64__
-#define MEMORY_BARRIER()	__asm__ volatile("membar #Sync" : : : "memory")
 #elif	defined	__arm__
 #define MEMORY_BARRIER()	dmb()
 #elif	defined	__aarch64__
@@ -2652,9 +2645,6 @@ static int sym_prepare_setting(hcb_p np, struct sym_nv
 	 */
 	np->myaddr = 255;
 	sym_nvram_setup_host (np, nvram);
-#ifdef __sparc64__
-	np->myaddr = OF_getscsinitid(np->device);
-#endif
 
 	/*
 	 *  Get SCSI addr of host adapter (set by bios?).

Modified: head/sys/dev/syscons/scgfbrndr.c
==============================================================================
--- head/sys/dev/syscons/scgfbrndr.c	Mon Feb  3 17:34:57 2020	(r357454)
+++ head/sys/dev/syscons/scgfbrndr.c	Mon Feb  3 17:35:11 2020	(r357455)
@@ -107,38 +107,11 @@ sc_rndr_sw_t grrndrsw = {
 #endif /* SC_NO_MODE_CHANGE */
 

*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***


More information about the svn-src-head mailing list