aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390
diff options
context:
space:
mode:
authorHeiko Carstens <heiko.carstens@de.ibm.com>2013-12-30 06:54:14 -0500
committerChristian Borntraeger <borntraeger@de.ibm.com>2014-04-22 07:24:38 -0400
commit217a440683b51463f53e397cfdda27d7e92bf275 (patch)
treefbfb79903b5d5e69d59cbb9adda551c5de000604 /drivers/s390
parent2293897805c2fea69e45aca31b3589d4590af89d (diff)
KVM: s390/sclp: correctly set eca siif bit
Check if siif is available before setting. Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Reviewed-by: Thomas Huth <thuth@linux.vnet.ibm.com> Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Diffstat (limited to 'drivers/s390')
-rw-r--r--drivers/s390/char/sclp_early.c22
1 files changed, 21 insertions, 1 deletions
diff --git a/drivers/s390/char/sclp_early.c b/drivers/s390/char/sclp_early.c
index 14196ea0fdf3..b57fe0efb422 100644
--- a/drivers/s390/char/sclp_early.c
+++ b/drivers/s390/char/sclp_early.c
@@ -22,7 +22,8 @@ struct read_info_sccb {
22 u8 rnsize; /* 10 */ 22 u8 rnsize; /* 10 */
23 u8 _reserved0[16 - 11]; /* 11-15 */ 23 u8 _reserved0[16 - 11]; /* 11-15 */
24 u16 ncpurl; /* 16-17 */ 24 u16 ncpurl; /* 16-17 */
25 u8 _reserved7[24 - 18]; /* 18-23 */ 25 u16 cpuoff; /* 18-19 */
26 u8 _reserved7[24 - 20]; /* 20-23 */
26 u8 loadparm[8]; /* 24-31 */ 27 u8 loadparm[8]; /* 24-31 */
27 u8 _reserved1[48 - 32]; /* 32-47 */ 28 u8 _reserved1[48 - 32]; /* 32-47 */
28 u64 facilities; /* 48-55 */ 29 u64 facilities; /* 48-55 */
@@ -45,6 +46,7 @@ static unsigned int sclp_con_has_linemode __initdata;
45static unsigned long sclp_hsa_size; 46static unsigned long sclp_hsa_size;
46static unsigned int sclp_max_cpu; 47static unsigned int sclp_max_cpu;
47static struct sclp_ipl_info sclp_ipl_info; 48static struct sclp_ipl_info sclp_ipl_info;
49static unsigned char sclp_siif;
48 50
49u64 sclp_facilities; 51u64 sclp_facilities;
50u8 sclp_fac84; 52u8 sclp_fac84;
@@ -96,6 +98,9 @@ static int __init sclp_read_info_early(struct read_info_sccb *sccb)
96 98
97static void __init sclp_facilities_detect(struct read_info_sccb *sccb) 99static void __init sclp_facilities_detect(struct read_info_sccb *sccb)
98{ 100{
101 struct sclp_cpu_entry *cpue;
102 u16 boot_cpu_address, cpu;
103
99 if (sclp_read_info_early(sccb)) 104 if (sclp_read_info_early(sccb))
100 return; 105 return;
101 106
@@ -116,6 +121,15 @@ static void __init sclp_facilities_detect(struct read_info_sccb *sccb)
116 sclp_max_cpu = sccb->hcpua + 1; 121 sclp_max_cpu = sccb->hcpua + 1;
117 } 122 }
118 123
124 boot_cpu_address = stap();
125 cpue = (void *)sccb + sccb->cpuoff;
126 for (cpu = 0; cpu < sccb->ncpurl; cpue++, cpu++) {
127 if (boot_cpu_address != cpue->address)
128 continue;
129 sclp_siif = cpue->siif;
130 break;
131 }
132
119 /* Save IPL information */ 133 /* Save IPL information */
120 sclp_ipl_info.is_valid = 1; 134 sclp_ipl_info.is_valid = 1;
121 if (sccb->flags & 0x2) 135 if (sccb->flags & 0x2)
@@ -148,6 +162,12 @@ unsigned int sclp_get_max_cpu(void)
148 return sclp_max_cpu; 162 return sclp_max_cpu;
149} 163}
150 164
165int sclp_has_siif(void)
166{
167 return sclp_siif;
168}
169EXPORT_SYMBOL(sclp_has_siif);
170
151/* 171/*
152 * This function will be called after sclp_facilities_detect(), which gets 172 * This function will be called after sclp_facilities_detect(), which gets
153 * called from early.c code. The sclp_facilities_detect() function retrieves 173 * called from early.c code. The sclp_facilities_detect() function retrieves