Skip to content

Commit

Permalink
Remove sparc64 kernel support
Browse files Browse the repository at this point in the history
Remove all sparc64 specific files
Remove all sparc64 ifdefs
Removee indireeect sparc64 ifdefs
  • Loading branch information
bsdimp committed Feb 3, 2020
1 parent e4792f3 commit 48b9486
Show file tree
Hide file tree
Showing 294 changed files with 52 additions and 61,270 deletions.
3 changes: 1 addition & 2 deletions lib/libkvm/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion sys/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ CSCOPEDIRS= bsm cam cddl compat conf contrib crypto ddb dev fs gdb \
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}
Expand Down
11 changes: 0 additions & 11 deletions sys/cam/cam_xpt.c
Original file line number Diff line number Diff line change
Expand Up @@ -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:
{
Expand Down
4 changes: 0 additions & 4 deletions sys/cddl/compat/opensolaris/sys/atomic.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand All @@ -107,7 +106,6 @@ atomic_cas_32(volatile uint32_t *target, uint32_t cmp, uint32_t newval)
#endif
return (cmp);
}
#endif

#if defined(__LP64__) || defined(__mips_n32) || \
defined(ARM_HAVE_ATOMIC64) || defined(I386_HAVE_ATOMIC64) || \
Expand All @@ -124,7 +122,6 @@ atomic_add_64_nv(volatile uint64_t *target, int64_t delta)
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)
{
Expand All @@ -141,7 +138,6 @@ atomic_cas_64(volatile uint64_t *target, uint64_t cmp, uint64_t newval)
return (cmp);
}
#endif
#endif

static __inline void
atomic_inc_64(volatile uint64_t *target)
Expand Down
10 changes: 0 additions & 10 deletions sys/cddl/contrib/opensolaris/common/lz4/lz4.c
Original file line number Diff line number Diff line change
Expand Up @@ -245,16 +245,6 @@ lz4_decompress(void *s_start, void *d_start, size_t s_len, size_t d_len,
#define LZ4_FORCE_UNALIGNED_ACCESS 1
#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
*/
Expand Down
5 changes: 0 additions & 5 deletions sys/cddl/contrib/opensolaris/uts/common/sys/asm_linkage.h
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
49 changes: 0 additions & 49 deletions sys/conf/Makefile.sparc64

This file was deleted.

3 changes: 0 additions & 3 deletions sys/conf/NOTES
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
6 changes: 0 additions & 6 deletions sys/conf/files
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -3009,9 +3006,7 @@ rtwn-rtl8821aufw.fw optional rtwn-rtl8821aufw | rtwnfw \
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
Expand Down Expand Up @@ -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
Expand Down
146 changes: 0 additions & 146 deletions sys/conf/files.sparc64

This file was deleted.

13 changes: 0 additions & 13 deletions sys/conf/kern.mk
Original file line number Diff line number Diff line change
Expand Up @@ -153,18 +153,6 @@ CFLAGS+= -mno-relax
.endif
.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
Expand Down Expand Up @@ -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}}
4 changes: 2 additions & 2 deletions sys/conf/kern.opts.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
Loading

0 comments on commit 48b9486

Please sign in to comment.