1b2441318SGreg Kroah-Hartman /* SPDX-License-Identifier: GPL-2.0 */ 2c6557e7fSMartin Schwidefsky /* 3c6557e7fSMartin Schwidefsky * definitions for external memory segment support 4a53c8fabSHeiko Carstens * Copyright IBM Corp. 2003 5c6557e7fSMartin Schwidefsky */ 6c6557e7fSMartin Schwidefsky 7c6557e7fSMartin Schwidefsky #ifndef _ASM_S390X_DCSS_H 8c6557e7fSMartin Schwidefsky #define _ASM_S390X_DCSS_H 9c6557e7fSMartin Schwidefsky #ifndef __ASSEMBLY__ 10c6557e7fSMartin Schwidefsky 11*b2b15f07SAlexander Gordeev /* 12*b2b15f07SAlexander Gordeev * DCSS segment is defined as a contiguous range of pages using DEFSEG command. 13*b2b15f07SAlexander Gordeev * The range start and end is a page number with a value less than or equal to 14*b2b15f07SAlexander Gordeev * 0x7ffffff (see CP Commands and Utilities Reference). 15*b2b15f07SAlexander Gordeev */ 16*b2b15f07SAlexander Gordeev #define MAX_DCSS_ADDR (512UL * SZ_1G) 17*b2b15f07SAlexander Gordeev 18c6557e7fSMartin Schwidefsky /* possible values for segment type as returned by segment_info */ 19c6557e7fSMartin Schwidefsky #define SEG_TYPE_SW 0 20c6557e7fSMartin Schwidefsky #define SEG_TYPE_EW 1 21c6557e7fSMartin Schwidefsky #define SEG_TYPE_SR 2 22c6557e7fSMartin Schwidefsky #define SEG_TYPE_ER 3 23c6557e7fSMartin Schwidefsky #define SEG_TYPE_SN 4 24c6557e7fSMartin Schwidefsky #define SEG_TYPE_EN 5 25c6557e7fSMartin Schwidefsky #define SEG_TYPE_SC 6 26c6557e7fSMartin Schwidefsky #define SEG_TYPE_EWEN 7 27c6557e7fSMartin Schwidefsky 28c6557e7fSMartin Schwidefsky #define SEGMENT_SHARED 0 29c6557e7fSMartin Schwidefsky #define SEGMENT_EXCLUSIVE 1 30c6557e7fSMartin Schwidefsky 31c6557e7fSMartin Schwidefsky int segment_load (char *name, int segtype, unsigned long *addr, unsigned long *length); 32c6557e7fSMartin Schwidefsky void segment_unload(char *name); 33c6557e7fSMartin Schwidefsky void segment_save(char *name); 34c6557e7fSMartin Schwidefsky int segment_type (char* name); 35c6557e7fSMartin Schwidefsky int segment_modify_shared (char *name, int do_nonshared); 36c6557e7fSMartin Schwidefsky void segment_warning(int rc, char *seg_name); 37c6557e7fSMartin Schwidefsky 38c6557e7fSMartin Schwidefsky #endif 39c6557e7fSMartin Schwidefsky #endif 40