mirror of
https://git.postgresql.org/git/postgresql.git
synced 2024-11-27 07:21:09 +08:00
Remove support for HPPA (a/k/a PA-RISC) architecture.
This old CPU architecture hasn't been produced in decades, and whatever instances might still survive are surely too underpowered for anyone to consider running Postgres on in production. We'd nonetheless continued to carry code support for it (largely at my insistence), because its unique implementation of spinlocks seemed like a good edge case for our spinlock infrastructure. However, our last buildfarm animal of this type was retired last year, and it seems quite unlikely that another will emerge. Without the ability to run tests, the argument that this is useful test code fails to hold water. Furthermore, carrying code support for an untestable architecture has costs not to be ignored. So, remove HPPA-specific code, in the same vein as commits718aa43a4
and92d70b77e
. Discussion: https://postgr.es/m/3351991.1697728588@sss.pgh.pa.us
This commit is contained in:
parent
7967d10c5b
commit
edadeb0710
@ -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
|
||||
|
@ -3390,8 +3390,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
|
||||
@ -3422,7 +3422,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, AIX, BEOS,
|
||||
M88K, NS32K, PA-RISC, SuperH, and VAX,
|
||||
and operating systems including 4.3BSD, AIX, BEOS,
|
||||
BSD/OS, DG/UX, Dynix, HP-UX, IRIX, NeXTSTEP, QNX, SCO, SINIX, Sprite, SunOS,
|
||||
Tru64 UNIX, and ULTRIX.
|
||||
</para>
|
||||
|
@ -116,12 +116,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
|
||||
|
||||
|
@ -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
|
||||
|
||||
/*
|
||||
|
@ -1,17 +0,0 @@
|
||||
/*-------------------------------------------------------------------------
|
||||
*
|
||||
* arch-hppa.h
|
||||
* Atomic operations considerations specific to HPPA
|
||||
*
|
||||
* Portions Copyright (c) 1996-2024, 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()
|
@ -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;
|
||||
|
||||
|
@ -526,71 +526,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
|
||||
|
@ -107,12 +107,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
|
||||
|
Loading…
Reference in New Issue
Block a user