Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0-only */
0002 /*
0003  * s390x processor specific defines
0004  */
0005 #ifndef SELFTEST_KVM_PROCESSOR_H
0006 #define SELFTEST_KVM_PROCESSOR_H
0007 
0008 #include <linux/compiler.h>
0009 
0010 /* Bits in the region/segment table entry */
0011 #define REGION_ENTRY_ORIGIN ~0xfffUL /* region/segment table origin    */
0012 #define REGION_ENTRY_PROTECT    0x200    /* region protection bit      */
0013 #define REGION_ENTRY_NOEXEC 0x100    /* region no-execute bit      */
0014 #define REGION_ENTRY_OFFSET 0xc0     /* region table offset        */
0015 #define REGION_ENTRY_INVALID    0x20     /* invalid region table entry     */
0016 #define REGION_ENTRY_TYPE   0x0c     /* region/segment table type mask */
0017 #define REGION_ENTRY_LENGTH 0x03     /* region third length        */
0018 
0019 /* Bits in the page table entry */
0020 #define PAGE_INVALID    0x400       /* HW invalid bit    */
0021 #define PAGE_PROTECT    0x200       /* HW read-only bit  */
0022 #define PAGE_NOEXEC 0x100       /* HW no-execute bit */
0023 
0024 /* Is there a portable way to do this? */
0025 static inline void cpu_relax(void)
0026 {
0027     barrier();
0028 }
0029 
0030 #endif