Skip to content

Commit 1a27555

Browse files
committed
Purge some leftover OPAL atomics.
Signed-off-by: Austen Lauria <awlauria@us.ibm.com>
1 parent af1ec9a commit 1a27555

File tree

9 files changed

+7
-116
lines changed

9 files changed

+7
-116
lines changed

opal/include/opal/sys/atomic.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -164,8 +164,6 @@ enum {
164164
*********************************************************************/
165165
#if defined(DOXYGEN)
166166
/* don't include system-level gorp when generating doxygen files */
167-
#elif OPAL_ASSEMBLY_BUILTIN == OPAL_BUILTIN_SYNC
168-
#include "opal/sys/sync_builtin/atomic.h"
169167
#elif OPAL_ASSEMBLY_BUILTIN == OPAL_BUILTIN_GCC
170168
#include "opal/sys/gcc_builtin/atomic.h"
171169
#elif OPAL_ASSEMBLY_ARCH == OPAL_X86_64

opal/mca/patcher/base/patcher_base_patch.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,8 +105,6 @@ static void flush_and_invalidate_cache (unsigned long a)
105105
}
106106
#elif OPAL_ASSEMBLY_ARCH == OPAL_X86_64
107107
__asm__ volatile("mfence;clflush %0;mfence" : :"m" (*(char*)a));
108-
#elif OPAL_ASSEMBLY_ARCH == OPAL_IA64
109-
__asm__ volatile ("fc %0;; sync.i;; srlz.i;;" : : "r"(a) : "memory");
110108
#elif OPAL_ASSEMBLY_ARCH == OPAL_ARM64
111109
__asm__ volatile ("dc cvau, %0\n\t"
112110
"dsb ish\n\t"

opal/mca/patcher/overwrite/patcher_overwrite_module.c

Lines changed: 1 addition & 106 deletions
Original file line numberDiff line numberDiff line change
@@ -30,59 +30,7 @@
3030
#include <dlfcn.h>
3131
#include <assert.h>
3232

33-
#if (OPAL_ASSEMBLY_ARCH == OPAL_IA32) || (OPAL_ASSEMBLY_ARCH == OPAL_IA64) || (OPAL_ASSEMBLY_ARCH == OPAL_X86_64)
34-
35-
#if (OPAL_ASSEMBLY_ARCH == OPAL_IA64)
36-
37-
#define INSERT_BIT(d,p,v) do { \
38-
unsigned char c=*(d); \
39-
assert(((p) < 8) && ((p) >= 0)); \
40-
c&= ~(1<<(p)); \
41-
c|= ((v)<<(p)); \
42-
*(d) = c; \
43-
} while (0)
44-
45-
static inline void
46-
copy_instr_slot(unsigned char **dst, int *dst_bitpos, unsigned long instr_slot)
47-
{
48-
for (int i = 40 ; i >= 0 ; --i) {
49-
INSERT_BIT(*dst, *dst_bitpos, (instr_slot>>i)&1);
50-
if (*dst_bitpos == 0) {
51-
++*dst;
52-
*dst_bitpos = 7;
53-
} else {
54-
--*dst_bitpos;
55-
}
56-
}
57-
}
58-
59-
static void make_ia64_bundle (unsigned char *dst,
60-
unsigned long i2,
61-
unsigned long i1,
62-
unsigned long i0,
63-
unsigned template)
64-
{
65-
/*
66-
* each instr is 41 bits, template is 5 bits
67-
*
68-
* generate the bit concatenation of i2:i1:i0:t, all in all 128 bits
69-
*
70-
*/
71-
72-
int dst_bitpos = 7;
73-
74-
copy_instr_slot(&dst, &dst_bitpos, i2);
75-
copy_instr_slot(&dst, &dst_bitpos, i1);
76-
copy_instr_slot(&dst, &dst_bitpos, i0);
77-
78-
assert(dst_bitpos == 4);
79-
80-
for (int i = 4 ; i >= 0 ; --i) {
81-
INSERT_BIT(dst, dst_bitpos, (template>>i)&1);
82-
--dst_bitpos;
83-
}
84-
}
85-
#endif /* defined(__ia64__) */
33+
#if (OPAL_ASSEMBLY_ARCH == OPAL_IA32) || (OPAL_ASSEMBLY_ARCH == OPAL_X86_64)
8634

