Lines Matching refs: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()
97 struct read_cpu_info_sccb *sccb) in sclp_fill_core_info() argument
99 char *page = (char *) sccb; in sclp_fill_core_info()
102 info->configured = sccb->nr_configured; in sclp_fill_core_info()
103 info->standby = sccb->nr_standby; in sclp_fill_core_info()
104 info->combined = sccb->nr_configured + sccb->nr_standby; in sclp_fill_core_info()
105 memcpy(&info->core, page + sccb->offset_configured, in sclp_fill_core_info()
112 struct read_cpu_info_sccb *sccb; in sclp_get_core_info() local
116 sccb = (void *) get_zeroed_page(GFP_KERNEL | GFP_DMA); in sclp_get_core_info()
117 if (!sccb) in sclp_get_core_info()
119 sccb->header.length = sizeof(*sccb); in sclp_get_core_info()
120 rc = sclp_sync_request_timeout(SCLP_CMDW_READ_CPU_INFO, sccb, in sclp_get_core_info()
124 if (sccb->header.response_code != 0x0010) { in sclp_get_core_info()
126 sccb->header.response_code); in sclp_get_core_info()
130 sclp_fill_core_info(info, sccb); in sclp_get_core_info()
132 free_page((unsigned long) sccb); in sclp_get_core_info()
142 struct cpu_configure_sccb *sccb; in do_core_configure() local
151 sccb = kzalloc(sizeof(*sccb), GFP_KERNEL | GFP_DMA); in do_core_configure()
152 if (!sccb) in do_core_configure()
154 sccb->header.length = sizeof(*sccb); in do_core_configure()
155 rc = sclp_sync_request_timeout(cmd, sccb, SCLP_QUEUE_INTERVAL); in do_core_configure()
158 switch (sccb->header.response_code) { in do_core_configure()
165 sccb->header.response_code); in do_core_configure()
170 kfree(sccb); in do_core_configure()
217 struct assign_storage_sccb *sccb; in do_assign_storage() local
220 sccb = (void *) get_zeroed_page(GFP_KERNEL | GFP_DMA); in do_assign_storage()
221 if (!sccb) in do_assign_storage()
223 sccb->header.length = PAGE_SIZE; in do_assign_storage()
224 sccb->rn = rn; in do_assign_storage()
225 rc = sclp_sync_request_timeout(cmd, sccb, SCLP_QUEUE_INTERVAL); in do_assign_storage()
228 switch (sccb->header.response_code) { in do_assign_storage()
235 sccb->header.response_code, rn); in do_assign_storage()
240 free_page((unsigned long) sccb); in do_assign_storage()
272 struct attach_storage_sccb *sccb; in sclp_attach_storage() local
276 sccb = (void *) get_zeroed_page(GFP_KERNEL | GFP_DMA); in sclp_attach_storage()
277 if (!sccb) in sclp_attach_storage()
279 sccb->header.length = PAGE_SIZE; in sclp_attach_storage()
280 rc = sclp_sync_request_timeout(0x00080001 | id << 8, sccb, in sclp_attach_storage()
284 switch (sccb->header.response_code) { in sclp_attach_storage()
287 for (i = 0; i < sccb->assigned; i++) { in sclp_attach_storage()
288 if (sccb->entries[i]) in sclp_attach_storage()
289 sclp_unassign_storage(sccb->entries[i] >> 16); in sclp_attach_storage()
297 free_page((unsigned long) sccb); in sclp_attach_storage()
509 struct read_storage_sccb *sccb; in sclp_detect_standby_memory() local
517 sccb = (void *) __get_free_page(GFP_KERNEL | GFP_DMA); in sclp_detect_standby_memory()
518 if (!sccb) in sclp_detect_standby_memory()
522 memset(sccb, 0, PAGE_SIZE); in sclp_detect_standby_memory()
523 sccb->header.length = PAGE_SIZE; in sclp_detect_standby_memory()
524 rc = sclp_sync_request(0x00040001 | id << 8, sccb); in sclp_detect_standby_memory()
527 switch (sccb->header.response_code) { in sclp_detect_standby_memory()
530 for (i = 0; i < sccb->assigned; i++) { in sclp_detect_standby_memory()
531 if (!sccb->entries[i]) in sclp_detect_standby_memory()
534 insert_increment(sccb->entries[i] >> 16, 0, 1); in sclp_detect_standby_memory()
540 for (i = 0; i < sccb->assigned; i++) { in sclp_detect_standby_memory()
541 if (!sccb->entries[i]) in sclp_detect_standby_memory()
544 insert_increment(sccb->entries[i] >> 16, 1, 1); in sclp_detect_standby_memory()
552 sclp_max_storage_id = sccb->max_id; in sclp_detect_standby_memory()
573 free_page((unsigned long) sccb); in sclp_detect_standby_memory()
598 struct pci_cfg_sccb *sccb; in do_pci_configure() local
604 sccb = (struct pci_cfg_sccb *) get_zeroed_page(GFP_KERNEL | GFP_DMA); in do_pci_configure()
605 if (!sccb) in do_pci_configure()
608 sccb->header.length = PAGE_SIZE; in do_pci_configure()
609 sccb->atype = SCLP_RECONFIG_PCI_ATPYE; in do_pci_configure()
610 sccb->aid = fid; in do_pci_configure()
611 rc = sclp_sync_request(cmd, sccb); in do_pci_configure()
614 switch (sccb->header.response_code) { in do_pci_configure()
620 cmd, sccb->header.response_code); in do_pci_configure()
625 free_page((unsigned long) sccb); in do_pci_configure()
658 struct chp_cfg_sccb *sccb; in do_chp_configure() local
664 sccb = (struct chp_cfg_sccb *) get_zeroed_page(GFP_KERNEL | GFP_DMA); in do_chp_configure()
665 if (!sccb) in do_chp_configure()
667 sccb->header.length = sizeof(*sccb); in do_chp_configure()
668 rc = sclp_sync_request(cmd, sccb); in do_chp_configure()
671 switch (sccb->header.response_code) { in do_chp_configure()
680 sccb->header.response_code); in do_chp_configure()
685 free_page((unsigned long) sccb); in do_chp_configure()
733 struct chp_info_sccb *sccb; in sclp_chp_read_info() local
739 sccb = (struct chp_info_sccb *) get_zeroed_page(GFP_KERNEL | GFP_DMA); in sclp_chp_read_info()
740 if (!sccb) in sclp_chp_read_info()
742 sccb->header.length = sizeof(*sccb); in sclp_chp_read_info()
743 rc = sclp_sync_request(SCLP_CMDW_READ_CHPATH_INFORMATION, sccb); in sclp_chp_read_info()
746 if (sccb->header.response_code != 0x0010) { in sclp_chp_read_info()
748 "(response=0x%04x)\n", sccb->header.response_code); in sclp_chp_read_info()
752 memcpy(info->recognized, sccb->recognized, SCLP_CHP_INFO_MASK_SIZE); in sclp_chp_read_info()
753 memcpy(info->standby, sccb->standby, SCLP_CHP_INFO_MASK_SIZE); in sclp_chp_read_info()
754 memcpy(info->configured, sccb->configured, SCLP_CHP_INFO_MASK_SIZE); in sclp_chp_read_info()
756 free_page((unsigned long) sccb); in sclp_chp_read_info()