From 09c53421c98905c45c117db2f387893086b3d484 Mon Sep 17 00:00:00 2001 From: Brian Barrett Date: Tue, 25 Mar 2025 08:19:44 -0700 Subject: [PATCH 1/2] Remove Altix-specific timer component We no longer have any Altix test machines and Altix is effectively dead anyway, so remove the Altix-specific timer support. If there are any Altix users out there, they'll fall back to the Linux timers, which should work just as well. Signed-off-by: Brian Barrett --- opal/mca/timer/altix/Makefile.am | 24 ---- opal/mca/timer/altix/configure.m4 | 83 -------------- opal/mca/timer/altix/owner.txt | 7 -- opal/mca/timer/altix/timer_altix.h | 48 -------- opal/mca/timer/altix/timer_altix_component.c | 113 ------------------- 5 files changed, 275 deletions(-) delete mode 100644 opal/mca/timer/altix/Makefile.am delete mode 100644 opal/mca/timer/altix/configure.m4 delete mode 100644 opal/mca/timer/altix/owner.txt delete mode 100644 opal/mca/timer/altix/timer_altix.h delete mode 100644 opal/mca/timer/altix/timer_altix_component.c diff --git a/opal/mca/timer/altix/Makefile.am b/opal/mca/timer/altix/Makefile.am deleted file mode 100644 index 8e75c15a339..00000000000 --- a/opal/mca/timer/altix/Makefile.am +++ /dev/null @@ -1,24 +0,0 @@ -# -# Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana -# University Research and Technology -# Corporation. All rights reserved. -# Copyright (c) 2004-2005 The University of Tennessee and The University -# of Tennessee Research Foundation. All rights -# reserved. -# Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, -# University of Stuttgart. All rights reserved. -# Copyright (c) 2004-2005 The Regents of the University of California. -# All rights reserved. -# $COPYRIGHT$ -# -# Additional copyrights may follow -# -# $HEADER$ -# - -noinst_LTLIBRARIES = libmca_timer_altix.la - -libmca_timer_altix_la_SOURCES = \ - timer_altix.h \ - timer_altix_component.c - diff --git a/opal/mca/timer/altix/configure.m4 b/opal/mca/timer/altix/configure.m4 deleted file mode 100644 index 42a98afe44a..00000000000 --- a/opal/mca/timer/altix/configure.m4 +++ /dev/null @@ -1,83 +0,0 @@ -# -*- shell-script -*- -# -# Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana -# University Research and Technology -# Corporation. All rights reserved. -# Copyright (c) 2004-2005 The University of Tennessee and The University -# of Tennessee Research Foundation. All rights -# reserved. -# Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, -# University of Stuttgart. All rights reserved. -# Copyright (c) 2004-2005 The Regents of the University of California. -# All rights reserved. -# Copyright (c) 2010 Cisco Systems, Inc. All rights reserved. -# Copyright (c) 2015 Research Organization for Information Science -# and Technology (RIST). All rights reserved. -# $COPYRIGHT$ -# -# Additional copyrights may follow -# -# $HEADER$ -# -AC_DEFUN([MCA_opal_timer_altix_PRIORITY], [100]) - -AC_DEFUN([MCA_opal_timer_altix_COMPILE_MODE], [ - AC_MSG_CHECKING([for MCA component $2:$3 compile mode]) - $4="static" - AC_MSG_RESULT([$$4]) -]) - -AC_DEFUN([MCA_opal_timer_altix_POST_CONFIG],[ - AS_IF([test "$1" = "1"], [timer_base_include="altix/timer_altix.h"]) -])dnl - -# MCA_timer_altix_CONFIG(action-if-can-compile, -# [action-if-cant-compile]) -# ------------------------------------------------ -AC_DEFUN([MCA_opal_timer_altix_CONFIG],[ - AC_CONFIG_FILES([opal/mca/timer/altix/Makefile]) - - AS_IF([test "$with_timer" = "altix"], - [timer_altix_happy="yes" - timer_altix_should_use=1], - [timer_altix_should_use=0 - AS_IF([test "$with_timer" = ""], - [timer_altix_happy="yes"], - [timer_altix_happy="no"])]) - - AS_IF([test "$timer_altix_happy" = "yes"], - [AC_CHECK_HEADER([sn/mmtimer.h], - [timer_altix_happy="yes"], - [timer_altix_happy="no"])]) - - AS_IF([test "$timer_altix_happy" = "yes"], - [AC_CHECK_HEADERS([sys/ioctl.h sys/mman.h])]) - - AS_IF([test "$timer_altix_happy" = "yes"], - [AC_CACHE_CHECK([if MM timer can be opened], - [ompi_cv_mm_timer_mmap], - [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([ -#include -#include -#include -#include -#include -#include -], [ - int fd; - fd = open(MMTIMER_FULLNAME, O_RDONLY); - if (-1 ==fd) return 1;])], - [ompi_cv_mm_timer_mmap="yes"], - [ompi_cv_mm_timer_mmap="no"])]) - AS_IF([test "$ompi_cv_mm_timer_mmap" = "yes"], - [timer_altix_happy="yes"], - [timer_altix_happy="no"])]) - - AS_IF([test "$timer_altix_happy" = "no" && \ - test "$timer_altix_should_use" = "1"], - [AC_MSG_ERROR([Altix timer requested but not available. Aborting.])]) - - AS_IF([test "$timer_altix_happy" = "yes"], - [$1], - [$2]) -]) diff --git a/opal/mca/timer/altix/owner.txt b/opal/mca/timer/altix/owner.txt deleted file mode 100644 index 1f73442ea02..00000000000 --- a/opal/mca/timer/altix/owner.txt +++ /dev/null @@ -1,7 +0,0 @@ -# -# owner/status file -# owner: institution that is responsible for this package -# status: e.g. active, maintenance, unmaintained -# -owner: SNL? -status: unmaintained diff --git a/opal/mca/timer/altix/timer_altix.h b/opal/mca/timer/altix/timer_altix.h deleted file mode 100644 index 56b65e554fa..00000000000 --- a/opal/mca/timer/altix/timer_altix.h +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana - * University Research and Technology - * Corporation. All rights reserved. - * Copyright (c) 2004-2014 The University of Tennessee and The University - * of Tennessee Research Foundation. All rights - * reserved. - * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, - * University of Stuttgart. All rights reserved. - * Copyright (c) 2004-2005 The Regents of the University of California. - * All rights reserved. - * $COPYRIGHT$ - * - * Additional copyrights may follow - * - * $HEADER$ - */ - -#ifndef OPAL_MCA_TIMER_ALTIX_TIMER_ALTIX_H -#define OPAL_MCA_TIMER_ALTIX_TIMER_ALTIX_H - -#include "opal/sys/timer.h" - -extern opal_timer_t opal_timer_altix_freq; -extern opal_timer_t opal_timer_altix_usec_conv; -extern volatile unsigned long *opal_timer_altix_mmdev_timer_addr; - -static inline opal_timer_t opal_timer_base_get_cycles(void) -{ - return (*opal_timer_altix_mmdev_timer_addr); -} - -static inline opal_timer_t opal_timer_base_get_usec(void) -{ - return opal_timer_base_get_cycles() / opal_timer_altix_usec_conv; -} - -static inline opal_timer_t opal_timer_base_get_freq(void) -{ - return opal_timer_altix_freq; -} - -#define OPAL_TIMER_CYCLE_NATIVE 1 -#define OPAL_TIMER_CYCLE_SUPPORTED 1 -#define OPAL_TIMER_USEC_NATIVE 0 -#define OPAL_TIMER_USEC_SUPPORTED 1 - -#endif diff --git a/opal/mca/timer/altix/timer_altix_component.c b/opal/mca/timer/altix/timer_altix_component.c deleted file mode 100644 index 9e6a7f25230..00000000000 --- a/opal/mca/timer/altix/timer_altix_component.c +++ /dev/null @@ -1,113 +0,0 @@ -/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */ -/* - * Copyright (c) 2004-2007 The Trustees of Indiana University and Indiana - * University Research and Technology - * Corporation. All rights reserved. - * Copyright (c) 2004-2005 The University of Tennessee and The University - * of Tennessee Research Foundation. All rights - * reserved. - * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, - * University of Stuttgart. All rights reserved. - * Copyright (c) 2004-2005 The Regents of the University of California. - * All rights reserved. - * Copyright (c) 2014 Research Organization for Information Science - * and Technology (RIST). All rights reserved. - * Copyright (c) 2015 Los Alamos National Security, LLC. All rights - * reserved. - * $COPYRIGHT$ - * - * Additional copyrights may follow - * - * $HEADER$ - */ - -#include "opal_config.h" - -#include -#include -#include -#include -#include -#include -#include -#include - -#include "opal/constants.h" -#include "opal/mca/timer/altix/timer_altix.h" -#include "opal/mca/timer/timer.h" -#include "opal/util/sys_limits.h" - -opal_timer_t opal_timer_altix_freq; -opal_timer_t opal_timer_altix_usec_conv; -volatile unsigned long *opal_timer_altix_mmdev_timer_addr; -static unsigned long *mmdev_map; - -static int opal_timer_altix_open(void); -static int opal_timer_altix_close(void); - -const opal_timer_base_component_2_0_0_t mca_timer_altix_component = { - /* First, the mca_component_t struct containing meta information - about the component itself */ - .timerc_version = - { - OPAL_TIMER_BASE_VERSION_2_0_0, - - /* Component name and version */ - .mca_component_name = "altix", - MCA_BASE_MAKE_VERSION(component, OPAL_MAJOR_VERSION, OPAL_MINOR_VERSION, - OPAL_RELEASE_VERSION), - - /* Component open and close functions */ - .mca_open_component = opal_timer_altix_open, - .mca_close_component = opal_timer_altix_close, - }, - .timerc_data = - {/* The component is checkpoint ready */ - MCA_BASE_METADATA_PARAM_CHECKPOINT}, -}; - -static int opal_timer_altix_open(void) -{ - int fd, ret; - unsigned long val; - long offset; - - fd = open(MMTIMER_FULLNAME, O_RDONLY); - if (fd < 0) - return OPAL_ERR_NOT_FOUND; - - /* make sure we can map the timer */ - ret = ioctl(fd, MMTIMER_MMAPAVAIL, 0); - if (1 != ret) - return OPAL_ERR_NOT_SUPPORTED; - - /* find the frequency */ - ret = ioctl(fd, MMTIMER_GETFREQ, &val); - if (ret == -ENOSYS) - return OPAL_ERR_NOT_SUPPORTED; - opal_timer_altix_freq = val; - opal_timer_altix_usec_conv = opal_timer_altix_freq / 1000000; - - /* find the address of the counter */ - ret = ioctl(fd, MMTIMER_GETOFFSET, 0); - if (ret == -ENOSYS) - return OPAL_ERR_NOT_SUPPORTED; - offset = ret; - - mmdev_map = mmap(0, (size_t) opal_getpagesize(), PROT_READ, MAP_SHARED, fd, 0); - if (NULL == mmdev_map) - return OPAL_ERR_NOT_SUPPORTED; - opal_timer_altix_mmdev_timer_addr = mmdev_map + offset; - close(fd); - - return OPAL_SUCCESS; -} - -static int opal_timer_altix_close(void) -{ - if (NULL != mmdev_map) { - munmap(mmdev_map, (size_t) opal_getpagesize()); - } - - return OPAL_SUCCESS; -} From e59caab2857ac6ef16dbcdce5af1b7fd4820a589 Mon Sep 17 00:00:00 2001 From: Brian Barrett Date: Tue, 25 Mar 2025 08:20:58 -0700 Subject: [PATCH 2/2] Remove Solaris-specific components While Solaris isn't officially dead, the last release was 6 years ago, we have no test infrastructure and no real interest in Solaris. So remove the Solaris-specific components. Signed-off-by: Brian Barrett --- opal/mca/if/solaris_ipv6/Makefile.am | 12 -- opal/mca/if/solaris_ipv6/configure.m4 | 32 ---- opal/mca/if/solaris_ipv6/if_solaris_ipv6.c | 147 ------------------ opal/mca/if/solaris_ipv6/owner.txt | 7 - opal/mca/memory/malloc_solaris/Makefile.am | 26 ---- opal/mca/memory/malloc_solaris/configure.m4 | 118 -------------- .../memory_malloc_solaris_component.c | 139 ----------------- opal/mca/memory/malloc_solaris/owner.txt | 7 - opal/mca/timer/solaris/Makefile.am | 24 --- opal/mca/timer/solaris/configure.m4 | 60 ------- opal/mca/timer/solaris/owner.txt | 7 - opal/mca/timer/solaris/timer_solaris.h | 47 ------ .../timer/solaris/timer_solaris_component.c | 42 ----- 13 files changed, 668 deletions(-) delete mode 100644 opal/mca/if/solaris_ipv6/Makefile.am delete mode 100644 opal/mca/if/solaris_ipv6/configure.m4 delete mode 100644 opal/mca/if/solaris_ipv6/if_solaris_ipv6.c delete mode 100644 opal/mca/if/solaris_ipv6/owner.txt delete mode 100644 opal/mca/memory/malloc_solaris/Makefile.am delete mode 100644 opal/mca/memory/malloc_solaris/configure.m4 delete mode 100644 opal/mca/memory/malloc_solaris/memory_malloc_solaris_component.c delete mode 100644 opal/mca/memory/malloc_solaris/owner.txt delete mode 100644 opal/mca/timer/solaris/Makefile.am delete mode 100644 opal/mca/timer/solaris/configure.m4 delete mode 100644 opal/mca/timer/solaris/owner.txt delete mode 100644 opal/mca/timer/solaris/timer_solaris.h delete mode 100644 opal/mca/timer/solaris/timer_solaris_component.c diff --git a/opal/mca/if/solaris_ipv6/Makefile.am b/opal/mca/if/solaris_ipv6/Makefile.am deleted file mode 100644 index b8e9606c327..00000000000 --- a/opal/mca/if/solaris_ipv6/Makefile.am +++ /dev/null @@ -1,12 +0,0 @@ -# -# Copyright (c) 2010 Cisco Systems, Inc. All rights reserved. -# $COPYRIGHT$ -# -# Additional copyrights may follow -# -# $HEADER$ -# - -noinst_LTLIBRARIES = libmca_if_solaris_ipv6.la - -libmca_if_solaris_ipv6_la_SOURCES = if_solaris_ipv6.c diff --git a/opal/mca/if/solaris_ipv6/configure.m4 b/opal/mca/if/solaris_ipv6/configure.m4 deleted file mode 100644 index eecf6f435dd..00000000000 --- a/opal/mca/if/solaris_ipv6/configure.m4 +++ /dev/null @@ -1,32 +0,0 @@ -# -*- shell-script -*- -# -# Copyright (c) 2010 Cisco Systems, Inc. All rights reserved. -# $COPYRIGHT$ -# -# Additional copyrights may follow -# -# $HEADER$ -# - -AC_DEFUN([MCA_opal_if_solaris_ipv6_COMPILE_MODE], [ - AC_MSG_CHECKING([for MCA component $2:$3 compile mode]) - $4="static" - AC_MSG_RESULT([$$4]) -]) - -# MCA_if_config_CONFIG(action-if-can-compile, -# [action-if-cant-compile]) -# ------------------------------------------------ -AC_DEFUN([MCA_opal_if_solaris_ipv6_CONFIG], [ - AC_CONFIG_FILES([opal/mca/if/solaris_ipv6/Makefile]) - - AC_REQUIRE([OPAL_CHECK_OS_FLAVORS]) - - # check to see if we are on a solaris machine - AS_IF([test "$opal_found_sun" = "yes"], [$1], [$2]) -])dnl - -# -# ifdef __sun__ -# - diff --git a/opal/mca/if/solaris_ipv6/if_solaris_ipv6.c b/opal/mca/if/solaris_ipv6/if_solaris_ipv6.c deleted file mode 100644 index 7103bc393cd..00000000000 --- a/opal/mca/if/solaris_ipv6/if_solaris_ipv6.c +++ /dev/null @@ -1,147 +0,0 @@ -/* - * Copyright (c) 2010 Cisco Systems, Inc. All rights reserved. - * Copyright (c) 2010 Oracle and/or its affiliates. All rights reserved. - * $COPYRIGHT$ - * - * Additional copyrights may follow - * - * $HEADER$ - */ - -#include "opal_config.h" - -#include -#include - -#include "opal/constants.h" -#include "opal/mca/if/if.h" -#include "opal/util/output.h" -#include "opal/util/string_copy.h" - -static int if_solaris_ipv6_open(void); - -/* Discovers Solaris IPv6 interfaces */ -opal_if_base_component_t mca_if_solaris_ipv6_component = { - /* First, the mca_component_t struct containing meta information - about the component itself */ - {OPAL_IF_BASE_VERSION_2_0_0, - - /* Component name and version */ - "solaris_ipv6", OPAL_MAJOR_VERSION, OPAL_MINOR_VERSION, OPAL_RELEASE_VERSION, - - /* Component open and close functions */ - if_solaris_ipv6_open, NULL}, - {/* This component is checkpointable */ - MCA_BASE_METADATA_PARAM_CHECKPOINT}, -}; - -/* configure using getifaddrs(3) */ -static int if_solaris_ipv6_open(void) -{ -#if OPAL_ENABLE_IPV6 - int i; - int sd; - int error; - uint16_t kindex; - struct lifnum lifnum; - struct lifconf lifconf; - struct lifreq *lifreq, lifquery; - - sd = socket(AF_INET6, SOCK_DGRAM, 0); - if (sd < 0) { - opal_output(0, "opal_ifinit: unable to open IPv6 socket\n"); - return OPAL_ERROR; - } - - /* we only ask for IPv6; IPv4 discovery has already been done */ - lifnum.lifn_family = AF_INET6; - lifnum.lifn_flags = 0; - lifnum.lifn_count = 0; - - /* get the number of interfaces in the system */ - error = ioctl(sd, SIOCGLIFNUM, &lifnum); - if (error < 0) { - opal_output(0, "opal_ifinit: ioctl SIOCGLIFNUM failed with errno=%d\n", errno); - return OPAL_ERROR; - } - - memset(&lifconf, 0, sizeof(struct lifconf)); - memset(&lifquery, 0, sizeof(struct lifreq)); - lifconf.lifc_family = AF_INET6; - lifconf.lifc_flags = 0; - lifconf.lifc_len = lifnum.lifn_count * sizeof(struct lifreq) * 2; - lifconf.lifc_buf = malloc(lifconf.lifc_len); - if (NULL == lifconf.lifc_buf) { - opal_output(0, "opal_ifinit: IPv6 discovery: malloc() failed\n"); - return OPAL_ERR_OUT_OF_RESOURCE; - } - - memset(lifconf.lifc_buf, 0, lifconf.lifc_len); - - error = ioctl(sd, SIOCGLIFCONF, &lifconf); - if (error < 0) { - opal_output(0, "opal_ifinit: IPv6 SIOCGLIFCONF failed with errno=%d\n", errno); - } - - for (i = 0; i + sizeof(struct lifreq) <= lifconf.lifc_len; i += sizeof(*lifreq)) { - - lifreq = (struct lifreq *) ((caddr_t) lifconf.lifc_buf + i); - opal_string_copy(lifquery.lifr_name, lifreq->lifr_name, sizeof(lifquery.lifr_name)); - - /* lookup kernel index */ - error = ioctl(sd, SIOCGLIFINDEX, &lifquery); - if (error < 0) { - opal_output(0, "opal_ifinit: SIOCGLIFINDEX failed with errno=%d\n", errno); - return OPAL_ERROR; - } - kindex = lifquery.lifr_index; - - /* lookup interface flags */ - error = ioctl(sd, SIOCGLIFFLAGS, &lifquery); - if (error < 0) { - opal_output(0, "opal_ifinit: SIOCGLIFFLAGS failed with errno=%d\n", errno); - return OPAL_ERROR; - } - - if (AF_INET6 == lifreq->lifr_addr.ss_family) { - struct sockaddr_in6 *my_addr = (struct sockaddr_in6 *) &lifreq->lifr_addr; - /* we surely want to check for sin6_scope_id, but Solaris - does not set it correctly, so we have to look for - global scope. For now, global is anything which is - neither loopback nor link local. - - Bug, FIXME: site-local, multicast, ... missing - Check for 2000::/3? - */ - if ((!opal_if_retain_loopback && !IN6_IS_ADDR_LOOPBACK(&my_addr->sin6_addr)) - && (!IN6_IS_ADDR_LINKLOCAL(&my_addr->sin6_addr))) { - /* create interface for newly found address */ - opal_if_t *intf; - - intf = OBJ_NEW(opal_if_t); - if (NULL == intf) { - opal_output(0, "opal_ifinit: unable to allocate %d bytes\n", sizeof(opal_if_t)); - return OPAL_ERR_OUT_OF_RESOURCE; - } - intf->af_family = AF_INET6; - - opal_string_copy(intf->if_name, lifreq->lifr_name, OPAL_IF_NAMESIZE); - intf->if_index = opal_list_get_size(&opal_if_list) + 1; - memcpy(&intf->if_addr, my_addr, sizeof(*my_addr)); - intf->if_mask = 64; - /* lifrq flags are uint64_t */ - intf->if_flags = (uint32_t)(0x00000000ffffffff) & lifquery.lifr_flags; - - /* append to list */ - opal_list_append(&opal_if_list, &(intf->super)); - } - } - } /* for */ - - if (NULL != lifconf.lifc_buf) { - free(lifconf.lifc_buf); - } -#endif /* OPAL_ENABLE_IPV6 */ - - return OPAL_SUCCESS; -} diff --git a/opal/mca/if/solaris_ipv6/owner.txt b/opal/mca/if/solaris_ipv6/owner.txt deleted file mode 100644 index 6b13fdc7a25..00000000000 --- a/opal/mca/if/solaris_ipv6/owner.txt +++ /dev/null @@ -1,7 +0,0 @@ -# -# owner/status file -# owner: institution that is responsible for this package -# status: e.g. active, maintenance, unmaintained -# -owner: nobody -status: maintenance diff --git a/opal/mca/memory/malloc_solaris/Makefile.am b/opal/mca/memory/malloc_solaris/Makefile.am deleted file mode 100644 index e2d270efd36..00000000000 --- a/opal/mca/memory/malloc_solaris/Makefile.am +++ /dev/null @@ -1,26 +0,0 @@ -# -# Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana -# University Research and Technology -# Corporation. All rights reserved. -# Copyright (c) 2004-2005 The University of Tennessee and The University -# of Tennessee Research Foundation. All rights -# reserved. -# Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, -# University of Stuttgart. All rights reserved. -# Copyright (c) 2004-2005 The Regents of the University of California. -# All rights reserved. -# Copyright (c) 2007-2008 Sun Microsystems, Inc. All rights reserved. -# $COPYRIGHT$ -# -# Additional copyrights may follow -# -# $HEADER$ -# - -noinst_LTLIBRARIES = libmca_memory_malloc_solaris.la - -# Source code files -libmca_memory_malloc_solaris_la_SOURCES = \ - memory_malloc_solaris_component.c -libmca_memory_malloc_solaris_la_LIBADD = \ - $(memory_malloc_solaris_LIBS) diff --git a/opal/mca/memory/malloc_solaris/configure.m4 b/opal/mca/memory/malloc_solaris/configure.m4 deleted file mode 100644 index 42d42333374..00000000000 --- a/opal/mca/memory/malloc_solaris/configure.m4 +++ /dev/null @@ -1,118 +0,0 @@ -# -*- shell-script -*- -# -# Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana -# University Research and Technology -# Corporation. All rights reserved. -# Copyright (c) 2004-2005 The University of Tennessee and The University -# of Tennessee Research Foundation. All rights -# reserved. -# Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, -# University of Stuttgart. All rights reserved. -# Copyright (c) 2004-2005 The Regents of the University of California. -# All rights reserved. -# Copyright (c) 2007-2011 Oracle and/or its affiliates. All rights reserved. -# Copyright (c) 2010-2011 Cisco Systems, Inc. All rights reserved. -# Copyright (c) 2015 Research Organization for Information Science -# and Technology (RIST). All rights reserved. -# $COPYRIGHT$ -# -# Additional copyrights may follow -# -# $HEADER$ -# -AC_DEFUN([MCA_opal_memory_malloc_solaris_PRIORITY], [0]) - -AC_DEFUN([MCA_opal_memory_malloc_solaris_COMPILE_MODE], [ - AC_MSG_CHECKING([for MCA component $2:$3 compile mode]) - $4="static" - AC_MSG_RESULT([$$4]) -]) - -# MCA_memory_malloc_solaris_CONFIG(action-if-can-compile, -# [action-if-cant-compile]) -# ------------------------------------------------ -AC_DEFUN([MCA_opal_memory_malloc_solaris_CONFIG],[ - AC_CONFIG_FILES([opal/mca/memory/malloc_solaris/Makefile]) - - OPAL_VAR_SCOPE_PUSH([memory_malloc_solaris_happy memory_malloc_solaris_should_use memory_malloc_solaris_munmap memory_alloc_solaris_legacy]) - - AC_MSG_CHECKING([for Solaris]) - - case "$host" in - *solaris*) - - AC_MSG_RESULT([yes]) - - AS_IF([test "$with_memory_manager" = "malloc_solaris"], - [memory_malloc_solaris_happy="yes" - memory_malloc_solaris_should_use=1], - [memory_malloc_solaris_should_use=0 - AS_IF([test "$with_memory_manager" = ""], - [memory_malloc_solaris_happy="yes"], - [memory_malloc_solaris_happy="no"])]) - - AS_IF([test "$memory_malloc_solaris_happy" = "yes"], - [AC_CHECK_HEADER([malloc.h], [], - [memory_malloc_solaris_happy="no"])]) - - AS_IF([test "$memory_malloc_solaris_happy" = "yes"], - [memory_malloc_solaris_munmap=0 - - AC_CHECK_HEADER([sys/syscall.h], - [AC_CHECK_FUNCS([syscall], - [memory_malloc_solaris_munmap=1])]) - - AC_CHECK_FUNCS([__munmap], [memory_malloc_solaris_munmap=1]) - - # only allow dlsym (and therefore add -ldl) if we - # really need to - AS_IF([test "$memory_malloc_solaris_munmap" = "0"], - [memory_malloc_solaris_LIBS_SAVE="$LIBS" - AC_CHECK_LIB([dl], - [dlsym], - [memory_malloc_solaris_LIBS="-ldl" - memory_malloc_solaris_munmap=1]) - AC_CHECK_FUNCS([dlsym]) - LIBS="$memory_malloc_solaris_LIBS_SAVE"]) - - AS_IF([test "$memory_malloc_solaris_munmap" = "0"], - [memory_malloc_solaris_happy="no"])]) - - # There is a difference in the munmap prototypes for different - # Solaris versions. So determine whether we are to use Legacy - # S10 or later prototypes. - memory_alloc_solaris_legacy=0 - AS_IF([test "$memory_malloc_solaris_happy" = "yes"], - [AC_MSG_CHECKING([for Solaris Legacy MUNMAP]) - AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include ]], - [[char *addr; - extern int munmap(caddr_t addr, size_t len);]])], - [memory_alloc_solaris_legacy=1 - AC_MSG_RESULT([yes])], - [AC_MSG_RESULT([no])]) - AC_DEFINE_UNQUOTED([USE_SOLARIS_LEGACY_MUNMAP_PROTOTYPE], - [$memory_alloc_solaris_legacy], - [Whether to use the legacy Solaris munmap prototype or not]) - ]) - - AS_IF([test "$memory_malloc_solaris_happy" = "no" && \ - test "$memory_malloc_solaris_should_use" = "1"], - [AC_MSG_ERROR([malloc_solaris memory management requested but not available. Aborting.])]) - - AC_SUBST(memory_malloc_solaris_LIBS) - - ;; - *) - AC_MSG_RESULT([no]) - AS_IF([test "$with_memory_manager" = "malloc_solaris"], - [memory_malloc_solaris_happy="no" - memory_malloc_solaris_should_use=0]) - ;; - esac - - AS_IF([test "$memory_malloc_solaris_happy" = "yes"], - [memory_base_found=1 - $1], [$2]) - - OPAL_VAR_SCOPE_POP -]) diff --git a/opal/mca/memory/malloc_solaris/memory_malloc_solaris_component.c b/opal/mca/memory/malloc_solaris/memory_malloc_solaris_component.c deleted file mode 100644 index 32be4dcea32..00000000000 --- a/opal/mca/memory/malloc_solaris/memory_malloc_solaris_component.c +++ /dev/null @@ -1,139 +0,0 @@ -/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */ -/* - * Copyright (c) 2004-2007 The Trustees of Indiana University and Indiana - * University Research and Technology - * Corporation. All rights reserved. - * Copyright (c) 2004-2005 The University of Tennessee and The University - * of Tennessee Research Foundation. All rights - * reserved. - * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, - * University of Stuttgart. All rights reserved. - * Copyright (c) 2004-2005 The Regents of the University of California. - * All rights reserved. - * Copyright (c) 2007-2011 Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2009-2011 Cisco Systems, Inc. All rights reserved. - * Copyright (c) 2015-2016 Los Alamos National Security, LLC. All rights - * reserved. - * Copyright (c) 2016 Research Organization for Information Science - * and Technology (RIST). All rights reserved. - * $COPYRIGHT$ - * - * Additional copyrights may follow - * - * $HEADER$ - */ - -#include "opal_config.h" -#include "opal/constants.h" -#include "opal/mca/memory/base/empty.h" -#include "opal/mca/memory/memory.h" -#include "opal/memoryhooks/memory_internal.h" - -#include -#include -#include -#include -#if defined(HAVE___MUNMAP) -/* here so we only include others if we absolutely have to */ -#elif defined(HAVE_SYSCALL) -# include -# include -#endif - -#if defined(HAVE___MUNMAP) -int __munmap(caddr_t addr, size_t len); -#endif - -static int opal_memory_malloc_open(void); -static int opal_memory_malloc_query(int *); - -const opal_memory_base_component_2_0_0_t mca_memory_malloc_solaris_component = { - /* First, the mca_component_t struct containing meta information - about the component itself */ - .memoryc_version = - { - OPAL_MEMORY_BASE_VERSION_2_0_0, - - /* Component name and version */ - .mca_component_name = "malloc_solaris", - MCA_BASE_MAKE_VERSION(component, OPAL_MAJOR_VERSION, OPAL_MINOR_VERSION, - OPAL_RELEASE_VERSION), - - /* Component open and close functions */ - .mca_open_component = opal_memory_malloc_open, - }, - .memoryc_data = - {/* The component is checkpoint ready */ - MCA_BASE_METADATA_PARAM_CHECKPOINT}, - - /* This component doesn't need these functions, but need to - provide safe/empty register/deregister functions to call */ - .memoryc_query = opal_memory_malloc_query, - .memoryc_register = opal_memory_base_component_register_empty, - .memoryc_deregister = opal_memory_base_component_deregister_empty, - .memoryc_set_alignment = opal_memory_base_component_set_alignment_empty, -}; - -/* - * This component exists to establish the memory hook support - * level available on Solaris. By default Solaris does not - * return memory to the system, i.e. does not unmap memory - * from the process space, when a user calls free(). This allows - * us to declare OPAL_MEMORY_FREE_SUPPORT. Additionally, by - * intercepting munmap we can declare OPAL_MEMORY_MUNMAP_SUPPORT. - * - * NOTE: Not releasing memory back to the system when calling - * free() may be unique to Solaris which is why this component - * was created. - */ -static int opal_memory_malloc_open(void) -{ - opal_mem_hooks_set_support((OPAL_MEMORY_FREE_SUPPORT | OPAL_MEMORY_MUNMAP_SUPPORT)); - return OPAL_SUCCESS; -} - -static int opal_memory_malloc_query(int *priority) -{ - *priority = 79; - return OPAL_SUCCESS; -} - -/* - * Three ways to call munmap. Preferred is to call __munmap, which - * will exist if munmap is a weak symbol. If not available next try - * the syscall, and if that doesn't work, try looking in the dynamic - * libc. - */ -#if USE_SOLARIS_LEGACY_MUNMAP_PROTOTYPE -/* We are compiling using S10 so use its munmap prototype */ -int munmap(caddr_t addr, size_t len) -#else -/* From S11 on forward munmap's addr is void * */ -int munmap(void *addr, size_t len) -#endif -{ -#if !defined(HAVE___MUNMAP) && !defined(HAVE_SYSCALL) && defined(HAVE_DLSYM) - static int (*realmunmap)(void *, size_t); -#endif - - opal_mem_hooks_release_hook(addr, len, 0); - -#if defined(HAVE___MUNMAP) - return __munmap(addr, len); -#elif defined(HAVE_SYSCALL) - return syscall(SYS_munmap, addr, len); -#elif defined(HAVE_DLSYM) - if (NULL == realmunmap) { - union { - int (*munmap_fp)(void *, size_t); - void *munmap_p; - } tmp; - - tmp.munmap_p = dlsym(RTLD_NEXT, "munmap"); - realmunmap = tmp.munmap_fp; - } - return realmunmap(addr, len); -#else -# error "Can not determine how to call munmap" -#endif -} diff --git a/opal/mca/memory/malloc_solaris/owner.txt b/opal/mca/memory/malloc_solaris/owner.txt deleted file mode 100644 index 29b7476009c..00000000000 --- a/opal/mca/memory/malloc_solaris/owner.txt +++ /dev/null @@ -1,7 +0,0 @@ -# -# owner/status file -# owner: institution that is responsible for this package -# status: e.g. active, maintenance, unmaintained -# -owner: nobody -status: unmaintained diff --git a/opal/mca/timer/solaris/Makefile.am b/opal/mca/timer/solaris/Makefile.am deleted file mode 100644 index dbe7e29396f..00000000000 --- a/opal/mca/timer/solaris/Makefile.am +++ /dev/null @@ -1,24 +0,0 @@ -# -# Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana -# University Research and Technology -# Corporation. All rights reserved. -# Copyright (c) 2004-2005 The University of Tennessee and The University -# of Tennessee Research Foundation. All rights -# reserved. -# Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, -# University of Stuttgart. All rights reserved. -# Copyright (c) 2004-2005 The Regents of the University of California. -# All rights reserved. -# Copyright (c) 2008 Cisco Systems, Inc. All rights reserved. -# $COPYRIGHT$ -# -# Additional copyrights may follow -# -# $HEADER$ -# - -noinst_LTLIBRARIES = libmca_timer_solaris.la - -libmca_timer_solaris_la_SOURCES = \ - timer_solaris.h \ - timer_solaris_component.c diff --git a/opal/mca/timer/solaris/configure.m4 b/opal/mca/timer/solaris/configure.m4 deleted file mode 100644 index 32b9893aa4d..00000000000 --- a/opal/mca/timer/solaris/configure.m4 +++ /dev/null @@ -1,60 +0,0 @@ -# -*- shell-script -*- -# -# Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana -# University Research and Technology -# Corporation. All rights reserved. -# Copyright (c) 2004-2005 The University of Tennessee and The University -# of Tennessee Research Foundation. All rights -# reserved. -# Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, -# University of Stuttgart. All rights reserved. -# Copyright (c) 2004-2005 The Regents of the University of California. -# All rights reserved. -# Copyright (c) 2010 Cisco Systems, Inc. All rights reserved. -# Copyright (c) 2015 Research Organization for Information Science -# and Technology (RIST). All rights reserved. -# $COPYRIGHT$ -# -# Additional copyrights may follow -# -# $HEADER$ -# -AC_DEFUN([MCA_opal_timer_solaris_PRIORITY], [30]) - -AC_DEFUN([MCA_opal_timer_solaris_COMPILE_MODE], [ - AC_MSG_CHECKING([for MCA component $2:$3 compile mode]) - $4="static" - AC_MSG_RESULT([$$4]) -]) - -AC_DEFUN([MCA_opal_timer_solaris_POST_CONFIG],[ - AS_IF([test "$1" = "1"], [timer_base_include="solaris/timer_solaris.h"]) -])dnl - -# MCA_timer_solaris_CONFIG(action-if-can-compile, -# [action-if-cant-compile]) -# ------------------------------------------------ -AC_DEFUN([MCA_opal_timer_solaris_CONFIG],[ - AC_CONFIG_FILES([opal/mca/timer/solaris/Makefile]) - - AS_IF([test "$with_timer" = "solaris"], - [timer_solaris_happy="yes" - timer_solaris_should_use=1], - [timer_solaris_should_use=0 - AS_IF([test "$with_timer" = ""], - [timer_solaris_happy="yes"], - [timer_solaris_happy="no"])]) - - AS_IF([test "$timer_solaris_happy" = "yes"], - [AC_CHECK_FUNC([gethrtime], - [timer_solaris_happy="yes"], - [timer_solaris_happy="no"])]) - - AS_IF([test "$timer_solaris_happy" = "no" && \ - test "$timer_solaris_should_use" = "1"], - [AC_MSG_ERROR([Solaris timer requested but not available. Aborting.])]) - - AS_IF([test "$timer_solaris_happy" = "yes"], - [$1], - [$2]) -]) diff --git a/opal/mca/timer/solaris/owner.txt b/opal/mca/timer/solaris/owner.txt deleted file mode 100644 index 29b7476009c..00000000000 --- a/opal/mca/timer/solaris/owner.txt +++ /dev/null @@ -1,7 +0,0 @@ -# -# owner/status file -# owner: institution that is responsible for this package -# status: e.g. active, maintenance, unmaintained -# -owner: nobody -status: unmaintained diff --git a/opal/mca/timer/solaris/timer_solaris.h b/opal/mca/timer/solaris/timer_solaris.h deleted file mode 100644 index a0c93d92bcf..00000000000 --- a/opal/mca/timer/solaris/timer_solaris.h +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana - * University Research and Technology - * Corporation. All rights reserved. - * Copyright (c) 2004-2014 The University of Tennessee and The University - * of Tennessee Research Foundation. All rights - * reserved. - * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, - * University of Stuttgart. All rights reserved. - * Copyright (c) 2004-2005 The Regents of the University of California. - * All rights reserved. - * $COPYRIGHT$ - * - * Additional copyrights may follow - * - * $HEADER$ - */ - -#ifndef OPAL_MCA_TIMER_SOLARIS_TIMER_SOLARIS_H -#define OPAL_MCA_TIMER_SOLARIS_TIMER_SOLARIS_H - -#include - -typedef hrtime_t opal_timer_t; - -static inline opal_timer_t opal_timer_base_get_cycles(void) -{ - return 0; -} - -static inline opal_timer_t opal_timer_base_get_usec(void) -{ - /* gethrtime returns nanoseconds */ - return gethrtime() / 1000; -} - -static inline opal_timer_t opal_timer_base_get_freq(void) -{ - return 0; -} - -#define OPAL_TIMER_CYCLE_NATIVE 0 -#define OPAL_TIMER_CYCLE_SUPPORTED 0 -#define OPAL_TIMER_USEC_NATIVE 1 -#define OPAL_TIMER_USEC_SUPPORTED 1 - -#endif diff --git a/opal/mca/timer/solaris/timer_solaris_component.c b/opal/mca/timer/solaris/timer_solaris_component.c deleted file mode 100644 index 0e80a9ab709..00000000000 --- a/opal/mca/timer/solaris/timer_solaris_component.c +++ /dev/null @@ -1,42 +0,0 @@ -/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */ -/* - * Copyright (c) 2004-2007 The Trustees of Indiana University and Indiana - * University Research and Technology - * Corporation. All rights reserved. - * Copyright (c) 2004-2005 The University of Tennessee and The University - * of Tennessee Research Foundation. All rights - * reserved. - * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, - * University of Stuttgart. All rights reserved. - * Copyright (c) 2004-2005 The Regents of the University of California. - * All rights reserved. - * Copyright (c) 2015 Los Alamos National Security, LLC. All rights - * reserved. - * $COPYRIGHT$ - * - * Additional copyrights may follow - * - * $HEADER$ - */ - -#include "opal_config.h" - -#include "opal/mca/timer/solaris/timer_solaris.h" -#include "opal/mca/timer/timer.h" - -const opal_timer_base_component_2_0_0_t mca_timer_solaris_component = { - /* First, the mca_component_t struct containing meta information - about the component itself */ - .timerc_version = - { - OPAL_TIMER_BASE_VERSION_2_0_0, - - /* Component name and version */ - .mca_component_name = "solaris", - MCA_BASE_MAKE_VERSION(component, OPAL_MAJOR_VERSION, OPAL_MINOR_VERSION, - OPAL_RELEASE_VERSION), - }, - .timerc_data = - {/* The component is checkpoint ready */ - MCA_BASE_METADATA_PARAM_CHECKPOINT}, -};