8735
static int mca_patcher_overwrite_apply_patch (mca_patcher_base_patch_t *patch)
8836
{
@@ -100,53 +48,6 @@ static int mca_patcher_overwrite_apply_patch (mca_patcher_base_patch_t *patch)
10048
*(unsigned char*) (patch->patch_data +10) = 0x41;
10149
*(unsigned char*) (patch->patch_data +11) = 0xff;
10250
*(unsigned char*) (patch->patch_data +12) = 0xe3;
103-
#elif (OPAL_ASSEMBLY_ARCH == OPAL_IA64)
104-
{
105-
/*
106-
* target64 = IP + ((i << 59 | imm39 << 20 | imm20) << 4)
107-
* imm64 = i << 63 | imm41 << 22 | ic << 21 | imm5c << 16 | imm9d << 7 | imm7b
108-
*/
109-
unsigned char buf[16];
110-
unsigned long long imm64 = func_new_addr - patch->patch_orig - 16;
111-
register unsigned long long glb_ptr __asm__("r1");
112-
unsigned long long nop =
113-
(0x0ULL<<37) | /* O */
114-
(0x0ULL<<36) | /* i */
115-
(0x0ULL<<33) | /* x3 */
116-
(0x1ULL<<27) | /* x6 */
117-
(0x0ULL<< 6) | /* imm20 */
118-
(0x0ULL<< 0); /* qp */
119-
unsigned long long brl =
120-
(0xcULL << 37) |
121-
(((imm64>>63)&0x1ULL) << 36) |
122-
(0x0ULL << 35) |
123-
(0x0ULL << 33) |
124-
(((imm64>>4)&0xFFFFFULL) << 13) |
125-
(0x0ULL << 6) |
126-
(0x0ULL << 0);
127-
unsigned long long movl =
128-
(0x6ULL << 37) |
129-
(((glb_ptr>>63)&0x1ULL) << 36) |
130-
(((glb_ptr>> 7)&0x1FFULL) << 27) |
131-
(((glb_ptr>>16)&0x1FULL) << 22) |
132-
(((glb_ptr>>21)&0x1ULL) << 21) |
133-
(0ULL << 20) |
134-
(((glb_ptr>> 0)&0x7FULL) << 13) |
135-
(1ULL << 6) |
136-
(0x0ULL << 0);
137-
138-
patch->patch_data_size = 32;
139-
140-
make_ia64_bundle(buf, movl, (glb_ptr>>22)&0x1FFFFFFFFFFULL, nop, 5);
141-
for (int i = 0 ; i < 16 ; ++i) {
142-
patch->patch_data[16-i-1] = buf[i];
143-
}
144-
145-
make_ia64_bundle(buf, brl, ((imm64>>24)&0x7FFFFFFFFFULL)<<2, nop, 5);
146-
for (int i = 0 ; i < 16 ; ++i) {
147-
patch->patch_data[32-i-1] = buf[i];
148-
}
149-
}
15051
#endif
15152
}
15253

