s390/pgtable: Add missing hardware bits for puds, pmds
authorClaudio Imbrenda <imbrenda@linux.ibm.com>
Mon, 29 Apr 2024 14:34:09 +0000 (16:34 +0200)
committerAlexander Gordeev <agordeev@linux.ibm.com>
Tue, 14 May 2024 11:37:05 +0000 (13:37 +0200)
Add the table type and ACCF validity bits to _SEGMENT_ENTRY_BITS and
_SEGMENT_ENTRY_HARDWARE_BITS{,_LARGE}.

For completeness, introduce _REGION3_ENTRY_HARDWARE_BITS_LARGE and
_REGION3_ENTRY_HARDWARE_BITS, containing the hardware bits used for
large puds and normal puds.

Signed-off-by: Claudio Imbrenda <imbrenda@linux.ibm.com>
Reviewed-by: Heiko Carstens <hca@linux.ibm.com>
Link: https://lore.kernel.org/r/20240429143409.49892-3-imbrenda@linux.ibm.com
Signed-off-by: Alexander Gordeev <agordeev@linux.ibm.com>
arch/s390/include/asm/pgtable.h

index f64de68b13aa5a9fa9ff5e7ee7c4893cb5b43733..07f0307905ffeaad67853ef64eb3b730c5be9b22 100644 (file)
@@ -268,6 +268,8 @@ static inline int is_module_addr(void *addr)
 #define _REGION3_ENTRY         (_REGION_ENTRY_TYPE_R3 | _REGION_ENTRY_LENGTH)
 #define _REGION3_ENTRY_EMPTY   (_REGION_ENTRY_TYPE_R3 | _REGION_ENTRY_INVALID)
 
+#define _REGION3_ENTRY_HARDWARE_BITS           0xfffffffffffff6ffUL
+#define _REGION3_ENTRY_HARDWARE_BITS_LARGE     0xffffffff8001073cUL
 #define _REGION3_ENTRY_ORIGIN_LARGE ~0x7fffffffUL /* large page address             */
 #define _REGION3_ENTRY_DIRTY   0x2000  /* SW region dirty bit */
 #define _REGION3_ENTRY_YOUNG   0x1000  /* SW region young bit */
@@ -284,9 +286,9 @@ static inline int is_module_addr(void *addr)
 #define _REGION_ENTRY_BITS      0xfffffffffffff22fUL
 
 /* Bits in the segment table entry */
-#define _SEGMENT_ENTRY_BITS                    0xfffffffffffffe33UL
-#define _SEGMENT_ENTRY_HARDWARE_BITS           0xfffffffffffffe30UL
-#define _SEGMENT_ENTRY_HARDWARE_BITS_LARGE     0xfffffffffff00730UL
+#define _SEGMENT_ENTRY_BITS                    0xfffffffffffffe3fUL
+#define _SEGMENT_ENTRY_HARDWARE_BITS           0xfffffffffffffe3cUL
+#define _SEGMENT_ENTRY_HARDWARE_BITS_LARGE     0xfffffffffff1073cUL
 #define _SEGMENT_ENTRY_ORIGIN_LARGE ~0xfffffUL /* large page address       */
 #define _SEGMENT_ENTRY_ORIGIN  ~0x7ffUL/* page table origin                */
 #define _SEGMENT_ENTRY_PROTECT 0x200   /* segment protection bit           */