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

s390/sclp: add sclp_get_ibc function

The patch adds functionality to retrieve the IBC configuration
by means of function sclp_get_ibc().

Signed-off-by: Michael Mueller <mimu@linux.vnet.ibm.com>
Acked-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Acked-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Acked-by: Christian Borntraeger <borntraeger@de.ibm.com>

authored by

Michael Mueller and committed by
Christian Borntraeger
570126d3 4953919f

+12 -1
+1
arch/s390/include/asm/sclp.h
··· 66 66 unsigned long sclp_get_hsa_size(void); 67 67 void sclp_early_detect(void); 68 68 int sclp_has_siif(void); 69 + unsigned int sclp_get_ibc(void); 69 70 70 71 #endif /* _ASM_S390_SCLP_H */
+11 -1
drivers/s390/char/sclp_early.c
··· 27 27 u8 loadparm[8]; /* 24-31 */ 28 28 u8 _reserved1[48 - 32]; /* 32-47 */ 29 29 u64 facilities; /* 48-55 */ 30 - u8 _reserved2[84 - 56]; /* 56-83 */ 30 + u8 _reserved2a[76 - 56]; /* 56-75 */ 31 + u32 ibc; /* 76-79 */ 32 + u8 _reserved2b[84 - 80]; /* 80-83 */ 31 33 u8 fac84; /* 84 */ 32 34 u8 fac85; /* 85 */ 33 35 u8 _reserved3[91 - 86]; /* 86-90 */ ··· 49 47 static unsigned int sclp_max_cpu; 50 48 static struct sclp_ipl_info sclp_ipl_info; 51 49 static unsigned char sclp_siif; 50 + static u32 sclp_ibc; 52 51 53 52 u64 sclp_facilities; 54 53 u8 sclp_fac84; ··· 114 111 sclp_rnmax = sccb->rnmax ? sccb->rnmax : sccb->rnmax2; 115 112 sclp_rzm = sccb->rnsize ? sccb->rnsize : sccb->rnsize2; 116 113 sclp_rzm <<= 20; 114 + sclp_ibc = sccb->ibc; 117 115 118 116 if (!sccb->hcpua) { 119 117 if (MACHINE_IS_VM) ··· 171 167 return sclp_siif; 172 168 } 173 169 EXPORT_SYMBOL(sclp_has_siif); 170 + 171 + unsigned int sclp_get_ibc(void) 172 + { 173 + return sclp_ibc; 174 + } 175 + EXPORT_SYMBOL(sclp_get_ibc); 174 176 175 177 /* 176 178 * This function will be called after sclp_facilities_detect(), which gets