@@ -359,12 +260,6 @@ static int mca_patcher_overwrite_patch_symbol (const char *func_symbol_name, uin
359260

360261
old_addr = (unsigned long)sym_addr;
361262

362-
#if (OPAL_ASSEMBLY_ARCH == OPAL_IA64)
363-
/* On IA64 addresses are all indirect */
364-
func_new_addr = *(unsigned long *)func_new_addr;
365-
old_addr = *(unsigned long *) old_addr;
366-
#endif
367-
368263
if (func_old_addr) {
369264
/* we will be overwritting part of the original function. do not return
370265
* its address */

oshmem/shmem/c/shmem_clear_cache_inv.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828

2929
void shmem_clear_cache_inv(void)
3030
{
31-
#if (OPAL_ASSEMBLY_ARCH == OPAL_IA64) || (OPAL_ASSEMBLY_ARCH == OPAL_IA32) || (OPAL_ASSEMBLY_ARCH == OPAL_X86_64)
31+
#if (OPAL_ASSEMBLY_ARCH == OPAL_IA32) || (OPAL_ASSEMBLY_ARCH == OPAL_X86_64)
3232
do {SHMEM_API_VERBOSE(10,"shmem_clear_cache_inv is not supported by the current CPU architecture");}while (0);
3333
#else
3434
/* another implementation */

oshmem/shmem/c/shmem_clear_cache_line_inv.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828

2929
void shmem_clear_cache_line_inv(void *target)
3030
{
31-
#if (OPAL_ASSEMBLY_ARCH == OPAL_IA64) || (OPAL_ASSEMBLY_ARCH == OPAL_IA32) || (OPAL_ASSEMBLY_ARCH == OPAL_X86_64)
31+
#if (OPAL_ASSEMBLY_ARCH == OPAL_IA32) || (OPAL_ASSEMBLY_ARCH == OPAL_X86_64)
3232
do {SHMEM_API_VERBOSE(10,"shmem_clear_cache_line_inv is not supported by the current CPU architecture");}while (0);
3333
#else
3434
/* another implementation */

oshmem/shmem/c/shmem_set_cache_inv.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828

2929
void shmem_set_cache_inv(void)
3030
{
31-
#if (OPAL_ASSEMBLY_ARCH == OPAL_IA64) || (OPAL_ASSEMBLY_ARCH == OPAL_IA32) || (OPAL_ASSEMBLY_ARCH == OPAL_X86_64)
31+
#if (OPAL_ASSEMBLY_ARCH == OPAL_IA32) || (OPAL_ASSEMBLY_ARCH == OPAL_X86_64)
3232
do {SHMEM_API_VERBOSE(10,"shmem_set_cache_inv is not supported by the current CPU architecture");}while (0);
3333
#else
3434
/* another implementation */

oshmem/shmem/c/shmem_set_cache_line_inv.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828

2929
void shmem_set_cache_line_inv(void *target)
3030
{
31-
#if (OPAL_ASSEMBLY_ARCH == OPAL_IA64) || (OPAL_ASSEMBLY_ARCH == OPAL_IA32) || (OPAL_ASSEMBLY_ARCH == OPAL_X86_64)
31+
#if (OPAL_ASSEMBLY_ARCH == OPAL_IA32) || (OPAL_ASSEMBLY_ARCH == OPAL_X86_64)
3232
do {SHMEM_API_VERBOSE(10,"shmem_set_cache_line_inv is not supported by the current CPU architecture");}while (0);
3333
#else
3434
/* another implementation */

oshmem/shmem/c/shmem_udcflush.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727

2828
void shmem_udcflush(void)
2929
{
30-
#if (OPAL_ASSEMBLY_ARCH == OPAL_IA64) || (OPAL_ASSEMBLY_ARCH == OPAL_IA32) || (OPAL_ASSEMBLY_ARCH == OPAL_X86_64)
30+
#if (OPAL_ASSEMBLY_ARCH == OPAL_IA32) || (OPAL_ASSEMBLY_ARCH == OPAL_X86_64)
3131
do {SHMEM_API_VERBOSE(10,"shmem_udcflush is not supported by the current CPU architecture");}while (0);
3232
#else
3333
/* another implementation */

oshmem/shmem/c/shmem_udcflush_line.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626

2727
void shmem_udcflush_line(void *target)
2828
{
29-
#if (OPAL_ASSEMBLY_ARCH == OPAL_IA64) || (OPAL_ASSEMBLY_ARCH == OPAL_IA32) || (OPAL_ASSEMBLY_ARCH == OPAL_X86_64)
29+
#if (OPAL_ASSEMBLY_ARCH == OPAL_IA32) || (OPAL_ASSEMBLY_ARCH == OPAL_X86_64)
3030
do {SHMEM_API_VERBOSE(10,"shmem_udcflush_line is not supported by the current CPU architecture");}while (0);
3131
#else
3232
/* another implementation */

0 commit comments

Comments
 (0)