Remove last traces of HPPA support - Mailing list pgsql-hackers
From | Tom Lane |
---|---|
Subject | Remove last traces of HPPA support |
Date | |
Msg-id | 3351991.1697728588@sss.pgh.pa.us Whole thread Raw |
Responses |
Re: Remove last traces of HPPA support
Re: Remove last traces of HPPA support Re: Remove last traces of HPPA support |
List | pgsql-hackers |
We removed support for the HP-UX OS in v16, but left in support for the PA-RISC architecture, mainly because I thought that its spinlock mechanism is weird enough to be a good stress test for our spinlock infrastructure. It still is that, but my one remaining HPPA machine has gone to the great recycle heap in the sky. There seems little point in keeping around nominal support for an architecture that we can't test and no one is using anymore. Hence, the attached removes the remaining support for HPPA. Any objections? regards, tom lane diff --git a/contrib/pgcrypto/crypt-blowfish.c b/contrib/pgcrypto/crypt-blowfish.c index 1264eccb3f..5a1b1e1009 100644 --- a/contrib/pgcrypto/crypt-blowfish.c +++ b/contrib/pgcrypto/crypt-blowfish.c @@ -41,7 +41,7 @@ #ifdef __i386__ #define BF_ASM 0 /* 1 */ #define BF_SCALE 1 -#elif defined(__x86_64__) || defined(__hppa__) +#elif defined(__x86_64__) #define BF_ASM 0 #define BF_SCALE 1 #else diff --git a/doc/src/sgml/installation.sgml b/doc/src/sgml/installation.sgml index f4b1f81189..3608aec595 100644 --- a/doc/src/sgml/installation.sgml +++ b/doc/src/sgml/installation.sgml @@ -3359,8 +3359,8 @@ export MANPATH <para> In general, <productname>PostgreSQL</productname> can be expected to work on - these CPU architectures: x86, PowerPC, S/390, SPARC, ARM, MIPS, RISC-V, - and PA-RISC, including + these CPU architectures: x86, PowerPC, S/390, SPARC, ARM, MIPS, + and RISC-V, including big-endian, little-endian, 32-bit, and 64-bit variants where applicable. It is often possible to build on an unsupported CPU type by configuring with @@ -3391,7 +3391,8 @@ export MANPATH <para> Historical versions of <productname>PostgreSQL</productname> or POSTGRES also ran on CPU architectures including Alpha, Itanium, M32R, M68K, - M88K, NS32K, SuperH, and VAX, and operating systems including 4.3BSD, BEOS, + M88K, NS32K, PA-RISC, SuperH, and VAX, + and operating systems including 4.3BSD, BEOS, BSD/OS, DG/UX, Dynix, HP-UX, IRIX, NeXTSTEP, QNX, SCO, SINIX, Sprite, SunOS, Tru64 UNIX, and ULTRIX. </para> diff --git a/src/backend/storage/lmgr/s_lock.c b/src/backend/storage/lmgr/s_lock.c index 327ac64f7c..0e3f04207c 100644 --- a/src/backend/storage/lmgr/s_lock.c +++ b/src/backend/storage/lmgr/s_lock.c @@ -110,12 +110,7 @@ s_lock(volatile slock_t *lock, const char *file, int line, const char *func) void s_unlock(volatile slock_t *lock) { -#ifdef TAS_ACTIVE_WORD - /* HP's PA-RISC */ - *TAS_ACTIVE_WORD(lock) = -1; -#else *lock = 0; -#endif } #endif diff --git a/src/include/port/atomics.h b/src/include/port/atomics.h index bbff945eba..f6f62d68c0 100644 --- a/src/include/port/atomics.h +++ b/src/include/port/atomics.h @@ -69,8 +69,6 @@ #include "port/atomics/arch-x86.h" #elif defined(__ppc__) || defined(__powerpc__) || defined(__ppc64__) || defined(__powerpc64__) #include "port/atomics/arch-ppc.h" -#elif defined(__hppa) || defined(__hppa__) -#include "port/atomics/arch-hppa.h" #endif /* diff --git a/src/include/port/atomics/arch-hppa.h b/src/include/port/atomics/arch-hppa.h deleted file mode 100644 index 4c89fbff71..0000000000 --- a/src/include/port/atomics/arch-hppa.h +++ /dev/null @@ -1,17 +0,0 @@ -/*------------------------------------------------------------------------- - * - * arch-hppa.h - * Atomic operations considerations specific to HPPA - * - * Portions Copyright (c) 1996-2023, PostgreSQL Global Development Group - * Portions Copyright (c) 1994, Regents of the University of California - * - * NOTES: - * - * src/include/port/atomics/arch-hppa.h - * - *------------------------------------------------------------------------- - */ - -/* HPPA doesn't do either read or write reordering */ -#define pg_memory_barrier_impl() pg_compiler_barrier_impl() diff --git a/src/include/port/atomics/fallback.h b/src/include/port/atomics/fallback.h index a9e8e77c03..d119e8cc50 100644 --- a/src/include/port/atomics/fallback.h +++ b/src/include/port/atomics/fallback.h @@ -75,11 +75,7 @@ typedef struct pg_atomic_flag * be content with just one byte instead of 4, but that's not too much * waste. */ -#if defined(__hppa) || defined(__hppa__) /* HP PA-RISC, GCC and HP compilers */ - int sema[4]; -#else int sema; -#endif volatile bool value; } pg_atomic_flag; @@ -93,11 +89,7 @@ typedef struct pg_atomic_flag typedef struct pg_atomic_uint32 { /* Check pg_atomic_flag's definition above for an explanation */ -#if defined(__hppa) || defined(__hppa__) /* HP PA-RISC */ - int sema[4]; -#else int sema; -#endif volatile uint32 value; } pg_atomic_uint32; @@ -111,11 +103,7 @@ typedef struct pg_atomic_uint32 typedef struct pg_atomic_uint64 { /* Check pg_atomic_flag's definition above for an explanation */ -#if defined(__hppa) || defined(__hppa__) /* HP PA-RISC */ - int sema[4]; -#else int sema; -#endif volatile uint64 value; } pg_atomic_uint64; diff --git a/src/include/storage/s_lock.h b/src/include/storage/s_lock.h index c9fa84cc43..e76e8b6888 100644 --- a/src/include/storage/s_lock.h +++ b/src/include/storage/s_lock.h @@ -530,71 +530,6 @@ do \ #endif /* __mips__ && !__sgi */ -#if defined(__hppa) || defined(__hppa__) /* HP PA-RISC */ -/* - * HP's PA-RISC - * - * Because LDCWX requires a 16-byte-aligned address, we declare slock_t as a - * 16-byte struct. The active word in the struct is whichever has the aligned - * address; the other three words just sit at -1. - */ -#define HAS_TEST_AND_SET - -typedef struct -{ - int sema[4]; -} slock_t; - -#define TAS_ACTIVE_WORD(lock) ((volatile int *) (((uintptr_t) (lock) + 15) & ~15)) - -static __inline__ int -tas(volatile slock_t *lock) -{ - volatile int *lockword = TAS_ACTIVE_WORD(lock); - int lockval; - - /* - * The LDCWX instruction atomically clears the target word and - * returns the previous value. Hence, if the instruction returns - * 0, someone else has already acquired the lock before we tested - * it (i.e., we have failed). - * - * Notice that this means that we actually clear the word to set - * the lock and set the word to clear the lock. This is the - * opposite behavior from the SPARC LDSTUB instruction. For some - * reason everything that H-P does is rather baroque... - * - * For details about the LDCWX instruction, see the "Precision - * Architecture and Instruction Reference Manual" (09740-90014 of June - * 1987), p. 5-38. - */ - __asm__ __volatile__( - " ldcwx 0(0,%2),%0 \n" -: "=r"(lockval), "+m"(*lockword) -: "r"(lockword) -: "memory"); - return (lockval == 0); -} - -#define S_UNLOCK(lock) \ - do { \ - __asm__ __volatile__("" : : : "memory"); \ - *TAS_ACTIVE_WORD(lock) = -1; \ - } while (0) - -#define S_INIT_LOCK(lock) \ - do { \ - volatile slock_t *lock_ = (lock); \ - lock_->sema[0] = -1; \ - lock_->sema[1] = -1; \ - lock_->sema[2] = -1; \ - lock_->sema[3] = -1; \ - } while (0) - -#define S_LOCK_FREE(lock) (*TAS_ACTIVE_WORD(lock) != 0) - -#endif /* __hppa || __hppa__ */ - /* * If we have no platform-specific knowledge, but we found that the compiler diff --git a/src/tools/pginclude/cpluspluscheck b/src/tools/pginclude/cpluspluscheck index 4e09c4686b..96852ef75f 100755 --- a/src/tools/pginclude/cpluspluscheck +++ b/src/tools/pginclude/cpluspluscheck @@ -84,12 +84,10 @@ do # Likewise, these files are platform-specific, and the one # relevant to our platform will be included by atomics.h. test "$f" = src/include/port/atomics/arch-arm.h && continue - test "$f" = src/include/port/atomics/arch-hppa.h && continue test "$f" = src/include/port/atomics/arch-ppc.h && continue test "$f" = src/include/port/atomics/arch-x86.h && continue test "$f" = src/include/port/atomics/fallback.h && continue test "$f" = src/include/port/atomics/generic.h && continue - test "$f" = src/include/port/atomics/generic-acc.h && continue test "$f" = src/include/port/atomics/generic-gcc.h && continue test "$f" = src/include/port/atomics/generic-msvc.h && continue test "$f" = src/include/port/atomics/generic-sunpro.h && continue diff --git a/src/tools/pginclude/headerscheck b/src/tools/pginclude/headerscheck index 8dee1b5670..0b9b9740f4 100755 --- a/src/tools/pginclude/headerscheck +++ b/src/tools/pginclude/headerscheck @@ -79,12 +79,10 @@ do # Likewise, these files are platform-specific, and the one # relevant to our platform will be included by atomics.h. test "$f" = src/include/port/atomics/arch-arm.h && continue - test "$f" = src/include/port/atomics/arch-hppa.h && continue test "$f" = src/include/port/atomics/arch-ppc.h && continue test "$f" = src/include/port/atomics/arch-x86.h && continue test "$f" = src/include/port/atomics/fallback.h && continue test "$f" = src/include/port/atomics/generic.h && continue - test "$f" = src/include/port/atomics/generic-acc.h && continue test "$f" = src/include/port/atomics/generic-gcc.h && continue test "$f" = src/include/port/atomics/generic-msvc.h && continue test "$f" = src/include/port/atomics/generic-sunpro.h && continue
pgsql-hackers by date: