Compare commits

..

No commits in common. "8f73327d8b62ff8ea1b7492b45ed73fb3317241d" and "4beca77733f3602392ad65e2f16628654f87a855" have entirely different histories.

5 changed files with 2 additions and 152 deletions

View File

@ -1,12 +0,0 @@
diff -Nur a/buildflags.mak b/buildflags.mak
--- a/buildflags.mak 2018-05-08 03:44:29.000000000 +0800
+++ b/buildflags.mak 2023-09-04 19:15:30.274937794 +0800
@@ -141,7 +141,7 @@
#
# feature test macros for drand48_r
#
-BASECFLAGS += -D_DEFAULT_SOURCE -D_SVID_SOURCE -D_BSD_SOURCE
+BASECFLAGS += -D_DEFAULT_SOURCE -D_SVID_SOURCE -D_BSD_SOURCE -D_FORTIFY_SOURCE=2
ifneq (,${HFI_BRAKE_DEBUG})
BASECFLAGS += -DHFI_BRAKE_DEBUG

View File

@ -1,13 +0,0 @@
diff --git a/psm_utils.c b/psm_utils.c
index 87e522b..6b7c0d1 100644
--- a/psm_utils.c
+++ b/psm_utils.c
@@ -57,6 +57,8 @@
#include "psm_mq_internal.h"
#include "psm_am_internal.h"
+uint32_t psmi_cpu_model;
+
int psmi_ep_device_is_enabled(const psm2_ep_t ep, int devid);
struct psmi_epid_table psmi_epid_table;

View File

@ -1,74 +0,0 @@
diff --git a/psm_error.h b/psm_error.h
index f335382..cb1b4ba 100644
--- a/psm_error.h
+++ b/psm_error.h
@@ -65,7 +65,7 @@
#define PSMI_EP_NORETURN ((psm2_ep_t) -2)
#define PSMI_EP_LOGEVENT ((psm2_ep_t) -3)
-psm2_ep_errhandler_t psmi_errhandler_global;
+extern psm2_ep_errhandler_t psmi_errhandler_global;
psm2_error_t MOCKABLE(psmi_handle_error)(psm2_ep_t ep, psm2_error_t error,
const char *buf, ...)
diff --git a/psm_utils.h b/psm_utils.h
index 3358704..5c02a2f 100644
--- a/psm_utils.h
+++ b/psm_utils.h
@@ -325,7 +325,7 @@ uint32_t psmi_get_hfi_type(const psmi_context_t *context);
/*
* Global model so we can tune defaults better for specific cpu's
*/
-uint32_t psmi_cpu_model;
+extern uint32_t psmi_cpu_model;
/*
* Diagnostics, all in psm_diags.c
@@ -342,7 +342,7 @@ void psmi_multi_ep_init();
* Fault injection
*/
struct psmi_faultinj_spec;
-int psmi_faultinj_enabled; /* use macro to test */
+extern int psmi_faultinj_enabled; /* use macro to test */
#if 1 /* possible to disable at compile time */
#define PSMI_FAULTINJ_ENABLED() (!!psmi_faultinj_enabled)
#else
diff --git a/ptl_am/ptl_fwd.h b/ptl_am/ptl_fwd.h
index e1bd064..1d0fec4 100644
--- a/ptl_am/ptl_fwd.h
+++ b/ptl_am/ptl_fwd.h
@@ -57,7 +57,7 @@
#define _PTL_FWD_AMSH_H
/* Symbol in am ptl */
-struct ptl_ctl_init psmi_ptl_amsh;
+extern struct ptl_ctl_init psmi_ptl_amsh;
extern int psmi_shm_mq_rv_thresh;
diff --git a/ptl_ips/ptl_fwd.h b/ptl_ips/ptl_fwd.h
index 3702fba..b774260 100644
--- a/ptl_ips/ptl_fwd.h
+++ b/ptl_ips/ptl_fwd.h
@@ -61,7 +61,7 @@ typedef struct ips_epaddr ips_epaddr_t;
typedef struct ips_msgctl ips_msgctl_t;
/* Symbol in ips ptl */
-struct ptl_ctl_init psmi_ptl_ips;
+extern struct ptl_ctl_init psmi_ptl_ips;
-struct ptl_ctl_rcvthread psmi_ptl_ips_rcvthread;
+extern struct ptl_ctl_rcvthread psmi_ptl_ips_rcvthread;
#endif /* _PTL_FWD_IPS_H */
diff --git a/ptl_self/ptl_fwd.h b/ptl_self/ptl_fwd.h
index 77ee7f9..7ee6b73 100644
--- a/ptl_self/ptl_fwd.h
+++ b/ptl_self/ptl_fwd.h
@@ -57,6 +57,6 @@
#define _PTL_FWD_SELF_H
/* Symbol in am ptl */
-struct ptl_ctl_init psmi_ptl_self;
+extern struct ptl_ctl_init psmi_ptl_self;
#endif

