Lines Matching full:sccb

44 int sclp_sync_request(sclp_cmdw_t cmd, void *sccb)  in sclp_sync_request()  argument
46 return sclp_sync_request_timeout(cmd, sccb, 0); in sclp_sync_request()
49 int sclp_sync_request_timeout(sclp_cmdw_t cmd, void *sccb, int timeout) in sclp_sync_request_timeout() argument
61 request->sccb = sccb; in sclp_sync_request_timeout()
95 struct read_cpu_info_sccb *sccb; in _sclp_get_core_info() local
100 sccb = (void *)__get_free_pages(GFP_KERNEL | GFP_DMA | __GFP_ZERO, get_order(length)); in _sclp_get_core_info()
101 if (!sccb) in _sclp_get_core_info()
103 sccb->header.length = length; in _sclp_get_core_info()
104 sccb->header.control_mask[2] = 0x80; in _sclp_get_core_info()
105 rc = sclp_sync_request_timeout(SCLP_CMDW_READ_CPU_INFO, sccb, in _sclp_get_core_info()
109 if (sccb->header.response_code != 0x0010) { in _sclp_get_core_info()
111 sccb->header.response_code); in _sclp_get_core_info()
115 sclp_fill_core_info(info, sccb); in _sclp_get_core_info()
117 free_pages((unsigned long) sccb, get_order(length)); in _sclp_get_core_info()
127 struct cpu_configure_sccb *sccb; in do_core_configure() local
136 sccb = kzalloc(sizeof(*sccb), GFP_KERNEL | GFP_DMA); in do_core_configure()
137 if (!sccb) in do_core_configure()
139 sccb->header.length = sizeof(*sccb); in do_core_configure()
140 rc = sclp_sync_request_timeout(cmd, sccb, SCLP_QUEUE_INTERVAL); in do_core_configure()
143 switch (sccb->header.response_code) { in do_core_configure()
149 cmd, sccb->header.response_code); in do_core_configure()
154 kfree(sccb); in do_core_configure()
200 struct assign_storage_sccb *sccb; in do_assign_storage() local
203 sccb = (void *) get_zeroed_page(GFP_KERNEL | GFP_DMA); in do_assign_storage()
204 if (!sccb) in do_assign_storage()
206 sccb->header.length = PAGE_SIZE; in do_assign_storage()
207 sccb->rn = rn; in do_assign_storage()
208 rc = sclp_sync_request_timeout(cmd, sccb, SCLP_QUEUE_INTERVAL); in do_assign_storage()
211 switch (sccb->header.response_code) { in do_assign_storage()
217 cmd, sccb->header.response_code, rn); in do_assign_storage()
222 free_page((unsigned long) sccb); in do_assign_storage()
254 struct attach_storage_sccb *sccb; in sclp_attach_storage() local
258 sccb = (void *) get_zeroed_page(GFP_KERNEL | GFP_DMA); in sclp_attach_storage()
259 if (!sccb) in sclp_attach_storage()
261 sccb->header.length = PAGE_SIZE; in sclp_attach_storage()
262 sccb->header.function_code = 0x40; in sclp_attach_storage()
263 rc = sclp_sync_request_timeout(0x00080001 | id << 8, sccb, in sclp_attach_storage()
267 switch (sccb->header.response_code) { in sclp_attach_storage()
270 for (i = 0; i < sccb->assigned; i++) { in sclp_attach_storage()
271 if (sccb->entries[i]) in sclp_attach_storage()
272 sclp_unassign_storage(sccb->entries[i] >> 16); in sclp_attach_storage()
280 free_page((unsigned long) sccb); in sclp_attach_storage()
480 struct read_storage_sccb *sccb; in sclp_detect_standby_memory() local
488 sccb = (void *) __get_free_page(GFP_KERNEL | GFP_DMA); in sclp_detect_standby_memory()
489 if (!sccb) in sclp_detect_standby_memory()
493 memset(sccb, 0, PAGE_SIZE); in sclp_detect_standby_memory()
494 sccb->header.length = PAGE_SIZE; in sclp_detect_standby_memory()
495 rc = sclp_sync_request(SCLP_CMDW_READ_STORAGE_INFO | id << 8, sccb); in sclp_detect_standby_memory()
498 switch (sccb->header.response_code) { in sclp_detect_standby_memory()
501 for (i = 0; i < sccb->assigned; i++) { in sclp_detect_standby_memory()
502 if (!sccb->entries[i]) in sclp_detect_standby_memory()
505 insert_increment(sccb->entries[i] >> 16, 0, 1); in sclp_detect_standby_memory()
511 for (i = 0; i < sccb->assigned; i++) { in sclp_detect_standby_memory()
512 if (!sccb->entries[i]) in sclp_detect_standby_memory()
515 insert_increment(sccb->entries[i] >> 16, 1, 1); in sclp_detect_standby_memory()
523 sclp_max_storage_id = sccb->max_id; in sclp_detect_standby_memory()
534 free_page((unsigned long) sccb); in sclp_detect_standby_memory()
558 struct chp_cfg_sccb *sccb; in do_chp_configure() local
563 /* Prepare sccb. */ in do_chp_configure()
564 sccb = (struct chp_cfg_sccb *) get_zeroed_page(GFP_KERNEL | GFP_DMA); in do_chp_configure()
565 if (!sccb) in do_chp_configure()
567 sccb->header.length = sizeof(*sccb); in do_chp_configure()
568 rc = sclp_sync_request(cmd, sccb); in do_chp_configure()
571 switch (sccb->header.response_code) { in do_chp_configure()
579 cmd, sccb->header.response_code); in do_chp_configure()
584 free_page((unsigned long) sccb); in do_chp_configure()
632 struct chp_info_sccb *sccb; in sclp_chp_read_info() local
637 /* Prepare sccb. */ in sclp_chp_read_info()
638 sccb = (struct chp_info_sccb *) get_zeroed_page(GFP_KERNEL | GFP_DMA); in sclp_chp_read_info()
639 if (!sccb) in sclp_chp_read_info()
641 sccb->header.length = sizeof(*sccb); in sclp_chp_read_info()
642 rc = sclp_sync_request(SCLP_CMDW_READ_CHPATH_INFORMATION, sccb); in sclp_chp_read_info()
645 if (sccb->header.response_code != 0x0010) { in sclp_chp_read_info()
647 sccb->header.response_code); in sclp_chp_read_info()
651 memcpy(info->recognized, sccb->recognized, SCLP_CHP_INFO_MASK_SIZE); in sclp_chp_read_info()
652 memcpy(info->standby, sccb->standby, SCLP_CHP_INFO_MASK_SIZE); in sclp_chp_read_info()
653 memcpy(info->configured, sccb->configured, SCLP_CHP_INFO_MASK_SIZE); in sclp_chp_read_info()
655 free_page((unsigned long) sccb); in sclp_chp_read_info()