Lines Matching defs:lpcb

70  * Call Logical Processor with c=0, the give constant lps and an lpcb request.
481 static int clp_base_slpc(struct clp_req *req, struct clp_req_rsp_slpc *lpcb)
483 unsigned long limit = PAGE_SIZE - sizeof(lpcb->request);
485 if (lpcb->request.hdr.len != sizeof(lpcb->request) ||
486 lpcb->response.hdr.len > limit)
488 return clp_req(lpcb, CLP_LPS_BASE) ? -EOPNOTSUPP : 0;
491 static int clp_base_command(struct clp_req *req, struct clp_req_hdr *lpcb)
493 switch (lpcb->cmd) {
495 return clp_base_slpc(req, (void *) lpcb);
501 static int clp_pci_slpc(struct clp_req *req, struct clp_req_rsp_slpc_pci *lpcb)
503 unsigned long limit = PAGE_SIZE - sizeof(lpcb->request);
505 if (lpcb->request.hdr.len != sizeof(lpcb->request) ||
506 lpcb->response.hdr.len > limit)
508 return clp_req(lpcb, CLP_LPS_PCI) ? -EOPNOTSUPP : 0;
511 static int clp_pci_list(struct clp_req *req, struct clp_req_rsp_list_pci *lpcb)
513 unsigned long limit = PAGE_SIZE - sizeof(lpcb->request);
515 if (lpcb->request.hdr.len != sizeof(lpcb->request) ||
516 lpcb->response.hdr.len > limit)
518 if (lpcb->request.reserved2 != 0)
520 return clp_req(lpcb, CLP_LPS_PCI) ? -EOPNOTSUPP : 0;
524 struct clp_req_rsp_query_pci *lpcb)
526 unsigned long limit = PAGE_SIZE - sizeof(lpcb->request);
528 if (lpcb->request.hdr.len != sizeof(lpcb->request) ||
529 lpcb->response.hdr.len > limit)
531 if (lpcb->request.reserved2 != 0 || lpcb->request.reserved3 != 0)
533 return clp_req(lpcb, CLP_LPS_PCI) ? -EOPNOTSUPP : 0;
537 struct clp_req_rsp_query_pci_grp *lpcb)
539 unsigned long limit = PAGE_SIZE - sizeof(lpcb->request);
541 if (lpcb->request.hdr.len != sizeof(lpcb->request) ||
542 lpcb->response.hdr.len > limit)
544 if (lpcb->request.reserved2 != 0 || lpcb->request.reserved3 != 0 ||
545 lpcb->request.reserved4 != 0)
547 return clp_req(lpcb, CLP_LPS_PCI) ? -EOPNOTSUPP : 0;
550 static int clp_pci_command(struct clp_req *req, struct clp_req_hdr *lpcb)
552 switch (lpcb->cmd) {
554 return clp_pci_slpc(req, (void *) lpcb);
556 return clp_pci_list(req, (void *) lpcb);
558 return clp_pci_query(req, (void *) lpcb);
560 return clp_pci_query_grp(req, (void *) lpcb);
568 struct clp_req_hdr *lpcb;
577 lpcb = clp_alloc_block(GFP_KERNEL);
578 if (!lpcb)
583 if (copy_from_user(lpcb, uptr, PAGE_SIZE) != 0)
587 if (lpcb->fmt != 0 || lpcb->reserved1 != 0 || lpcb->reserved2 != 0)
592 rc = clp_base_command(req, lpcb);
595 rc = clp_pci_command(req, lpcb);
602 if (copy_to_user(uptr, lpcb, PAGE_SIZE) != 0)
608 clp_free_block(lpcb);