Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[S390] fix kvm defines for 31 bit compile

KVM is not available for 31 bit but the KVM defines cause warnings:

arch/s390/include/asm/pgtable.h: In function 'ptep_test_and_clear_user_dirty':
arch/s390/include/asm/pgtable.h:817: warning: integer constant is too large for 'unsigned long' type
arch/s390/include/asm/pgtable.h:818: warning: integer constant is too large for 'unsigned long' type
arch/s390/include/asm/pgtable.h: In function 'ptep_test_and_clear_user_young':
arch/s390/include/asm/pgtable.h:837: warning: integer constant is too large for 'unsigned long' type
arch/s390/include/asm/pgtable.h:838: warning: integer constant is too large for 'unsigned long' type

Add 31 bit versions of the KVM defines to remove the warnings.

Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>

+26 -13
+26 -13
arch/s390/include/asm/pgtable.h
··· 293 293 * swap pte is 1011 and 0001, 0011, 0101, 0111 are invalid. 294 294 */ 295 295 296 - /* Page status table bits for virtualization */ 297 - #define RCP_ACC_BITS 0xf000000000000000UL 298 - #define RCP_FP_BIT 0x0800000000000000UL 299 - #define RCP_PCL_BIT 0x0080000000000000UL 300 - #define RCP_HR_BIT 0x0040000000000000UL 301 - #define RCP_HC_BIT 0x0020000000000000UL 302 - #define RCP_GR_BIT 0x0004000000000000UL 303 - #define RCP_GC_BIT 0x0002000000000000UL 304 - 305 - /* User dirty / referenced bit for KVM's migration feature */ 306 - #define KVM_UR_BIT 0x0000800000000000UL 307 - #define KVM_UC_BIT 0x0000400000000000UL 308 - 309 296 #ifndef __s390x__ 310 297 311 298 /* Bits in the segment table address-space-control-element */ ··· 311 324 312 325 #define _SEGMENT_ENTRY (_SEGMENT_ENTRY_PTL) 313 326 #define _SEGMENT_ENTRY_EMPTY (_SEGMENT_ENTRY_INV) 327 + 328 + /* Page status table bits for virtualization */ 329 + #define RCP_ACC_BITS 0xf0000000UL 330 + #define RCP_FP_BIT 0x08000000UL 331 + #define RCP_PCL_BIT 0x00800000UL 332 + #define RCP_HR_BIT 0x00400000UL 333 + #define RCP_HC_BIT 0x00200000UL 334 + #define RCP_GR_BIT 0x00040000UL 335 + #define RCP_GC_BIT 0x00020000UL 336 + 337 + /* User dirty / referenced bit for KVM's migration feature */ 338 + #define KVM_UR_BIT 0x00008000UL 339 + #define KVM_UC_BIT 0x00004000UL 314 340 315 341 #else /* __s390x__ */ 316 342 ··· 366 366 367 367 #define _SEGMENT_ENTRY_LARGE 0x400 /* STE-format control, large page */ 368 368 #define _SEGMENT_ENTRY_CO 0x100 /* change-recording override */ 369 + 370 + /* Page status table bits for virtualization */ 371 + #define RCP_ACC_BITS 0xf000000000000000UL 372 + #define RCP_FP_BIT 0x0800000000000000UL 373 + #define RCP_PCL_BIT 0x0080000000000000UL 374 + #define RCP_HR_BIT 0x0040000000000000UL 375 + #define RCP_HC_BIT 0x0020000000000000UL 376 + #define RCP_GR_BIT 0x0004000000000000UL 377 + #define RCP_GC_BIT 0x0002000000000000UL 378 + 379 + /* User dirty / referenced bit for KVM's migration feature */ 380 + #define KVM_UR_BIT 0x0000800000000000UL 381 + #define KVM_UC_BIT 0x0000400000000000UL 369 382 370 383 #endif /* __s390x__ */ 371 384