Lines Matching refs:sccb
57 static int __init sclp_cmd_sync_early(sclp_cmdw_t cmd, void *sccb) in sclp_cmd_sync_early() argument
62 rc = sclp_service_call(cmd, sccb); in sclp_cmd_sync_early()
79 struct read_info_sccb *sccb; in sclp_read_info_early() local
83 sccb = &early_read_info_sccb; in sclp_read_info_early()
86 memset(sccb, 0, sizeof(*sccb)); in sclp_read_info_early()
87 sccb->header.length = sizeof(*sccb); in sclp_read_info_early()
88 sccb->header.function_code = 0x80; in sclp_read_info_early()
89 sccb->header.control_mask[2] = 0x80; in sclp_read_info_early()
90 rc = sclp_cmd_sync_early(commands[i], sccb); in sclp_read_info_early()
95 if (sccb->header.response_code == 0x10) { in sclp_read_info_early()
99 if (sccb->header.response_code != 0x1f0) in sclp_read_info_early()
106 struct read_info_sccb *sccb; in sclp_facilities_detect() local
112 sccb = &early_read_info_sccb; in sclp_facilities_detect()
113 sclp_facilities = sccb->facilities; in sclp_facilities_detect()
114 sclp_fac84 = sccb->fac84; in sclp_facilities_detect()
115 rnmax = sccb->rnmax ? sccb->rnmax : sccb->rnmax2; in sclp_facilities_detect()
116 rzm = sccb->rnsize ? sccb->rnsize : sccb->rnsize2; in sclp_facilities_detect()
136 struct read_info_sccb *sccb; in sclp_get_ipl_info() local
140 sccb = &early_read_info_sccb; in sclp_get_ipl_info()
142 if (sccb->flags & 0x2) in sclp_get_ipl_info()
144 memcpy(&info->loadparm, &sccb->loadparm, LOADPARM_LEN); in sclp_get_ipl_info()
154 static int do_sync_request(sclp_cmdw_t cmd, void *sccb) in do_sync_request() argument
164 request->sccb = sccb; in do_sync_request()
205 struct read_cpu_info_sccb *sccb) in sclp_fill_cpu_info() argument
207 char *page = (char *) sccb; in sclp_fill_cpu_info()
210 info->configured = sccb->nr_configured; in sclp_fill_cpu_info()
211 info->standby = sccb->nr_standby; in sclp_fill_cpu_info()
212 info->combined = sccb->nr_configured + sccb->nr_standby; in sclp_fill_cpu_info()
214 memcpy(&info->cpu, page + sccb->offset_configured, in sclp_fill_cpu_info()
221 struct read_cpu_info_sccb *sccb; in sclp_get_cpu_info() local
225 sccb = (void *) get_zeroed_page(GFP_KERNEL | GFP_DMA); in sclp_get_cpu_info()
226 if (!sccb) in sclp_get_cpu_info()
228 sccb->header.length = sizeof(*sccb); in sclp_get_cpu_info()
229 rc = do_sync_request(SCLP_CMDW_READ_CPU_INFO, sccb); in sclp_get_cpu_info()
232 if (sccb->header.response_code != 0x0010) { in sclp_get_cpu_info()
234 sccb->header.response_code); in sclp_get_cpu_info()
238 sclp_fill_cpu_info(info, sccb); in sclp_get_cpu_info()
240 free_page((unsigned long) sccb); in sclp_get_cpu_info()
250 struct cpu_configure_sccb *sccb; in do_cpu_configure() local
259 sccb = kzalloc(sizeof(*sccb), GFP_KERNEL | GFP_DMA); in do_cpu_configure()
260 if (!sccb) in do_cpu_configure()
262 sccb->header.length = sizeof(*sccb); in do_cpu_configure()
263 rc = do_sync_request(cmd, sccb); in do_cpu_configure()
266 switch (sccb->header.response_code) { in do_cpu_configure()
273 sccb->header.response_code); in do_cpu_configure()
278 kfree(sccb); in do_cpu_configure()
326 struct assign_storage_sccb *sccb; in do_assign_storage() local
329 sccb = (void *) get_zeroed_page(GFP_KERNEL | GFP_DMA); in do_assign_storage()
330 if (!sccb) in do_assign_storage()
332 sccb->header.length = PAGE_SIZE; in do_assign_storage()
333 sccb->rn = rn; in do_assign_storage()
334 rc = do_sync_request(cmd, sccb); in do_assign_storage()
337 switch (sccb->header.response_code) { in do_assign_storage()
344 sccb->header.response_code, rn); in do_assign_storage()
349 free_page((unsigned long) sccb); in do_assign_storage()
373 struct attach_storage_sccb *sccb; in sclp_attach_storage() local
377 sccb = (void *) get_zeroed_page(GFP_KERNEL | GFP_DMA); in sclp_attach_storage()
378 if (!sccb) in sclp_attach_storage()
380 sccb->header.length = PAGE_SIZE; in sclp_attach_storage()
381 rc = do_sync_request(0x00080001 | id << 8, sccb); in sclp_attach_storage()
384 switch (sccb->header.response_code) { in sclp_attach_storage()
387 for (i = 0; i < sccb->assigned; i++) { in sclp_attach_storage()
388 if (sccb->entries[i]) in sclp_attach_storage()
389 sclp_unassign_storage(sccb->entries[i] >> 16); in sclp_attach_storage()
397 free_page((unsigned long) sccb); in sclp_attach_storage()
577 struct read_storage_sccb *sccb; in sclp_detect_standby_memory() local
585 sccb = (void *) __get_free_page(GFP_KERNEL | GFP_DMA); in sclp_detect_standby_memory()
586 if (!sccb) in sclp_detect_standby_memory()
590 memset(sccb, 0, PAGE_SIZE); in sclp_detect_standby_memory()
591 sccb->header.length = PAGE_SIZE; in sclp_detect_standby_memory()
592 rc = do_sync_request(0x00040001 | id << 8, sccb); in sclp_detect_standby_memory()
595 switch (sccb->header.response_code) { in sclp_detect_standby_memory()
598 for (i = 0; i < sccb->assigned; i++) { in sclp_detect_standby_memory()
599 if (!sccb->entries[i]) in sclp_detect_standby_memory()
602 insert_increment(sccb->entries[i] >> 16, 0, 1); in sclp_detect_standby_memory()
608 for (i = 0; i < sccb->assigned; i++) { in sclp_detect_standby_memory()
609 if (!sccb->entries[i]) in sclp_detect_standby_memory()
612 insert_increment(sccb->entries[i] >> 16, 1, 1); in sclp_detect_standby_memory()
620 sclp_max_storage_id = sccb->max_id; in sclp_detect_standby_memory()
641 free_page((unsigned long) sccb); in sclp_detect_standby_memory()
665 struct chp_cfg_sccb *sccb; in do_chp_configure() local
671 sccb = (struct chp_cfg_sccb *) get_zeroed_page(GFP_KERNEL | GFP_DMA); in do_chp_configure()
672 if (!sccb) in do_chp_configure()
674 sccb->header.length = sizeof(*sccb); in do_chp_configure()
675 rc = do_sync_request(cmd, sccb); in do_chp_configure()
678 switch (sccb->header.response_code) { in do_chp_configure()
687 sccb->header.response_code); in do_chp_configure()
692 free_page((unsigned long) sccb); in do_chp_configure()
740 struct chp_info_sccb *sccb; in sclp_chp_read_info() local
746 sccb = (struct chp_info_sccb *) get_zeroed_page(GFP_KERNEL | GFP_DMA); in sclp_chp_read_info()
747 if (!sccb) in sclp_chp_read_info()
749 sccb->header.length = sizeof(*sccb); in sclp_chp_read_info()
750 rc = do_sync_request(SCLP_CMDW_READ_CHPATH_INFORMATION, sccb); in sclp_chp_read_info()
753 if (sccb->header.response_code != 0x0010) { in sclp_chp_read_info()
755 "(response=0x%04x)\n", sccb->header.response_code); in sclp_chp_read_info()
759 memcpy(info->recognized, sccb->recognized, SCLP_CHP_INFO_MASK_SIZE); in sclp_chp_read_info()
760 memcpy(info->standby, sccb->standby, SCLP_CHP_INFO_MASK_SIZE); in sclp_chp_read_info()
761 memcpy(info->configured, sccb->configured, SCLP_CHP_INFO_MASK_SIZE); in sclp_chp_read_info()
763 free_page((unsigned long) sccb); in sclp_chp_read_info()