mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-16 14:06:48 +07:00
d60a540ac5
Pull s390 updates from Heiko Carstens: "Since Martin is on vacation you get the s390 pull request for the v4.15 merge window this time from me. Besides a lot of cleanups and bug fixes these are the most important changes: - a new regset for runtime instrumentation registers - hardware accelerated AES-GCM support for the aes_s390 module - support for the new CEX6S crypto cards - support for FORTIFY_SOURCE - addition of missing z13 and new z14 instructions to the in-kernel disassembler - generate opcode tables for the in-kernel disassembler out of a simple text file instead of having to manually maintain those tables - fast memset16, memset32 and memset64 implementations - removal of named saved segment support - hardware counter support for z14 - queued spinlocks and queued rwlocks implementations for s390 - use the stack_depth tracking feature for s390 BPF JIT - a new s390_sthyi system call which emulates the sthyi (store hypervisor information) instruction - removal of the old KVM virtio transport - an s390 specific CPU alternatives implementation which is used in the new spinlock code" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux: (88 commits) MAINTAINERS: add virtio-ccw.h to virtio/s390 section s390/noexec: execute kexec datamover without DAT s390: fix transactional execution control register handling s390/bpf: take advantage of stack_depth tracking s390: simplify transactional execution elf hwcap handling s390/zcrypt: Rework struct ap_qact_ap_info. s390/virtio: remove unused header file kvm_virtio.h s390: avoid undefined behaviour s390/disassembler: generate opcode tables from text file s390/disassembler: remove insn_to_mnemonic() s390/dasd: avoid calling do_gettimeofday() s390: vfio-ccw: Do not attempt to free no-op, test and tic cda. s390: remove named saved segment support s390/archrandom: Reconsider s390 arch random implementation s390/pci: do not require AIS facility s390/qdio: sanitize put_indicator s390/qdio: use atomic_cmpxchg s390/nmi: avoid using long-displacement facility s390: pass endianness info to sparse s390/decompressor: remove informational messages ...
113 lines
2.9 KiB
C
113 lines
2.9 KiB
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
/*
|
|
* Copyright IBM Corp. 1999, 2009
|
|
*
|
|
* Author(s): Martin Schwidefsky <schwidefsky@de.ibm.com>
|
|
*/
|
|
|
|
#ifndef __ASM_CTL_REG_H
|
|
#define __ASM_CTL_REG_H
|
|
|
|
#include <linux/const.h>
|
|
|
|
#define CR2_GUARDED_STORAGE _BITUL(63 - 59)
|
|
|
|
#define CR14_CHANNEL_REPORT_SUBMASK _BITUL(63 - 35)
|
|
#define CR14_RECOVERY_SUBMASK _BITUL(63 - 36)
|
|
#define CR14_DEGRADATION_SUBMASK _BITUL(63 - 37)
|
|
#define CR14_EXTERNAL_DAMAGE_SUBMASK _BITUL(63 - 38)
|
|
#define CR14_WARNING_SUBMASK _BITUL(63 - 39)
|
|
|
|
#ifndef __ASSEMBLY__
|
|
|
|
#include <linux/bug.h>
|
|
|
|
#define __ctl_load(array, low, high) do { \
|
|
typedef struct { char _[sizeof(array)]; } addrtype; \
|
|
\
|
|
BUILD_BUG_ON(sizeof(addrtype) != (high - low + 1) * sizeof(long));\
|
|
asm volatile( \
|
|
" lctlg %1,%2,%0\n" \
|
|
: \
|
|
: "Q" (*(addrtype *)(&array)), "i" (low), "i" (high) \
|
|
: "memory"); \
|
|
} while (0)
|
|
|
|
#define __ctl_store(array, low, high) do { \
|
|
typedef struct { char _[sizeof(array)]; } addrtype; \
|
|
\
|
|
BUILD_BUG_ON(sizeof(addrtype) != (high - low + 1) * sizeof(long));\
|
|
asm volatile( \
|
|
" stctg %1,%2,%0\n" \
|
|
: "=Q" (*(addrtype *)(&array)) \
|
|
: "i" (low), "i" (high)); \
|
|
} while (0)
|
|
|
|
static inline void __ctl_set_bit(unsigned int cr, unsigned int bit)
|
|
{
|
|
unsigned long reg;
|
|
|
|
__ctl_store(reg, cr, cr);
|
|
reg |= 1UL << bit;
|
|
__ctl_load(reg, cr, cr);
|
|
}
|
|
|
|
static inline void __ctl_clear_bit(unsigned int cr, unsigned int bit)
|
|
{
|
|
unsigned long reg;
|
|
|
|
__ctl_store(reg, cr, cr);
|
|
reg &= ~(1UL << bit);
|
|
__ctl_load(reg, cr, cr);
|
|
}
|
|
|
|
void smp_ctl_set_bit(int cr, int bit);
|
|
void smp_ctl_clear_bit(int cr, int bit);
|
|
|
|
union ctlreg0 {
|
|
unsigned long val;
|
|
struct {
|
|
unsigned long : 8;
|
|
unsigned long tcx : 1; /* Transactional-Execution control */
|
|
unsigned long pifo : 1; /* Transactional-Execution Program-
|
|
Interruption-Filtering Override */
|
|
unsigned long : 22;
|
|
unsigned long : 3;
|
|
unsigned long lap : 1; /* Low-address-protection control */
|
|
unsigned long : 4;
|
|
unsigned long edat : 1; /* Enhanced-DAT-enablement control */
|
|
unsigned long : 2;
|
|
unsigned long iep : 1; /* Instruction-Execution-Protection */
|
|
unsigned long : 1;
|
|
unsigned long afp : 1; /* AFP-register control */
|
|
unsigned long vx : 1; /* Vector enablement control */
|
|
unsigned long : 7;
|
|
unsigned long sssm : 1; /* Service signal subclass mask */
|
|
unsigned long : 9;
|
|
};
|
|
};
|
|
|
|
union ctlreg2 {
|
|
unsigned long val;
|
|
struct {
|
|
unsigned long : 33;
|
|
unsigned long ducto : 25;
|
|
unsigned long : 1;
|
|
unsigned long gse : 1;
|
|
unsigned long : 1;
|
|
unsigned long tds : 1;
|
|
unsigned long tdc : 2;
|
|
};
|
|
};
|
|
|
|
#ifdef CONFIG_SMP
|
|
# define ctl_set_bit(cr, bit) smp_ctl_set_bit(cr, bit)
|
|
# define ctl_clear_bit(cr, bit) smp_ctl_clear_bit(cr, bit)
|
|
#else
|
|
# define ctl_set_bit(cr, bit) __ctl_set_bit(cr, bit)
|
|
# define ctl_clear_bit(cr, bit) __ctl_clear_bit(cr, bit)
|
|
#endif
|
|
|
|
#endif /* __ASSEMBLY__ */
|
|
#endif /* __ASM_CTL_REG_H */
|