View File

@ -1,32 +0,0 @@
From c3a7d9468d5623c0164b783346bada8664a9a2c9 Mon Sep 17 00:00:00 2001
From: Brendan Cunningham <14318587+BrendanCunningham@users.noreply.github.com>
Date: Sat, 20 Nov 2021 13:02:06 -0500
Subject: [PATCH] ips_cmpxchg: remove compile-breaking bad cast-to-struct.
uint32_t ptr argument in compare-and-swap code snippet should not be
cast to pointer-to-uint32_t[100] struct.
Signed-off-by: Brendan Cunningham <bcunningham@cornelisnetworks.com>
---
include/linux-i386/sysdep.h | 5 +----
rpm_release_extension | 2 +-
2 files changed, 2 insertions(+), 5 deletions(-)
diff --git a/include/linux-i386/sysdep.h b/include/linux-i386/sysdep.h
index bfd5746..2c48c1e 100644
--- a/include/linux-i386/sysdep.h
+++ b/include/linux-i386/sysdep.h
@@ -139,12 +139,9 @@ static __inline__ uint32_t ips_cmpxchg(volatile uint32_t *ptr,
uint32_t old_val, uint32_t new_val)
{
uint32_t prev;
- struct xchg_dummy {
- uint32_t a[100];
- };
asm volatile (LOCK_PREFIX "cmpxchgl %1,%2" : "=a"(prev)
- : "q"(new_val), "m"(*(struct xchg_dummy *)ptr), "0"(old_val)
+ : "q"(new_val), "m"(*ptr), "0"(old_val)
: "memory");
return prev;

View File

@ -1,6 +1,6 @@
Name: libpsm2
Version: 10.3.58
Release: 11
Release: 6
Summary: Intel PSM Libraries
License: BSD or GPLv2
URL: https://github.com/01org/opa-psm2/
@ -9,13 +9,9 @@ Source0: https://github.com/intel/opa-psm2/archive/PSM2_10.3.58.tar.gz
#extend fdesc array
Patch0: 0000-extend-fdesc-array.patch
Patch1: fix-stringop-truncation-build-error.patch
Patch2: Fix-opa-psm2-gcc10.patch
Patch3: Fix-missing-extern.patch
Patch4: Fix-opa-psm2-gcc12-ips_cmpxchg-remove-compile-breaking-bad.patch
Patch5: Add-D_FORTIFY_SOURCE-compile-option.patch
ExclusiveArch: x86_64
BuildRequires: libuuid-devel numactl-devel gcc systemd-udev
BuildRequires: libuuid-devel numactl-devel
Obsoletes: hfi1-psm < 1.0.0
%package devel
@ -77,21 +73,6 @@ rm -f %{buildroot}%{_libdir}/*.a
%{_sysconfdir}/modprobe.d/libpsm2-compat.conf
%changelog
* Mon Sep 4 2023 liyanan <thistleslyn@163.com> - 10.3.58-11
- Add D_FORTIFY_SOURC compile option to solve self-compilation failure problem
* Fri Jul 14 2023 yaoxin <yao_xin001@hoperun.com> - 10.3.58-10
- Fix complication failed due to gcc update to 12.3.1
* Fri Aug 06 2021 wangyong <wangyong187@huawei.com> - 10.3.58-9
- Fix downstream missing lib problem
* Mon Aug 02 2021 wangyong <wangyong187@huawei.com> - 10.3.58-8
- Fix build error caused by GCC upgrade to GCC-10
* Wed Jun 16 2021 wulei <wulei80@huawei.com> - 10.3.58-7
- Fix build error
* Thu Jul 02 2020 senlin <xiasenlin1@huawei.com> - 10.3.58-6
- Fix stringop-truncation build error