Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 80703617 authored by Martin Schwidefsky's avatar Martin Schwidefsky
Browse files

s390: add support for vector extension



The vector extension introduces 32 128-bit vector registers and a set of
instruction to operate on the vector registers.

The kernel can control the use of vector registers for the problem state
program with a bit in control register 0. Once enabled for a process the
kernel needs to retain the content of the vector registers on context
switch. The signal frame is extended to include the vector registers.
Two new register sets NT_S390_VXRS_LOW and NT_S390_VXRS_HIGH are added
to the regset interface for the debugger and core dumps.

Signed-off-by: default avatarMartin Schwidefsky <schwidefsky@de.ibm.com>
parent 42f4dd61
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -102,6 +102,7 @@
#define HWCAP_S390_ETF3EH	256
#define HWCAP_S390_HIGH_GPRS	512
#define HWCAP_S390_TE		1024
#define HWCAP_S390_VXRS		2048

/*
 * These are used to set parameters in the core dumps.
+7 −3
Original line number Diff line number Diff line
@@ -310,7 +310,10 @@ struct _lowcore {

	/* Extended facility list */
	__u64	stfle_fac_list[32];		/* 0x0f00 */
	__u8	pad_0x1000[0x11b8-0x1000];	/* 0x1000 */
	__u8	pad_0x1000[0x11b0-0x1000];	/* 0x1000 */

	/* Pointer to vector register save area */
	__u64	vector_save_area_addr;		/* 0x11b0 */

	/* 64 bit extparam used for pfault/diag 250: defined by architecture */
	__u64	ext_params2;			/* 0x11B8 */
@@ -334,9 +337,10 @@ struct _lowcore {

	/* Transaction abort diagnostic block */
	__u8	pgm_tdb[256];			/* 0x1800 */
	__u8	pad_0x1900[0x1c00-0x1900];	/* 0x1900 */

	/* align to the top of the prefix area */
	__u8	pad_0x1900[0x2000-0x1900];	/* 0x1900 */
	/* Software defined save area for vector registers */
	__u8	vector_save_area[1024];		/* 0x1c00 */
} __packed;

#endif /* CONFIG_32BIT */
+1 −1
Original line number Diff line number Diff line
@@ -38,7 +38,7 @@ struct mci {
	__u32 pm :  1; /* 22 psw program mask and cc validity */
	__u32 ia :  1; /* 23 psw instruction address validity */
	__u32 fa :  1; /* 24 failing storage address validity */
	__u32	 :  1; /* 25 */
	__u32 vr :  1; /* 25 vector register validity */
	__u32 ec :  1; /* 26 external damage code validity */
	__u32 fp :  1; /* 27 floating point register validity */
	__u32 gr :  1; /* 28 general register validity */
+1 −0
Original line number Diff line number Diff line
@@ -117,6 +117,7 @@ struct thread_struct {
	int ri_signum;
#ifdef CONFIG_64BIT
	unsigned char trap_tdb[256];	/* Transaction abort diagnose block */
	__vector128 *vxrs;		/* Vector register save area */
#endif
};

+3 −0
Original line number Diff line number Diff line
@@ -56,6 +56,7 @@ extern void detect_memory_memblock(void);
#define MACHINE_FLAG_TOPOLOGY	(1UL << 14)
#define MACHINE_FLAG_TE		(1UL << 15)
#define MACHINE_FLAG_TLB_LC	(1UL << 17)
#define MACHINE_FLAG_VX		(1UL << 18)

#define MACHINE_IS_VM		(S390_lowcore.machine_flags & MACHINE_FLAG_VM)
#define MACHINE_IS_KVM		(S390_lowcore.machine_flags & MACHINE_FLAG_KVM)
@@ -78,6 +79,7 @@ extern void detect_memory_memblock(void);
#define MACHINE_HAS_TOPOLOGY	(0)
#define MACHINE_HAS_TE		(0)
#define MACHINE_HAS_TLB_LC	(0)
#define MACHINE_HAS_VX		(0)
#else /* CONFIG_64BIT */
#define MACHINE_HAS_IEEE	(1)
#define MACHINE_HAS_CSP		(1)
@@ -90,6 +92,7 @@ extern void detect_memory_memblock(void);
#define MACHINE_HAS_TOPOLOGY	(S390_lowcore.machine_flags & MACHINE_FLAG_TOPOLOGY)
#define MACHINE_HAS_TE		(S390_lowcore.machine_flags & MACHINE_FLAG_TE)
#define MACHINE_HAS_TLB_LC	(S390_lowcore.machine_flags & MACHINE_FLAG_TLB_LC)
#define MACHINE_HAS_VX		(S390_lowcore.machine_flags & MACHINE_FLAG_VX)
#endif /* CONFIG_64BIT */

/*
Loading