Heiko Carstens | ab14de6 | 2007-02-05 21:18:37 +0100 | [diff] [blame] | 1 | /* |
Heiko Carstens | ab14de6 | 2007-02-05 21:18:37 +0100 | [diff] [blame] | 2 | * Copyright IBM Corp. 2007 |
| 3 | * Author(s): Heiko Carstens <heiko.carstens@de.ibm.com> |
| 4 | */ |
| 5 | |
| 6 | #ifndef _ASM_S390_SCLP_H |
| 7 | #define _ASM_S390_SCLP_H |
| 8 | |
| 9 | #include <linux/types.h> |
Peter Oberparleiter | e5854a5 | 2007-04-27 16:01:31 +0200 | [diff] [blame] | 10 | #include <asm/chpid.h> |
Heiko Carstens | 9c09523 | 2013-11-30 12:00:28 +0100 | [diff] [blame] | 11 | #include <asm/cpu.h> |
Heiko Carstens | ab14de6 | 2007-02-05 21:18:37 +0100 | [diff] [blame] | 12 | |
Peter Oberparleiter | e5854a5 | 2007-04-27 16:01:31 +0200 | [diff] [blame] | 13 | #define SCLP_CHP_INFO_MASK_SIZE 32 |
| 14 | |
| 15 | struct sclp_chp_info { |
| 16 | u8 recognized[SCLP_CHP_INFO_MASK_SIZE]; |
| 17 | u8 standby[SCLP_CHP_INFO_MASK_SIZE]; |
| 18 | u8 configured[SCLP_CHP_INFO_MASK_SIZE]; |
| 19 | }; |
| 20 | |
Heiko Carstens | 05dd253 | 2007-07-10 11:24:09 +0200 | [diff] [blame] | 21 | #define LOADPARM_LEN 8 |
| 22 | |
| 23 | struct sclp_ipl_info { |
| 24 | int is_valid; |
| 25 | int has_dump; |
| 26 | char loadparm[LOADPARM_LEN]; |
| 27 | }; |
| 28 | |
Heiko Carstens | 08d0796 | 2008-01-26 14:10:56 +0100 | [diff] [blame] | 29 | struct sclp_cpu_entry { |
Martin Schwidefsky | 10ad34b | 2015-01-14 17:52:10 +0100 | [diff] [blame] | 30 | u8 core_id; |
Heiko Carstens | 217a440 | 2013-12-30 12:54:14 +0100 | [diff] [blame] | 31 | u8 reserved0[2]; |
| 32 | u8 : 3; |
| 33 | u8 siif : 1; |
David Hildenbrand | d614be0 | 2014-10-14 12:11:02 +0200 | [diff] [blame] | 34 | u8 sigpif : 1; |
| 35 | u8 : 3; |
Heiko Carstens | 217a440 | 2013-12-30 12:54:14 +0100 | [diff] [blame] | 36 | u8 reserved2[10]; |
Heiko Carstens | 08d0796 | 2008-01-26 14:10:56 +0100 | [diff] [blame] | 37 | u8 type; |
| 38 | u8 reserved1; |
| 39 | } __attribute__((packed)); |
| 40 | |
| 41 | struct sclp_cpu_info { |
| 42 | unsigned int configured; |
| 43 | unsigned int standby; |
| 44 | unsigned int combined; |
| 45 | int has_cpu_type; |
Heiko Carstens | 9c09523 | 2013-11-30 12:00:28 +0100 | [diff] [blame] | 46 | struct sclp_cpu_entry cpu[MAX_CPU_ADDRESS + 1]; |
Heiko Carstens | 08d0796 | 2008-01-26 14:10:56 +0100 | [diff] [blame] | 47 | }; |
| 48 | |
| 49 | int sclp_get_cpu_info(struct sclp_cpu_info *info); |
| 50 | int sclp_cpu_configure(u8 cpu); |
| 51 | int sclp_cpu_deconfigure(u8 cpu); |
Heiko Carstens | 23d1742 | 2008-07-14 09:59:21 +0200 | [diff] [blame] | 52 | unsigned long long sclp_get_rnmax(void); |
| 53 | unsigned long long sclp_get_rzm(void); |
Heiko Carstens | cf813db | 2014-03-10 14:50:16 +0100 | [diff] [blame] | 54 | unsigned int sclp_get_max_cpu(void); |
Martin Schwidefsky | 10ad34b | 2015-01-14 17:52:10 +0100 | [diff] [blame] | 55 | unsigned int sclp_get_mtid(u8 cpu_type); |
| 56 | unsigned int sclp_get_mtid_max(void); |
| 57 | unsigned int sclp_get_mtid_prev(void); |
Heiko Carstens | 05dd253 | 2007-07-10 11:24:09 +0200 | [diff] [blame] | 58 | int sclp_sdias_blk_count(void); |
| 59 | int sclp_sdias_copy(void *dest, int blk_num, int nr_blks); |
| 60 | int sclp_chp_configure(struct chp_id chpid); |
| 61 | int sclp_chp_deconfigure(struct chp_id chpid); |
| 62 | int sclp_chp_read_info(struct sclp_chp_info *info); |
| 63 | void sclp_get_ipl_info(struct sclp_ipl_info *info); |
Hendrik Brueckner | 52733e0 | 2013-12-05 19:28:39 +0100 | [diff] [blame] | 64 | bool __init sclp_has_linemode(void); |
| 65 | bool __init sclp_has_vt220(void); |
Martin Schwidefsky | 07be038 | 2014-01-24 09:18:52 +0100 | [diff] [blame] | 66 | bool sclp_has_sprp(void); |
Jan Glauber | 7441b06 | 2012-11-29 14:35:47 +0100 | [diff] [blame] | 67 | int sclp_pci_configure(u32 fid); |
| 68 | int sclp_pci_deconfigure(u32 fid); |
Michael Holzheu | 6f79d33 | 2013-09-11 14:24:54 -0700 | [diff] [blame] | 69 | int memcpy_hsa(void *dest, unsigned long src, size_t count, int mode); |
Michael Holzheu | e657d8f | 2013-11-13 10:38:27 +0100 | [diff] [blame] | 70 | unsigned long sclp_get_hsa_size(void); |
Michael Holzheu | 7b50da5 | 2013-11-13 10:38:27 +0100 | [diff] [blame] | 71 | void sclp_early_detect(void); |
Heiko Carstens | 217a440 | 2013-12-30 12:54:14 +0100 | [diff] [blame] | 72 | int sclp_has_siif(void); |
David Hildenbrand | d614be0 | 2014-10-14 12:11:02 +0200 | [diff] [blame] | 73 | int sclp_has_sigpif(void); |
Michael Mueller | 570126d | 2014-03-15 18:16:26 +0100 | [diff] [blame] | 74 | unsigned int sclp_get_ibc(void); |
Heiko Carstens | ab14de6 | 2007-02-05 21:18:37 +0100 | [diff] [blame] | 75 | |
Chen Gang | fbf87df | 2015-01-03 17:29:07 +0800 | [diff] [blame] | 76 | long _sclp_print_early(const char *); |
| 77 | |
Heiko Carstens | ab14de6 | 2007-02-05 21:18:37 +0100 | [diff] [blame] | 78 | #endif /* _ASM_S390_SCLP_H */ |