Lines Matching full:sccb
39 int sclp_sync_request(sclp_cmdw_t cmd, void *sccb) in sclp_sync_request() argument
41 return sclp_sync_request_timeout(cmd, sccb, 0); in sclp_sync_request()
44 int sclp_sync_request_timeout(sclp_cmdw_t cmd, void *sccb, int timeout) in sclp_sync_request_timeout() argument
56 request->sccb = sccb; in sclp_sync_request_timeout()
90 struct read_cpu_info_sccb *sccb; in _sclp_get_core_info() local
95 sccb = (void *)__get_free_pages(GFP_KERNEL | GFP_DMA | __GFP_ZERO, get_order(length)); in _sclp_get_core_info()
96 if (!sccb) in _sclp_get_core_info()
98 sccb->header.length = length; in _sclp_get_core_info()
99 sccb->header.control_mask[2] = 0x80; in _sclp_get_core_info()
100 rc = sclp_sync_request_timeout(SCLP_CMDW_READ_CPU_INFO, sccb, in _sclp_get_core_info()
104 if (sccb->header.response_code != 0x0010) { in _sclp_get_core_info()
106 sccb->header.response_code); in _sclp_get_core_info()
110 sclp_fill_core_info(info, sccb); in _sclp_get_core_info()
112 free_pages((unsigned long) sccb, get_order(length)); in _sclp_get_core_info()
122 struct cpu_configure_sccb *sccb; in do_core_configure() local
131 sccb = kzalloc(sizeof(*sccb), GFP_KERNEL | GFP_DMA); in do_core_configure()
132 if (!sccb) in do_core_configure()
134 sccb->header.length = sizeof(*sccb); in do_core_configure()
135 rc = sclp_sync_request_timeout(cmd, sccb, SCLP_QUEUE_INTERVAL); in do_core_configure()
138 switch (sccb->header.response_code) { in do_core_configure()
144 cmd, sccb->header.response_code); in do_core_configure()
149 kfree(sccb); in do_core_configure()
195 struct assign_storage_sccb *sccb; in do_assign_storage() local
198 sccb = (void *) get_zeroed_page(GFP_KERNEL | GFP_DMA); in do_assign_storage()
199 if (!sccb) in do_assign_storage()
201 sccb->header.length = PAGE_SIZE; in do_assign_storage()
202 sccb->rn = rn; in do_assign_storage()
203 rc = sclp_sync_request_timeout(cmd, sccb, SCLP_QUEUE_INTERVAL); in do_assign_storage()
206 switch (sccb->header.response_code) { in do_assign_storage()
212 cmd, sccb->header.response_code, rn); in do_assign_storage()
217 free_page((unsigned long) sccb); in do_assign_storage()
249 struct attach_storage_sccb *sccb; in sclp_attach_storage() local
253 sccb = (void *) get_zeroed_page(GFP_KERNEL | GFP_DMA); in sclp_attach_storage()
254 if (!sccb) in sclp_attach_storage()
256 sccb->header.length = PAGE_SIZE; in sclp_attach_storage()
257 sccb->header.function_code = 0x40; in sclp_attach_storage()
258 rc = sclp_sync_request_timeout(0x00080001 | id << 8, sccb, in sclp_attach_storage()
262 switch (sccb->header.response_code) { in sclp_attach_storage()
265 for (i = 0; i < sccb->assigned; i++) { in sclp_attach_storage()
266 if (sccb->entries[i]) in sclp_attach_storage()
267 sclp_unassign_storage(sccb->entries[i] >> 16); in sclp_attach_storage()
275 free_page((unsigned long) sccb); in sclp_attach_storage()
452 struct read_storage_sccb *sccb; in sclp_detect_standby_memory() local
460 sccb = (void *) __get_free_page(GFP_KERNEL | GFP_DMA); in sclp_detect_standby_memory()
461 if (!sccb) in sclp_detect_standby_memory()
465 memset(sccb, 0, PAGE_SIZE); in sclp_detect_standby_memory()
466 sccb->header.length = PAGE_SIZE; in sclp_detect_standby_memory()
467 rc = sclp_sync_request(SCLP_CMDW_READ_STORAGE_INFO | id << 8, sccb); in sclp_detect_standby_memory()
470 switch (sccb->header.response_code) { in sclp_detect_standby_memory()
473 for (i = 0; i < sccb->assigned; i++) { in sclp_detect_standby_memory()
474 if (!sccb->entries[i]) in sclp_detect_standby_memory()
477 insert_increment(sccb->entries[i] >> 16, 0, 1); in sclp_detect_standby_memory()
483 for (i = 0; i < sccb->assigned; i++) { in sclp_detect_standby_memory()
484 if (!sccb->entries[i]) in sclp_detect_standby_memory()
487 insert_increment(sccb->entries[i] >> 16, 1, 1); in sclp_detect_standby_memory()
495 sclp_max_storage_id = sccb->max_id; in sclp_detect_standby_memory()
506 free_page((unsigned long) sccb); in sclp_detect_standby_memory()
530 struct chp_cfg_sccb *sccb; in do_chp_configure() local
535 /* Prepare sccb. */ in do_chp_configure()
536 sccb = (struct chp_cfg_sccb *) get_zeroed_page(GFP_KERNEL | GFP_DMA); in do_chp_configure()
537 if (!sccb) in do_chp_configure()
539 sccb->header.length = sizeof(*sccb); in do_chp_configure()
540 rc = sclp_sync_request(cmd, sccb); in do_chp_configure()
543 switch (sccb->header.response_code) { in do_chp_configure()
551 cmd, sccb->header.response_code); in do_chp_configure()
556 free_page((unsigned long) sccb); in do_chp_configure()
604 struct chp_info_sccb *sccb; in sclp_chp_read_info() local
609 /* Prepare sccb. */ in sclp_chp_read_info()
610 sccb = (struct chp_info_sccb *) get_zeroed_page(GFP_KERNEL | GFP_DMA); in sclp_chp_read_info()
611 if (!sccb) in sclp_chp_read_info()
613 sccb->header.length = sizeof(*sccb); in sclp_chp_read_info()
614 rc = sclp_sync_request(SCLP_CMDW_READ_CHPATH_INFORMATION, sccb); in sclp_chp_read_info()
617 if (sccb->header.response_code != 0x0010) { in sclp_chp_read_info()
619 sccb->header.response_code); in sclp_chp_read_info()
623 memcpy(info->recognized, sccb->recognized, SCLP_CHP_INFO_MASK_SIZE); in sclp_chp_read_info()
624 memcpy(info->standby, sccb->standby, SCLP_CHP_INFO_MASK_SIZE); in sclp_chp_read_info()
625 memcpy(info->configured, sccb->configured, SCLP_CHP_INFO_MASK_SIZE); in sclp_chp_read_info()
627 free_page((unsigned long) sccb); in sclp_chp_read_info()